diff options
-rw-r--r-- | core/config/config.php | 3 | ||||
-rw-r--r-- | modules/search/helpers/search_block.php | 25 | ||||
-rw-r--r-- | modules/search/helpers/search_installer.php | 36 | ||||
-rw-r--r-- | modules/search/views/search_link.html.php | 12 | ||||
-rw-r--r-- | themes/default/css/screen.css | 19 | ||||
-rw-r--r-- | themes/default/views/header.html.php | 8 |
6 files changed, 94 insertions, 9 deletions
diff --git a/core/config/config.php b/core/config/config.php index 71916a8b..9fe668b8 100644 --- a/core/config/config.php +++ b/core/config/config.php @@ -132,5 +132,6 @@ $config['modules'] = array MODPATH . 'media_rss', MODPATH . 'slideshow', MODPATH . 'comment', - MODPATH . 'atom' + MODPATH . 'atom', + MODPATH . 'search' ); diff --git a/modules/search/helpers/search_block.php b/modules/search/helpers/search_block.php new file mode 100644 index 00000000..b6450b4d --- /dev/null +++ b/modules/search/helpers/search_block.php @@ -0,0 +1,25 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class search_block_Core { + public static function header_bottom($theme) { + $view = new View("search_link.html"); + return $view->render(); + } +}
\ No newline at end of file diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php new file mode 100644 index 00000000..ebcab43b --- /dev/null +++ b/modules/search/helpers/search_installer.php @@ -0,0 +1,36 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class search_installer { + public static function install() { + Kohana::log("debug", "search_installer::install"); + $db = Database::instance(); + $version = module::get_version("search"); + Kohana::log("debug", "version: $version"); + + if ($version == 0) { + module::set_version("search", 1); + } + } + + public static function uninstall() { + $db = Database::instance(); + module::delete("search"); + } +} diff --git a/modules/search/views/search_link.html.php b/modules/search/views/search_link.html.php new file mode 100644 index 00000000..983742a3 --- /dev/null +++ b/modules/search/views/search_link.html.php @@ -0,0 +1,12 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<form id="gSearchForm"> + <ul> + <li> + <label for="search"><?= _("Search") ?></label> + <input type="text" name="search" value="<?= _("Search Gallery ...") ?>"/> + </li> + <li> + <input type="submit" value="<?= _("search") ?>" /> + </li> + </ul> +</form> diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index f8cbe878..a3ccedfc 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -74,7 +74,7 @@ th { /** ******************************************************************* * 2) Base text styles ******************************************************************/ -#gContent { +#gContent { font-size: 1em; } @@ -721,6 +721,23 @@ li.gError select { margin-right: 20px; } +#gSearchForm li { + float: left; + padding: .3em .5em .4em .5em; +} + +#gSearchForm input[type="text"], +#gSearchForm input[type="password"], +#gSearchForm textarea, +#gSearchForm .gValidationRule { + width: 10em; +} + +#gSearchForm input[type="Submit"] { + margin-top: 1em; +} + + #gSearchForm label { display: none; } diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index c8eb2145..1ca2a952 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -12,12 +12,7 @@ </ul> </div> -<form id="gSearchForm" class="gInline"> - <ul class="gNoLabels"> - <li><label for="search">Search</label><input type="text" name="search" value="<?= _("Search Gallery ...") ?>"/></li> - <li><input type="submit" value="<?= _("search") ?>" /></li> - </ul> -</form> +<?= $theme->header_bottom() ?> <ul id="gBreadcrumbs" class="gClearFix"> <? foreach ($parents as $parent): ?> @@ -25,4 +20,3 @@ <? endforeach ?> <li class="active"><?= $item->title_edit ?></li> </ul> -<?= $theme->header_bottom() ?> |