Skip to content
Permalink
Browse files

additional advice for the owner on logging maintenance states

  • Loading branch information...
following5 committed Mar 2, 2016
1 parent d812218 commit 8b74108ed511a1a844c9c9b3aef8e6ea49a78d94
@@ -2843,6 +2843,10 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2556', 'geocach
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2557', 'geocache is ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2558', 'description is outdated', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2559', 'description is ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2560', 'By logging \"Available\", you confirm that the geocache is in good condition.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2561', 'By logging \"Available\", you confirm that the geocache description is up-to-date.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2562', 'You may indicate here what is the current maintenance state of the geocache.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2563', 'You may indicate here if the cache description is up-to-date.', '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 ('2557', 'DE', 'Cache ist ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2558', 'DE', 'Cachebeschreibung ist veraltet', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2559', 'DE', 'Cachebeschreibung ist ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2560', 'DE', 'Mit einem &bdquo;kann-gesucht-werden&ldquo;-Log bestätigst du,<br />dass der Cache in guten Zustand ist.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2561', 'DE', 'Mit einem &bdquo;kann-gesucht-werden&ldquo;-Log bestätigst du,<br />dass die Cachebeschreibung aktuell ist.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2562', 'DE', 'Hier kannst du den aktuellen Wartungszustand des Caches angeben.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2563', 'DE', 'Hier kannst du den aktuellen Zustand der Cachebeschreibung angeben.', '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');
@@ -33,29 +33,29 @@
`user`.`user_id` AS `userid`, `user`.`username`, `caches`.`wp_oc`, `ca`.`attrib_id` IS NOT NULL AS `oconly`,
`cache_rating`.`rating_date` IS NOT NULL AS `recommended`,
`cache_logs`.`needs_maintenance`,
`cache_logs`.`listing_outdated`
`cache_logs`.`listing_outdated`
FROM `cache_logs`
INNER JOIN `caches` ON `cache_logs`.`cache_id`=`caches`.`cache_id`
INNER JOIN `user` ON `caches`.`user_id`=`user`.`user_id`
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
LEFT JOIN `cache_rating` ON `cache_rating`.`cache_id`=`caches`.`cache_id` AND `cache_rating`.`user_id`=`cache_logs`.`user_id` AND `cache_rating`.`rating_date`=`cache_logs`.`date`
WHERE `cache_logs`.`user_id`='&1'
ORDER BY `cache_logs`.`date` DESC, `cache_logs`.`date_created` DESC
LIMIT 10", $login->userid));
LIMIT 10", $login->userid));
$tpl->assign('morelogs', sql_value("SELECT FOUND_ROWS()", 0) > 10);
sql_foundrows_done();
//get last hidden caches
$tpl->assign_rs('caches', sql("SELECT `caches`.`cache_id`, `caches`.`name`, `caches`.`type`,
`caches`.`date_hidden`, `caches`.`status`, `caches`.`wp_oc`,
IF(`caches`.`needs_maintenance`, 2, 0) AS `needs_maintenance`,
IF(`caches`.`listing_outdated`, 2, 0) AS `listing_outdated`,
IF(`caches`.`listing_outdated`, 2, 0) AS `listing_outdated`,
`stat_caches`.`found`,`stat_caches`.`toprating`,
`ca`.`attrib_id` IS NOT NULL AS `oconly`,
MAX(`cache_logs`.`date`) AS `lastlog`,
(SELECT `type` FROM `cache_logs` `cl2`
WHERE `cl2`.`cache_id`=`caches`.`cache_id`
ORDER BY `date` DESC,`id` DESC LIMIT 1) AS `lastlog_type`
WHERE `cl2`.`cache_id`=`caches`.`cache_id`
ORDER BY `date` DESC,`id` DESC LIMIT 1) AS `lastlog_type`
FROM `caches`
LEFT JOIN `stat_caches` ON `stat_caches`.`cache_id`=`caches`.`cache_id`
LEFT JOIN `cache_logs` ON `cache_logs`.`cache_id`=`caches`.`cache_id`
@@ -64,7 +64,7 @@
AND `caches`.`status` != 5
GROUP BY `caches`.`cache_id`
ORDER BY `caches`.`date_hidden` DESC, `caches`.`date_created` DESC",
$login->userid));
$login->userid));
if ($useragent_msie && $useragent_msie_version < 9)
$tpl->assign('dotfill','');
else
@@ -566,6 +566,7 @@ input.checkbox {width:12px; height:12px; font-size:12px; border:0;}
input.radio {border:0px; border-width: 0px; width:12px; height:12px; background-color: transparent;}

