Changeset - e6c802a8dede
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-05-25 19:31:56
marcin@python-works.com
repo edit
3 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/repos.py
Show inline comments
 
@@ -88,7 +88,9 @@ class ReposController(BaseController):
 
    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')
pylons_app/templates/admin/repos/repo_edit.html
Show inline comments
 
@@ -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>
pylons_app/templates/admin/repos/repos.html
Show inline comments
 
@@ -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')}
0 comments (0 inline, 0 general)