Skip to content
Permalink
Browse files

fixed print-view description language; fixes #961

  • Loading branch information...
following5 committed May 12, 2016
1 parent 8157f14 commit bb64172dfede7cda634d6b93929a419f1cf713dc
Showing with 12 additions and 22 deletions.
  1. +4 −4 htdocs/templates2/ocstyle/viewcache.tpl
  2. +5 −17 htdocs/templates2/ocstyle/viewcache_print.tpl
  3. +3 −1 htdocs/viewcache.php
@@ -286,10 +286,10 @@
<img src="resource2/{$opt.template.style}/images/viewcache/print-18.png" class="icon16" alt="" />
<select class="exportlist" onchange="location.href=this.options[this.selectedIndex].value+'&nocrypt='+bNoCrypt">
<option value="#">{t}Print{/t} …</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&print=y&log=N">{t}without logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&print=y&log=5">{t}with 5 logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&print=y&log=10">{t}with 10 logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&print=y&log=A">{t}with all logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}print=y&log=N">{t}without logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}print=y&log=5">{t}with 5 logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}print=y&log=10">{t}with 10 logs{/t}</option>
<option value="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}print=y&log=A">{t}with all logs{/t}</option>
</select>&nbsp;
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-save.png" class="icon16" alt="" />
<select class="exportlist" onchange="location.href=this.options[this.selectedIndex].value">
@@ -166,23 +166,11 @@
<tr>
<td class="header-small-print">
<!-- <img src="resource2/{$opt.template.style}/images/description/22x22-description.png" width="22" height="22" style="vertical-align:middle" border="0" /> -->
{t}Description{/t}&nbsp;&nbsp;
{t}Description{/t}&nbsp;
{if $cache.desclanguages|@count > 1}
<span style="font-weight: 400;">
{foreach from=$cache.desclanguages item=desclanguagesItem name=desclanguagesItem}
{strip}
{if $smarty.foreach.desclanguagesItem.first==false},&nbsp;{/if}
<img src="images/flags/{$desclanguagesItem|lower}.gif" style="vertical-align:middle" />&nbsp;
<a href="viewcache.php?wp={$cache.wpoc}&desclang={$desclanguagesItem|escape}">
{if $cache.desclanguage==$desclanguagesItem}
<i>{$desclanguagesItem|escape}</i>
{else}
{$desclanguagesItem|escape}
{/if}
</a>
{/strip}
{foreachelse}
<b>{$cache.desclanguage|escape}</b>
{if $cache.desclanguage == $desclanguagesItem.code}({$desclanguagesItem.name}){/if}
{/foreach}
</span>
{/if}
@@ -259,15 +247,15 @@
<img src="resource2/{$opt.template.style}/images/action/16x16-encrypt.png" width="16" height="16" style="vertical-align:middle" border="0" />
{if $crypt==true}
{if $log=="5"}
<span style="font-weight:400">[<a href="viewcache.php?cacheid={$cache.cacheid}&log=5&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
<span style="font-weight:400">[<a href="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}log=5&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
</span>
{elseif $log =="N"}
<span style="font-weight:400">
[<a href="viewcache.php?cacheid={$cache.cacheid}&log=N&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
[<a href="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}log=N&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
</span>
{else}
<span style="font-weight:400">
[<a href="viewcache.php?cacheid={$cache.cacheid}&log=A&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
[<a href="viewcache.php?cacheid={$cache.cacheid}&{if $desclang}desclang={$desclang}&{/if}log=A&print=y&nocrypt=1&desclang={$cache.desclanguage|urlencode}">{t}Decrypt{/t}</a>]
</span>
{/if}
{/if}
@@ -71,7 +71,8 @@ function getChildWaypoints($cacheid)
$bCrypt = !isset($_REQUEST['nocrypt']) || ($_REQUEST['nocrypt'] != 1);
$tpl->assign('crypt', $bCrypt);
if (isset($_REQUEST['desclang']))
$desclang = isset($_REQUEST['desclang']) ? $_REQUEST['desclang'] : false;
if ($desclang)
$sPreferedDescLang = $_REQUEST['desclang'] . ',' . $opt['template']['locale'] . ',EN';
else
$sPreferedDescLang = $opt['template']['locale'] . ',EN';
@@ -375,6 +376,7 @@ function getChildWaypoints($cacheid)
$tpl->assign('listing_admin', $login->listingAdmin());
$tpl->assign('npahelplink', helppagelink('npa'));
$tpl->assign('garmin_url', $opt['lib']['garmin']['page_url']);
$tpl->assign('desclang', $desclang);
// display the page
$tpl->display();

0 comments on commit bb64172

Please sign in to comment.
You can’t perform that action at this time.