Skip to content

Commit f2eadb3

Browse files
committed
fix: issue2550924. clean up schema for devel/responsive templates.
both templates have the same schema. Changes patches class to patch in devel schema. Change bug.issue.html to account for patches -> patch rename. Sort property list for a permission. Add patch class for responsive template. From both remove incorrect comment.
1 parent f84dec3 commit f2eadb3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

share/roundup/templates/devel/html/bug.item.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,21 @@
176176
<tr tal:condition="context/is_edit_ok">
177177
<th><tal:block i18n:translate="">Patch</tal:block>:</th>
178178
<td colspan="3">
179-
<input type="hidden" name="@link@patches" value="patches-1"/>
180-
<input type="file" name="patches-1@content" size="35"/>
179+
<input type="hidden" name="@link@patches" value="patch-1"/>
180+
<input type="file" name="patch-1@content" size="35"/>
181181
</td>
182182
</tr>
183183
<tr tal:condition="context/is_edit_ok">
184184
<th><tal:block i18n:translate="">Patch Description</tal:block>:</th>
185-
<td colspan=3><input type="edit" name="patches-1@description" size="40"></td>
185+
<td colspan=3><input type="edit" name="patch-1@description" size="40"></td>
186186
</tr>
187187
<tr tal:condition="context/is_edit_ok">
188188
<th><tal:block i18n:translate="">Repository</tal:block>:</th>
189-
<td colspan=3><input type="edit" name="patches-1@repository" size="40"></td>
189+
<td colspan=3><input type="edit" name="patch-1@repository" size="40"></td>
190190
</tr>
191191
<tr tal:condition="context/is_edit_ok">
192192
<th><tal:block i18n:translate="">Repo. Revision</tal:block>:</th>
193-
<td colspan=3><input type="edit" name="patches-1@revision" size="40"></td>
193+
<td colspan=3><input type="edit" name="patch-1@revision" size="40"></td>
194194
</tr>
195195
-->
196196
</table>

share/roundup/templates/devel/schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
description=String(indexme='yes'))
128128

129129
# Patch
130-
patches = FileClass(db, "patches",
130+
patch = FileClass(db, "patch",
131131
name=String(),
132132
description=String(indexme='yes'),
133133
repository=String(),
@@ -144,7 +144,6 @@
144144
# title = String()
145145
# messages = Multilink("msg")
146146
# files = Multilink("file")
147-
# patches = Multilink("patches")
148147
# nosy = Multilink("user")
149148
# superseder = Multilink("issue")
150149
bug = IssueClass(db, "bug",
@@ -159,7 +158,7 @@
159158
resolution=Link('resolution'),
160159
superseder=Link('bug'),
161160
keywords=Multilink('keyword'),
162-
patches=Multilink('patches'))
161+
patches=Multilink('patch'))
163162

164163
# Task Type
165164
task_type = Class(db, 'task_type',
@@ -209,6 +208,7 @@
209208
db.security.addPermissionToRole(r, 'Rest Access')
210209
db.security.addPermissionToRole(r, 'Xmlrpc Access')
211210

211+
212212
##########################
213213
# User permissions
214214
##########################
@@ -299,7 +299,7 @@ def may_edit_file(db, userid, itemid):
299299
# if you don't want them to
300300
p = db.security.addPermission(name='View', klass='user',
301301
properties=('id', 'organisation', 'phone', 'realname', 'timezone',
302-
'vcs_name', 'username'))
302+
'username', 'vcs_name'))
303303
db.security.addPermissionToRole('User', p)
304304
db.security.addPermissionToRole('Developer', p)
305305

share/roundup/templates/responsive/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
# title = String()
145145
# messages = Multilink("msg")
146146
# files = Multilink("file")
147-
# patches = Multilink("patches")
148147
# nosy = Multilink("user")
149148
# superseder = Multilink("issue")
150149
bug = IssueClass(db, "bug",
@@ -158,7 +157,8 @@
158157
status=Link('status'),
159158
resolution=Link('resolution'),
160159
superseder=Link('bug'),
161-
keywords=Multilink('keyword'))
160+
keywords=Multilink('keyword'),
161+
patches=Multilink('patch'))
162162

163163
# Task Type
164164
task_type = Class(db, 'task_type',

0 commit comments

Comments
 (0)