Commit Graph

25 Commits

Author SHA1 Message Date
Bharat Mediratta
6bfadc14ed Fully implement the user administration backend with drag/drop to add
users to groups.
2009-01-28 22:42:50 +00:00
Tim Almdal
a8233ed979 Undo the adding underscores to the id on forge generated forms 2009-01-25 06:28:04 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +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
4ee24a6645 Put up an error if you rename a user to an already existing name. 2009-01-06 10:05:08 +00:00
Bharat Mediratta
fa1ccbd86d Fix up all the various little forms to have submit buttons, fieldset legends, etc etc. 2009-01-06 09:22:29 +00:00
Felix Rabinovich
1d76689e4b Add title back to non-DHTML form to maintain consistency 2008-12-28 22:49:58 +00:00
Felix Rabinovich
a26127ae9c Added title to user/group administration dialogs 2008-12-26 20:34:56 +00:00
Felix Rabinovich
6dcc3e5c25 User/Group administration cleanup 2008-12-26 06:14:24 +00:00
Felix Rabinovich
c154f9f20a Group Administration 2008-12-26 04:35:27 +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
Felix Rabinovich
6e68c5ca28 added sprintf to strings for tranlation support 2008-12-25 02:59:45 +00:00
Felix Rabinovich
481352c382 User administration: 1. Add users; 2. Group administration; 3. General cleanup 2008-12-25 02:16:41 +00:00
Bharat Mediratta
a3142246e4 Move the view permission cache directly into the item table for efficiency. Unit tests ftw! 2008-12-12 06:54:48 +00:00
Bharat Mediratta
2cf3233f54 Get rid of all pseudo users and pseudo groups, while preserving all
other functionality.  This makes our user/group and access code
fully consistent.
2008-12-12 00:59:30 +00:00
Bharat Mediratta
e62103b8d9 Move code to delete users and add/remove users from groups into the
model.
2008-12-09 08:47:30 +00:00
Bharat Mediratta
91c4bda1ec Prototype access control model. There's much left to do, but it's a
working implementation.
2008-12-01 08:50:00 +00:00
Bharat Mediratta
e1f39ac13f Re-enable code to drop view columns from the items table when deleting groups. 2008-11-26 09:38:39 +00:00
Tim Almdal
de56a33c9c Clean tag creation 2008-11-26 06:37:12 +00:00
Bharat Mediratta
226df2a8f8 Add support in the scaffolding for adding users to groups, adding and
removing users and groups.
2008-11-26 04:45:43 +00:00
Bharat Mediratta
5ccb050413 group::create() and group::delete() now manage the view_## columns in
the items table.

Convert installer over to using new creation API.
2008-11-26 04:13:57 +00:00
Bharat Mediratta
5fce343ca4 Create user/group create/delete functions and have the scaffolding use them. 2008-11-26 03:34:39 +00:00