Properly nested, zebra-striped categories list. (Almost. Best possible solution.)
This commit is contained in:
@ -139,7 +139,7 @@
|
|||||||
{if $view}
|
{if $view}
|
||||||
<h2>{$CONST.CATEGORY_INDEX}:</h2>
|
<h2>{$CONST.CATEGORY_INDEX}:</h2>
|
||||||
{if is_array($viewCats)}
|
{if is_array($viewCats)}
|
||||||
<ul id="categories" class="plainList zebra_list">
|
<ul id="categories">
|
||||||
{foreach $viewCategories as $category}
|
{foreach $viewCategories as $category}
|
||||||
{if ! $category@first}
|
{if ! $category@first}
|
||||||
{if $category.depth > $priorDepth}
|
{if $category.depth > $priorDepth}
|
||||||
@ -160,22 +160,24 @@
|
|||||||
|
|
||||||
{$priorDepth=$category.depth}
|
{$priorDepth=$category.depth}
|
||||||
|
|
||||||
<li class="clearfix">
|
<li>
|
||||||
<details class="category_data">
|
<div class="clearfix {cycle values="odd,even"}">
|
||||||
<summary class="category_name{if $category.category_icon} category_hasicon{/if}"><span class="icon-folder-open"></span> {$category.category_name|escape:"html"}</summary>
|
<details class="category_data">
|
||||||
|
<summary class="category_name{if $category.category_icon} category_hasicon{/if}"><span class="icon-folder-open"></span> {$category.category_name|escape:"html"}</summary>
|
||||||
|
|
||||||
<div class="category_info clearfix">
|
<div class="category_info clearfix">
|
||||||
{if $category.category_description != ''}
|
{if $category.category_description != ''}
|
||||||
<span class="category_desc">{$category.category_description|escape:"html"}</span>
|
<span class="category_desc">{$category.category_description|escape:"html"}</span>
|
||||||
{/if}
|
{/if}
|
||||||
(<span class="category_author">{if $category.authorid == 0}{$CONST.ALL_AUTHORS}{else}{$category.realname|escape:"html"}{/if}</span>)
|
(<span class="category_author">{if $category.authorid == 0}{$CONST.ALL_AUTHORS}{else}{$category.realname|escape:"html"}{/if}</span>)
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<ul class="plainList clearfix edit_actions">
|
<ul class="plainList clearfix edit_actions">
|
||||||
<li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=edit&serendipity[cid]={$category.categoryid}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
|
<li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=edit&serendipity[cid]={$category.categoryid}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
|
||||||
<li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=delete&serendipity[cid]={$category.categoryid}" title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
|
<li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=delete&serendipity[cid]={$category.categoryid}" title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</li>
|
</li>
|
||||||
{for $i=1 to $priorDepth}
|
{for $i=1 to $priorDepth}
|
||||||
@ -185,5 +187,5 @@
|
|||||||
{else}
|
{else}
|
||||||
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_CATEGORIES}</span>
|
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_CATEGORIES}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<a class="button_link icon_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=new">{$CONST.CREATE_NEW_CAT}</a>
|
<a class="button_link state_submit icon_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=new">{$CONST.CREATE_NEW_CAT}</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -464,6 +464,8 @@ form > a {
|
|||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#categories,
|
||||||
|
#categories ul,
|
||||||
#serendipity_admin_groups ul,
|
#serendipity_admin_groups ul,
|
||||||
.imageMessage ul {
|
.imageMessage ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -1187,11 +1189,15 @@ form > .button_link:first-of-type { margin-top: 0; }
|
|||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zebra_list { border-top: 1px solid #aaa; }
|
.zebra_list,
|
||||||
|
#categories .odd,
|
||||||
|
#categories .even { border-top: 1px solid #aaa; }
|
||||||
|
|
||||||
.zebra_list>li { border-bottom: 1px solid #aaa; }
|
.zebra_list>li,
|
||||||
|
#categories { border-bottom: 1px solid #aaa; }
|
||||||
|
|
||||||
.zebra_list>.odd { background: #eee; }
|
.zebra_list>.odd,
|
||||||
|
#categories .odd { background: #eee; }
|
||||||
|
|
||||||
#entries_list h3,
|
#entries_list h3,
|
||||||
#serendipity_comments_list h4 {
|
#serendipity_comments_list h4 {
|
||||||
@ -1200,10 +1206,11 @@ form > .button_link:first-of-type { margin-top: 0; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
#entries_list>li,
|
#entries_list>li,
|
||||||
#categories li,
|
|
||||||
#serendipity_image_folders li,
|
#serendipity_image_folders li,
|
||||||
#serendipity_comments_list>li { padding: 0 0 0 .4em; }
|
#serendipity_comments_list>li { padding: 0 0 0 .4em; }
|
||||||
|
|
||||||
|
#categories li > ul { padding: 0 0 0 1em; }
|
||||||
|
|
||||||
#categories .edit_actions li,
|
#categories .edit_actions li,
|
||||||
#serendipity_image_folders .edit_actions li { padding: 0; }
|
#serendipity_image_folders .edit_actions li { padding: 0; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user