[MKDoc-commit] Various i18n / macro updates, this is still a work in progress...

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Wed Nov 17 17:16:04 GMT 2004


Log Message:
-----------
Various i18n / macro updates, this is still a work in progress... Hopefully I'll
complete all the stuff in resources/templates/admin/ this week...

Modified Files:
--------------
    mkd/resources/templates/admin/new:
        en.html
    mkd/resources/templates/admin/sort:
        en.html
    mkd/resources/templates/admin/user_insert:
        en.html
    mkd/resources/templates/admin/user_list:
        en.html

-------------- next part --------------
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/new/en.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lresources/templates/admin/new/en.html -Lresources/templates/admin/new/en.html -u -r1.10 -r1.11
--- resources/templates/admin/new/en.html
+++ resources/templates/admin/new/en.html
@@ -274,7 +274,6 @@
               id="title"
               size="35" 
               title="Enter a title for the document."
-              class="input-text"
               petal:attributes="value self/form_input --title" 
             />
             <br />
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/sort/en.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lresources/templates/admin/sort/en.html -Lresources/templates/admin/sort/en.html -u -r1.6 -r1.7
--- resources/templates/admin/sort/en.html
+++ resources/templates/admin/sort/en.html
@@ -10,6 +10,27 @@
 
   $Id$
 
+
+  Author: Chris Croome <chris at webarchitects.co.uk> and others
+  Copyright: (c) 2004, MKDoc Holdings Ltd.
+
+  This file is part of MKDoc. 
+  
+  MKDoc 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.
+  
+  MKDoc 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 MKDoc; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
   petal:define="
     uri                   self/uri;
     title                 string:Modify the sort order of the child documents of ${self/parent/title};
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/user_insert/en.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lresources/templates/admin/user_insert/en.html -Lresources/templates/admin/user_insert/en.html -u -r1.5 -r1.6
--- resources/templates/admin/user_insert/en.html
+++ resources/templates/admin/user_insert/en.html
@@ -595,11 +595,19 @@
         </fieldset>
 
         <p>
+
           <input 
+            lang="en"
+            xml:lang="en"
+            dir="ltr"
             type="submit" 
             value="Create User"
+            class="input-submit"
             title="Create a new user using values in this form."
-            i18n:attributes="value  create-user;
+            i18n:attributes="lang     two-letter-language-code;
+                             xml:lang two-letter-language-code;
+                             dir      text-direction;
+                             value  create-user;
                              title  create-a-new-user;"
           />
         </p>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/user_list/en.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lresources/templates/admin/user_list/en.html -Lresources/templates/admin/user_list/en.html -u -r1.3 -r1.4
--- resources/templates/admin/user_list/en.html
+++ resources/templates/admin/user_list/en.html
@@ -12,12 +12,26 @@
   $Id$
 
 
+  Author: Chris Croome <chris at webarchitects.co.uk> and others
+  Copyright: (c) 2004, MKDoc Holdings Ltd.
+
+  This file is part of MKDoc. 
+  
+  MKDoc 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.
+  
+  MKDoc 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 MKDoc; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 
-?-->
-<html
-  lang="en"
-  xml:lang="en"
-  dir="ltr"
   petal:define="
     uri                        self/uri;
     title                      string:Users;
@@ -40,58 +54,176 @@
     preferences                plugin: flo::plugin::Account::Preferences;
     edit_preferences_uri       string:./${preferences/name};
             " 
-  petal:attributes="lang lang; xml:lang lang; dir dir"
-  xmlns="http://www.w3.org/1999/xhtml"
+
+?-->
+<html
+  lang="en"
+  xml:lang="en"
+  dir="ltr"
+  petal:attributes="lang     self/lang; 
+                    xml:lang self/lang; 
+                    dir      self/direction;"
+  petal:define=" user_list   plugin: flo::plugin::Admin::UserList;
+                 user_add    plugin: flo::plugin::Admin::UserInsert;
+                 user_modify plugin: flo::plugin::Admin::UserModify;
+                 user_delete plugin: flo::plugin::Admin::UserDelete;"
   xmlns:petal="http://purl.org/petal/1.0/"
-  xmlns:xi="http://www.w3.org/2001/XInclude"
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+  xmlns:metal="http://xml.zope.org/namespaces/metal"
+  xmlns="http://www.w3.org/1999/xhtml"
+  i18n:domain="mkdoc"
 >
 
