web/hosts/issues/html bug.item,1.10,1.11 milestone.item,1.9,1.10 task.item,1.13,1.14 user.index,1.2,1.3 user.item,1.11,1.12
Tobias Hunger <[email protected]> Thu, 21 Aug 2003 11:33:10 -0500
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/web/hosts/issues/html
In directory purcel:/tmp/cvs-serv31681/html
Modified Files:
bug.item milestone.item task.item user.index user.item
Log Message:
* Make everything more consistent...
* clean up the code
* Fix a couple of permission settings: Deleting queries should work now,
milestones should no longer look 'editable' to developers
* Fix some minor problems with the roundup upgrade
Index: bug.item
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/bug.item,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- bug.item 7 Jan 2003 18:10:38 -0000 1.10
+++ bug.item 21 Aug 2003 16:33:06 -0000 1.11
@@ -1,3 +1,5 @@
+<!-- HEADER -->
+
<tal:block metal:use-macro="templates/page/macros/frame">
<tal:block metal:fill-slot="body_title">
<p class="header">Bug<span tal:replace="context/id" /> Editing</p>
@@ -5,100 +7,229 @@
<tal:block metal:fill-slot="content">
-<form method="POST" onSubmit="return submit_once()"
+ <tal:block tal:condition="python:context.is_view_ok or context.is_edit_ok">
+<!-- BODY -->
+
+<form method="POST" name="itemSynopsis" onSubmit="return submit_once()"
enctype="multipart/form-data">
<input type="hidden" name=":template" value="item">
- <input type="hidden" name=":required" value="title">
+ <input type="hidden" name=":required" value="title,priority">
<table class="form">
+
+ <!-- Title -->
<tr>
- <th nowrap>Title</th>
- <td colspan="5" tal:content="structure python:context.title.field(size=60)">title</td>
+ <th class="required" nowrap>Title</th>
+ <td colspan="5"
+ tal:condition="python: request.user.hasPermission('Process') or
+ not context.id"
+ tal:content="structure python:context.title.field(size=60)">
+ title
+ </td>
+ <td colspan="5"
+ tal:condition="python: not (request.user.hasPermission('Process') or
+ not context.id)"
+ tal:content="structure context/title/plain">
+ title
+ </td>
</tr>
+
+ <!-- creation, creator, activity -->
<tr tal:condition="context/id">
- <td colspan="6" tal:content="structure string:<b>Created:</b> ${context/creation} <b>by</b> ${context/creator}; <b>last modified:</b> ${context/activity}">creation</td>
+ <td colspan="6"
+ tal:content="structure string:Created on
+ <b>${context/creation}</b> by <b>${context/creator}</b>, last
+ changed <b>${context/activity}</b>.">last changed
+ </td>
</tr>
- <tr tal:condition="python:request.user.hasPermission('Process')">
+
+ <!-- assigned to, priority -->
+ <tr>
<th nowrap>assigned to</th>
- <td colspan="2">
+ <td colspan="2"
+ tal:condition="python:request.user.hasPermission('Process')">
<select name="assignedto">
<option value="-1">nobody</option>
<tal:block tal:repeat="user db/user/list">
<option tal:condition="python: user.hasPermission('Process', 'bug')"
tal:attributes="selected python:user.id == context.assignedto;
- value user/id"
- tal:content="user/username">
- </option>
+ value user/id"
+ tal:content="user/username"> </option>
</tal:block>
</select>
</td>
- <th><a href="javascript:help_window('priority?:template=help&properties=name,description', 500, 400)">priority</a></th>
- <td colspan="2" tal:content="structure python:context.priority.menu(size=60)">priority</td>
- </tr>
- <tr tal:condition="python:not request.user.hasPermission('Process') and context.id">
- <th nowrap>assigned to</th>
- <td colspan="2" tal:content="structure context/assignedto/plain">assignedto</td>
- <th><a href="javascript:help_window('priority?:template=help&properties=name,description', 500, 400)">priority</a></th>
- <td colspan="2" tal:content="structure context/priority/plain">priority</td>
+ <td colspan="2"
+ tal:condition="python:not request.user.hasPermission('Process')"
+ tal:content="structure context/assignedto/plain">
+ assignedto
+ </td>
+
+ <th class="required">
+ <a href="javascript:help_window('priority?:template=help&properties=name,description', 500, 400)">priority</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.priority.menu(size=60)">
+ priority
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/priority/plain">
+ priority
+ </td>
</tr>
+
+ <!-- bug_type, severity -->
<tr>
<th><a href="javascript:help_window('bug_type?:template=help&properties=name,description', 500, 400)">type</a></th>
- <td colspan="2" tal:content="structure python:context.bug_type.menu(size=60)">type</td>
+ <td colspan="2"
+ tal:condition="python:request.user.hasPermission('Process')"
+ tal:content="structure python:context.bug_type.menu(size=60)">type
+ </td>
+ <td colspan="2"
+ tal:condition="python:not request.user.hasPermission('Process')"
+ tal:content="structure context/bug_type/plain">type
+ </td>
+
<th><a href="javascript:help_window('severity?:template=help&properties=name,description', 500, 400)">severity</a></th>
- <td colspan="2" tal:content="structure python:context.severity.menu(size=60)">severity</td>
+ <td colspan="2"
+ tal:condition="python:request.user.hasPermission('Process')"
+ tal:content="structure python:context.severity.menu(size=60)">severity
+ </td>
+ <td colspan="2"
+ tal:condition="python:not request.user.hasPermission('Process')"
+ tal:content="structure context/severity/plain">severity
+ </td>
</tr>
+
+ <!-- topic, components, platform -->
<tr>
<th><a href="javascript:help_window('topic?:template=help&properties=name,description', 500, 400)">topic</a></th>
- <td tal:content="structure python:context.topics.menu(size=60, height=5)">topic</td>
+ <td tal:condition="python: request.user.hasPermission('Process')"
+ tal:content="structure python:context.topics.menu(size=60, height=5)">
+ topic
+ </td>
+ <td tal:condition="python: not request.user.hasPermission('Process')"
+ tal:content="structure context/topics/plain">
+ topic
+ </td>
+
<th><a href="javascript:help_window('component?:template=help&properties=name,description', 500, 400)">components</a></th>
- <td tal:content="structure python:context.components.menu(size=60, height=5)">components</td>
+ <td tal:condition="python: not context.id or request.user.hasPermission('Process')"
+ tal:content="structure python:context.components.menu(size=60, height=5)">components</td>
+ <td tal:condition="python: not (not context.id or request.user.hasPermission('Process'))"
+ tal:content="structure python:context.components.menu(size=60, height=5)">components</td>
+
<th><a href="javascript:help_window('platform?:template=help&properties=name,description', 500, 400)">platform</a></th>
- <td tal:content="structure python:context.platforms.menu(size=60, height=5)">platforms</td>
- </tr>
- <tr tal:condition="python: context.id and request.user.hasPermission('Process')">
- <th><a href="javascript:help_window('status?:template=help&properties=name,description', 500, 400)">status</a></th>
- <td colspan="2" tal:content="structure context/status/menu">status</td>
- <th><a href="javascript:help_window('resolution?:template=help&properties=name,description', 500, 400)">resolution</a></th>
- <td colspan="2" tal:content="structure context/resolution/menu">resolution</td>
+ <td tal:condition="python: not context.id or request.user.hasPermission('Process')"
+ tal:content="structure python:context.platforms.menu(size=60, height=5)">platforms</td>
+ <td tal:condition="python: not (not context.id or request.user.hasPermission('Process'))"
+ tal:content="structure python:context.platforms.menu(size=60, height=5)">platforms</td>
</tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')">
+
+ <!-- Status, resolution -->
+ <tr tal:condition="context/id">
<th><a href="javascript:help_window('status?:template=help&properties=name,description', 500, 400)">status</a></th>
- <td colspan="2" tal:content="structure context/status/plain">status</td>
+ <td colspan="2"
+ tal:condition="python: request.user.hasPermission('Process')"
+ tal:content="structure context/status/menu">
+ status
+ </td>
+ <td colspan="2"
+ tal:condition="python: not request.user.hasPermission('Process')"
+ tal:content="structure context/status/plain">
+ status
+ </td>
+
<th><a href="javascript:help_window('resolution?:template=help&properties=name,description', 500, 400)">resolution</a></th>
- <td colspan="2" tal:content="structure context/resolution/plain">resolution</td>
+ <td colspan="2"
+ tal:condition="python: request.user.hasPermission('Process')"
+ tal:content="structure context/resolution/menu">
+ resolution
+ </td>
+ <td colspan="2"
+ tal:condition="python: not request.user.hasPermission('Process')"
+ tal:content="structure context/resolution/plain">
+ resolution
+ </td>
</tr>
- <tr tal:condition="python: request.user.hasPermission('Process')">
- <th><a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">depends on</a></th>
- <td colspan="2">
- <table tal:condition="context/dependson">
+
+ <!-- depends on, superseeded by -->
+ <tr tal:condition="python:request.user.hasPermission('Process') or
+ context.id">
+ <th nowrap>
+ <a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">depends on</a>
+ </th>
+ <td colspan="2"
+ tal:condition="python:request.user.hasPermission('Process')">
+ <table>
+ <tr>
+ Add: <input name=":add:dependson" size="20">
+ </tr>
<tr tal:repeat="dep context/dependson">
- <td><a tal:attributes="href string:bug${dep/id}; title string:${dep/title}"
- tal:content="string:bug${dep/id}"></a>
+ <td>
+ <a tal:attributes="href string:bug${dep/id};
+ title string:${dep/title}"
+ tal:content="string:bug${dep/id}"> </a>
</td>
<td>
- <input type="checkbox" name=":remove:dependson" tal:attributes="value dep/id">
+ <input type="checkbox"
+ name=":remove:dependson"
+ tal:attributes="value dep/id">
remove
</td>
</tr>
</table>
- <input name=":add:dependson" size="20">
</td>
+ <td colspan="2"
+ tal:condition="python:not request.user.hasPermission('Process')">
+ <span tal:condition="context/dependson"
+ tal:repeat="dep context/dependson">
+ <br/>View:
+ <a tal:attributes="href string:bug${dep/id};
+ title string:${dep/title}"
+ tal:content="string:bug${dep/id}">
+
+ </a> </span>
+ </td>
+
<tal:block tal:condition="context/id">
- <th><a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">superseded by</a></th>
- <td colspan="2">
- <table tal:condition="context/superseder">
+ <th nowrap>
+ <a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">superseded by</a>
+ </th>
+ <td colspan="2"
+ tal:condition="python: request.user.hasPermission('Process')">
+ <table>
+ <tr>
+ Add: <input name=":add:superseder" size="20">
+ </tr>
<tr tal:repeat="sup context/superseder">
- <td><a tal:attributes="href string:bug${sup/id}; title string:${sup/title}"
- tal:content="string:bug${sup/id}"></a>
+ <td>
+ <a tal:attributes="href string:bug${sup/id};
+ title string:${sup/title}"
+ tal:content="string:bug${sup/id}"> </a>
</td>
<td>
- <input type="checkbox" name=":remove:superseder" tal:attributes="value sup/id">
+ <input type="checkbox"
+ name=":remove:superseder"
+ tal:attributes="value sup/id">
remove
</td>
</tr>
- </table>
- <input name=":add:superseder" size="20">
+ </table>
+ </td>
+ <td colspan="2"
+ tal:condition="python:not request.user.hasPermission('Process')">
+ <span tal:condition="context/superseder"
+ tal:repeat="sup context/superseder">
+ <br/>View:
+ <a tal:attributes="href string:bug${sup/id};
+ title string:${sup/title}"
+ tal:content="string:bug${sup/id}">
+
+ </a>
+ </span>
</td>
</tal:block>
<tal:block tal:condition="python: not context.id">
@@ -106,41 +237,39 @@
<td colspan="2"></td>
</tal:block>
</tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')">
- <th nowrap>depends on</th>
- <td colspan="2" tal:content="structure context/dependson/plain">dependson</td>
- <th nowrap>superseded by</th>
- <td colspan="2">
- <span tal:condition="context/superseder" tal:repeat="sup context/superseder">
- <br/>
- View:
- <a tal:attributes="href string:bug${sup/id}" tal:content="sup/id"></a>
- </span>
- </td>
- </tr>
+
+ <!-- Comment -->
<tr>
<th nowrap>Add Comment:</th>
<td colspan="5" class="form-text">
<textarea name=":note" wrap="hard" rows="5" cols="50"></textarea>
</td>
</tr>
+
+ <!-- Files -->
<tr>
<th nowrap>File</th>
<td colspan="5"><input type="file" name=":file" size="40"></td>
</tr>
+
+ <!-- Nosy List -->
<tr>
- <th nowrap>CC List:<span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
-</th>
+ <th nowrap>
+ CC List:<span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
+ </th>
<td colspan="5">
<span tal:replace="structure context/nosy/field" />
</td>
</tr>
</table>
+
+ <!-- Submit -->
<p tal:content="structure context/submit">
submit button will go here
</p>
<tal:block tal:condition="context/id">
+ <!-- Messages -->
<table class="messages" tal:condition="context/messages">
<tr><th colspan="3" class="header">Messages</th></tr>
<tal:block tal:repeat="msg context/messages">
@@ -153,6 +282,8 @@
</tr>
</tal:block>
</table>
+
+ <!-- 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>
@@ -167,9 +298,18 @@
</td>
</tr>
</table>
+
+ <!-- Sort ascending -->
<tal:block tal:replace="structure python:context.history(direction='ascending')" />
+
</tal:block>
</form>
-</tal:block>
+<!-- FOOTER -->
+ </tal:block>
+ <span tal:condition="python:not (context.is_view_ok or context.is_edit_ok)">
+You are not allowed to view this page.
+ </span>
+
+ </tal:block>
</tal:block>
Index: milestone.item
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/milestone.item,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- milestone.item 4 May 2003 17:28:15 -0000 1.9
+++ milestone.item 21 Aug 2003 16:33:06 -0000 1.10
@@ -1,3 +1,5 @@
+<!-- HEADER -->
+
<tal:block metal:use-macro="templates/page/macros/frame">
<tal:block metal:fill-slot="body_title">
<p class="header">Milestone<span tal:replace="context/id" /> Editing</p>
@@ -5,216 +7,210 @@
<tal:block metal:fill-slot="content">
- <form method="POST" onSubmit="return submit_once()"
- enctype="multipart/form-data">
+ <tal:block tal:condition="python:context.is_view_ok or context.is_edit_ok">
- <input type="hidden" name=":template" value="item">
- <input type="hidden" name=":required" value="title">
+<!-- BODY -->
- <table class="form">
- <tal:block tal:condition="python: request.user.hasPermission('Process')">
- <tr>
- <th>title</th>
- <td tal:content="structure python:context.title.field(size=60)">title</td>
- </tr>
- <tr>
- <th>status</th>
- <td tal:content="structure context/status/menu"></td>
- </tr>
- <tr>
- <th nowrap>Add Comment:</th>
- <td class="form-text">
- <textarea name=":note" wrap="hard" rows="5" cols="50"></textarea>
- </td>
- </tr>
- <tr>
- <th nowrap>CC List:<span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
- </th>
- <td>
- <span tal:replace="structure context/nosy/field" />
- </td>
- </tr>
- </tal:block>
- <tal:block tal:condition="python: not request.user.hasPermission('Process')">
+<form method="POST" name="itemSynopsis" onSubmit="return submit_once()"
+ enctype="multipart/form-data">
+
+ <input type="hidden" name=":template" value="item">
+ <input type="hidden" name=":required" value="title">
+
+ <table class="form">
+
+ <!-- Title -->
+ <tr>
+ <th class="required" nowrap>Title</th>
+ <td colspan="5"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.title.field(size=60)">
+ title
+ </td>
+ <td colspan="5"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/title/plain">
+ title
+ </td>
+ </tr>
+
+ <!-- creation, creator, activity -->
+ <tr tal:condition="context/id">
+ <td colspan="6"
+ tal:content="structure string:Created on
+ <b>${context/creation}</b> by <b>${context/creator}</b>, last
+ changed <b>${context/activity}</b>.">last changed
+ </td>
+ </tr>
+
+ <!-- status -->
+ <tr tal:condition="context/id">
+ <th>
+ <a href="javascript:help_window('status?:template=help&properties=name,d
+escription', 500, 400)">status</a>
+ </th>
+ <td colspan="5"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure context/status/menu">
+ status
+ </td>
+ <td colspan="5"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/status/plain">
+ status
+ </td>
+ </tr>
+
+ <!-- bugs, tasks -->
+ <tr>
+ <th>Bugs</th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok">
+ <table>
<tr>
- <th>title</th>
- <td tal:content="structure context/title/plain">title</td>
- </tr>
+ Add: <input name=":add:bugs" size="20">
+ </tr>
+ <tr tal:repeat="bug context/bugs">
+ <td>
+ <a tal:attributes="href string:bug${bug/id}; title string:${bug/title}"
+ tal:content="string:bug${bug/id}"> </a>
+ </td>
+ <td>
+ <input type="checkbox"
+ name=":remove:bugs"
+ tal:attributes="value bug/id">
+ remove
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok">
+ <span tal:condition="context/bugs"
+ tal:repeat="bug context/bugs">
+ <br/>View:
+ <a tal:attributes="href string:bug${bug/id};
+ title string:${bug/title}"
+ tal:content="string:bug${bug/id}">
+
+ </a>
+ </span>
+ </td>
+
+ <th>Tasks</th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok">
+ <table>
<tr>
- <th>status</th>
- <td tal:content="structure context/status/plain"></td>
- </tr>
- </tal:block>
- </table>
- <p tal:condition="python: request.user.hasPermission('Process')"
- tal:content="structure python: context.submit(label='change')">
- submit button will go here
- </p>
- </form>
+ Add: <input name=":add:tasks" size="20">
+ </tr>
+ <tr tal:repeat="task context/tasks">
+ <td>
+ <a tal:attributes="href string:task${task/id};
+ title string:${task/title}"
+ tal:content="string:task${task/id}"> </a>
+ </td>
+ <td>
+ <input type="checkbox"
+ name=":remove:tasks"
+ tal:attributes="value task/id">
+ remove
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok">
+ <span tal:condition="context/tasks"
+ tal:repeat="task context/tasks">
+ <br/>View:
+ <a tal:attributes="href string:task${task/id};
+ title string:${task/title}"
+ tal:content="string:task${task/id}">
+
+ </a>
+ </span>
+ </td>
+ </tr>
- <p tal:condition="context/id">
- View the <a tal:attributes="href string:/graph?type=milestone&id=${context/id}&output=cmap">dependency graph</a> for this milestone.
- </p>
+ <!-- Comment -->
+ <tr>
+ <th nowrap>Add Comment:</th>
+ <td colspan="5" class="form-text">
+ <textarea name=":note" wrap="hard" rows="5" cols="50"></textarea>
+ </td>
+ </tr>
- <span tal:condition="context/id"
- tal:content="structure string:Created on <b>${context/creation}</b> by <b>${context/creator}</b>, last changed <b>${context/activity}</b>.">
- activity info
- </span>
+ <!-- Files -->
+ <tr>
+ <th nowrap>File</th>
+ <td colspan="5"><input type="file" name=":file" size="40"></td>
+ </tr>
- <p class="header">bugs</p>
- <form method="POST" onSubmit="return submit_once()"
- enctype="multipart/form-data">
+ <!-- Nosy List -->
+ <tr>
+ <th nowrap>
+ CC List:<span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
+ </th>
+ <td colspan="5">
+ <span tal:replace="structure context/nosy/field" />
+ </td>
+ </tr>
+ </table>
- <input type="hidden" name=":template" value="item"/>
- <table class="form">
- <tr tal:condition="python: context.id and request.user.hasPermission('Process')">
- <th>id</th><th>title</th><th>remove</th>
- </tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')">
- <th>id</th><th>title</th>
- </tr>
- <tr tal:condition="python: context.id and request.user.hasPermission('Process')"
- tal:repeat="bug context/bugs">
- <td><a tal:attributes="href string:bug${bug/id}"
- tal:content="string:bug${bug/id}"></a>
- </td>
- <td tal:content="bug/title"></td>
- <td><input type="checkbox" name=":remove:bugs" tal:attributes="value bug/id"></td>
- </tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')"
- tal:repeat="bug context/bugs">
- <td><a tal:attributes="href string:bug${bug/id}"
- tal:content="string:bug${bug/id}"></a>
- </td>
- <td tal:content="bug/title"></td>
- </tr>
- </table>
- <tal:block tal:condition="python: request.user.hasPermission('Process')">
- <p tal:content="structure python: context.submit(label='remove')">
- submit button will go here
- </p>
- </tal:block>
- </form>
- <form method="POST" onSubmit="return submit_once()"
- enctype="multipart/form-data">
+ <!-- graph -->
+ <p tal:condition="context/id">
+View the <a tal:attributes="href string:/graph?type=milestone&id=${context/id}&output=cmap">dependency graph</a> for this milestone.
+ </p>
- <input type="hidden" name=":template" value="item"/>
- <table tal:condition="python: request.user.hasPermission('Process')">
- <tr>
- <td>
- <table class="form">
- <tr>
- <td colspan="4">
- <select name=":add:bug">
- <tal:block tal:repeat="bug db/bug/list">
- <option tal:condition="python: not bug in context.bugs"
- tal:attributes="value bug/id"
- tal:content="string:bug${bug/id}:${bug/title}">
- </option>
- </tal:block>
- </select>
- </td>
- </tr>
- </table>
- </td>
- <td tal:content="structure python: context.submit(label='add')">
- submit button will go here
- </td>
- </tr>
- </table>
- </form>
- <p class="header">tasks</p>
- <form method="POST" onSubmit="return submit_once()"
- enctype="multipart/form-data">
+ <!-- Submit -->
+ <p tal:content="structure context/submit">
+ submit button will go here
+ </p>
- <input type="hidden" name=":template" value="item"/>
- <table class="form">
- <tr tal:condition="python: context.id and request.user.hasPermission('Process')">
- <th>id</th><th>title</th><th>remove</th>
- </tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')">
- <th>id</th><th>title</th>
- </tr>
- <tr tal:condition="python: context.id and request.user.hasPermission('Process')"
- tal:repeat="task context/tasks">
- <td><a tal:attributes="href string:task${task/id}"
- tal:content="string:task${task/id}"></a>
- </td>
- <td tal:content="task/title"></td>
- <td><input type="checkbox" name=":remove:tasks" tal:attributes="value task/id"></td>
+ <tal:block tal:condition="context/id">
+ <!-- Messages -->
+ <table class="messages" tal:condition="context/messages">
+ <tr><th colspan="3" class="header">Messages</th></tr>
+ <tal:block tal:repeat="msg context/messages">
+ <tr>
+ <th tal:content="string:Author: ${msg/author}">author</th>
+ <th tal:content="string:Date: ${msg/date}">date</th>
</tr>
- <tr tal:condition="python: context.id and not request.user.hasPermission('Process')"
- tal:repeat="task context/tasks">
- <td><a tal:attributes="href string:task${task/id}"
- tal:content="string:task${task/id}"></a>
- </td>
- <td tal:content="task/title"></td>
+ <tr>
+ <td colspan="2"><pre tal:content="msg/content">content</pre></td>
</tr>
- </table>
- <tal:block tal:condition="python: request.user.hasPermission('Process')">
- <p tal:content="structure python: context.submit(label='remove')">
- submit button will go here
- </p>
</tal:block>
- </form>
- <form method="POST" onSubmit="return submit_once()"
- enctype="multipart/form-data">
+ </table>
- <input type="hidden" name=":template" value="item"/>
- <table tal:condition="python: request.user.hasPermission('Process')">
- <tr>
- <td>
- <table class="form">
- <tr>
- <td colspan="4">
- <select name=":add:task">
- <tal:block tal:repeat="task db/task/list">
- <option tal:condition="python: not task in context.tasks"
- tal:attributes="value task/id"
- tal:content="string:task${task/id}:${task/title}">
- </option>
- </tal:block>
- </select>
- </td>
- </tr>
- </table>
- </td>
- <td tal:content="structure python: context.submit(label='add')">
- submit button will go here
- </td>
- </tr>
- </table>
- </form>
+ <!-- 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 context/files">
+ <td>
+ <a tal:attributes="href string:file${file/id}/${file/name}"
+ tal:content="file/name">dld link</a>
+ </td>
+ <td>
+ <span tal:content="file/creator">creator's name</span>,
+ <span tal:content="file/creation">creation date</span>
+ </td>
+ </tr>
+ </table>
- <tal:block tal:condition="context/id">
- <table class="messages" tal:condition="context/messages">
- <tr><th colspan=2 class="header">Messages</th></tr>
- <tal:block tal:repeat="msg context/messages">
- <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>
- </table>
+ <!-- Sort ascending -->
+ <tal:block tal:replace="structure python:context.history(direction='ascending')" />
- <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 context/files">
- <td>
- <a tal:attributes="href string:file${file/id}/${file/name}"
- tal:content="file/name">dld link</a>
- </td>
- <td>
- <span tal:content="file/creator">creator's name</span>,
- <span tal:content="file/creation">creation date</span>
- </td>
- </tr>
- </table>
- <tal:block tal:replace="structure python:context.history(direction='ascending')" />
+ </tal:block>
+</form>
+
+<!-- FOOTER -->
</tal:block>
+ <span tal:condition="python:not (context.is_view_ok or context.is_edit_ok)">
+You are not allowed to view this page.
+ </span>
+
</tal:block>
</tal:block>
+
Index: task.item
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/task.item,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- task.item 7 Jan 2003 18:10:38 -0000 1.13
+++ task.item 21 Aug 2003 16:33:06 -0000 1.14
@@ -1,3 +1,5 @@
+<!-- HEADER -->
+
<tal:block metal:use-macro="templates/page/macros/frame">
<tal:block metal:fill-slot="body_title">
<p class="header">Task<span tal:replace="context/id" /> Editing</p>
@@ -5,182 +7,300 @@
<tal:block metal:fill-slot="content">
-<form method="POST" onSubmit="return submit_once()"
+ <tal:block tal:condition="python:context.is_view_ok or context.is_edit_ok">
+<!-- BODY -->
+
+<form method="POST" name="itemSynopsis" onSubmit="return submit_once()"
enctype="multipart/form-data">
<input type="hidden" name=":template" value="item">
- <input type="hidden" name=":required" value="title">
+ <input type="hidden" name=":required" value="title,priority">
<table class="form">
+
+ <!-- Title -->
<tr>
- <th nowrap>Title</th>
- <td colspan=3 tal:content="structure python:context.title.field(size=60)">title</td>
+ <th class="required" nowrap>Title</th>
+ <td colspan="5"
+ condition="context/is_edit_ok"
+ tal:content="structure python:context.title.field(size=60)">
+ title
+ </td>
+ <td colspan="5"
+ condition="not:context/is_edit_ok"
+ tal:content="structure context/title/plain">
+ title
+ </td>
</tr>
+
+ <!-- creation, creator, activity -->
<tr tal:condition="context/id">
- <td colspan="6" tal:content="structure string:<b>Created:</b> ${context/creation} <b>by</b> ${context/creator}; <b>last modified:</b> ${context/activity}">creation</td>
- </tr>
- <tr tal:condition="python:request.user.hasPermission('Process') and context.id">
- <th nowrap>assigned to</th>
- <td>
- <select multiple name="assignedto" size="3">
- <option value="-1">nobody</option>
- <tal:block tal:repeat="user db/user/list">
- <option tal:condition="python: user.hasPermission('Process')"
- tal:attributes="selected python:str(context.assignedto).find(str(user.username)) != -1;
- value user/id"
- tal:content="user/username">
- </option>
- </tal:block>
- </select>
- </td>
- <th><a href="javascript:help_window('priority?:template=help&properties=name,description', 500, 400)">priority</a>
- <td tal:content="structure python:context.priority.menu(size=60)">priority</td>
+ <td colspan="6"
+ tal:content="structure string:Created on
+ <b>${context/creation}</b> by <b>${context/creator}</b>, last
+ changed <b>${context/activity}</b>.">last changed
+ </td>
</tr>
- <tr tal:condition="python:not request.user.hasPermission('Process')">
+
+ <!-- assigned to, priority -->
+ <tr>
<th nowrap>assigned to</th>
- <td tal:content="structure context/assignedto/plain">assignedto</td>
- <th nowrap>priority</th>
- <td tal:content="structure context/priority/plain">priority</td>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok">
+ <select multiple size="3" name="assignedto">
+ <option value="-1">nobody</option>
+ <tal:block tal:repeat="user db/user/list">
+ <option tal:condition="context/is_edit_ok"
+ tal:attributes="selected python:str(context.assignedto).find(str(user.username)) != -1;
+ value user/id"
+ tal:content="user/username"> </option>
+ </tal:block>
+ </select>
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/assignedto/plain">
+ assignedto
+ </td>
+
+ <th>
+ <a href="javascript:help_window('priority?:template=help&properties=name,description', 500, 400)">priority</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.priority.menu(size=60)">
+ priority
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/priority/plain">
+ priority
+ </td>
</tr>
- <tr tal:condition="python:request.user.hasPermission('Edit')">
- <th><a href="javascript:help_window('task_type?:template=help&properties=name,description', 500, 400)">type</a>
- <td tal:content="structure python:context.task_type.menu(size=60)">type</td>
- <th><a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">solves</a></th>
- <td>
- <table tal:condition="context/solves">
+
+ <!-- task_type, solves -->
+ <tr>
+ <th>
+ <a href="javascript:help_window('task_type?:template=help&properties=name,description', 500, 400)">type</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.task_type.menu(size=60)">
+ type
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/task_type/plain">
+ type
+ </td>
+
+ <th>
+ <a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">solves</a>
+ </th>
+ <td tal:condition="context/is_edit_ok">
+ <table>
+ <tr>
+ Add: <input name=":add:solves" size="20">
+ </tr>
<tr tal:repeat="sol context/solves">
- <td><a tal:attributes="href string:bug${sol/id}; title string:${sol/title}"
- tal:content="string:bug${sol/id}"></a>
+ <td>
+ <a tal:attributes="href string:bug${sol/id};
+ title string:${bug/title}"
+ tal:content="string:bug${sol/id}"> </a>
</td>
<td>
- <input type="checkbox" name=":remove:solves" tal:attributes="value sol/id">
+ <input type="checkbox"
+ name=":remove:solves"
+ tal:attributes="value sol/id">
remove
</td>
</tr>
</table>
- <br/>
- <input name=":add:solves" size="20">
</td>
- </tr>
- <tr tal:condition="python:not request.user.hasPermission('Edit')">
- <th><a href="javascript:help_window('task_type?:template=help&properties=name,description', 500, 400)">type</a>
- <td tal:content="structure context/task_type/plain">type</td>
- <th nowrap>solves</th>
- <td>
+ <td tal:condition="not:context/is_edit_ok">
<span tal:repeat="bug context/solves">
- <a tal:attributes="href string:bug${bug/id}" tal:content="string:bug${bug/id}"></a>: <span tal:content="bug/title"></span>
+ <a tal:attributes="href string:bug${bug/id};
+ title string:${bug/title}"
+ tal:content="string:bug${bug/id}"> </a>:
+ <span tal:content="bug/title"> </span>
<br />
- </span>
+ </span>
</td>
</tr>
- <tr tal:condition="python:request.user.hasPermission('Edit') and context.id">
- <th><a href="javascript:help_window('status?:template=help&properties=name,description', 500, 400)">status</a>
+
+ <!-- topic, components -->
+ <tr>
+ <th>
+ <a href="javascript:help_window('topic?:template=help&properties=name,description', 500, 400)">topic</a>
</th>
- <td tal:content="structure context/status/menu">status</td>
- <th><a href="javascript:help_window('result?:template=help&properties=name,description', 500, 400)">result</a>
- <td tal:content="structure context/result/menu">result</td>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.topics.menu(size=60, height=5)">
+ topic
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/topics/plain">
+ topic
+ </td>
+
+ <th><a href="javascript:help_window('component?:template=help&properties=name,description', 500, 400)">components</a></th>
+ <td tal:condition="context/is_edit_ok"
+ tal:content="structure python:context.components.menu(size=60, height=5)">
+ components
+ </td>
+ <td tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/components/plain">
+ components
+ </td>
</tr>
- <tr tal:condition="python:not request.user.hasPermission('Edit')">
- <th><a href="javascript:help_window('status?:template=help&properties=name,description', 500, 400)">status</a>
- <td tal:content="structure context/status/plain">status</td>
- <th><a href="javascript:help_window('result?:template=help&properties=name,description', 500, 400)">result</a>
- <td tal:content="structure context/result/plain">result</td>
+
+ <!-- Status, result -->
+ <tr tal:condition="context/id">
+ <th>
+ <a href="javascript:help_window('status?:template=help&properties=name,description', 500, 400)">status</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure context/status/menu">
+ status
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/status/plain">
+ status
+ </td>
+
+ <th><a href="javascript:help_window('result?:template=help&properties=name,description', 500, 400)">result</a></th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok"
+ tal:content="structure context/result/menu">
+ result
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/result/plain">
+ result
+ </td>
</tr>
- <tr tal:condition="python: request.user.hasPermission('Edit') and context.id">
- <th><a href="javascript:help_window('task?:template=help&properties=name,description', 500, 400)">depends on</a></th>
- <td>
- <table tal:condition="context/dependson">
+
+ <!-- depends on, superseeded by -->
+ <tr tal:condition="python:context.is_edit_ok() or context.id">
+ <th nowrap>
+ <a href="javascript:help_window('bug?:template=help&properties=name,description', 500, 400)">depends on</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok">
+ <table>
+ <tr>
+ Add: <input name=":add:dependson" size="20">
+ </tr>
<tr tal:repeat="dep context/dependson">
- <td><a tal:attributes="href string:task${dep/id}; title string:${dep/title}"
- tal:content="string:task${dep/id}"></a>
+ <td>
+ <a tal:attributes="href string:task${dep/id};
+ title string:${dep/title}"
+ tal:content="string:task${dep/id}"> </a>
</td>
<td>
- <input type="checkbox" name=":remove:dependson" tal:attributes="value dep/id">
+ <input type="checkbox"
+ name=":remove:dependson"
+ tal:attributes="value dep/id">
remove
</td>
</tr>
</table>
- <input name=":add:dependson" size="20">
</td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok">
+ <span tal:condition="context/dependson"
+ tal:repeat="dep context/dependson">
+ <br/>View:
+ <a tal:attributes="href string:task${dep/id};
+ title string:${dep/title}"
+ tal:content="string:task${dep/id}">
+
+ </a>
+ </span>
+ </td>
+
<tal:block tal:condition="context/id">
- <th><a href="javascript:help_window('task?:template=help&properties=name,description', 500, 400)">superseded by</a></th>
- <td>
- <table tal:condition="context/superseder">
+ <th nowrap>
+ <a href="javascript:help_window('task?:template=help&properties=name,description', 500, 400)">superseded by</a>
+ </th>
+ <td colspan="2"
+ tal:condition="context/is_edit_ok">
+ <table>
+ <tr>
+ Add: <input name=":add:superseder" size="20">
+ </tr>
<tr tal:repeat="sup context/superseder">
- <td><a tal:attributes="href string:task${sup/id}; title string:${sup/title}"
- tal:content="string:task${sup/id}"></a>
+ <td>
+ <a tal:attributes="href string:task${sup/id};
+ title string:${sup/title}"
+ tal:content="string:task${sup/id}"> </a>
</td>
<td>
- <input type="checkbox" name=":remove:superseder" tal:attributes="value sup/id">
+ <input type="checkbox"
+ name=":remove:superseder"
+ tal:attributes="value sup/id">
remove
</td>
</tr>
- </table>
- <input name=":add:superseder" size="20">
+ </table>
+ </td>
+ <td colspan="2"
+ tal:condition="not:context/is_edit_ok">
+ <span tal:condition="context/superseder"
+ tal:repeat="sup context/superseder">
+ <br/>View:
+ <a tal:attributes="href string:task${sup/id};
+ title string:${sup/title}"
+ tal:content="string:task${sup/id}">
+
+ </a>
+ </span>
</td>
</tal:block>
- <tal:block tal:condition="python: not context.id">
+ <tal:block tal:condition="not:context/id">
<th></th>
- <td colspan=2></td>
+ <td colspan="2"></td>
</tal:block>
</tr>
- <tr tal:condition="python:not request.user.hasPermission('Edit')">
- <th nowrap>depends on</th>
- <td>
- <span tal:repeat="dep context/dependson">
- <a tal:attributes="href string:task${dep/id}" tal:content="string:task${dep/id}"></a>: <span tal:content="dep/title"></span>
- <br />
- </span>
- </td>
- <th nowrap>superseded by</th>
- <td>
- <span tal:repeat="sup context/superseder">
- <a tal:attributes="href string:task${sup/id}" tal:content="string:task${sup/id}"></a>: <span tal:content="sup/title"></span>
- <br />
- </span>
- </td>
- </tr>
- <tr tal:condition="python:request.user.hasPermission('Edit')">
- <th nowrap>topic</th>
- <td tal:content="structure python:context.topics.menu(size=60, height=5)">topic</td>
- <th nowrap>components</th>
- <td tal:content="structure python:context.components.menu(size=60, height=5)">components</td>
- </tr>
- <tr tal:condition="python:not request.user.hasPermission('Edit')">
- <th nowrap>topic</th>
- <td tal:content="structure context/topics/plain">topic</td>
- <th nowrap>components</th>
- <td tal:content="structure context/components/plain">components</td>
- </tr>
- <tr tal:condition="python: request.user.hasPermission('Edit')">
+
+ <!-- Comment -->
+ <tr>
<th nowrap>Add Comment:</th>
- <td colspan=3 class="form-text">
+ <td colspan="5" class="form-text">
<textarea name=":note" wrap="hard" rows="5" cols="50"></textarea>
</td>
</tr>
- <tr tal:condition="python: request.user.hasPermission('Edit')">
+
+ <!-- Files -->
+ <tr>
<th nowrap>File</th>
- <td colspan=3><input type="file" name=":file" size="40"></td>
+ <td colspan="5"><input type="file" name=":file" size="40"></td>
</tr>
- <tr tal:condition="python: request.user.hasPermission('Edit')">
- <th nowrap>CC List:</th>
- <td colspan=3>
+
+ <!-- Nosy List -->
+ <tr>
+ <th nowrap>
+ CC List:<span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
+ </th>
+ <td colspan="5">
<span tal:replace="structure context/nosy/field" />
- <span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" />
</td>
</tr>
- <tr tal:condition="python:not request.user.hasPermission('Edit')">
- <th nowrap>CC List: <span tal:replace="structure python:db.user.classhelp('username,realname,address', label='?', width=500)" /></th>
- <td colspan=3 tal:content="structure context/nosy/plain">nosy</td>
- </tr>
</table>
- <p tal:content="structure context/submit"
- tal:condition="python:request.user.hasPermission('Edit')">
+
+ <!-- Submit -->
+ <p tal:content="structure context/submit">
submit button will go here
</p>
+
<tal:block tal:condition="context/id">
+ <!-- Messages -->
<table class="messages" tal:condition="context/messages">
- <tr><th colspan=3 class="header">Messages</th></tr>
+ <tr><th colspan="3" class="header">Messages</th></tr>
<tal:block tal:repeat="msg context/messages">
<tr>
<th tal:content="string:Author: ${msg/author}">author</th>
@@ -191,6 +311,8 @@
</tr>
</tal:block>
</table>
+
+ <!-- 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>
@@ -205,8 +327,18 @@
</td>
</tr>
</table>
+
+ <!-- Sort ascending -->
<tal:block tal:replace="structure python:context.history(direction='ascending')" />
+
</tal:block>
</form>
-</tal:block>
+
+<!-- FOOTER -->
+ </tal:block>
+ <span tal:condition="python:not (context.is_view_ok or context.is_edit_ok)">
+You are not allowed to view this page.
+ </span>
+
+ </tal:block>
</tal:block>
Index: user.index
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/user.index,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- user.index 11 Dec 2002 22:01:35 -0000 1.2
+++ user.index 21 Aug 2003 16:33:06 -0000 1.3
@@ -1,3 +1,5 @@
+<!-- HEADER -->
+
<tal:block metal:use-macro="templates/page/macros/frame">
<tal:block metal:fill-slot="body_title">
<p class="header">List of registered users</p>
@@ -5,24 +7,36 @@
<tal:block metal:fill-slot="content">
- <table width="100%" border=0 cellspacing=0 cellpadding=2 class="list">
- <tr class="list-header">
- <th>Username</th>
- <th>Real name</th>
- <th>Email address</th>
- <th>Roles</th>
- </tr>
- <tr tal:repeat="u context/list"
- tal:attributes="class python:['row-normal', 'row-alt'][repeat['u'].even()]">
- <td valign="top">
- <a tal:attributes="href string:user${u/id}"
- tal:content="u/username">username</a>
- </td>
- <td valign="top" tal:content="u/realname">realname</td>
- <td valign="top" tal:content="python:u.address.email()">address</td>
- <td valign="top" tal:content="u/roles">roles</td>
- </tr>
- </table>
+ <tal:block tal:condition="context/is_view_ok">
+
+<!-- BODY -->
+
+<table width="100%" border=0 cellspacing=0 cellpadding=2 class="list">
+ <tr class="list-header">
+ <th>Username</th>
+ <th>Real name</th>
+ <th>Email address</th>
+ <th>Roles</th>
+ </tr>
+ <tr tal:repeat="u context/list"
+ tal:attributes="class python:['row-normal', 'row-alt'][repeat['u'].even()]">
+ <td valign="top">
+ <a tal:attributes="href string:user${u/id}"
+ tal:content="u/username">username</a>
+ </td>
+ <td valign="top" tal:content="u/realname">realname</td>
+ <td valign="top" tal:content="python:u.address.email()">address</td>
+ <td valign="top" tal:content="u/roles">roles</td>
+ </tr>
+</table>
+
+<!-- FOOTER -->
+
+ </tal:block>
+
+ <span tal:condition="not:context/is_view_ok">
+You are not allowed to view this page.
+ </span>
</tal:block>
</tal:block>
Index: user.item
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/html/user.item,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- user.item 17 Aug 2003 12:19:09 -0000 1.11
+++ user.item 21 Aug 2003 16:33:06 -0000 1.12
@@ -1,3 +1,5 @@
+<!-- HEADER -->
+
<tal:block metal:use-macro="templates/page/macros/frame">
<tal:block metal:fill-slot="body_title">
<p class="header">User<span tal:replace="context/id" /> Editing</p>
@@ -5,139 +7,159 @@
<tal:block metal:fill-slot="content">
-<tal:block tal:define="
- editok python:request.user.hasPermission('Edit') or
- context.id == request.user.id;
- viewok python:request.user.hasPermission('View')">
+ <tal:block condition="context/is_view_ok">
-<span tal:condition="python:not (viewok or editok)">
-You are not allowed to view this page.
-</span>
+<!-- BODY -->
-<tal:block tal:condition="editok">
-<form method="POST" onSubmit="return submit_once()" enctype="multipart/form-data">
+<form method="POST" onSubmit="return submit_once()"
+ enctype="multipart/form-data" tal:condition="context/is_edit_ok">
-<input type="hidden" name=":required" value="username,address">
-<tal:block condition="context/id">
- <input type="hidden" name="username" tal:attributes="value python:context.username">
-</tal:block>
+ <input type="hidden" name=":template" value="item">
+ <input type="hidden" name=":required" value="username,address">
+
+ <table class="form">
+ <!-- Name -->
+ <tr>
+ <th>Name</th>
+ <td tal:condition="context/is_edit_ok"
+ tal:content="structure context/realname/field">realname</td>
+ <td tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/realname/plain">realname</td>
+ </tr>
+
+ <!-- Login -->
+ <tr>
+ <th>Login Name</th>
+ <td tal:condition="context/is_edit_ok"
+ tal:content="structure context/username/field">username</td>
+ <td tal:condition="not:context/is_edit_ok"
+ tal:content="structure context/username/plain">username</td>
+ </tr>
+
+ <!-- Password -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>Login Password</th>
+ <td tal:content="structure context/password/field">password</td>
+ </tr>
+ <tr tal:condition="context/is_edit_ok">
+ <th>Confirm Password</th>
+ <td tal:content="structure context/password/confirm">password</td>
+ </tr>
+
+ <!-- Roles -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>Roles</th>
+ <tal:block tal:condition="python:request.user.hasPermission('Web Roles')">
+ <td tal:condition="context/id"
+ tal:content="structure context/roles/field">roles</td>
+ <td tal:condition="not:context/id">
+ <input name="roles"
+ tal:attributes="value db/config/NEW_WEB_USER_ROLES">
+(to give the user more than one role, enter a comma,separated,list)
+ </td>
+ </tal:block>
+ <td tal:condition="python:not request.user.hasPermission('Web Roles')"
+ tal:content="structure context/roles/plain">roles</td>
+ </tr>
+
+ <!-- E-Mail -->
+ <tr>
+ <th>E-mail address</th>
+ <td tal:condition="context/is_edit_ok"
+ tal:content="structure context/address/field">address</td>
+ <td tal:condition="not:context/is_edit_ok"
+ tal:content="context/address/email">address</td>
+ </tr>
+
+ <!-- alternate E-Mail -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>Alternate E-mail addresses<br>One address per line</th>
+ <td tal:content="structure context/alternate_addresses/multiline">
+ alternate_addresses
+ </td>
+ </tr>
+
+ <!-- timezone -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>Timezone</th>
+ <td tal:content="structure context/timezone/field">timezone</td>
+ </tr>
+
+ <!-- notify -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>notify on new issue submissions (per <a href="javascript:help_window('component?:template=help&properties=id,name,description', 500, 400)">component</a>)</th>
+ <td>
+ <input name=":add:notify_on_new_issues" size="20">
+ <table tal:condition="context/notify_on_new_issues">
+ <tr>
+ <th>id</th><th>remove</th>
+ </tr>
+ <tr tal:repeat="component context/notify_on_new_issues">
+ <td><a tal:attributes="title component/description"
+ tal:content="component/name"></a>
+ </td>
+ <td>
+ <input type="checkbox" name=":remove:notify_on_new_issues" tal:attributes="value component/id">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- add to nosy -->
+ <tr tal:condition="context/is_edit_ok">
+ <th>add to all new nosy lists (per <a href="javascript:help_window('component?:template=help&properties=id,name,description', 500, 400)">component</a>)</th>
+ <td>
+ <input name=":add:add_to_all_nosy_lists" size="20">
+ <table tal:condition="context/add_to_all_nosy_lists">
+ <tr>
+ <th>id</th><th>remove</th>
+ </tr>
+ <tr tal:repeat="component context/add_to_all_nosy_lists">
+ <td><a tal:attributes="title component/description"
+ tal:content="component/name"></a>
+ </td>
+ <td>
+ <input type="checkbox" name=":remove:add_to_all_nosy_lists" tal:attributes="value component/id">
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+
+ <!-- Submit -->
-<table class="form">
- <tr>
- <th>Name</th>
- <td tal:content="structure context/realname/field">realname</td>
- </tr>
- <tr>
- <th>Login Name</th>
- <tal:block condition="context/id">
- <td tal:content="structure context/username/plain">username</td>
- </tal:block>
- <tal:block condition="python:not(context.id)">
- <td tal:content="structure context/username/field">username</td>
- </tal:block>
- </tr>
- <tr>
- <th>Login Password</th>
- <td tal:content="structure context/password/field">password</td>
- </tr>
- <tr>
- <th>Confirm Password</th>
- <td tal:content="structure context/password/confirm">password</td>
- </tr>
- <tr>
- <th>Roles</th>
- <td tal:condition="python:request.user.hasPermission('Edit')"
- tal:content="structure context/roles/field">roles</td>
- <td tal:condition="python:not request.user.hasPermission('Edit')"
- tal:content="structure context/roles/plain">roles</td>
- </tr>
- <tr>
- <th>E-mail address</th>
- <td tal:content="structure context/address/field">address</td>
- </tr>
- <tr>
- <th>Alternate E-mail addresses<br>One address per line</th>
- <td tal:content="structure context/alternate_addresses/multiline">alternate_addresses</td>
- </tr>
- <tr>
- <th>Timezone</th>
- <td tal:content="structure context/timezone/field">timezone</td>
- </tr>
- <tr>
- <th>notify on new issue submissions (per <a href="javascript:help_window('component?:template=help&properties=id,name,description', 500, 400)">component</a>)</th>
- <td>
- <input name=":add:notify_on_new_issues" size="20">
- <table tal:condition="context/notify_on_new_issues">
- <tr>
- <th>id</th><th>remove</th>
- </tr>
- <tr tal:repeat="component context/notify_on_new_issues">
- <td><a tal:attributes="title component/description"
- tal:content="component/name"></a>
- </td>
- <td>
- <input type="checkbox" name=":remove:notify_on_new_issues" tal:attributes="value component/id">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <th>add to all new nosy lists (per <a href="javascript:help_window('component?:template=help&properties=id,name,description', 500, 400)">component</a>)</th>
- <td>
- <input name=":add:add_to_all_nosy_lists" size="20">
- <table tal:condition="context/add_to_all_nosy_lists">
- <tr>
- <th>id</th><th>remove</th>
- </tr>
- <tr tal:repeat="component context/add_to_all_nosy_lists">
- <td><a tal:attributes="title component/description"
- tal:content="component/name"></a>
- </td>
- <td>
- <input type="checkbox" name=":remove:add_to_all_nosy_lists" tal:attributes="value component/id">
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
<p tal:content="structure context/submit">submit button here</p>
+
</form>
-<tal:block tal:condition="context/id">
- <table class="otherinfo" tal:condition="context/queries">
- <tr><th colspan="2" class="header">Queries</th></tr>
- <tr><th>Name</th><th>Display</th></tr>
+<table class="otherinfo" tal:condition="python: context.queries and context.is_edit_ok()">
+ <tr><th colspan="3" class="header">Queries</th></tr>
+ <tr><th>Name</th><th colspan="2">Actions</th></tr>
<tr tal:repeat="query context/queries">
- <td><a tal:attributes="href string:query${query/id}"
- tal:content="query/name"></a></td>
- <td>
- <a tal:attributes="href python:'%s%s'%(query['klass'], query['url'])">display</a>
- </td>
+ <td><a tal:attributes="href string:query${query/id}"
+ tal:content="query/name"></a></td>
+ <td>
+ <a tal:attributes="href python:'%s%s'%(query['klass'], query['url'])">display
+ </a>
+ </td>
+ <td>
+ <a tal:attributes="href string:?:remove:queries=${query/id}&:action=edit">remove</a>
+ </td>
</tr>
- </table>
-
- <tal:block tal:replace="structure context/history" />
+</table>
-</tal:block>
+<tal:block tal:condition="python:context.id and context.is_view_ok()"
+ tal:replace="structure context/history" />
-</tal:block>
+<!-- FOOTER -->
-<table class="form" tal:condition="python:viewok and not editok">
- <tr>
- <th colspan=2 class="header" tal:content="context/realname">realname</th>
- </tr>
- <tr>
- <th>Login Name</th>
- <td tal:content="context/username">username</td>
- </tr>
- <tr>
- <th>E-mail address</th>
- <td tal:content="context/address/email">address</td>
- </tr>
-</table>
+ </tal:block>
-</tal:block>
-</tal:block>
+ <span tal:condition="not:context/is_view_ok">
+You are not allowed to view this page.
+ </span>
+ </tal:block>
</tal:block>