Changeset - a0a93357f954
[Not reviewed]
default
0 2 0
Marcin Kuzminski - 15 years ago 2010-09-03 00:46:07
marcin@python-works.com
started my page rewrite
2 files changed with 36 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/admin/settings.py
Show inline comments
 
@@ -225,6 +225,11 @@ class SettingsController(BaseController)
 
        """
 
        # url('admin_settings_my_account')
 
        c.user = self.sa.query(User).get(c.hg_app_user.user_id)
 
        c.user_repos = []
 
        for repo in c.cached_repo_list.values():
 
            if repo.dbrepo.user.username == c.user.username:
 
                c.user_repos.append(repo)
 
                
 
        if c.user.username == 'default':
 
            h.flash(_("You can't edit this user since it's" 
 
              " crucial for entire application"), category='warning')
pylons_app/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -14,7 +14,7 @@
 
</%def>
 

	
 
<%def name="main()">
 
<div class="box">
 
<div class="box box-left">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}       
 
@@ -76,4 +76,34 @@
 
    </div>
 
    ${h.end_form()}
 
</div>    
 

	
 
<div class="box box-right">
 
    <!-- box / title -->
 
    <div class="title">
 
        <h5>${_('My repositories')}</h5>   
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
    <table>
 
     <tbody>
 
     %for repo in c.user_repos:
 
        <tr>
 
            <td>
 
             %if repo.dbrepo.private:
 
                <img alt="${_('private')}" src="/images/icons/lock.png"/>
 
             %else:
 
                <img alt="${_('public')}" src="/images/icons/lock_open.png"/>
 
             %endif
 
                                             
 
            ${h.link_to(repo.name, h.url('summary_home',repo_name=repo.name))}</td> 
 
            ##<td>${_('created')} ${repo.dbrepo.}</td>
 
            <td>${_('last changed')}  ${h.age(repo.last_change)}</td>
 
            <td>${h.link_to(_('[edit]'),h.url('edit_repo',repo_name=repo.name))}</td>
 
        </tr>
 
     %endfor
 
     </tbody>
 
     </table>
 
    </div>
 
    
 
</div>
 
</%def>  
 
\ No newline at end of file
0 comments (0 inline, 0 general)