-<!--? This is the <head> for admin documents ?-->
-<?include file="/fragments/head_admin/"?>
+  <head>
+    <title
+      petal:content="structure string:${self/parent_alternate_title}${string:users}"
+    >
+    </title>
+    <meta 
+      http-equiv="Content-Type" 
+      content="text/html; charset=UTF-8" 
+    />
+    <meta 
+      http-equiv="Content-Language" 
+      content="en" 
+      petal:attributes="content self/lang"
+    />
+    <!--? CSS ?-->
+    <style 
+      media="screen" 
+      type="text/css"
+      title="Screen style sheet"
+      metal:use-macro="/macros/style/#content"
+    >
+      @import url(../../css/public.ltr.css);
+      @import url(../../css/public.css);
+      @import url(../../css/colours.css);
+      @import url(../../css/admin.ltr.css);
+      @import url(../../css/admin.css);
+    </style>
+    <link 
+      rel="shortcut icon" 
+      href="../../css/favicon.ico" 
+      type="image/x-icon" 
+      petal:attributes="href string:${self/root/uri}favicon.ico"
+      petal:condition="true: self/root/get --favicon.ico;"
+    />
+    <meta
+      name="generator"
+      content="MKDoc 1.8, see http://mkdoc.com/"
+    />
+    <!--? Document specific things ?-->
+    <link
+      rel="top"
+      href="/"
+      hreflang="en"
+      title="Root Document"
+      type="text/html"
+      petal:attributes="href     self/root/uri; 
+                        hreflang self/root/lang; 
+                        title    self/root/title;"
+      petal:condition="false: self/cgi/path_info_eq '/';"
+    />
+    <link
+      rel="parent"
+      href="#"
+      hreflang="en"
+      title="Document Parent Title"
+      type="text/html"
+      petal:attributes="href     self/parent/uri; 
+                        hreflang self/parent/lang; 
+                        title    self/parent/title"
+    />
+  </head>
 
-  <body
-    lang="en"
-    xml:lang="en"
-    dir="ltr"
-    petal:attributes="lang lang; xml:lang lang; dir dir"
-  >
-
-  <xi:include href="/fragments/admin/" />
-
-    <div class="admin-content">
-
-      <h1
-        lang="en"
-        xml:lang="en"
-        dir="ltr"
-        align="left"
-        petal:attributes="align align"
-        petal:content="title"
-      >Users</h1>
+  <body>
+
+    <!--? Admin Fragment ?-->
+    <div
+      class="admin"
+      petal:condition="true: self/user; 
+                       true: self/user/is_editor"
+      metal:use-macro="/macros/menu_admin/#content"
+    >
+      <!--? Mockup content - this will be replaced by the result of the macro ?-->
+      <form accept-charset="utf-8" action="#" method="post">
+        <a lang="en"  xml:lang="en" dir="ltr" href="#">Document</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" 
+          title="Modify the Title, Description, and other Properties of this document.">Properties</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" 
+          title="Edit the Content of of this document.">Content</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" title="Find documents.">Finder</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" 
+          title="Modify the Sort order of the child documents of this document.">Sort</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" title="Move this document.">Move</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" title="Copy this document.">Copy</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" title="Create a new child document.">New</a>
+        <bdo dir="ltr">|</bdo>
+        <a lang="en" xml:lang="en" dir="ltr" href="#" title="Delete this document.">Delete</a>
+      </form>
+      <!--? / Mockup content ?-->
+    </div>
+    <!--? / Admin Fragment ?-->
+
+    <div 
+      class="admin-content"
+    >
+
+      <h1>
+        <a
+          id="page_content"
+          name="page_content"
+          lang="en"
+          xml:lang="en"
+          dir="ltr"
+          i18n:attributes="lang     two-letter-language-code;
+                           xml:lang two-letter-language-code;
+                           dir      text-direction;" 
+          i18n:translate="users"
+        >Users</a>
+      </h1>
 
       <p
-        lang="en"
-        xml:lang="en"
-        dir="ltr"
+          lang="en"
+          xml:lang="en"
+          dir="ltr"
+          i18n:attributes="lang     two-letter-language-code;
+                           xml:lang two-letter-language-code;
+                           dir      text-direction;"
+          i18n:translate="you-may-add-edit-or-delete-users"
       >
         You may 
         <a
           href="#"
           petal:attributes="href user_add/uri"
-        >add a new user</a>
-        or edit or delete the existing users using the links in the following table.
+          i18n:name="add"
+        >add</a> 
+        a new user or edit or delete the existing users using the links in the following table.
       </p>
 
       <table
-        cellpadding="4"
-        cellspacing="0"
-        border="1"
+        border="0" 
+        cellpadding="12"
+        cellspacing="6"
         dir="ltr"
-        summary="This table contains a list of the users."
-        petal:attributes="dir dir"
+        summary="This table contains a list of the users and links for deleting and editing users."
+        i18n:attributes="summary this-table-contains-a-list-of-users"
+        petal:attributes="dir self/dir"
+        petal:condition="true: self/users"
       >
         <caption>
-          Users List
+          <a 
+            name="users-list"
+            id="users-list"
+            i18n:translate="users-list"
+          >Users List</a>
         </caption>
         <thead>
           <tr>
