Skip to content
Snippets Groups Projects
Unverified Commit a73e2edc authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

profile: use effective visibility from journey object

parent 4f54597c
No related branches found
No related tags found
No related merge requests found
......@@ -213,9 +213,8 @@ sub profile {
follow_reqs_me =>
( $inverse_relation and $inverse_relation eq 'requests_follow' ) ? 1
: 0,
journey => $status,
journey_visibility => $visibility,
journeys => [@journeys],
journey => $status,
journeys => [@journeys],
);
}
......@@ -363,14 +362,13 @@ sub journey_details {
}
$self->render(
'journey',
error => undef,
journey => $journey,
with_map => 1,
username => $name,
readonly => 1,
twitter => \%tw_data,
opengraph => \%og_data,
journey_visibility => $visibility,
error => undef,
journey => $journey,
with_map => 1,
username => $name,
readonly => 1,
twitter => \%tw_data,
opengraph => \%og_data,
%{$map_data},
);
}
......@@ -542,14 +540,13 @@ sub user_status {
},
},
any => {
template => 'user_status',
name => $name,
privacy => $user,
journey => $status,
journey_visibility => $visibility,
twitter => \%tw_data,
opengraph => \%og_data,
version => $self->app->config->{version} // 'UNKNOWN',
template => 'user_status',
name => $name,
privacy => $user,
journey => $status,
twitter => \%tw_data,
opengraph => \%og_data,
version => $self->app->config->{version} // 'UNKNOWN',
},
);
}
......@@ -626,11 +623,10 @@ sub status_card {
$self->render(
'_public_status_card',
name => $name,
privacy => $user,
journey => $status,
journey_visibility => $visibility,
from_profile => $self->param('profile') ? 1 : 0,
name => $name,
privacy => $user,
journey => $status,
from_profile => $self->param('profile') ? 1 : 0,
);
}
......
......@@ -10,9 +10,7 @@
% else {
<a href="/p/<%= $name %>"><%= $name %></a> ist unterwegs
% }
% if ($journey_visibility) {
<i class="material-icons right"><%= visibility_icon($journey_visibility) %></i>
% }
<i class="material-icons right"><%= visibility_icon($journey->{effective_visibility_str}) %></i>
</span>
% if ($privacy->{comments_visible} and $journey->{comment}) {
<p>„<%= $journey->{comment} %>“</p>
......
......@@ -79,7 +79,7 @@
</div>
<div class="row">
<div class="col s12 publicstatuscol" data-user="<%= $name %>" data-profile="1">
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, journey_visibility => $journey_visibility, from_profile => 1
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, from_profile => 1
</div>
</div>
% if ($journeys and @{$journeys}) {
......
<div class="row">
<div class="col s12 publicstatuscol" data-user="<%= $name %>">
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, journey_visibility => $journey_visibility
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment