Commit Graph

376 Commits

Author SHA1 Message Date
Bharat Mediratta
b19729435c Dashboard blocks are now data driven, and you can add new blocks to
both the sidebar and the center content area from a dropdown at the
top of the dashboard sidebar.
2009-01-12 07:39:53 +00:00
Bharat Mediratta
11fb04cdde Only the admin dashboard has a sidebar now.
admin.html.php looks for $sidebar and renders the page appropriately
if one exists.  But only admin_dashboard has one currently.
2009-01-12 04:04:55 +00:00
Bharat Mediratta
b98f498ed6 Change admin/graphics to avoid using radio buttons. Instead, when you
hover over a toolkit it changes color and your cursor becomes a
pointer.  Clicking changes the toolkit.
2009-01-11 22:14:44 +00:00
Bharat Mediratta
0033887ba8 Rework the way we do theme selection. Show the currently active theme
and then thumbnails for all the other available themes.  If you select
one of the other available themes, it gives you a preview pane where
you can look at either the main page or the site admin page with the
new theme, then choose to activate it if you like it.
2009-01-11 00:24:39 +00:00
Felix Rabinovich
5ee03eb9c8 Save individual theme values 2009-01-10 22:36:06 +00:00
Felix Rabinovich
705c55fb79 Submit theme values 2009-01-10 22:04:49 +00:00
Felix Rabinovich
72e9d20f3c Display theme details 2009-01-10 19:41:43 +00:00
Bharat Mediratta
a2dbbf32ab style cleanup. 2009-01-10 19:10:52 +00:00
Felix Rabinovich
006f18dc7a Split themes into two tabs for regular and admin themes 2009-01-10 08:00:43 +00:00
Bharat Mediratta
a7feeb576f Big set of changes to comments, with related changes to akismet and
user modules.

* Don't delete vars when we delete a module.  This makes
  reinstalling a module a lot easier.

* Add user::lookup() as the preferred way to load a user, so that
  other modules don't delve into the user module (that'd be a
  problem when we swap out user modules)

* Notify site admins if Akismet is not fully configured

* Bundle all server variables into the comment so that if/when we
  re-check the comment, we are not using the server info from the
  site admin's request.

* Update Akismet to grab request context data from the comment

* Pre-seed comment fields if we have a logged in user.  Update
  comment::create() API to clarify it for this.

* Delete comment::update(), that's a controller function.

* Add url to User_Model

* Add author_name() author_email() and author_url() to
  Comment_Model.  It'll return the appropriate values depending
  on whether the comment was left by a logged in user or a guest.

* Use resetForm() instead of clearForm() when we reload the
  comment form after ajax submit, this way we preserve the
  pre-seeded values.

