Skip to content
Permalink
Browse files

added coordinate conversion links to additional waypoint list; closes…

… #941
  • Loading branch information...
following5 committed Mar 24, 2016
1 parent 4776347 commit ea8cc5d036d6cc39899aa9b7bad88aa9c3e55a18
@@ -106,6 +106,8 @@
sql_free_result($rs);
}
$tpl->assign('wp', $wp);
$childwp = isset($_REQUEST['childwp']) ? $_REQUEST['childwp'] : '';
$tpl->assign('childwp', $childwp);
$tpl->display();
?>
@@ -2870,6 +2870,8 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2608', 'move up
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2609', 'Description is unusable', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2610', 'Your geocache', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2611', 'Your geocache report for', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2612', 'convert', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2613', 'waypoint', '2015-06-17 10:09:14');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2609', 'DE', 'Beschreibung ist unbrauchbar', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2610', 'DE', 'Dein Cache', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2611', 'DE', 'Deine Cachemeldung für', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2612', 'DE', 'umrechnen', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2613', 'DE', 'Wegpunkt', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '2010-09-02 00:15:30');
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 ('2537', 'FR', 'Listes de cache :', '2015-08-25 01:29:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2603', 'FR', 'Il y a plus de 2 ans', '2013-11-03 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2607', 'FR', 'Titre :', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2613', 'FR', 'waypoint', '2010-08-28 11:48:08');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'IT', 'Riordina gli ID', '2010-10-27 18:49:18');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'IT', 'Impossibile riconnettersi al database', '2010-08-28 20:28:01');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'IT', 'Test - per favore non connettersi', '2010-08-28 20:36:53');
@@ -7,8 +7,9 @@

{if $wp!=''}
<div style="margin-top:4px;">
<p style="color: 5890a8"><b>{$cachename}</b><br />
<p style="color: 5890a8">{t}by{/t} {$owner}</p>
<p style="color: 5890a8"><b>{$cachename}</b>{if $childwp}, {t}waypoint{/t}&nbsp;{$childwp}<br />
<p style="color: 5890a8">{t}by{/t} {$owner}{/if}
</p>
</div>
{/if}
<div style="margin-top:16px;">
@@ -66,6 +66,14 @@
}
}
function enable_wpt_conversion()
{
var wpt_convert_links = document.getElementsByName('wpt_convert');
for (var i=0; i<wpt_convert_links.length; ++i)
wpt_convert_links[i].style.display = '';
document.getElementById('convert_waypoints').style.display = 'none';
}
//-->
{/literal}
</script>
@@ -171,7 +179,7 @@
</span>
</p>
{if $cache.type==6}
<span class="participants"><img src="resource2/{$opt.template.style}/images/cacheicon/16x16-event.gif" width="16" height="16" alt="" />&nbsp;<a href="#" onclick="window.open('event_attendance.php?id={$cache.cacheid}&popup=y','{t escape=js}List{/t}','width=320,height=440,resizable=no,scrollbars=1')">{t}List of participants{/t}</a></span>
<span class="participants"><img src="resource2/{$opt.template.style}/images/cacheicon/16x16-event.gif" width="16" height="16" alt="" />&nbsp;<a href="javascript:;" onclick="window.open('event_attendance.php?id={$cache.cacheid}&popup=y','{t escape=js}List{/t}','width=320,height=440,resizable=no,scrollbars=1')">{t}List of participants{/t}</a></span>
{/if}
</div>
</div>
@@ -397,7 +405,7 @@ function showalllists()
<div class="content2-container bg-blue02 content2-section-no-p">
<p class="content-title-noshade-size2">
<img src="resource2/{$opt.template.style}/images/description/20x20-compass.png" style="margin-right: 10px;" alt="" />
{t}Additional waypoints{/t}
{t}Additional waypoints{/t} <span id="convert_waypoints">&nbsp; <img src="resource2/{$opt.template.style}/images/viewcache/map.png" class="icon16" style="margin-right: 10px;" alt="" /><span class="content-title-link" ><a href="javascript:enable_wpt_conversion()">{t}Convert coordinates{/t}</a></span></span>
</p>
</div>
@@ -406,7 +414,7 @@ function showalllists()
{foreach from=$childWaypoints item=childWaypoint}
<tr bgcolor="{cycle values="#ffffff,#f4f4f4"}">
<td width="25%"><table cellspacing="0" cellpadding="0"><tr><td><img src="{$childWaypoint.image}" /></td><td>{$childWaypoint.name|escape}</td></tr></table></td>
<td class="wpt_text" width="18%">{$childWaypoint.coordinateHtml}</td>
<td class="wpt_text" width="18%">{$childWaypoint.coordinateHtml}<span name="wpt_convert" style="display:none"><br /><a href="javascript:;" onclick="window.open('coordinates.php?lat={$childWaypoint.coord.lat}&lon={$childWaypoint.coord.lon}&popup=y&wp={$cache.wpoc}&childwp={$childWaypoint.position}&country={$cache.countryCode}&desclang={$cache.desclanguage}','{t escape=js}Coordinates{/t}','width=280,height=550,resizable=no,scrollbars=1')">{t}convert{/t}</a></td>
<td class="wpt_text" >{$childWaypoint.description|escape|replace:"\r\n":"<br />"}</td>
</tr>
{/foreach}
@@ -426,7 +434,7 @@ function showalllists()
<img src="resource2/{$opt.template.style}/images/description/22x22-encrypted.png" style="margin-right: 10px;" width="22" height="22" alt="" /> {t}Additional hint{/t}&nbsp;&nbsp;
<span id="decrypt-info">{if $crypt}
<img src="resource2/{$opt.template.style}/images/viewcache/decrypt.png" class="icon32" width="22" height="22" alt="" />
<span style="font-weight: 400;"><a href="viewcache.php?wp={$cache.wpoc}&nocrypt=1&desclang={$cache.desclanguage|urlencode}#decrypt-info" {literal}onclick="var ch = document.getElementById('decrypt-hints').childNodes;for(var i=0;i < ch.length;++i) {var e = ch[i]; decrypt(e);} document.getElementById('decrypt-info').style.display = 'none';
<span class="content-title-link" ><a href="viewcache.php?wp={$cache.wpoc}&nocrypt=1&desclang={$cache.desclanguage|urlencode}#decrypt-info" {literal}onclick="var ch = document.getElementById('decrypt-hints').childNodes;for(var i=0;i < ch.length;++i) {var e = ch[i]; decrypt(e);} document.getElementById('decrypt-info').style.display = 'none';
bNoCrypt = 1;
return false;"{/literal}>{t}Decrypt{/t}</a>{/if}</span>
</span>
@@ -30,8 +30,11 @@ function getChildWaypoints($cacheid)
for ($i = 0; $i < $count; $i++)
{
$waypoints[$i]['coord']['lat'] = $waypoints[$i]['coordinate']->latitude();
$waypoints[$i]['coord']['lon'] = $waypoints[$i]['coordinate']->longitude();
$waypoints[$i]['coordinateHtml'] = $formatter->formatHtml($waypoints[$i]['coordinate'], '<br />');
$waypoints[$i]['description'] = trim($waypoints[$i]['description']);
$waypoints[$i]['position'] = $i + 1;
}
}

0 comments on commit ea8cc5d

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