select {border:1px solid #555; background-color:white; padding:1px; font-size:11px; color: black;}
select.disabled {border:1px solid #a0a0a0; color:grey; }

input.formbutton_header {
width:65px;
@@ -12,6 +12,12 @@
var cache_needs_maintenance = {$cache_needs_maintenance + 0};
var cachetype = {$cachetype};
var logtype_allows_nm = [{$logtype_allows_nm}];
var tip_general_nm = "{t}Select <i>needs maintenance</i> if the geocache was in poor condition at the<br />specified date and in urgent need of maintenance. Please explain why.{/t}";
var tip_general_lo = "{if $has_gc_listing}{t}Select <i>is outdated</i> if the geocache search is hampered by outdated information in<br />the description, e.g. the location has severely changed or the description lacks<br />important information which has been added at another geocaching website.<br />Please give details in your log.{/t}{else}{t}Select <i>is outdated</i> if the geocache search is hampered by outdated information<br />in the description, e.g. because the location has severely changed. Please give<br />details in your log.{/t}{/if}";
var tip_activate_nm = '{t}By logging "Available", you confirm that the geocache is in good condition.{/t}';
var tip_activate_lo = '{t}By logging "Available", you confirm that the geocache description is up-to-date.{/t}';
var tip_disable_nm = "{t}You may indicate here what is the current maintenance state of the geocache.{/t}";
var tip_disable_lo = "{t}You may indicate here if the cache description is up-to-date.{/t}";
{literal}
function insertSmiley(smileySymbol, smileyPath)
@@ -79,13 +85,49 @@ function logtype_changed()
document.getElementById('cache_condition').style.display = 'none';
document.getElementById('cache_condition_spacer').style.display = 'none';
}
if (cache_needs_maintenance && (document.editform.logtype.value == "10") != (old_logtype == 10))
var new_logtype = parseInt(document.editform.logtype.value);
if ((new_logtype == 10) != (old_logtype == 10))
{
document.getElementById('needs_maintenance').value = (old_logtype == 10 ? 0 : 1);
old_logtype = document.editform.logtype.value;
var nm = document.getElementById('needs_maintenance');
nm.value = (old_logtype == 10 ? 0 : 1);
nm.disabled = (new_logtype == 10);
nm.className = (new_logtype == 10 ? 'disabled' : '');
lo = document.getElementById('listing_outdated');
lo.value = (old_logtype == 10 ? 0 : 1);
lo.disabled = (new_logtype == 10);
lo.className = (new_logtype == 10 ? 'disabled' : '');
old_logtype = new_logtype;
}
return false;
}
function show_nm_tip()
{
if (document.editform.logtype.value == "10")
show_tip(tip_activate_nm);
else if (document.editform.logtype.value == "11")
show_tip(tip_disable_nm);
else
show_tip(tip_general_nm);
}
function show_lo_tip()
{
if (document.editform.logtype.value == "10")
show_tip(tip_activate_lo);
else if (document.editform.logtype.value == "11")
show_tip(tip_disable_lo);
else
show_tip(tip_general_lo);
}
function show_tip(text)
{
Tip(text, DELAY, 0, FADEIN, false, FADEOUT, false, BGCOLOR, "#fffedf", BORDERCOLOR, "grey");
}
//-->
{/literal}
{*
@@ -145,28 +187,28 @@ function logtype_changed()
<input class="input20" type="text" id="logday" name="logday" maxlength="2" value="{$logday}" onchange="condition_init()" />.
<input class="input20" type="text" id="logmonth" name="logmonth" maxlength="2" value="{$logmonth}" onchange="condition_init()" />.
<input class="input40" type="text" id="logyear" name="logyear" maxlength="4" value="{$logyear}" onchange="condition_init()" />
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<input class="input20" type="text" id="loghour" name="loghour" maxlength="2" value="{$loghour}" onchange="condition_init()" /> :
<input class="input20" type="text" id="logminute" name="logminute" maxlength="2" value="{$logminute}" onchange="condition_init()" />
&nbsp;&nbsp; <span id="datecomment"></span>
&nbsp;&nbsp;&nbsp; <span id="datecomment"></span>
{if $validate.dateOk==false}<br /><span class="errormsg">{t}date or time is invalid{/t}</span>{/if}
</td>
</tr>
<tr><td class="spacer" colspan="2"></td></tr>
<tr id="cache_condition">
<td>{t}Geocache condition:{/t}</td>
<td>
<span onmouseover='Tip("{t}Select <i>needs maintenance</i> if the geocache was in poor condition at the<br />specified date and in urgent need of maintenance. Please explain why.{/t}", DELAY, 0, FADEIN, false, FADEOUT, false, BGCOLOR, "#fffedf", BORDERCOLOR, "grey")' onmouseout="UnTip()">
<select name="needs_maintenance" id="needs_maintenance">
<span id="nmtip" onmouseover='show_nm_tip()' onmouseout="UnTip()">
<select id="needs_maintenance" name="needs_maintenance">
<option value="0" {if $needs_maintenance==0}selected="selected"{/if}>{t}not specified{/t}</option>
<option value="2" {if $needs_maintenance==2}selected="selected"{/if}>{t}needs maintenance{/t}</option>
<option value="1" {if $needs_maintenance==1}selected="selected"{/if}>{t}ok{/t}</option>
</select>
</span>
&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;
{t}Description:{/t}&nbsp;
<span onmouseover='Tip("{if $has_gc_listing}{t}Select <i>is outdated</i> if the geocache search is hampered by outdated information in<br />the description, e.g. the location has severely changed or the description lacks<br />important information which has been added at another geocaching website.<br />Please give details in your log.{/t}{else}{t}Select <i>is outdated</i> if the geocache search is hampered by outdated information<br />in the description, e.g. because the location has severely changed. Please give<br />details in your log.{/t}{/if}", DELAY, 0, FADEIN, false, FADEOUT, false, BGCOLOR, "#fffedf", BORDERCOLOR, "grey")' onmouseout="UnTip()">
<select name="listing_outdated" id="listing_outdated">
<span id="lotip" onmouseover='show_lo_tip()' onmouseout="UnTip()">
<select id="listing_outdated" name="listing_outdated">
<option value="0" {if $listing_outdated==0}selected="selected"{/if}>{t}not specified{/t}</option>
<option value="2" {if $listing_outdated==2}selected="selected"{/if}>{t}outdated{/t}</option>
<option value="1" {if $listing_outdated==1}selected="selected"{/if}>{t}up to date{/t}</option>
@@ -253,9 +295,9 @@ function logtype_changed()
<script type="text/javascript">
<!--
OcInitEditor();
var old_logtype = parseInt(document.editform.logtype.value);
logtype_changed();
condition_init();
var descMode = {$descMode};
var old_logtype = parseInt(document.editform.logtype.value);
//-->
</script>
@@ -23,16 +23,16 @@
case 0: // sofort
hour.options[0].selected = true;
weekday.options[0].selected = true;
weekday.disabled=true; weekday.style.color="grey";
hour.disabled=true; hour.style.color="grey";
weekday.disabled=true; weekday.className='disabled';
hour.disabled=true; hour.className='disabled';
break;
case 1: // taeglich
weekday.disabled=true; weekday.style.color="grey";
hour.disabled=false; hour.style.color="";
weekday.disabled=true; weekday.className='disabled';
hour.disabled=false; hour.className='';
break;
case 2: // woechentlich
weekday.disabled=false; weekday.style.color="";
hour.disabled=false; hour.style.color="";
weekday.disabled=false; weekday.className='';
hour.disabled=false; hour.className='';
break;
}
}
@@ -1,5 +1,5 @@
{* Unicode Reminder メモ *}
{if $lfSpace && ($logItem.needs_maintenance || $logItem.listing_outdated || $logItem.recommended)}&nbsp;{/if}
{if $logItem.needs_maintenance}<img src="resource2/{$opt.template.style}/images/log/16x16-needs-maintenance{if $logItem.needs_maintenance==1}-no{/if}.png" alt="{if $logItem.needs_maintenance==2}{t}The geocache needs maintenance.{/t}{else}{t}The geocache is in good or acceptable condition.{/t}{/if}" title="{if $logItem.needs_maintenance==2}{t}The geocache needs maintenance.{/t}{else}{t}The geocache is in good or acceptable condition.{/t}{/if}" />{if $logItem.listing_outdated}&nbsp;{/if}{/if}
{if $logItem.listing_outdated}<img src="resource2/{$opt.template.style}/images/log/16x16-listing-outdated{if $logItem.listing_outdated==1}-no{/if}.png" alt="{if $logItem.listing_outdated==2}{t}The geocache description is outdated.{/t}{else}{t}The geocache description is ok.{/t}{/if}" title="{if $logItem.listing_outdated==2}{t}The geocache description is outdated.{/t}{else}{t}The geocache description is ok.{/t}{/if}" />{/if}
{if $lfSpace && ($logItem.needs_maintenance==2 || $logItem.needs_maintenance==1 && !(isset($logItem.type) && $logItem.type==10) || $logItem.listing_outdated==2 || $logItem.listing_outdated==1 && !(isset($logItem.type) && $logItem.type==10) || $logItem.recommended)}&nbsp;{/if}
{if $logItem.needs_maintenance==2}<img src="resource2/{$opt.template.style}/images/log/16x16-needs-maintenance.png" alt="{t}The geocache needs maintenance.{/t}" title="{t}The geocache needs maintenance.{/t}" />{elseif $logItem.needs_maintenance==1 && !(isset($logItem.type) && $logItem.type==10)}<img src="resource2/{$opt.template.style}/images/log/16x16-needs-maintenance-no.png" alt="{t}The geocache is in good or acceptable condition.{/t}" title="{t}The geocache is in good or acceptable condition.{/t}" />{if $logItem.listing_outdated}&nbsp;{/if}{/if}
{if $logItem.listing_outdated==2}<img src="resource2/{$opt.template.style}/images/log/16x16-listing-outdated.png" alt="{t}The geocache description is outdated.{/t}" title="{t}The geocache description is outdated.{/t}" />{elseif $logItem.listing_outdated==1 && !(isset($logItem.type) && $logItem.type==10)}<img src="resource2/{$opt.template.style}/images/log/16x16-listing-outdated-no.png" alt="{t}The geocache description is ok.{/t}" title="{t}The geocache description is ok.{/t}" />{/if}
{if $logItem.recommended==1} {* Ocprop: rating-star\.gif *}<img src="images/rating-star.gif" border="0" alt="{t}Recommended{/t}" width="17px" height="16px" />{/if}

0 comments on commit 8b74108

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