changeset 4306:4541ef6d33d3

repo group: make it possible to remove repo groups
author Mads Kiilerich <madski@unity3d.com>
date Tue, 10 Dec 2013 19:30:37 +0100
parents 6b97c7e8d03c
children ee43e19c18b7
files kallithea/config/routing.py kallithea/templates/admin/repo_groups/repo_group_edit_settings.html
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/routing.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/config/routing.py	Tue Dec 10 19:30:37 2013 +0100
@@ -172,7 +172,7 @@
                   action="delete_perms",
                   conditions=dict(method=["DELETE"], function=check_group))
 
-        m.connect("delete_repos_group", "/repo_groups/{group_name:.*?}",
+        m.connect("delete_repo_group", "/repo_groups/{group_name:.*?}",
                   action="delete", conditions=dict(method=["DELETE"],
                                                    function=check_group_skip_path))
 
--- a/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/templates/admin/repo_groups/repo_group_edit_settings.html	Tue Dec 10 19:30:37 2013 +0100
@@ -46,6 +46,16 @@
 </div>
 ${h.end_form()}
 
+${h.form(url('delete_repo_group', group_name=c.repo_group.group_name),method='delete')}
+<div class="form">
+    <div class="fields">
+        <div class="field" style="border:none;color:#888">
+            ${h.submit('remove_%s' % c.repo_group.group_name,_('Remove this group'),class_="btn red",onclick="return confirm('"+_('Confirm to delete this group')+"');")}
+        </div>
+    </div>
+</div>
+${h.end_form()}
+
 <script>
     $(document).ready(function(){
         $("#group_parent_id").select2({