Ignore:
Timestamp:
Jan 12, 2013, 7:23:05 PM (11 years ago)
Author:
mistic100
Message:

add order and caddie buttons, columns header in CSV file, move some code to template

Location:
extensions/UserCollections/template/themes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/template/themes/default.tpl

    r20090 r20093  
    55<div class="titrePage">
    66        <ul class="categoryActions">
     7  {if !empty($image_orders)}
     8                <li>{strip}<a id="sortOrderLink" title="{'Sort order'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     9                        <span class="pwg-icon pwg-icon-sort">&nbsp;</span><span class="pwg-button-text">{'Sort order'|@translate}</span>
     10                </a>
     11                <div id="sortOrderBox" class="switchBox">
     12                        <div class="switchBoxTitle">{'Sort order'|@translate}</div>
     13                        {foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
     14                        {if $image_order.SELECTED}
     15                        <span>&#x2714; </span>{$image_order.DISPLAY}
     16                        {else}
     17                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_order.URL}" rel="nofollow">{$image_order.DISPLAY}</a>
     18                        {/if}
     19                        {/foreach}
     20                </div>
     21                {footer_script require='jquery'}{literal}
     22    jQuery("#sortOrderLink").click(function() {
     23      var elt = jQuery("#sortOrderBox");
     24      elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
     25        .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
     26        .toggle();
     27    });
     28    jQuery("#sortOrderBox").on("mouseleave", function() {
     29      jQuery(this).hide();
     30    });
     31                {/literal}{/footer_script}
     32                {/strip}</li>
     33  {/if}
    734  {if !empty($image_derivatives)}
    835                <li>{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     
    3259                {/strip}</li>
    3360  {/if}
     61  {if isset($U_CADDIE)}
     62                <li><a href="{$U_CADDIE}" title="{'Add to caddie'|@translate}" class="pwg-state-default pwg-button">
     63                        <span class="pwg-icon pwg-icon-caddie-add">&nbsp;</span><span class="pwg-button-text">{'Caddie'|@translate}</span>
     64                </a></li>
     65  {/if}
     66 
     67  {if $U_MAIL}
     68    <li><a href="#mail_form" title="{'Send this collection my mail'|@translate}" class="mail_colorbox_open pwg-state-default pwg-button" rel="nofollow"
     69        {if not $collection.PUBLIC}onClick="alert('{'The collection must be public in order to send it'|@translate|escape:javascript}');return false;"{/if}>
     70          <span class="pwg-icon user-collections-mail-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/mail.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Send'|@translate}</span>
     71    </a></li>
     72  {/if}
     73  {if $U_CLEAR}
     74    <li><a href="{$U_CLEAR}" title="{'Clear this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     75      <span class="pwg-icon user-collections-clear-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/bin.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Clear'|@translate}</span>
     76    </a></li>
     77  {/if}
     78  {if $U_DELETE}
     79    <li><a href="{$U_DELETE}" title="{'Delete this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     80      <span class="pwg-icon user-collections-delete-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/delete.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Delete'|@translate}</span>
     81    </a></li>
     82  {/if}
    3483
    3584  {if !empty($COLLECTION_ACTIONS)}
  • extensions/UserCollections/template/themes/simple.tpl

    r17519 r20093  
    33  <h2>{$TITLE}</h2>
    44 
     5  <ul class="categoryActions">
     6  {if $U_MAIL}
     7    <li><a href="#mail_form" title="{'Send this collection my mail'|@translate}" class="mail_colorbox_open pwg-state-default pwg-button" rel="nofollow"
     8        {if not $collection.PUBLIC}onClick="alert('{'The collection must be public in order to send it'|@translate|escape:javascript}');return false;"{/if}>
     9          <span class="pwg-icon user-collections-mail-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/mail.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Send'|@translate}</span>
     10    </a></li>
     11  {/if}
     12  {if $U_CLEAR}
     13    <li><a href="{$U_CLEAR}" title="{'Clear this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     14      <span class="pwg-icon user-collections-clear-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/bin.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Clear'|@translate}</span>
     15    </a></li>
     16  {/if}
     17  {if $U_DELETE}
     18    <li><a href="{$U_DELETE}" title="{'Delete this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     19      <span class="pwg-icon user-collections-delete-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/delete.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Delete'|@translate}</span>
     20    </a></li>
     21  {/if}
     22 
    523  {if !empty($COLLECTION_ACTIONS)}
    6   <ul class="categoryActions">
    724    {$COLLECTION_ACTIONS}
     25  {/if}
    826  </ul>
    9   {/if}
    1027</div>
    1128
  • extensions/UserCollections/template/themes/stripped.tpl

    r17519 r20093  
    55        </div>
    66 
    7         {if !empty($COLLECTION_ACTIONS)}
    8                 <div class="categoryActionsContainer">
    9                         <ul class="categoryActions group1">
    10                                 {$COLLECTION_ACTIONS}
    11                         </ul>
    12                 </div>
    13         {/if}
     7  <div class="categoryActionsContainer">
     8    <ul class="categoryActions group1">
     9    {if isset($U_CADDIE) }
     10      <li class="mainAction"><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}">{'caddie'|@translate}</a></li>
     11    {/if}
     12       
     13    {if $U_MAIL}
     14      <li><a href="#mail_form" title="{'Send this collection my mail'|@translate}" class="mail_colorbox_open pwg-state-default pwg-button" rel="nofollow"
     15          {if not $collection.PUBLIC}onClick="alert('{'The collection must be public in order to send it'|@translate|escape:javascript}');return false;"{/if}>
     16            <span class="pwg-icon user-collections-mail-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/mail.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Send'|@translate}</span>
     17      </a></li>
     18    {/if}
     19    {if $U_CLEAR}
     20      <li><a href="{$U_CLEAR}" title="{'Clear this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     21        <span class="pwg-icon user-collections-clear-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/bin.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Clear'|@translate}</span>
     22      </a></li>
     23    {/if}
     24    {if $U_DELETE}
     25      <li><a href="{$colelction.U_DELETE}" title="{'Delete this collection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow" onClick="return confirm('{'Are you sure?'|@translate|escape:javascript}');">
     26        <span class="pwg-icon user-collections-delete-icon" style="background:url('{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/delete.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Delete'|@translate}</span>
     27      </a></li>
     28    {/if}
     29 
     30    {if !empty($COLLECTION_ACTIONS)}
     31      {$COLLECTION_ACTIONS}
     32    {/if}
     33    </ul>
     34  </div>
    1435</div>
    1536
Note: See TracChangeset for help on using the changeset viewer.