changeset 220:e6c802a8dede

repo edit
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 25 May 2010 19:31:56 +0200
parents 64e1125fc479
children 0eedbbc58ed9
files pylons_app/controllers/repos.py pylons_app/templates/admin/repos/repo_edit.html pylons_app/templates/admin/repos/repos.html
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/controllers/repos.py	Tue May 25 19:18:12 2010 +0200
+++ b/pylons_app/controllers/repos.py	Tue May 25 19:31:56 2010 +0200
@@ -88,7 +88,9 @@
     def show(self, id, format='html'):
         """GET /repos/id: Show a specific item"""
         # url('repo', id=ID)
-        return render('/repos_show.html')
+        
     def edit(self, id, format='html'):
         """GET /repos/id/edit: Form to edit an existing item"""
         # url('edit_repo', id=ID)
+        c.new_repo = id
+        return render('admin/repos/repo_edit.html')
--- a/pylons_app/templates/admin/repos/repo_edit.html	Tue May 25 19:18:12 2010 +0200
+++ b/pylons_app/templates/admin/repos/repo_edit.html	Tue May 25 19:31:56 2010 +0200
@@ -15,7 +15,7 @@
 <%def name="main()">
 	<div>
         <h2>${_('Repositories')} - ${_('edit')}</h2>
-        ${h.form(url('repos'))}
+        ${h.form(url('repo', id=ID),method='put'))}
         <table>
         	<tr>
         		<td>${_('Name')}</td>
@@ -31,7 +31,7 @@
         	</tr>
         	<tr>
         		<td></td>
-        		<td>${h.submit('add','add')}</td>
+        		<td>${h.submit('update','update')}</td>
         	</tr>
         	        	        	
         </table>
--- a/pylons_app/templates/admin/repos/repos.html	Tue May 25 19:18:12 2010 +0200
+++ b/pylons_app/templates/admin/repos/repos.html	Tue May 25 19:31:56 2010 +0200
@@ -23,7 +23,7 @@
         </tr>
 	        %for cnt,repo in enumerate(c.repos_list):
 	 		<tr class="parity${cnt%2}">
-			    <td>${h.link_to(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td>
+			    <td>${h.link_to(repo['name'],h.url('edit_repo',id=repo['name']))}</td>
 		        <td>r${repo['rev']}:${repo['tip']}</td>
                 <td>
                   ${h.form(url('repo', id=repo['name']),method='delete')}