Skip to content
Permalink
Browse files

use arrows for search result list direction

  • Loading branch information...
following5 committed Jul 19, 2013
1 parent 2169282 commit 4a5373d27880b92c4497d7fedbdbfc5a4c86d0fe
@@ -2536,6 +2536,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2110', 'Result
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2111', 'My caches', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2112', 'Opencaching', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2113', 'New Wiki articles', '2010-09-07 20:19:07');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2114', 'Cardinal direction', '2010-09-07 20:19:07');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2111', 'DE', 'Meine Caches', '2010-09-10 23:33:33');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2112', 'DE', 'Opencaching', '2010-09-10 23:33:33');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2113', 'DE', 'Neue Wiki-Artikel', '2010-09-10 23:33:33');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2114', 'DE', 'Himmelsrichtung', '2010-09-10 23:33:33');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('4', 'EN', 'User', '2010-08-28 11:48:07');
@@ -96,9 +96,13 @@ function search_output()
// get direction from search coordinate
if ($rCache['distance'] > 0)
$rCache['direction'] = geomath::Bearing2Text(geomath::calcBearing($lat_rad / 3.14159 * 180, $lon_rad / 3.14159 * 180, $rCache['latitude'], $rCache['longitude']), 1);
{
$direction = geomath::calcBearing($lat_rad / 3.14159 * 180, $lon_rad / 3.14159 * 180, $rCache['latitude'], $rCache['longitude']);
$rCache['direction_deg'] = round($direction / 22.5) * 22.5;
$rCache['direction_txt'] = geomath::Bearing2Text($direction, 1);
}
else
$rCache['direction'] = '';
$rCache['direction_deg'] = false;
// other data
$rCache['icon'] = getCacheIcon($login->userid, $rCache['cache_id'], $rCache['status'], $rCache['user_id'], $rCache['icon_large']);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
outputs one cache line of the search result *}
<!--m-->
<tr>
<td width="18" class="{$listcolor}">&nbsp;{$position}&nbsp;</td>
<td width="18" class="{$listcolor}">&nbsp;{$position}&nbsp;&nbsp;</td>
<td width="45" class="{$listcolor}">{if $cache.distance !== null}{$cache.distance|sprintf:"%1.1f"|escape}&nbsp;{/if}</td>
<td width="32" class="{$listcolor}" rowspan="2"><img src="resource2/{$opt.template.style}/images/cacheicon/{$cache.icon}" title="{$cache.cacheTypeName}"></td>
<td width="46" class="{$listcolor}" rowspan="2"><nobr>{include file="res_difficon.tpl" difficulty=$cache.difficulty}{include file="res_terricon.tpl" terrain=$cache.terrain}</nobr></td>
@@ -19,7 +19,7 @@
<!--n-->
<tr>
<td width="25" class="{$listcolor}">&nbsp;</td>
<td width="32" class="{$listcolor}" valign="top">{$cache.direction}&nbsp;</td>
<td width="32" class="{$listcolor}" valign="top">{if $cache.direction_deg !== false}<img src="resource2/ocstyle/images/direction/16x16-{$cache.direction_deg}deg.png" title="{t}Cardinal direction{/t}: {$cache.direction_txt}">&nbsp;{/if}</td>
<td width="448" class="{$listcolor}" valign="top">
<p>{strip}
{if $cache.topratings>0}<img src="images/rating-star.gif" title="{t}Recommendations{/t}" width="17" height="16" />{/if}

0 comments on commit 4a5373d

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