2009-07-24 02:21:49 +00:00
< ? php defined ( " SYSPATH " ) or die ( " No direct script access. " ) ?>
< h2 >
< ? = t ( " TagsMap Admin " ) ?>
</ h2 >
2009-10-04 20:40:59 +00:00
< div class = " g-block " >
2009-07-24 02:21:49 +00:00
< h3 >
< ? = t ( " Google Maps Settings " ) ?>
</ h3 >
2012-07-03 03:06:05 +00:00
< br />< div >
< ? = t ( " You may sign up for a Google APIs Console key " ); ?> <a href="https://developers.google.com/maps/documentation/javascript/tutorial#api_key" target="_new">here</a>.</div><br/>
2009-07-24 02:21:49 +00:00
< ? = $googlemaps_form ?>
</ div >
2009-10-04 20:40:59 +00:00
< div class = " g-block " >
2009-07-24 02:21:49 +00:00
< h3 >
< ? = t ( " Assign GPS Coordinates " ) ?>
</ h3 >
< ? $tags_per_column = $tags -> count () / 5 ?>
< ? $column_tag_count = 0 ?>
2009-10-04 20:40:59 +00:00
< table id = " g-gps-tag-admin " class = " g-block-content " >
2009-07-24 02:21:49 +00:00
< caption class = " understate " >
< ? = t2 ( " There is one tag " , " There are %count tags " , $tags -> count ()) ?>
</ caption >
< tr >
< td >
< ? foreach ( $tags as $i => $tag ) : ?>
< ? $current_letter = strtoupper ( mb_substr ( $tag -> name , 0 , 1 )) ?>
< ? if ( $i == 0 ) : /* first letter */ ?>
< strong >< ? = $current_letter ?> </strong>
< ul >
< ? elseif ( $last_letter != $current_letter ) : /* new letter */ ?>
< ? if ( $column_tag_count > $tags_per_column ) : /* new column */ ?>
</ td >
< td >
< ? $column_tag_count = 0 ?>
< ? endif ?>
</ ul >
< strong >< ? = $current_letter ?> </strong>
< ul >
< ? endif ?>
< li >
2009-08-31 08:37:11 +00:00
< ? = html :: clean ( $tag -> name ) ?>
2009-07-24 02:21:49 +00:00
< span class = " understate " > ( < ? = $tag -> count ?> )</span>
< a href = " <?= url::site( " admin / tagsmap / edit_gps / $tag -> id " ) ?> " >< ? = t ( " Edit GPS " ) ?> </a>
2009-07-25 05:17:24 +00:00
< ?
// Check and see if this ID already has GPS data, display a delete button if it does.
$existingGPS = ORM :: factory ( " tags_gps " )
2009-12-23 05:31:03 +00:00
-> where ( " tag_id " , " = " , $tag -> id )
2009-07-25 05:17:24 +00:00
-> find_all ();
if ( count ( $existingGPS ) > 0 ) {
?>
| < a href = " <?= url::site( " admin / tagsmap / confirm_delete_gps / $tag -> id " ) ?> " >< ? = t ( " Delete GPS " ) ?> </a>
< ?
}
?>
2009-07-24 02:21:49 +00:00
</ li >
< ? $column_tag_count ++ ?>
< ? $last_letter = $current_letter ?>
< ? endforeach /* $tags */ ?>
</ ul >
</ td >
</ tr >
</ table >
</ div >
2009-07-26 19:55:49 +00:00
2009-12-23 05:31:03 +00:00
< div class = " g-block " >
2009-07-26 19:55:49 +00:00
< h3 >
< ? = t ( " Remove Orphaned GPS Data " ) ?>
</ h3 >
2009-10-04 20:40:59 +00:00
< table id = " g-orphaned-tag-admin " class = " g-block-content " >
2009-07-26 19:55:49 +00:00
< tr >< td >
< a href = " <?= url::site( " admin / tagsmap / orphaned_tags " ) ?> " >
< ? = t ( " Search For and Delete Orphaned Data " ) ?>
</ a >
</ td ></ tr >
</ table >
</ div >