Ignore:
Timestamp:
Mar 14, 2012, 2:50:34 PM (12 years ago)
Author:
plg
Message:

import theme Simple version 2.5

  • use media queries to adapt layout for small screens
  • remove arbitrary limit on width: the picture will simply be partially hidden if too wide
  • update password.tpl
  • add MENUBAR on all pages
  • Spelling correction in README
  • update url
  • bugfix for the feature 'open external links in new window' for menubar links
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/simple_themes/simple/template/picture.tpl

    r13554 r13555  
    66{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
    77<div id="content">
     8  {if isset($MENUBAR)}{$MENUBAR}{/if}
     9
    810  {if isset($errors)}
    911  <div class="errors">
     
    1517  </div>
    1618  {/if}
     19
    1720  {if isset($infos)}
    1821  <div class="infos">
     
    2427  </div>
    2528  {/if}
     29
     30  <div id="theImage">
     31    {$ELEMENT_CONTENT}
     32    {if isset($COMMENT_IMG)}
     33    <p>{$COMMENT_IMG}</p>
     34    {/if}
     35  </div> <!-- theImage -->
     36
    2637  <div id="imageInfoBar">
    2738    <div id="imageToolBar">
     
    113124        <dd>{$INFO_VISITS}</dd>
    114125        {/if}
    115         {if $display_info.average_rate}
    116         {if isset($rate_summary)}
    117         <dt>{'Average rate'|@translate}</dt>
    118         <dd id="ratingSummary">
    119           {if $rate_summary.count}
    120           {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
    121           {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
    122           {else}
    123           {'no rate'|@translate}
    124           {/if}
    125         </dd>
    126         {/if}
     126
     127                {if $display_info.rating_score and isset($rate_summary)}
     128                <dt id="Average">{'Rating score'|@translate}</dt>
     129                <dd id="ratingSummary">
     130                {if $rate_summary.count}
     131                        <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span>
     132                {else}
     133                        <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
     134                {/if}
     135                </dd>
     136                {/if}
     137
    127138        {if isset($rating)}
    128139        <dt><span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span></dt>
     
    131142            <div>&nbsp;
    132143              {foreach from=$rating.marks item=mark name=rate_loop}
    133               {if !$smarty.foreach.rate_loop.first} | {/if}
    134144              {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
    135145              <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
     
    138148              {/if}
    139149              {/foreach}
    140               <script type="text/javascript">
    141                 makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}',
    142                 image_id: {$current.id},
    143                 updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}",
    144                 updateRateElement: document.getElementById("updateRate"),
    145                 ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}",
    146                 ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
    147               </script>
     150              {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
     151              {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
     152              {footer_script}
     153              var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[];
     154              _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id},
     155              onSuccess : function(rating) {ldelim}
     156              var e = document.getElementById("updateRate");
     157              if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}";
     158              e = document.getElementById("ratingScore");
     159              if (e) e.innerHTML = rating.score;
     160              e = document.getElementById("ratingCount");
     161              if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
     162              {rdelim}{rdelim} );
     163              {/footer_script}
     164              {/strip}
    148165            </div>
    149166          </form>
    150167        </dd>
    151168        {/if}
    152         {/if}
    153169      </dl>
    154170    </div> <!-- imageInfos -->
    155171  </div>
    156   <div id="theImage">
    157     {$ELEMENT_CONTENT}
    158     {if isset($COMMENT_IMG)}
    159     <p>{$COMMENT_IMG}</p>
    160     {/if}
    161   </div> <!-- theImage -->
    162172  <div style="clear: both;"></div>
    163173
Note: See TracChangeset for help on using the changeset viewer.