+
-
= t("Gallery 3 does not support per-user / per-item permissions. Review permissions!") ?>
diff --git a/modules/gallery/views/admin_block_welcome.html.php b/modules/gallery/views/admin_block_welcome.html.php
index d8c96187..d3765d19 100644
--- a/modules/gallery/views/admin_block_welcome.html.php
+++ b/modules/gallery/views/admin_block_welcome.html.php
@@ -2,7 +2,7 @@
= t("This is your administration dashboard and it provides a quick overview of status messages, recent updates, and frequently used options. Add or remove blocks and rearrange them to tailor to your needs. The admin menu provides quick access to all of Gallery 3's options and settings. Here are a few of the most used options to get you started.") ?>
-
+
-
= t("General Settings - choose your graphics and language settings.",
array("graphics_url" => html::mark_clean(url::site("admin/graphics")),
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index f01c2a94..6f1c0962 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -92,25 +92,12 @@ a:hover,
/* Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-#g-content ul li {
+ul.g-text li,
+.g-text ul li {
list-style-type: disc;
margin-left: 1em;
}
-form ul li,
-#g-action-status li,
-#g-log-entries li,
-#g-tag-admin li,
-.g-buttonset li,
-.g-buttonset-vertical li,
-.g-paginator li,
-.ui-sortable li,
-.ui-widget-header li {
- list-style: none !important;
- margin-left: 0 !important;
-}
-
-
/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
form {
--
cgit v1.2.3
From ce5a2532ebcd5131056df908d2da831e91407e9d Mon Sep 17 00:00:00 2001
From: Chad Kieffer
Date: Sun, 24 Apr 2011 13:41:12 -0400
Subject: Extend .g-text list styles to ordered lists to admin_wind theme. Add
.g-text list styles to wind theme.
---
themes/admin_wind/css/screen.css | 9 +++++++++
themes/wind/css/screen.css | 17 +++++++++++++++++
2 files changed, 26 insertions(+)
(limited to 'themes')
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index 6f1c0962..d67850ec 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -95,6 +95,15 @@ a:hover,
ul.g-text li,
.g-text ul li {
list-style-type: disc;
+}
+
+ol.g-text li,
+.g-text ol li {
+ list-style-type: decimal;
+}
+
+.g-text li,
+.g-text li {
margin-left: 1em;
}
diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css
index b470ab1c..81231426 100644
--- a/themes/wind/css/screen.css
+++ b/themes/wind/css/screen.css
@@ -111,6 +111,23 @@ a:hover,
padding-left: 32px;
}
+/* Lists ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+ul.g-text li,
+.g-text ul li {
+ list-style-type: disc;
+}
+
+ol.g-text li,
+.g-text ol li {
+ list-style-type: decimal;
+}
+
+.g-text li,
+.g-text li {
+ margin-left: 1em;
+}
+
/* Forms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
form {
--
cgit v1.2.3
From 8e7a8fd2dc3245c2d236a2cd33d8c1a61ef9963c Mon Sep 17 00:00:00 2001
From: Chad Kieffer
Date: Sun, 24 Apr 2011 14:09:03 -0400
Subject: Add a bit of space below progress bars. Fixes #1703.
---
themes/admin_wind/css/screen.css | 2 +-
themes/wind/css/screen.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'themes')
diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css
index d67850ec..a26bf6d2 100644
--- a/themes/admin_wind/css/screen.css
+++ b/themes/admin_wind/css/screen.css
@@ -896,7 +896,7 @@ button {
.g-progress-bar {
height: 1em;
width: 100%;
- margin-top: .5em;
+ margin: .5em 0;
display: inline-block;
}
diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css
index 81231426..d6909364 100644
--- a/themes/wind/css/screen.css
+++ b/themes/wind/css/screen.css
@@ -945,7 +945,7 @@ button {
.g-progress-bar {
height: 1em;
width: 100%;
- margin-top: .5em;
+ margin: .5em 0;
display: inline-block;
}
--
cgit v1.2.3
From 5cf38ed816006af52fa08475d2957a6f18846887 Mon Sep 17 00:00:00 2001
From: Bharat Mediratta
Date: Tue, 26 Apr 2011 09:48:21 -0700
Subject: Stop using Pagination() and instead use $theme->pager() in views.
Move the pager() function up to Gallery_View and replace
themes/admin_wind/views/pager.html.php (Pagination based) with a modified
version from the wind theme in themes/admin_wind/views/paginator.html.php.
Fixes #1718.
---
.../comment/controllers/admin_manage_comments.php | 13 ++--
.../comment/views/admin_manage_comments.html.php | 2 +-
modules/gallery/libraries/Gallery_View.php | 46 +++++++++++
modules/gallery/libraries/MY_Pagination.php | 35 ---------
modules/gallery/libraries/Theme_View.php | 46 -----------
modules/user/controllers/admin_users.php | 8 ++
modules/user/views/admin_users.html.php | 2 +-
themes/admin_wind/views/pager.html.php | 44 -----------
themes/admin_wind/views/paginator.html.php | 88 ++++++++++++++++++++++
9 files changed, 151 insertions(+), 133 deletions(-)
delete mode 100644 modules/gallery/libraries/MY_Pagination.php
delete mode 100644 themes/admin_wind/views/pager.html.php
create mode 100644 themes/admin_wind/views/paginator.html.php
(limited to 'themes')
diff --git a/modules/comment/controllers/admin_manage_comments.php b/modules/comment/controllers/admin_manage_comments.php
index 9bd1d7f6..effefcbb 100644
--- a/modules/comment/controllers/admin_manage_comments.php
+++ b/modules/comment/controllers/admin_manage_comments.php
@@ -45,6 +45,8 @@ class Admin_Manage_Comments_Controller extends Admin_Controller {
$view = new Admin_View("admin.html");
$view->page_title = t("Manage comments");
+ $view->page_type = "collection";
+ $view->page_subtype = "admin_comments";
$view->content = new View("admin_manage_comments.html");
$view->content->counts = $this->_counts();
$view->content->menu = $this->_menu($view->content->counts);
@@ -56,13 +58,12 @@ class Admin_Manage_Comments_Controller extends Admin_Controller {
->limit(self::$items_per_page)
->offset(($page - 1) * self::$items_per_page)
->find_all();
- $view->content->pager = new Pagination();
- $view->content->pager->initialize(
- array("query_string" => "page",
- "total_items" => $view->content->counts->$state,
- "items_per_page" => self::$items_per_page,
- "style" => "classic"));
+ // Pagination info
+ $view->page = $page;
+ $view->page_size = self::$items_per_page;
+ $view->children_count = $this->_counts()->$state;
+ $view->max_pages = ceil($view->children_count / $view->page_size);
print $view;
}
diff --git a/modules/comment/views/admin_manage_comments.html.php b/modules/comment/views/admin_manage_comments.html.php
index 34a28986..e7a61837 100644
--- a/modules/comment/views/admin_manage_comments.html.php
+++ b/modules/comment/views/admin_manage_comments.html.php
@@ -194,7 +194,7 @@
- = $pager ?>
+ = $theme->paginator() ?>
diff --git a/modules/gallery/libraries/Gallery_View.php b/modules/gallery/libraries/Gallery_View.php
index 1395686c..e04b9169 100644
--- a/modules/gallery/libraries/Gallery_View.php
+++ b/modules/gallery/libraries/Gallery_View.php
@@ -30,6 +30,52 @@ class Gallery_View_Core extends View {
return $absolute_url ? url::abs_file($arg) : url::file($arg);
}
+ /**
+ * Set up the data and render a pager.
+ *
+ * See themes/wind/views/pager.html for documentation on the variables generated here.
+ */
+ public function paginator() {
+ $v = new View("paginator.html");
+ $v->page_type = $this->page_type;
+ $v->page_subtype = $this->page_subtype;
+ $v->first_page_url = null;
+ $v->previous_page_url = null;
+ $v->next_page_url = null;
+ $v->last_page_url = null;
+
+ if ($this->page_type == "collection") {
+ $v->page = $this->page;
+ $v->max_pages = $this->max_pages;
+ $v->total = $this->children_count;
+
+ if ($this->page != 1) {
+ $v->first_page_url = url::site(url::merge(array("page" => 1)));
+ $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1)));
+ }
+
+ if ($this->page != $this->max_pages) {
+ $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1)));
+ $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages)));
+ }
+
+ $v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
+ $v->last_visible_position = min($this->page * $this->page_size, $v->total);
+ } else if ($this->page_type == "item") {
+ $v->position = $this->position;
+ $v->total = $this->sibling_count;
+ if ($this->previous_item) {
+ $v->previous_page_url = $this->previous_item->url();
+ }
+
+ if ($this->next_item) {
+ $v->next_page_url = $this->next_item->url();
+ }
+ }
+
+ return $v;
+ }
+
/**
* Begin gather up scripts or css files so that they can be combined into a single request.
*
diff --git a/modules/gallery/libraries/MY_Pagination.php b/modules/gallery/libraries/MY_Pagination.php
deleted file mode 100644
index e697c0bd..00000000
--- a/modules/gallery/libraries/MY_Pagination.php
+++ /dev/null
@@ -1,35 +0,0 @@
-auto_hide === TRUE AND $this->total_pages <= 1) {
- return "";
- }
-
- if ($style === NULL) {
- // Use default style
- $style = $this->style;
- }
-
- // Return rendered pagination view
- return View::factory("pager.html", get_object_vars($this))->render();
- }
-}
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 152efc37..d6834464 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -138,52 +138,6 @@ class Theme_View_Core extends Gallery_View {
return $menu->render();
}
- /**
- * Set up the data and render a pager.
- *
- * See themes/wind/views/pager.html for documentation on the variables generated here.
- */
- public function paginator() {
- $v = new View("paginator.html");
- $v->page_type = $this->page_type;
- $v->page_subtype = $this->page_subtype;
- $v->first_page_url = null;
- $v->previous_page_url = null;
- $v->next_page_url = null;
- $v->last_page_url = null;
-
- if ($this->page_type == "collection") {
- $v->page = $this->page;
- $v->max_pages = $this->max_pages;
- $v->total = $this->children_count;
-
- if ($this->page != 1) {
- $v->first_page_url = url::site(url::merge(array("page" => 1)));
- $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1)));
- }
-
- if ($this->page != $this->max_pages) {
- $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1)));
- $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages)));
- }
-
- $v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
- $v->last_visible_position = min($this->page * $this->page_size, $v->total);
- } else if ($this->page_type == "item") {
- $v->position = $this->position;
- $v->total = $this->sibling_count;
- if ($this->previous_item) {
- $v->previous_page_url = $this->previous_item->url();
- }
-
- if ($this->next_item) {
- $v->next_page_url = $this->next_item->url();
- }
- }
-
- return $v;
- }
-
/**
* Print out any site wide status information.
*/
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index a3633b52..41be6c03 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -21,6 +21,8 @@ class Admin_Users_Controller extends Admin_Controller {
public function index() {
$view = new Admin_View("admin.html");
$view->page_title = t("Users and groups");
+ $view->page_type = "collection";
+ $view->page_subtype = "admin_users";
$view->content = new View("admin_users.html");
// @todo: add this as a config option
@@ -29,6 +31,12 @@ class Admin_Users_Controller extends Admin_Controller {
$builder = db::build();
$user_count = $builder->from("users")->count_records();
+ // Pagination info
+ $view->page = $page;
+ $view->page_size = $page_size;
+ $view->children_count = $user_count;
+ $view->max_pages = ceil($view->children_count / $view->page_size);
+
$view->content->pager = new Pagination();
$view->content->pager->initialize(
array("query_string" => "page",
diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php
index a7bd6b27..033c9dae 100644
--- a/modules/user/views/admin_users.html.php
+++ b/modules/user/views/admin_users.html.php
@@ -110,7 +110,7 @@