Anonymous avatar Anonymous committed 57b8395

* Add user/user demo user.
* Add 'description' to some properties.
* Enhance help page a little.

Comments (0)

Files changed (4)

html/_generic.help.html

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html tal:define="property request/form/property/value" >
+<html>
   <head>
+      <link media="screen" href="http://python.org/styles/screen-switcher-default.css" type="text/css" id="screen-switcher-stylesheet" rel="stylesheet" />
       <link rel="stylesheet" type="text/css" href="@@file/style.css" />
       <meta http-equiv="Content-Type"
        tal:attributes="content string:text/html;; charset=${request/client/charset}" />
       <tal:block tal:condition="python:request.form.has_key('property')">
+      <tal:block tal:define="property request/form/property/value">
       <title i18n:translate=""><tal:x i18n:name="property"
        tal:content="property" i18n:translate="" /> help - <span i18n:name="tracker"
        tal:replace="config/TRACKER_NAME" /></title>
       <script src="@@file/help_controls.js" type="text/javascript"><!--
       //--></script>
       </tal:block>
+      </tal:block>
   </head>
  <body class="body" onload="resetList();">
+ <h1 id="logoheader">
+   <img src="http://python.org/images/python-logo.gif" alt="logo" border="0" />
+ </h1>
+<div id="content-body">
+<div id="content">
+<div id="breadcrumb">Python Issue Tracker: Help - <tal:block tal:content="context/classname">item</tal:block></div>
+<tal:block tal:condition="python:request.form.has_key('property')">
  <form name="frm_help" tal:attributes="action request/base"
        tal:define="batch request/batch;
                    props python:request.form['properties'].value.split(',')">
      </table>
 
  </form>
+ </tal:block>
+ <tal:block tal:condition="python:not request.form.has_key('property')">
+ <tal:block tal:define="batch request/batch;
+                        props python:request.form['properties'].value.split(',')">
+     <table width="100%">
+      <tr class="navigation">
+       <th>
+        <a tal:define="prev batch/previous" tal:condition="prev"
+           tal:attributes="href python:request.indexargs_url(request.classname,
+           {'@template':'help', 'property': request.form['property'].value,
+            'properties': request.form['properties'].value,
+            'form': request.form['form'].value,
+            'type': request.form['type'].value,
+            '@startwith':prev.first, '@pagesize':prev.size})"
+           i18n:translate="" >&lt;&lt; previous</a>
+        &nbsp;
+       </th>
+       <th i18n:translate=""><span tal:replace="batch/start" i18n:name="start"
+        />..<span tal:replace="python: batch.start + batch.length -1" i18n:name="end"
+        /> out of <span tal:replace="batch/sequence_length" i18n:name="total"
+        />
+       </th>
+       <th>
+        <a tal:define="next batch/next" tal:condition="next"
+           tal:attributes="href python:request.indexargs_url(request.classname,
+           {'@template':'help', 'property': request.form['property'].value,
+            'properties': request.form['properties'].value,
+            'form': request.form['form'].value,
+            'type': request.form['type'].value,
+            '@startwith':next.first, '@pagesize':next.size})"
+           i18n:translate="" >next &gt;&gt;</a>
+        &nbsp;
+       </th>
+      </tr>
+     </table>
+
+     <table class="classhelp">
+       <tr>
+           <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
+       </tr>
+       <tr tal:repeat="item batch">
+         <tal:block tal:define="attr python:item[props[0]]" >
+             <td tal:repeat="prop props">
+                 <label class="classhelp-label"
+                        tal:attributes="for string:id_$attr"
+                        tal:content="structure python:item[prop]"></label>
+             </td>
+           </tal:block>
+       </tr>
+       <tr>
+           <th tal:repeat="prop props" tal:content="prop" i18n:translate=""></th>
+       </tr>
+     </table>
+ </tal:block>
+ </tal:block>
+</div> <!-- content-body -->
+</div> <!-- content -->
  </body>
 </html>

html/issue.item.html

 </tr>
 
 <tr>
- <th i18n:translate="">Group</th>
+ <th i18n:translate="">
+   <span tal:replace="structure python:db.group.classhelp('id,name,description',label='Group')" />
+ </th>
  <td tal:content="structure context/group/menu">group</td>
  <th class="required" i18n:translate="">Priority</th>
  <td tal:content="structure context/priority/menu">priority</td>
 </tr>
 
 <tr>
- <th i18n:translate="">Status</th>
+ <th i18n:translate="">
+   <span tal:replace="structure python:db.status.classhelp('id,name,description',label='Status')" />
+ </th>
  <td tal:content="structure context/status/menu">status</td>
  <th i18n:translate="">Resolution</th>
  <td tal:content="structure context/resolution/menu">resolution</td>
 
 <tr>
  <th i18n:translate="">Assigned To</th>
- <td tal:content="structure context/assignedto/field">assignedto field</td>
+ <td tal:content="structure context/assignedto/menu">assignedto field</td>
  <th i18n:translate="">Topics</th>
  <td>
   <span tal:replace="structure context/topic/field" />
  <th i18n:translate="">Change Note</th>
  <td colspan=3>
   <textarea tal:content="request/form/@note/value | default"
-            name="@note" wrap="hard" rows="5" cols="80"></textarea>
+            name="@note" wrap="hard" rows="5" cols="72"></textarea>
  </td>
 </tr>
 
+from roundup.password import Password
+
 #
 # TRACKER INITIAL PRIORITY AND STATUS VALUES
 #
 stat.create(name='Pending', order='2')
 stat.create(name='Closed', order='3')
 stat.create(name='Deleted', order='4')
+
+group = db.getclass('group')
+group.create(name='third_party', order='1')
+group.create(name='AST', order='2')
+group.create(name='feature_request', order='3')
+group.create(name='irreproducible', order='4')
+group.create(name='python3k', description='This bug relates to python 3000', order='5')
+
+
+
 #
 # create the two default users
 user = db.getclass('user')
     address=admin_email, roles='Admin')
 user.create(username="anonymous", roles='Anonymous')
 
-
 # add any additional database creation steps here - but only if you
 # haven't initialised the database with the admin "initialise" command
 
+user.create(username="user", password=Password("user"), roles="User")
 
 # vim: set filetype=python sts=4 sw=4 et si
-#SHA: b1da2e72a7fe9f26086f243eb744135b085101d9
 
 # Priorities
 pri = Class(db, "priority",
-                name=String(),
-                order=Number())
+            name=String(),
+            description=String(),
+            order=Number())
 pri.setkey("name")
 
 # Statuses
 stat = Class(db, "status",
-                name=String(),
-                order=Number())
+             name=String(),
+             description=String(),
+             order=Number())
 stat.setkey("name")
 
 # Resolution
 resolution = Class(db, "resolution",
                    name=String(),
+                   description=String(),
                    order=Number())
 resolution.setkey('name')
 
 # Groups
 group = Class(db, "group",
               name=String(),
+              description=String(),
               order=Number())
 group.setkey("name")
             
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.