diff options
Diffstat (limited to 'themes/default/views')
| -rw-r--r-- | themes/default/views/album.html.php | 5 | ||||
| -rw-r--r-- | themes/default/views/dynamic.html.php | 4 | ||||
| -rw-r--r-- | themes/default/views/header.html.php | 8 | ||||
| -rw-r--r-- | themes/default/views/movie.html.php | 23 | ||||
| -rw-r--r-- | themes/default/views/page.html.php | 56 | ||||
| -rw-r--r-- | themes/default/views/pager.html.php | 10 | ||||
| -rw-r--r-- | themes/default/views/photo.html.php | 5 |
7 files changed, 51 insertions, 60 deletions
diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index 7e6913df..65ea3381 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -2,8 +2,8 @@ <? // @todo Set hover on AlbumGrid list items for guest users ?> <div id="gInfo"> <?= $theme->album_top() ?> - <h1><?= p::clean($item->title) ?></h1> - <div class="gDescription"><?= p::clean($item->description) ?></div> + <h1><?= p::purify($item->title) ?></h1> + <div class="gDescription"><?= nl2br(p::purify($item->description)) ?></div> </div> <ul id="gAlbumGrid"> @@ -19,6 +19,7 @@ <?= $child->thumb_img(array("class" => "gThumbnail")) ?> </a> <?= $theme->thumb_bottom($child) ?> + <?= $theme->thumb_menu($child) ?> <h2><span></span><a href="<?= $child->url() ?>"><?= p::clean($child->title) ?></a></h2> <ul class="gMetadata"> <?= $theme->thumb_info($child) ?> diff --git a/themes/default/views/dynamic.html.php b/themes/default/views/dynamic.html.php index 12b5192c..2d122e69 100644 --- a/themes/default/views/dynamic.html.php +++ b/themes/default/views/dynamic.html.php @@ -3,7 +3,7 @@ <div id="gAlbumHeaderButtons"> <?= $theme->dynamic_top() ?> </div> - <h1><?= p::clean($tag->name) ?></h1> + <h1><?= p::clean($title) ?></h1> </div> <ul id="gAlbumGrid"> @@ -16,7 +16,7 @@ width="<?= $child->thumb_width ?>" height="<?= $child->thumb_height ?>" /> </a> - <h2><?= p::clean($child->title) ?></h2> + <h2><?= p::purify($child->title) ?></h2> <?= $theme->thumb_bottom($child) ?> <ul class="gMetadata"> <?= $theme->thumb_info($child) ?> diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index e1e52bda..5428d9fd 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -3,8 +3,8 @@ <? if ($header_text = module::get_var("gallery", "header_text")): ?> <?= $header_text ?> <? else: ?> -<a href="<?= url::site("albums/1") ?>"> - <img width="107" height="48" id="gLogo" alt="<?= t("Gallery: Your photos on your web site") ?>" src="<?= $theme->url("images/logo.png") ?>" /> +<a id="gLogo" href="<?= url::site("albums/1") ?>" title="<?= t("go back to the Gallery home") ?>"> + <img width="107" height="48" alt="<?= t("Gallery logo: Your photos on your web site") ?>" src="<?= $theme->theme_url("images/logo.png") ?>" /> </a> <? endif ?> @@ -19,10 +19,10 @@ <? foreach ($parents as $parent): ?> <li> <a href="<?= url::site("albums/{$parent->id}?show=$item->id") ?>"> - <?= p::clean($parent->title) ?> + <?= p::purify($parent->title) ?> </a> </li> <? endforeach ?> - <li class="active"><?= p::clean($item->title) ?></li> + <li class="active"><?= p::purify($item->title) ?></li> </ul> <? endif ?> diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php index e8559697..66c80ded 100644 --- a/themes/default/views/movie.html.php +++ b/themes/default/views/movie.html.php @@ -1,5 +1,4 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<script src="<?= url::file("lib/flowplayer.js") ?>" type="text/javascript"></script> <div id="gItem"> <?= $theme->photo_top() ?> @@ -13,27 +12,11 @@ <? endif ?> </ul> - <a id="gMovieId-<?= $item->id ?>" - href="<?= $item->file_url(true) ?>" - style="display: block; width: <?= $item->width ?>px; height: <?= $item->height ?>px"> - </a> - <script> - flowplayer("gMovieId-<?= $item->id ?>", "<?= url::abs_file("lib/flowplayer.swf") ?>", { - plugins: { - h264streaming: { - url: "<?= url::abs_file("lib/flowplayer.h264streaming.swf") ?>" - }, - controls: { - autoHide: 'always', - hideDelay: 2000 - } - } - }) - </script> + <?= $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?> <div id="gInfo"> - <h1><?= p::clean($item->title) ?></h1> - <div><?= p::clean($item->description) ?></div> + <h1><?= p::purify($item->title) ?></h1> + <div><?= nl2br(p::purify($item->description)) ?></div> </div> <script type="text/javascript"> diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index f6286f95..181a2c46 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -1,5 +1,5 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN" +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> @@ -23,17 +23,13 @@ <? endif ?> <? endif ?> </title> - <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" - media="screen,print,projection" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/superfish/css/superfish.css") ?>" - media="screen" /> - <link rel="stylesheet" type="text/css" href="<?= url::file("lib/themeroller/ui.base.css") ?>" - media="screen,print,projection" /> - <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/screen.css") ?>" - media="screen,print,projection" /> + <link rel="shortcut icon" href="<?= $theme->theme_url("images/favicon.ico") ?>" type="image/x-icon" /> + <?= $theme->css("lib/yui/reset-fonts-grids.css") ?> + <?= $theme->css("lib/superfish/css/superfish.css") ?> + <?= $theme->css("lib/themeroller/ui.base.css") ?> + <?= $theme->theme_css("css/screen.css") ?> <!--[if lt IE 8]> - <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>" + <link rel="stylesheet" type="text/css" href="<?= $theme->theme_url("css/fix-ie.css") ?>" media="screen,print,projection" /> <![endif]--> <? if ($theme->page_type == 'album'): ?> @@ -49,18 +45,28 @@ </style> <? endif ?> <? endif ?> - <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/gallery.common.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/gallery.form.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script> - <? if ($theme->page_type == 'photo'): ?> - <script src="<?= url::file("lib/jquery.scrollTo.js") ?>" type="text/javascript"></script> - <script src="<?= url::file("lib/jquery.localscroll.js") ?>" type="text/javascript"></script> + <?= $theme->script("lib/jquery.js") ?> + <?= $theme->script("lib/jquery.form.js") ?> + <?= $theme->script("lib/jquery-ui.js") ?> + <?= $theme->script("lib/gallery.common.js") ?> + <? /* MSG_CANCEL is required by gallery.dialog.js */ ?> + <script type="text/javascript"> + var MSG_CANCEL = "<?= t('Cancel') ?>"; + </script> + <?= $theme->script("lib/gallery.dialog.js") ?> + <?= $theme->script("lib/gallery.form.js") ?> + <?= $theme->script("lib/superfish/js/superfish.js") ?> + <?= $theme->script("lib/jquery.localscroll.js") ?> + <?= $theme->theme_script("js/ui.init.js") ?> + + <? /* These are page specific, but if we put them before $theme->head() they get combined */ ?> + <? if ($theme->page_type == "photo"): ?> + <?= $theme->script("lib/jquery.scrollTo.js") ?> + <?= $theme->script("lib/gallery.show_full_size.js") ?> + <? elseif ($theme->page_type == "movie"): ?> + <?= $theme->script("lib/flowplayer.js") ?> <? endif ?> - <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script> + <?= $theme->head() ?> </head> @@ -69,7 +75,7 @@ <div id="doc4" class="yui-t5 gView"> <?= $theme->site_status() ?> <div id="gHeader"> - <?= $theme->display("header.html") ?> + <?= new View("header.html") ?> </div> <div id="bd"> <div id="yui-main"> @@ -82,12 +88,12 @@ </div> <div id="gSidebar" class="yui-b"> <? if ($theme->page_type != "login"): ?> - <?= $theme->display("sidebar.html") ?> + <?= new View("sidebar.html") ?> <? endif ?> </div> </div> <div id="gFooter"> - <?= $theme->display("footer.html") ?> + <?= new View("footer.html") ?> </div> </div> <?= $theme->page_bottom() ?> diff --git a/themes/default/views/pager.html.php b/themes/default/views/pager.html.php index 28a39490..7cdc9bb0 100644 --- a/themes/default/views/pager.html.php +++ b/themes/default/views/pager.html.php @@ -2,10 +2,12 @@ <? // See http://docs.kohanaphp.com/libraries/pagination ?> <ul class="gPager"> <? /* @todo This message isn't easily localizable */ - $from_to_msg = t("Photos %from_number - %to_number of %total", - array("from_number" => $current_first_item, - "to_number" => $current_last_item, - "total" => $total_items)) ?> + $from_to_msg = t2("Photo %from_number of %count", + "Photos %from_number - %to_number of %count", + $total_items, + array("from_number" => $current_first_item, + "to_number" => $current_last_item, + "count" => $total_items)) ?> <li> <? if ($first_page): ?> <a href="<?= str_replace('{page}', 1, $url) ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 1c3b81a7..bf4d9da3 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -2,7 +2,6 @@ <? if (access::can("view_full", $theme->item())): ?> <!-- Use javascript to show the full size as an overlay on the current page --> -<script src="<?= url::file("lib/gallery.show_full_size.js") ?>" type="text/javascript"></script> <script> $(document).ready(function() { $(".gFullSizeLink").click(function() { @@ -51,8 +50,8 @@ </div> <div id="gInfo"> - <h1><?= p::clean($item->title) ?></h1> - <div><?= p::clean($item->description) ?></div> + <h1><?= p::purify($item->title) ?></h1> + <div><?= nl2br(p::purify($item->description)) ?></div> </div> <script type="text/javascript"> |
