Code

- added CGI :remove:<propname> and :add:<propname> which specify item ids to
[roundup.git] / roundup / templates / classic / html / issue.item
index 750f35cd44eb4bcef153e54c0d0cc2ddbaf49a62..3215703e28111ef2ecddec2dd7b18527f7b75870 100644 (file)
 <!-- dollarId: issue.item,v 1.4 2001/08/03 01:19:43 richard Exp dollar-->
+<tal:block metal:use-macro="templates/page/macros/icing">
+<title metal:fill-slot="head_title">Issue editing</title>
+<td class="page-header-top" metal:fill-slot="body_title"><h2>Issue Editing</h2>
+</td>
+
+<td class="content" metal:fill-slot="content">
+
+<span tal:condition="python:not (context.is_view_ok() or context.is_edit_ok())">
+You are not allowed to view this page.
+</span>
+
 <form method="POST" onSubmit="return submit_once()"
-      enctype="multipart/form-data">
-<table border=0 cellspacing=0 cellpadding=2 class="form">
+      enctype="multipart/form-data" tal:condition="context/is_edit_ok">
+
+<input type="hidden" name=":template" value="item">
+<input type="hidden" name=":required" value="title,priority">
+
+<table class="form">
 <tr>
  <th nowrap>Title</th>
- <td colspan=3 class="form-text" tal:content="structure python:issue.title.field(size=60)">title</td>
-</tr>
-
-<tr class="form">
- <th nowrap>Created</th>
- <td class="form-text" tal:content="string:${issue/creation} (${issue/creator/username})">creation (creator)</td>
- <th nowrap>Last activity</th>
- <td class="form-text" tal:content="issue/activity">activity</td>
+ <td colspan=3 tal:content="structure python:context.title.field(size=60)">title</td>
 </tr>
 
-<tr class="form">
+<tr>
  <th nowrap>Priority</th>
- <td class="form-text" tal:content="structure issue/priority/menu">priority</td>
+ <td tal:content="structure context/priority/menu">priority</td>
  <th nowrap>Status</th>
- <td class="form-text" tal:content="structure issue/status/menu">status</td>
+ <td tal:content="structure context/status/menu">status</td>
 </tr>
 
-<tr class="form">
+<tr>
  <th nowrap>Superseder</th>
  <td>
-  <span tal:replace="structure python:issue.superseder.field(showid=1)" />
-  <span tal:replace="structure python:db.issue.classhelp('id,title', label='list', width=500)" />
-  <span tal:condition="issue/superseder">
-   <br>View: <span tal:replace="structure python:issue.superseder.link(showid=1)" />
+  <span tal:replace="structure python:context.superseder.field(showid=1, size=20)" />
+  <span tal:replace="structure python:db.issue.classhelp('id,title')" />
+  <span tal:condition="context/superseder" tal:repeat="sup context/superseder">
+   <br>View: <a tal:attributes="href string:issue${sup/id}"
+                tal:content="sup/id"></a>
   </span>
  </td>
  <th nowrap>Nosy List</th>
  <td>
-  <span tal:replace="structure issue/nosy/field" />
-  <span tal:replace="structure python:db.user.classhelp('username,realname,address,phone', label='list', width=500)" />
+  <span tal:replace="structure context/nosy/field" />
+  <span tal:replace="structure
+python:db.user.classhelp('username,realname,address,phone')" /><br>
  </td>
 </tr>
 
-<tr class="form">
+<tr>
  <th nowrap>Assigned To</th>
- <td class="form-text" tal:content="structure issue/assignedto/menu">
-  assignedto menu
+ <td tal:content="structure context/assignedto/menu">assignedto menu</td>
+ <th nowrap>Topics</th>
+ <td>
+  <span tal:replace="structure context/topic/field" />
+  <span tal:replace="structure db/keyword/classhelp" />
  </td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
 </tr>
 
-<tr class="form">
+<tr>
  <th nowrap>Change Note</th>