* In the user profile page, ignore blank passwords.
2009-01-10 00:34:23 +00:00
Felix Rabinovich
48e73e9081 Theme Administration cleanup initialization 2009-01-09 23:54:40 +00:00
Felix Rabinovich
b647aa0f74 Theme Administration v. 2. Doesn't distinguish between regular and admin themes yet 2009-01-09 23:31:46 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
8f9738e6d3 Don't toggle akismet::test_mode if akismet isn't installed. 2009-01-08 02:58:03 +00:00
Bharat Mediratta
bc36ba609d Add akismet::$test_mode, initialize it to TEST_MODE and don't contact
akismet if it's on.  Force it on in the scaffolding so that we don't
try to run all comments we add from there through Akismet.
2009-01-08 02:56:49 +00:00
Bharat Mediratta
8620c3fa01 Update event calls to take the orig and new models so that event listeners can do comparisons 2009-01-08 02:39:21 +00:00
Bharat Mediratta
7482b6683e Add "quick edit" which lets you edit a photo's details from the albums
page.
2009-01-05 08:05:50 +00:00
Bharat Mediratta
63302ad49c Fix message line so that uploads work 2009-01-04 19:46:37 +00:00
Bharat Mediratta
3c768e1c59 Require CSRF for any non-"get" action. 2009-01-04 01:27:24 +00:00
Bharat Mediratta
3d9e5e439e Stay on the right page when we navigate up in the breadcrumb.
Introduce a "show" parameter which contains the id of the item that we
want to show when we go to the parent's page.
2009-01-03 20:14:06 +00:00
Bharat Mediratta
0cfa51b5b7 Propagate rotation up to the parent album, if we're rotating the album cover. 2009-01-03 05:47:00 +00:00
Bharat Mediratta
e8f1ff580c Add a new quick-edit mode for editing photos when viewing albums.
Implement image rotation this way.
2009-01-03 05:36:16 +00:00
Bharat Mediratta
b08373919b trim() the path in add_photos 2009-01-02 04:01:25 +00:00
Felix Rabinovich
50dceb5015 Theme Administration implementation 2009-01-01 18:56:06 +00:00
Bharat Mediratta
03c60e2b55 Add deepest album link 2009-01-01 00:28:00 +00:00
Bharat Mediratta
4573ada534 Extend permissions interface to allow resetting to the parental default. 2008-12-31 19:59:42 +00:00
Bharat Mediratta
7d30e55b85 Rename permissions_edit to permissions_browse for consistency 2008-12-31 09:52:03 +00:00
Bharat Mediratta
34372b86c5 Ajaxify the permissions browsing dialog. It only does allow/deny
right now, it doesn't allow you to reset to inherited values.  That's
next.
2008-12-31 09:50:25 +00:00
Bharat Mediratta
48e91e71e5 Rename permission_xxx to permissions_xxx for consistency 2008-12-31 09:04:18 +00:00
Bharat Mediratta
610494296b Turn permission dialog into a browser where you can look at permissions back up the tree 2008-12-31 09:02:40 +00:00
Bharat Mediratta
fc56ebd434 Simplify the next/previous logic in the theme by passing in a null
next/prev sib if one didn't exist.  (that's what we were supposed to
be doing in the first place, anyway)
2008-12-31 07:22:35 +00:00
Bharat Mediratta
c1140b5c0a Add Item_Model::url() and use it where appropriate. Cleans up some
grotty looking stuff in themes.
2008-12-31 07:13:34 +00:00
Bharat Mediratta
44c987e89e Add sibling information on photo pages and a very simple next/previous interface. 2008-12-31 07:06:10 +00:00
Bharat Mediratta
b7f451635a change single to double quotes. 2008-12-31 06:44:38 +00:00
Bharat Mediratta
1579494ec4 Preliminary "Edit Permissions" dialog. You can't change permissions
yet, but it shows you which items have locked view perms.
2008-12-31 04:05:41 +00:00
Bharat Mediratta
ad719b9b6f Fully implement the view_full permission. 2008-12-31 00:18:24 +00:00
Andy Staudacher
59e5ddc13f Update user::create() scaffolding for changes in the user module: can't set the isAdmin bit at creation time. 2008-12-30 21:20:16 +00:00
Bharat Mediratta
a481a684b6 Add a "Graphics Settings" page that lets admins choose which graphics
toolkit we use.  We only allow users to use one toolkit.  The UI needs
work!
2008-12-30 04:14:57 +00:00
Bharat Mediratta
6ab195854d Remove rest::JSON content type; it's causing lots of problems and it doesn't directly help since text/html works just as well for our JSON communications 2008-12-29 22:41:53 +00:00
Bharat Mediratta
763cc32caf Return the task on success so that our UI can show it at 100% 2008-12-29 21:28:28 +00:00
Bharat Mediratta
8fe1990c99 Don't set the document type to JSON when uploading photos. 2008-12-29 04:20:25 +00:00
Bharat Mediratta
ed8689f768 Expand on the maintenance code to make it more robust and give the
admin more control.  You can now track running tasks, resume stalled
tasks, cancel running tasks, and remove finished tasks.

Added graphics::compose() as a placeholder for future watermark
operations.

Added CSRF protection to maintenance urls.
2008-12-28 23:48:15 +00:00
Bharat Mediratta
74d4e7d505 First round of a task framework. Tasks are job definitions stored in
the database.  They're started with admin/maintenance/start/[task_name]
which sends down some JS/HTML which regularly pings the task at
admin/maintenance/start/[task_id] until its done.

The UI is still very rough.  It works, though!
2008-12-28 10:12:41 +00:00
Felix Rabinovich
6b1fa62173 Added content type to JSON output functions 2008-12-26 20:08:15 +00:00
Bharat Mediratta
6b45be9632 Fix a typo. 2008-12-26 03:56:12 +00:00
Bharat Mediratta
2c91a7e9ce Rework log and message helpers to be parallel, but separate.
1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
2008-12-25 23:43:44 +00:00
Bharat Mediratta
b6f44334d9 Make sure admin method exist before we call them, else we'll just recurse into Admin_Controller::__call() again 2008-12-25 22:29:05 +00:00
Bharat Mediratta
d5a1433f2d Reload the parent before using when adding albums/photos since it may have invalid left/right pointers. 2008-12-25 06:12:16 +00:00
Bharat Mediratta
fdc0f83024 Big round of normalization of the way that our controllers
communicate.  Almost all controllers now use JSON to speak to the
theme when we're dealing with form processing.  This means tht we only
send the form back and forth, but we use a JSON protocol to tell the
browser success/error status as well as the location of any newly
created resources, or where the browser should redirect the user.

Lots of small changes:
1) Admin -> Edit Profile is gone.  Instead I fixed the "Modify Profile" link
   in the top right corner to be a modal dialog

2) We use json_encode everywhere.  No more Atom/XML for now.  We can bring those
   back later, though.  For now there's a lot of code duplication but that'll be
   easy to clean up.

3) REST_Controller is no longer abstract.   All methods its subclasses should create
   throw exceptions, which means that subclasses don't have to implement stubs for
   those methods.

4) New pattern: helper method get_add_form calls take an Item_Model,
   not an id since we have to load the Item_Model in the controller
   anyway to check permissions.

5) User/Groups REST resources are separate from User/Group in the site
   admin.  They do different things, we should avoid confusing overlap.
2008-12-25 05:12:46 +00:00
Bharat Mediratta
f6ebb436e4 Rest_Controller -> REST_Controller everywhere, for consistency. 2008-12-25 02:38:53 +00:00