Permalink
Browse files

Added a return to album link.

  • Loading branch information...
1 parent f93a9fc commit a523a32e82f31c0f777690faf38c17957af72f12 rWatcher committed with talmdal Mar 18, 2010
Showing with 6 additions and 0 deletions.
  1. +3 −0 modules/exif_gps/controllers/exif_gps.php
  2. +3 −0 modules/exif_gps/views/exif_gps_map.html.php
@@ -65,6 +65,9 @@ public function map($map_type, $type_id) {
if ($int_map_type == 3) $map_type = "TERRAIN";
$template->content->map_type = $map_type;
+ // When mapping an album, generate a "return to album" link.
+ if (isset($curr_album)) $template->content->return_url = url::abs_site("{$curr_album[0]->type}s/{$curr_album[0]->id}");
+
// Load in module preferences.
$template->content->items = $items;
$template->content->google_map_key = module::get_var("exif_gps", "googlemap_api_key");
@@ -74,4 +74,7 @@ function initialize() {
</div>
<br />
<div id="map_canvas" style="width:600px; height:480px;"></div>
+<? if ($return_url != ""): ?>
+<br /><a href="<?=$return_url; ?>"><?=t("Return to album"); ?></a>
+<? endif ?>
<?= $theme->dynamic_bottom() ?>

0 comments on commit a523a32

Please sign in to comment.