Changeset - ef7520340c44
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 13 years ago 2012-08-20 18:10:23
marcin@python-works.com
fixed missing div on my_account + added nothing here yet when there are no
pull requests for user
4 files changed with 18 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/css/style.css
Show inline comments
 
@@ -198,48 +198,53 @@ div.options a {
 
    -moz-border-radius-topright: 4px;
 
    border-top-right-radius: 4px;
 
}
 
 
.bottom-left-rounded-corner-mid {
 
    -webkit-border-bottom-left-radius: 4px;
 
    -khtml-border-radius-bottomleft: 4px;
 
    -moz-border-radius-bottomleft: 4px;
 
    border-bottom-left-radius: 4px;
 
}
 
 
.bottom-right-rounded-corner-mid {
 
    -webkit-border-bottom-right-radius: 4px;
 
    -khtml-border-radius-bottomright: 4px;
 
    -moz-border-radius-bottomright: 4px;
 
    border-bottom-right-radius: 4px;
 
}
 
 
.help-block {
 
    color: #999999;
 
    display: block;
 
    margin-bottom: 0;
 
    margin-top: 5px;
 
}
 
 
.empty_data{
 
    color:#B9B9B9;	
 
}
 
 
a.permalink{
 
	visibility: hidden;
 
}
 
 
a.permalink:hover{
 
	text-decoration: none;
 
}
 
 
h1:hover > a.permalink,
 
h2:hover > a.permalink,
 
h3:hover > a.permalink,
 
h4:hover > a.permalink,
 
h5:hover > a.permalink,
 
h6:hover > a.permalink,
 
div:hover > a.permalink {
 
    visibility: visible;
 
}
 
 
#header {
 
	margin: 0;
 
	padding: 0 10px;
 
}
 
 
#header ul#logged-user {
rhodecode/templates/admin/users/user_edit.html
Show inline comments
 
@@ -162,49 +162,49 @@
 
                </div>
 
             </div>
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="fork_repo_perm">${_('Fork repositories')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('fork_repo_perm',value=True)}
 
                </div>
 
             </div>
 
             </div>             
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="ui-btn large")}
 
              ${h.reset('reset',_('Reset'),class_="ui-btn large")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 

	
 
    ## permissions overview
 
    <div id="perms" class="table">
 
           %for section in sorted(c.perm_user.permissions.keys()):
 
              <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
 
              %if not c.perm_user.permissions[section]:
 
                  <span style="color:#B9B9B9">${_('Nothing here yet')}</span>
 
                  <span class="empty_data">${_('Nothing here yet')}</span>
 
              %else:
 
              <div id='tbl_list_wrap_${section}' class="yui-skin-sam">
 
               <table id="tbl_list_${section}">
 
                <thead>
 
                    <tr>
 
                    <th class="left">${_('Name')}</th>
 
                    <th class="left">${_('Permission')}</th>
 
                    <th class="left">${_('Edit Permission')}</th>
 
                </thead>
 
                <tbody>
 
                %for k in c.perm_user.permissions[section]:
 
                     <%
 
                     if section != 'global':
 
                         section_perm = c.perm_user.permissions[section].get(k)
 
                         _perm = section_perm.split('.')[-1]
 
                     else:
 
                         _perm = section_perm = None
 
                     %>
 
                    <tr>
 
                        <td>
 
                            %if section == 'repositories':
 
                                <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
 
                            %elif section == 'repositories_groups':
 
                                <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
rhodecode/templates/admin/users/user_edit_my_account.html
Show inline comments
 
@@ -75,50 +75,53 @@
 
                            <a href="${h.url('summary_home',repo_name=k)}">${k}</a>
 
                        %elif section == 'repositories_groups':
 
                            <a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
 
                        %else:
 
                            ${k}
 
                        %endif
 
                    </td>
 
                    <td>
 
                        %if section == 'global':
 
                         ${h.bool2icon(True)}
 
                        %else:
 
                        <span class="perm_tag ${_perm}">${section_perm}</span>
 
                        %endif
 
                     </td>
 
                </tr>
 
             %endif
 
            %endfor
 
            </tbody>
 
            </table>
 
            </div>
 
           %endfor
 
    </div>
 
    <div id="my" class="table" style="display:none">
 
    </div>
 
    <div id="pullrequests" class="table" style="display:none">
 
    <div id="pullrequests" class="table" style="display:none"></div>
 
</div>
 

	
 

	
 

	
 
<script type="text/javascript">
 
var filter_activate = function(){
 
    var nodes = YUQ('#my tr td a.repo_name');
 
    var func = function(node){
 
        return node.parentNode.parentNode.parentNode.parentNode;
 
    }
 
    q_filter('q_filter',YUQ('#my tr td a.repo_name'),func);
 
}
 
YUE.on('show_perms','click',function(e){
 
	YUD.addClass('show_perms', 'current');
 
	YUD.removeClass('show_my','current');
 
	YUD.removeClass('show_pullrequests','current');
 

	
 
    YUD.setStyle('my','display','none');
 
    YUD.setStyle('pullrequests','display','none');
 
    YUD.setStyle('perms','display','');
 
    YUD.setStyle('q_filter','display','none');
 
    YUE.preventDefault(e);
 
})
 
YUE.on('show_my','click',function(e){
 
    YUD.addClass('show_my', 'current');
 
    YUD.removeClass('show_perms','current');
 
    YUD.removeClass('show_pullrequests','current');
 

	
rhodecode/templates/admin/users/user_edit_my_account_pullrequests.html
Show inline comments
 

	
 
<div class="pullrequests_section_head">${_('Opened by me')}</div>
 
<ul>
 
    %if c.my_pull_requests:
 
    %for pull_request in c.my_pull_requests:
 
    <li>
 
    <a href="${h.url('pullrequest_show',repo_name=pull_request.other_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
 
    ${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.fmt_date(pull_request.created_on))}
 
    </a>
 
    </li>
 
    %endfor
 
   %else:
 
    <li><span class="empty_data">${_('Nothing here yet')}</span></li>
 
   %endif
 
</ul>
 

	
 
<div class="pullrequests_section_head">${_('I participate in')}</div>
 
<ul>
 
    %if c.my_pull_requests:
 
    %for pull_request in c.participate_in_pull_requests:
 
    <li>
 
    <a href="${h.url('pullrequest_show',repo_name=pull_request.other_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
 
    ${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.fmt_date(pull_request.created_on))}
 
    </a>
 
    </li>
 
    %endfor
 
    %else:
 
     <li><span class="empty_data">${_('Nothing here yet')}</span></li>
 
    %endif
 
</ul>
0 comments (0 inline, 0 general)