@@ -99,15 +231,13 @@
               lang="en"
               xml:lang="en"
               dir="ltr"
-              title="User Identifier"
-            >
-              ID
-            </th>
-            <th
-              lang="en"
-              xml:lang="en"
-              dir="ltr"
-              title="User Username"
+              title="Login name"
+              id="username"
+              i18n:attributes="lang     two-letter-language-code;
+                               xml:lang two-letter-language-code;
+                               dir      text-direction;
+                               title    user-login-name;" 
+              i18n:translate="username"
             >
               Username
             </th>
@@ -115,17 +245,15 @@
               lang="en"
               xml:lang="en"
               dir="ltr"
-              title="User First Name"
-            >
-              First Name
-            </th>
-            <th
-              lang="en"
-              xml:lang="en"
-              dir="ltr"
-              title="User Last Name"
+              title="User Full Name"
+              id="full-name"
+              i18n:attributes="lang     two-letter-language-code;
+                               xml:lang two-letter-language-code;
+                               dir      text-direction;
+                               title    user-full-name;" 
+              i18n:translate="fullname"
             >
-              Last Name
+              Full Name
             </th>
             <th 
               lang="en"
@@ -133,6 +261,12 @@
               dir="ltr"
               title="Edit options for users"
               colspan="2"
+              id="actions"
+              i18n:attributes="lang     two-letter-language-code;
+                               xml:lang two-letter-language-code;
+                               dir      text-direction;
+                               title    edit-options-for-users;"
+              i18n:translate="actions"
             >
               Actions
             </th>
@@ -142,41 +276,103 @@
           <tr 
             petal:repeat="user self/users"
           >
+
+            <!--? First the even row ?-->
             <td 
-              petal:content="user/id"
+              headers="username"
+              class="even"
+              petal:content="user/login"
+              petal:condition="true: repeat/even"
             >
-              1
+              admin
             </td>
             <td 
+              headers="fullname"
+              class="even"
+              petal:content="user/full_name"
+              petal:condition="true: repeat/even"
+            >
+              Lisa Simpson
+            </td>
+            <td 
+              headers="actions"
+              class="even"
+              petal:condition="true: repeat/even"
+            >
+              <a 
+                href="#" 
+                petal:attributes="href string:${user_modify/uri}?id=${user/id};" 
+                i18n:content="edit-username"
+              >
+                Edit 
+                <span
+                  petal:content="user/login"
+                  i18n:name="username"
+                >username</span></a>
+            </td>
+            <td 
+              headers="actions"
+              class="even"
+              petal:condition="true: repeat/even"
+            >
+              <a 
+                href="#" 
+                petal:attributes="href string:${user_delete/uri}?id=${user/id};" 
+                i18n:content="delete-username"
+              >Delete
+                <span
+                  petal:content="user/login"
+                  i18n:name="username"
+                >username</span></a>
+            </td>
+
+            <!--? Then the odd row ?-->
+            <td 
+              headers="username"
+              class="odd"
               petal:content="user/login"
+              petal:condition="true: repeat/odd"
             >
               admin
             </td>
             <td 
-              petal:content="user/first_name"
+              headers="fullname"
+              class="odd"
+              petal:content="user/full_name"
+              petal:condition="true: repeat/odd"
             >
-              Ex
+              Lisa Simpson
             </td>
             <td 
-              petal:content="user/family_name"
+              headers="actions"
+              class="odd"
+              petal:condition="true: repeat/odd"
             >
-              Ample
-            </td>
-            <td>
               <a 
                 href="#" 
-                title="Edit Label"
-                petal:attributes="href string:${user_modify/uri}?id=${user/id}; title string:Edit ${user/first_name} ${user/family_name}"
-                petal:content="string:Edit ${user/id}"
-              >Edit</a>
+                petal:attributes="href string:${user_modify/uri}?id=${user/id};" 
+                i18n:content="edit-username"
+              >
+                Edit 
+                <span
+                  petal:content="user/login"
+                  i18n:name="username"
+                >username</span></a>
             </td>
-            <td>
+            <td 
+              headers="actions"
+              class="odd"
+              petal:condition="true: repeat/odd"
+            >
               <a 
                 href="#" 
-                title="Delete Label"
-                petal:attributes="href string:${user_delete/uri}?id=${user/id}; title string:Delete ${user/first_name} ${user/family_name}"
-                petal:content="string:Delete ${user/id}"
-              >Delete</a>
+                petal:attributes="href string:${user_delete/uri}?id=${user/id};" 
+                i18n:content="delete-username"
+              >Delete
+                <span
+                  petal:content="user/login"
+                  i18n:name="username"
+                >username</span></a>
             </td>
           </tr>
         </tbody>


More information about the MKDoc-commit mailing list