nicer pager browser for new caches and logpics; todo: search results
@@ -179,7 +179,8 @@ function get_logpics($purpose, $userid=0, $cacheid=0)
|
||||
|
||||
function set_paged_pics($purpose, $userid, $cacheid, $tpl, $url)
|
||||
{
|
||||
global $_REQUEST;
|
||||
global $_REQUEST, $opt;
|
||||
|
||||
$startat = isset($_REQUEST['startat']) ? $_REQUEST['startat']+0 : 0;
|
||||
|
||||
$pictures = get_logpics($purpose, $userid, $cacheid);
|
||||
@@ -193,12 +194,18 @@ function set_paged_pics($purpose, $userid, $cacheid, $tpl, $url)
|
||||
$page = floor($startat/MAX_PICTURES_PER_GALLERY_PAGE) + 1;
|
||||
|
||||
$pl = "";
|
||||
/* paging overhead - does not look nice ...
|
||||
if ($startat > 0)
|
||||
$pl .= "<a href='" . $url . "&startat=" . ($startat - MAX_PICTURES_PER_GALLERY_PAGE) . "'><</a> ";
|
||||
{
|
||||
if ($pages > 2)
|
||||
$pl .= "<a href='" . $url . "&startat=0'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-first.png' width='16px' height='16px' alt='<<'></a> ";
|
||||
$pl .= "<a href='" . $url . "&startat=" . ($startat - MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-prev.png' width='16px' height='16px' alt='<'></a> ";
|
||||
}
|
||||
else
|
||||
$pl .= "< ";
|
||||
*/
|
||||
{
|
||||
if ($pages > 2)
|
||||
$pl .= "<a href='" . $url . "&startat=0'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-first-inactive.png' width='16px' height='16px' alt='<<'></a> ";
|
||||
$pl .= "<img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-prev-inactive.png' width='16px' height='16px' alt='<'> ";
|
||||
}
|
||||
|
||||
for ($p=1; $p<=$pages; $p++)
|
||||
{
|
||||
@@ -210,12 +217,18 @@ function set_paged_pics($purpose, $userid, $cacheid, $tpl, $url)
|
||||
else $pl .= "</strong>";
|
||||
}
|
||||
|
||||
/*
|
||||
if ($startat + MAX_PICTURES_PER_GALLERY_PAGE < count($pictures))
|
||||
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'>></a> ";
|
||||
{
|
||||
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-next.png' width='16px' height='16px' alt='>'></a> ";
|
||||
if ($pages > 2)
|
||||
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-last.png' width='16px' height='16px' alt='>>'></a> ";
|
||||
}
|
||||
else
|
||||
$pl .= " >";
|
||||
*/
|
||||
{
|
||||
$pl .= " <img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-next-inactive.png' width='16px' height='16px' alt='>'>";
|
||||
if ($pages > 2)
|
||||
$pl .= " <a href='" . $url . "&startat=" . ($startat + MAX_PICTURES_PER_GALLERY_PAGE) . "'><img src='resource2/" . $opt['template']['style'] . "/images/navigation/16x16-browse-last-inactive.png' width='16px' height='16px' alt='>>'></a> ";
|
||||
}
|
||||
|
||||
$tpl->assign('pagelinks', $pl);
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 715 B |
|
After Width: | Height: | Size: 271 B |
BIN
htdocs/resource2/ocstyle/images/navigation/16x16-browse-last.png
Normal file
|
After Width: | Height: | Size: 715 B |
|
After Width: | Height: | Size: 255 B |
BIN
htdocs/resource2/ocstyle/images/navigation/16x16-browse-next.png
Normal file
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 253 B |
BIN
htdocs/resource2/ocstyle/images/navigation/16x16-browse-prev.png
Normal file
|
After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 740 B |
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
@@ -2142,7 +2142,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
{* popup box for permalink *}
|
||||
<div id="permalink_box" class="mappermalink mapboxframe mapboxshadow" style="display:none">
|
||||
<table>
|
||||
<tr><td><img src="resource2/ocstyle/images/viewcache/link.png" alt="" height="16" width="16" /> {t}Link to this map view{/t}:</td><td align="right"><a href="javascript:permalinkbox_hide()"><img src="resource2/ocstyle/images/misc/close-medium.png" style="opacity:0.7" ></a></td></tr>
|
||||
<tr><td><img src="resource2/ocstyle/images/viewcache/link.png" alt="" height="16" width="16" /> {t}Link to this map view{/t}:</td><td align="right"><a href="javascript:permalinkbox_hide()"><img src="resource2/ocstyle/images/navigation/close-medium.png" style="opacity:0.7" ></a></td></tr>
|
||||
<tr><td><input id="permalink_text" type="text" value="" size="55"/></td></tr>
|
||||
<tr id="permalink_addFavorites"><td align="right"><input type="button" value="{t}Add to favorites...{/t}" onclick="addFavorites_click()" /></td></tr>
|
||||
</table>
|
||||
@@ -2172,7 +2172,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
<form action="map2.php?mode={if $bFullscreen}full{else}normal{/if}screen" method="post" style="display:inline;">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<table>
|
||||
<tr><td><span style="font-size:1.2em; font-weight:bold">{t}Settings{/t}</strong></td><td style="text-align:right"><a href="javascript:toggle_settings()"><img src="resource2/ocstyle/images/misc/close-medium.png" style="opacity:0.7" /></a></tr>
|
||||
<tr><td><span style="font-size:1.2em; font-weight:bold">{t}Settings{/t}</strong></td><td style="text-align:right"><a href="javascript:toggle_settings()"><img src="resource2/ocstyle/images/navigation/close-medium.png" style="opacity:0.7" /></a></tr>
|
||||
<tr><td>{t}Menu option 'Map' shows{/t}:</td><td><select name="opt_menumap"><option id="opt_menumap0" value="0">{t}small map{/t}</option><option id="opt_menumap1" value="1">{t}fullscreen map{/t}</option></select></td></tr>
|
||||
<tr><td>{t}Show overview map{/t}:</td><td><input type="checkbox" id="opt_overview" name="opt_overview" value="1" /></td></tr>
|
||||
<tr><td>{t 1=$min_maxrecords 2=$max_maxrecords}Maximum caches on map<br />(%1-%2, 0=automatic){/t}:</td><td><input type="text" id="opt_maxcaches" name="opt_maxcaches" size="6" /></td></tr>
|
||||
@@ -2191,7 +2191,7 @@ function toggle_attribselection(bSaveCookies)
|
||||
|
||||
<div id="cachepicbox" class="default mapboxframe mapboxshadow" style="position:absolute; {if $bFullscreen}left:4px; top:7px;{else}left:0; top:0;{/if} background:#fdfdfd; display:none; z-index:60">
|
||||
<div style="position:absolute; right:-19px; top:2px; opacity:0.7">
|
||||
<img src="resource2/ocstyle/images/misc/close-smaller.png" onclick="hide_picture()" style="cursor:pointer"/>
|
||||
<img src="resource2/ocstyle/images/navigation/close-smaller.png" onclick="hide_picture()" style="cursor:pointer"/>
|
||||
</div>
|
||||
<div>
|
||||
<a id="cachepiccontainer" class="nooutline"><img id="cachepic"/></a>
|
||||
|
||||
@@ -12,14 +12,7 @@
|
||||
<table width="100%" class="table">
|
||||
<tr>
|
||||
<td class="header-small">
|
||||
|
||||
{if $startat>0}
|
||||
<a href="newcaches.php?startat=0"><<</a>
|
||||
<a href="newcaches.php?startat={$startat-$perpage}"><</a>
|
||||
{else}
|
||||
<<
|
||||
<
|
||||
{/if}
|
||||
{include file="res_browse_left.tpl" page="newcaches"}
|
||||
|
||||
{section name=page start=$firstpage loop=$lastpage+1 step=100}
|
||||
{if $smarty.section.page.index!=$startat}
|
||||
@@ -29,14 +22,7 @@
|
||||
{/if}
|
||||
{/section}
|
||||
|
||||
{if $startat<$maxstart}
|
||||
<a href="newcaches.php?startat={$startat+$perpage}">></a>
|
||||
<a href="newcaches.php?startat={$maxstart}">>></a>
|
||||
{else}
|
||||
>
|
||||
>>
|
||||
{/if}
|
||||
|
||||
{include file="res_browse_right.tpl" page="newcaches"}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -46,14 +32,7 @@
|
||||
|
||||
<tr>
|
||||
<td class="header-small">
|
||||
|
||||
{if $startat>0}
|
||||
<a href="newcaches.php?startat=0"><<</a>
|
||||
<a href="newcaches.php?startat={$startat-$perpage}"><</a>
|
||||
{else}
|
||||
<<
|
||||
<
|
||||
{/if}
|
||||
{include file="res_browse_left.tpl" page="newcaches"}
|
||||
|
||||
{section name=page start=$firstpage loop=$lastpage+1 step=100}
|
||||
{if $smarty.section.page.index!=$startat}
|
||||
@@ -63,14 +42,7 @@
|
||||
{/if}
|
||||
{/section}
|
||||
|
||||
{if $startat<$maxstart}
|
||||
<a href="newcaches.php?startat={$startat+$perpage}">></a>
|
||||
<a href="newcaches.php?startat={$maxstart}">>></a>
|
||||
{else}
|
||||
>
|
||||
>>
|
||||
{/if}
|
||||
|
||||
{include file="res_browse_right.tpl" page="newcaches"}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
13
htdocs/templates2/ocstyle/res_browse_left.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{***************************************************************************
|
||||
* You can find the license in the docs directory
|
||||
*
|
||||
* Unicode Reminder メモ
|
||||
***************************************************************************}
|
||||
{* OCSTYLE *}
|
||||
{if $startat <= 0}
|
||||
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first-inactive.png" width="16px" height="16px" alt="<<">
|
||||
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev-inactive.png" width="16px" height="16px" alt="<">
|
||||
{else}
|
||||
<a href="{$page}.php?startat=0"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-first.png" width="16px" height="16px" alt="<<"></a>
|
||||
<a href="{$page}.php?startat={$startat-$perpage}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-prev.png" width="16px" height="16px" alt="<"></a>
|
||||
{/if}
|
||||
13
htdocs/templates2/ocstyle/res_browse_right.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{***************************************************************************
|
||||
* You can find the license in the docs directory
|
||||
*
|
||||
* Unicode Reminder メモ
|
||||
***************************************************************************}
|
||||
{* OCSTYLE *}
|
||||
{if $startat<$maxstart}
|
||||
<a href="{$page}.php?startat={$startat+$perpage}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next.png" width="16px" height="16px" alt=">"></a>
|
||||
<a href="{$page}.php?startat={$maxstart}"><img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last.png" width="16px" height="16px" alt=">>"></a>
|
||||
{else}
|
||||
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-next-inactive.png" width="16px" height="16px" alt=">">
|
||||
<img src="resource2/{$opt.template.style}/images/navigation/16x16-browse-last-inactive.png" width="16px" height="16px" alt=">>">
|
||||
{/if}
|
||||
@@ -5,7 +5,7 @@
|
||||
<table width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><font size="2">{$subtitle}</font></td>
|
||||
<td class="picpaging">{t}Page{/t} {$pagelinks}</td>
|
||||
<td class="picpaging">{$pagelinks}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||