Skip to content

Commit

Permalink
Merge pull request #41 from plegall/feature/40-compatibility-user-col…
Browse files Browse the repository at this point in the history
…lections

fixes #40, specific template for User Collections menu
  • Loading branch information
Philio authored Feb 7, 2017
2 parents 2f6c27a + 2734a0f commit b4f1c7e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
30 changes: 30 additions & 0 deletions template/menubar_user_collections.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{$block->get_title()|strip_tags:true} <span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-scrollable" role="menu">
<li>{strip}
<a href="{$block->data.U_LIST}">
{if $block->data.NB_COL == 0}
{'You have no collection'|translate}
{else}
{$pwg->l10n_dec('You have %d collection', 'You have %d collections', $block->data.NB_COL)}
{/if}
</a>
{/strip}</li>
<li class="divider"></li>
{if $block->data.collections}
{foreach from=$block->data.collections item=col}{strip}
<li>
<a href="{$col.u_edit}">
{$col.name}
&nbsp;<span class="badge" title="{$cat.TITLE}">{$col.nb_images}</span>
</a>
</li>
{/strip}{/foreach}
{if isset($block->data.MORE)}
<li class="divider"></li>
<li><a href="{$block->data.U_LIST}">{'%d more...'|translate:$block->data.MORE}</a></li>
{/if}
</ul>
{/if}
</ul>
</li>
10 changes: 10 additions & 0 deletions theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,13 @@ fieldset[disabled] .html-radios-inline label {
display: block;
}
}

#collectionsDropdown {
padding: 10px;
background-color: #fff;
}

.user-collections-icon {
width:16px;
height:16px;
}

0 comments on commit b4f1c7e

Please sign in to comment.