diff --git a/rhodecode/templates/admin/repos/repo_edit.html b/rhodecode/templates/admin/repos/repo_edit.html --- a/rhodecode/templates/admin/repos/repo_edit.html +++ b/rhodecode/templates/admin/repos/repo_edit.html @@ -128,7 +128,22 @@ - + %if c.visual.repository_fields: + ## EXTRA FIELDS + %for field in c.repo_fields: +
+
+ +
+
+ ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} + %if field.field_desc: + ${field.field_desc} + %endif +
+
+ %endfor + %endif
@@ -286,4 +301,68 @@ ${h.end_form()}
+##TODO: this should be controlled by the VISUAL setting +%if c.visual.repository_fields: +
+ +
+
${_('Extra fields')}
+
+ +
+ + %for field in c.repo_fields: + + + + + + %endfor +
${field.field_label} (${field.field_key})${field.field_type} + ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')} + ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id, + class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")} + ${h.end_form()} +
+
+ + ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')} +
+ +
+
+
+ +
+
+ ${h.text('new_field_key', class_='small')} +
+
+
+
+ +
+
+ ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))} +
+
+ +
+
+ +
+
+ ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))} +
+
+ +
+ ${h.submit('save',_('Add'),class_="ui-btn large")} + ${h.reset('reset',_('Reset'),class_="ui-btn large")} +
+
+
+ ${h.end_form()} +
+%endif