Fix timelines
FossilOrigin-Name: db1f2c1597a362e40bc65c39daf079ee51091bba653e721a9ac4e918bad95d61
This commit is contained in:
parent
6ab40c0a66
commit
50b0404c51
4 changed files with 13 additions and 12 deletions
|
@ -7,6 +7,8 @@ use Exporter 'import';
|
|||
|
||||
our @EXPORT = qw( generate_postbox );
|
||||
|
||||
use icons 'get_icon';
|
||||
|
||||
sub generate_postbox
|
||||
{
|
||||
my ($ssn, $data, $status) = @_;
|
||||
|
@ -16,6 +18,7 @@ sub generate_postbox
|
|||
ssn => $ssn,
|
||||
data => $data,
|
||||
status => $status,
|
||||
icon => \&get_icon,
|
||||
mentionify => \&get_mentions_from_content,
|
||||
);
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ sub content_timeline
|
|||
statuses => $statuses,
|
||||
title => $title,
|
||||
show_post_box => $show_post_box,
|
||||
postbox => \&postbox,
|
||||
postbox => \&generate_postbox,
|
||||
create_status => \&generate_status,
|
||||
);
|
||||
|
||||
to_template(\&vars, \&data->{'timeline.tt'});
|
||||
to_template(\%vars, \$data->{'timeline.tt'});
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ void content_timeline(FCGX_Request* req,
|
|||
char* header_text,
|
||||
int show_post_box)
|
||||
{
|
||||
perl_lock();
|
||||
dSP;
|
||||
ENTER;
|
||||
SAVETMPS;
|
||||
|
@ -74,7 +73,6 @@ void content_timeline(FCGX_Request* req,
|
|||
PUTBACK;
|
||||
FREETMPS;
|
||||
LEAVE;
|
||||
perl_unlock();
|
||||
|
||||
struct base_page b = {
|
||||
.category = cat,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<!-- Local -->
|
||||
<label>
|
||||
<input type="radio" name="visibility" value="local" class="hidden"
|
||||
[%- IF status.visibility == 6 %] checked[% END %]>
|
||||
[%- IF status && status.visibility == 6 %] checked[% END %]>
|
||||
<div class="visibility-icon vis-local">
|
||||
[% icon('local') %]
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<!-- Direct -->
|
||||
<label>
|
||||
<input type="radio" name="visibility" value="direct" class="hidden"
|
||||
[%- IF status.visibility == 5 %] checked[% END %]>
|
||||
[%- IF status && status.visibility == 5 %] checked[% END %]>
|
||||
<div class="visibility-icon vis-direct">
|
||||
[% icon('direct') %]
|
||||
</div>
|
||||
|
@ -38,8 +38,8 @@
|
|||
<!-- Private -->
|
||||
<label>
|
||||
<input type="radio" name="visibility" value="private" class="hidden"
|
||||
[%- IF status.visibility == 3 %] checked[% END %]
|
||||
[%- IF status.visibility > 3 %] disabled[% END %]>
|
||||
[%- IF status && status.visibility == 3 %] checked[% END %]
|
||||
[%- IF status && status.visibility > 3 %] disabled[% END %]>
|
||||
<div class="visibility-icon vis-private">
|
||||
[% icon('private') %]
|
||||
</div>
|
||||
|
@ -47,8 +47,8 @@
|
|||
<!-- Unlisted -->
|
||||
<label>
|
||||
<input type="radio" name="visibility" value="unlisted" class="hidden"
|
||||
[%- IF status.visibility == 2 %] checked[% END %]
|
||||
[%- IF status.visibility > 2 %] disabled[% END %]>
|
||||
[%- IF status && status.visibility == 2 %] checked[% END %]
|
||||
[%- IF status && status.visibility > 2 %] disabled[% END %]>
|
||||
<div class="visibility-icon vis-unlisted">
|
||||
[% icon('unlisted') %]
|
||||
</div>
|
||||
|
@ -56,8 +56,8 @@
|
|||
<!-- Public -->
|
||||
<label>
|
||||
<input type="radio" name="visibility" value="public" class="hidden"
|
||||
[%- IF status.visibility == 1 %] checked[% END %]
|
||||
[%- IF status.visibility > 2 %] disabled[% END %]>
|
||||
[%- IF status && status.visibility == 1 %] checked[% END %]
|
||||
[%- IF status && status.visibility > 2 %] disabled[% END %]>
|
||||
<div class="visibility-icon vis-public">
|
||||
[% icon('public') %]
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue