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
 
@@ -222,12 +222,17 @@ class SettingsController(BaseController)
 
    def my_account(self):
 
        """
 
        GET /_admin/my_account Displays info about my account 
 
        """
 
        # 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')
 
            return redirect(url('users'))
 
        
 
        defaults = c.user.__dict__
pylons_app/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -11,13 +11,13 @@
 

	
 
<%def name="page_nav()">
 
	${self.menu('admin')}
 
</%def>
 

	
 
<%def name="main()">
 
<div class="box">
 
<div class="box box-left">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}       
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('admin_settings_my_account_update'),method='put')}
 
@@ -73,7 +73,37 @@
 
              ${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")}
 
            </div>             
 
    	</div>    
 
    </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)