Skip to content

Commit

Permalink
Friendly names for visibility flags
Browse files Browse the repository at this point in the history
  • Loading branch information
sayakb committed Aug 5, 2013
1 parent 373d85f commit 42a01ff
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
41 changes: 20 additions & 21 deletions list.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,26 +269,26 @@
}

$skin->assign(array(
'paste_count' => $rowcount,
'paste_pages' => ceil($total / 10),
'error_text' => $lang->get('no_pastes'),
'list_title' => $trending ? $lang->get('trending') : $lang->get('archives'),
'list_icon' => $trending ? 'trending' : 'archives',
'list_data' => $output_data,
'list_pagination' => $pagination,
'feed_time' => $published,
'filter_visibility' => $skin->visibility($trending),
'pages_visibility' => $skin->visibility($trending, true),
'trending_now' => $nav->get('nav_trending', $project),
'trending_week' => $nav->get('nav_trending', $project, $page, 'week'),
'trending_month' => $nav->get('nav_trending', $project, $page, 'month'),
'trending_year' => $nav->get('nav_trending', $project, $page, 'year'),
'trending_all' => $nav->get('nav_trending', $project, $page, 'all'),
'tr_active_now' => $skin->active(empty($age)),
'tr_active_week' => $skin->active($age == 'week'),
'tr_active_month' => $skin->active($age == 'month'),
'tr_active_year' => $skin->active($age == 'year'),
'tr_active_all' => $skin->active($age == 'all'),
'paste_count' => $rowcount,
'paste_pages' => ceil($total / 10),
'error_text' => $lang->get('no_pastes'),
'list_title' => $trending ? $lang->get('trending') : $lang->get('archives'),
'list_icon' => $trending ? 'trending' : 'archives',
'list_data' => $output_data,
'list_pagination' => $pagination,
'feed_time' => $published,
'trending_visibility' => $skin->visibility($trending),
'archives_visibility' => $skin->visibility($trending, true),
'trending_now' => $nav->get('nav_trending', $project),
'trending_week' => $nav->get('nav_trending', $project, $page, 'week'),
'trending_month' => $nav->get('nav_trending', $project, $page, 'month'),
'trending_year' => $nav->get('nav_trending', $project, $page, 'year'),
'trending_all' => $nav->get('nav_trending', $project, $page, 'all'),
'tr_active_now' => $skin->active(empty($age)),
'tr_active_week' => $skin->active($age == 'week'),
'tr_active_month' => $skin->active($age == 'month'),
'tr_active_year' => $skin->active($age == 'year'),
'tr_active_all' => $skin->active($age == 'all'),
));

// Output the page
Expand All @@ -305,4 +305,3 @@
}

?>

4 changes: 2 additions & 2 deletions skins/bootstrap/html/tpl_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>

<br class="[[data_visibility]]" />

<div class="whitebox [[filter_visibility]]">
<div class="whitebox [[trending_visibility]]">
<ul class="nav nav-pills nomargin">
<li class="nav-text">{{filter}}:</li>
<li class="[[tr_active_now]]"><a href="[[trending_now]]">{{right_now}}</a></li>
Expand All @@ -30,4 +30,4 @@ <h1>[[error_text]]</h1>

<div class="[[data_visibility]] pagination pagination_bottom">
[[list_pagination]]
</div>
</div>
4 changes: 2 additions & 2 deletions skins/neverland/html/tpl_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>

<div class="row-fluid">
<div class="span12">
<div class="whitebox [[filter_visibility]]">
<div class="whitebox [[trending_visibility]]">
<ul class="nav nav-pills trend-filter">
<li class="nav-text">{{filter}}:</li>
<li class="[[tr_active_now]]"><a href="[[trending_now]]">{{right_now}}</a></li>
Expand All @@ -33,7 +33,7 @@ <h1>[[error_text]]</h1>
</div>
</div>

<div class="row-fluid [[pages_visibility]]">
<div class="row-fluid [[archives_visibility]]">
<div class="span12 pages pages-bottom [[data_visibility]]">
[[list_pagination]]
</div>
Expand Down

0 comments on commit 42a01ff

Please sign in to comment.