- <td colspan=3 class="form-text">
-  <textarea name="__note" wrap="hard" rows="5" cols="60"></textarea>
+ <td colspan=3>
+  <textarea name=":note" wrap="hard" rows="5" cols="60"></textarea>
  </td>
 </tr>
 
-<tr class="form">
+<tr>
  <th nowrap>File</th>
- <td colspan=3 class="form-text">
-  <input type="file" name="__file" size="60">
- </td>
+ <td colspan=3><input type="file" name=":file" size="40"></td>
 </tr>
 
-<tr class="form">
+<tr>
  <td>&nbsp;</td>
- <td colspan=3 class="form-text" tal:content="structure issue/submit">
+ <td colspan=3 tal:content="structure context/submit">
   submit button will go here
  </td>
 </tr>
 </table>
 
-<tal:block tal:condition="exists:item">
- <table class="messages" tal:condition="issue/messages">
-  <tr><th colspan=2 class="header">Messages</th></tr>
-  <tal:block tal:repeat="msg issue/messages/reverse">
-   <tr>
-    <th tal:content="string:Author: ${msg/author}">author</th>
-    <th tal:content="string:Date: ${msg/date}">date</th>
-   </tr>
-   <tr>
-    <td colspan="2"><pre tal:content="msg/content">content</pre></td>
-   </tr>
-  </tal:block>
+</form>
+
+<table class="form" tal:condition="context/is_only_view_ok">
+<tr>
+ <th nowrap>Title</th><td colspan=3 tal:content="context/title">title</td>
+</tr>
+
+<tr>
+ <th nowrap>Priority</th><td tal:content="context/priority">priority</td>
+ <th nowrap>Status</th><td tal:content="context/status">status</td>
+</tr>
+
+<tr>
+ <th nowrap>Superseder</th>
+ <td>
+  <span tal:condition="context/superseder" tal:repeat="sup context/superseder">
+   <br>View: <a tal:attributes="href string:issue${sup/id}"
+                tal:content="sup/id"></a>
+  </span>
+ </td>
+ <th nowrap>Nosy List</th><td><span tal:replace="context/nosy" /></td>
+</tr>
+
+<tr>
+ <th nowrap>Assigned To</th><td tal:content="context/assignedto"></td>
+ <th nowrap>Topics</th><td tal:content="structure context/topic"></td>
+</tr>
+</table>
+
+<tal:block tal:condition="python:context.id and context.is_view_ok()">
+
+ <p tal:content="structure string:Created on
+  <b>${context/creation}</b> by <b>${context/creator}</b>, last
+  changed <b>${context/activity}</b>.">activity info
+ </p>
+
+ <table class="messages" tal:condition="context/messages">
+  <tr><th colspan=4 class="header">Messages</th></tr>
+  <tr tal:repeat="msg context/messages/reverse">
+   <td><a tal:attributes="href string:msg${msg/id}"
+          tal:content="string:msg${msg/id}"></a></td>
+   <td tal:content="msg/author">author</td>
+   <td nowrap tal:content="msg/date/pretty">date</td>
+   <td tal:content="msg/summary">summary</td>
+   <td>
+    <a tal:attributes="href string:?:remove:messages=${msg/id}&:action=edit">remove</a>
+   </td>
+  </tr>
  </table>
 
- <table class="files" tal:condition="issue/files">
+ <table class="files" tal:condition="context/files">
   <tr><th colspan="2" class="header">Files</th></tr>
   <tr><th>File name</th><th>Uploaded</th></tr>
-  <tr tal:repeat="file issue/files">
+  <tr tal:repeat="file context/files">
    <td>
     <a tal:attributes="href string:file${file/id}/${file/name}"
        tal:content="file/name">dld link</a>
   </tr>
  </table>
 
- <table class="history">
-  <tr><th colspan="2" class="header">History</th></tr>
-  <tr><td colspan="2" tal:content="structure issue/history">history</td></tr>
- </table>
+ <tal:block tal:replace="structure context/history" />
+
 </tal:block>
 
-</form>
+</td>
+
+</tal:block>