[MKDoc-commit] Patch from Sam normalizing the URIs in the group admin UI

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Mon May 23 16:46:15 BST 2005


Log Message:
-----------
Patch from Sam normalizing the URIs in the group admin UI

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/conf:
        users.conf
    mkd/flo/plugin/Admin:
        Group.pm
    mkd/templates/admin/group_add:
        en.html
    mkd/templates/admin/group_confirm_delete:
        en.html
    mkd/templates/admin/group_edit:
        en.html
    mkd/templates/admin/group_list:
        en.html

-------------- next part --------------
Index: users.conf
===================================================================
RCS file: /var/spool/cvs/mkd/conf/Attic/users.conf,v
retrieving revision 1.1.2.37
retrieving revision 1.1.2.38
diff -Lconf/users.conf -Lconf/users.conf -u -r1.1.2.37 -r1.1.2.38
--- conf/users.conf
+++ conf/users.conf
@@ -43,6 +43,9 @@
 flo::plugin::Admin::AudienceModify
 flo::plugin::Admin::AudienceDelete
 flo::plugin::Admin::Group
+flo::plugin::Admin::GroupEdit
+flo::plugin::Admin::GroupConfirmDelete
+flo::plugin::Admin::GroupAdd
 flo::plugin::Admin::UserCSV
 
 # preferences
Index: Group.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/plugin/Admin/Attic/Group.pm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Lflo/plugin/Admin/Group.pm -Lflo/plugin/Admin/Group.pm -u -r1.1.2.1 -r1.1.2.2
--- flo/plugin/Admin/Group.pm
+++ flo/plugin/Admin/Group.pm
@@ -84,7 +84,7 @@
         die "Unknown runmode $rm.";
     }
 }
-sub http_post { goto &http_get; }
+sub http_post { shift()->http_get(@_) }
 
 # render the template for this runmode
 sub output {
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/admin/group_add/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/admin/group_add/en.html -Ltemplates/admin/group_add/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/admin/group_add/en.html
+++ templates/admin/group_add/en.html
@@ -13,7 +13,6 @@
   xml:lang="en"
   dir="ltr"
   petal:define="
-    uri                        self/uri;
     title                      string:Add a Group;
     lang                       self/lang;
     dir                        self/direction;
@@ -27,6 +26,7 @@
     user_list                  plugin: flo::plugin::Admin::UserList;
     user_add                   plugin: flo::plugin::Admin::UserInsert;
     group_plugin               plugin: flo::plugin::Admin::Group;
+    uri                        group_plugin/uri;
     preferences                plugin: flo::plugin::Account::Preferences;
     edit_preferences_uri       string:./${preferences/name};
                " 
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/admin/group_confirm_delete/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/admin/group_confirm_delete/en.html -Ltemplates/admin/group_confirm_delete/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/admin/group_confirm_delete/en.html
+++ templates/admin/group_confirm_delete/en.html
@@ -13,7 +13,6 @@
   xml:lang="en"
   dir="ltr"
   petal:define="
-    uri                        self/uri;
     title                      string:Delete a Group;
     lang                       self/lang;
     dir                        self/direction;
@@ -23,6 +22,9 @@
     document_title             self/parent/title;
     document_lang              self/parent/lang;
     group                      self/group;
+    group_plugin               plugin: flo::plugin::Admin::Group;
+    uri                        group_plugin/uri;
+
                " 
   petal:attributes="lang lang; xml:lang lang; dir dir"
   xmlns="http://www.w3.org/1999/xhtml"
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/admin/group_edit/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/admin/group_edit/en.html -Ltemplates/admin/group_edit/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/admin/group_edit/en.html
+++ templates/admin/group_edit/en.html
@@ -13,7 +13,6 @@
   xml:lang="en"
   dir="ltr"
   petal:define="
-    uri                        self/uri;
     title                      string:Edit a Group;
     lang                       self/lang;
     dir                        self/direction;
@@ -27,6 +26,7 @@
     user_list                  plugin: flo::plugin::Admin::UserList;
     user_add                   plugin: flo::plugin::Admin::UserInsert;
     group_plugin               plugin: flo::plugin::Admin::Group;
+    uri                        group_plugin/uri;
     preferences                plugin: flo::plugin::Account::Preferences;
     edit_preferences_uri       string:./${preferences/name};
                " 
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/templates/admin/group_list/Attic/en.html,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Ltemplates/admin/group_list/en.html -Ltemplates/admin/group_list/en.html -u -r1.1.2.1 -r1.1.2.2
--- templates/admin/group_list/en.html
+++ templates/admin/group_list/en.html
@@ -25,7 +25,7 @@
     document                   plugin: flo::plugin::Cache::Fake;
     user_list                  plugin: flo::plugin::Admin::UserList;
     user_add                   plugin: flo::plugin::Admin::UserInsert;
-    group                      plugin: flo::plugin::Admin::Group;
+    group_plugin               plugin: flo::plugin::Admin::Group;
     preferences                plugin: flo::plugin::Account::Preferences;
     edit_preferences_uri       string:./${preferences/name};
                " 
@@ -65,7 +65,7 @@
         You may 
         <a
           href="#"
-          petal:attributes="href string:${group/uri}?rm=add"
+          petal:attributes="href string:${group_plugin/uri}add"
         >add a new group</a>
         or edit or delete the existing groups using the links in the following table.
       </p>
@@ -141,7 +141,7 @@
               <a 
                 href="#" 
                 title="Edit Label"
-                petal:attributes="href string:${group/uri}?rm=edit&id=${group/id}; title string:Edit ${group/label}"
+                petal:attributes="href string:${group_plugin/uri}edit?id=${group/id}; title string:Edit ${group/label}"
                 petal:content="string:Edit ${group/id}"
               >Edit</a>
             </td>
@@ -149,7 +149,7 @@
               <a 
                 href="#" 
                 title="Delete Label"
-                petal:attributes="href string:${group/uri}?rm=confirm_delete&id=${group/id}; title string:Delete ${group/label}"
+                petal:attributes="href string:${group_plugin/uri}confirmdelete?id=${group/id}; title string:Delete ${group/label}"
                 petal:content="string:Delete ${group/id}"
               >Delete</a>
             </td>


More information about the MKDoc-commit mailing list