Changeset - ceb7fdf4588a
[Not reviewed]
beta
0 3 0
Mads Kiilerich - 13 years ago 2013-03-26 23:29:54
madski@unity3d.com
move repo actions from their own menu line to Options menu
3 files changed with 22 insertions and 63 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/css/contextbar.css
Show inline comments
 
/**
 
 * Stylesheets for the context bar
 
 */
 

	
 
#quick .repo_switcher { background-image: url("../images/icons/database.png"); }
 
#quick .journal { background-image: url("../images/icons/book.png"); }
 
#quick .search { background-image: url("../images/icons/search_16.png"); }
 
#quick .admin { background-image: url("../images/icons/cog_edit.png"); }
 

	
 
#context-bar button.follow { background-image: url("../images/icons/heart.png"); }
 
#context-bar button.following { background-image: url("../images/icons/heart_delete.png"); }
 
#context-bar a.follow { background-image: url("../images/icons/heart.png"); }
 
#context-bar a.following { background-image: url("../images/icons/heart_delete.png"); }
 
#context-bar a.fork { background-image: url("../images/icons/arrow_divide.png"); }
 
#context-bar a.summary { background-image: url("../images/icons/clipboard_16.png"); }
 
#context-bar a.changelogs { background-image: url("../images/icons/time.png"); }
 
#context-bar a.files { background-image: url("../images/icons/file.png"); }
 
#context-bar a.switch-to { background-image: url("../images/icons/arrow_switch.png"); }
 
#context-bar a.options { background-image: url("../images/icons/table_gear.png"); }
 
#context-bar a.forks { background-image: url("../images/icons/arrow_divide.png"); }
 
#context-bar a.pull-request { background-image: url("../images/icons/arrow_join.png"); }
 
#context-bar a.branches { background-image: url("../images/icons/arrow_branch.png"); }
 
#context-bar a.tags { background-image: url("../images/icons/tag_blue.png"); }
 
#context-bar a.bookmarks { background-image: url("../images/icons/tag_green.png"); }
 
#context-bar a.settings { background-image: url("../images/icons/cog.png"); }
 
@@ -38,32 +38,30 @@
 
#context-bar a.locking_del { background-image: url('../images/icons/lock_delete.png')}
 
#context-bar a.locking_add { background-image: url('../images/icons/lock_add.png')}
 

	
 
#content #context-bar {
 
    position: relative;
 
    background-color: #003B76 !important;
 
    padding: 0px;
 
    overflow: visible;
 
}
 

	
 
#header #header-inner #quick a,
 
#content #context-bar,
 
#content #context-bar a,
 
#content #context-bar button {
 
#content #context-bar a {
 
    color: #FFFFFF;
 
}
 

	
 
#header #header-inner #quick a:hover,
 
#content #context-bar a:hover,
 
#content #context-bar button:hover {
 
#content #context-bar a:hover {
 
    text-decoration: none;
 
}
 

	
 
#content #context-bar .icon {
 
    display: inline-block;
 
    width: 16px;
 
    height: 16px;
 
    vertical-align: text-bottom;
 
}
 

	
 
ul.horizontal-list {
 
    display: block;
 
@@ -161,25 +159,24 @@ ul#context-actions {
 
    display: inline-block;
 
    float: right;
 
    border-radius: 4px;
 
    background-image: linear-gradient(top, #4574a2 0%, #2f5d8b 100%);
 
}
 

	
 
#content ul#context-actions li {
 
    padding: 0px;
 
    border-right: 1px solid rgba(0,0,0,0.1);
 
    border-left: 1px solid rgba(255,255,255,0.1);
 
}
 

	
 
#context-actions button,
 
#context-actions a {
 
    display: block;
 
    cursor: pointer;
 
    background: none;
 
    border: none;
 
    margin: 0px;
 
    height: auto;
 
    padding: 10px 10px 10px 30px;
 
    background-repeat: no-repeat;
 
    background-position: 10px 50%;
 
    font-size: 1em;
 
}
 
@@ -207,51 +204,37 @@ ul#context-actions {
 

	
 

	
 
#content #context-actions li:first-child {
 
    border-left: none;
 
    border-radius: 4px 0 0px 4px;
 
}
 

	
 
#content #context-actions li:last-child {
 
    border-right: none;
 
    border-radius: 0 4px 4px 0;
 
}
 

	
 
#content  #context-actions .icon {
 
#content #context-actions .icon {
 
    margin: auto;
 
    margin-bottom: 5px;
 
    display: block;
 
    clear: both;
 
    float: none;
 
}
 

	
 
#content  #context-actions button.follow,
 
#content  #context-actions button.following {
 
    width: auto;
 
    float: none;
 
}
 

	
 
#content  #context-actions button .show-following,
 
#content  #context-actions button .show-follow {
 
#content #context-pages .follow .show-following,
 
#content #context-pages .following .show-follow {
 
    display: none;
 
}
 

	
 
#content #context-bar #context-actions button.follow .show-follow {
 
    display: block;
 
}
 

	
 
#content #context-bar #context-actions button.following .show-following {
 
    display: block;
 
}
 

	
 
#context-state {
 
    background-color: #336699;
 
    border-top: 1px solid #517da8;
 
    min-height: 36px;
 
}
 

	
 
#context-pages {
 
    float: right;
 
    border-left: 1px solid rgba(0,0,0,0.1);
 
}
 

	
 
#context-pages li.current {
rhodecode/public/css/style.css
Show inline comments
 
@@ -3165,44 +3165,24 @@ table.code-browser .submodule-dir {
 
    z-index: 9050;
 
}
 

	
 
.ac .yui-ac-content li.yui-ac-highlight {
 
    background: #556CB5;
 
    color: #FFF;
 
    z-index: 9050;
 
}
 
.ac .yui-ac-bd {
 
    z-index: 9050;
 
}
 

	
 
.follow {
 
    background: url("../images/icons/heart_add.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
.following {
 
    background: url("../images/icons/heart_delete.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
.reposize {
 
    background: url("../images/icons/server.png") no-repeat scroll 3px;
 
    height: 16px;
 
    width: 20px;
 
    cursor: pointer;
 
    display: block;
 
    float: right;
 
    margin-top: 2px;
 
}
 

	
 
#repo_size {
 
    display: block;
rhodecode/templates/base/base.html
Show inline comments
 
@@ -78,58 +78,40 @@
 
<%def name="admin_menu_simple()">
 
  <ul>
 
      <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
 
  </ul>
 
</%def>
 

	
 
<%def name="repo_context_bar(current=None)">
 
  <%
 
      def follow_class():
 
          if c.repository_following:
 
              return h.literal('following')
 
          else:
 
            return h.literal('follow')
 
              return h.literal('follow')
 
  %>
 
  <%
 
    def is_current(selected):
 
        if selected == current:
 
            return h.literal('class="current"')
 
    %>
 

	
 
  <!--- CONTEXT BAR -->
 
  <div id="context-bar" class="box">
 
    <div id="context-top">
 
      <div id="breadcrumbs">
 
        ${h.link_to(_(u'Repositories'),h.url('home'))}
 
        &raquo;
 
        ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
 
      </div>
 
      ## TODO: this check feels wrong, it would be better to have a check for permissions
 
      ## also it feels like a job for the controller
 
      %if c.rhodecode_user.username != 'default':
 
        <ul id="context-actions" class="horizontal-list">
 
          <li>
 
           <button class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
 
            <!--span class="icon show-follow follow"></span>
 
            <span class="icon show-following following"></span-->
 
            <span class="show-follow">${_('Follow')}</span>
 
            <span class="show-following">${_('Unfollow')}</span>
 
          </button>
 
          </li>
 
          <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
 
          %if h.is_hg(c.rhodecode_repo):
 
          <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
 
          %endif
 
        </ul>
 
      %endif
 
    </div>
 
    <div id="context-state">
 
      <ul id="context-pages" class="horizontal-list">
 
        <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
 
        <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
 
        <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
 
        <li ${is_current('switch-to')}>
 
          <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
 
          <ul id="switch_to_list_2" class="switch_to submenu">
 
            <li><a href="#">${_('loading...')}</a></li>
 
          </ul>
 
        </li>
 
@@ -147,24 +129,38 @@
 
               <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default'),class_='compare_request')}</li>
 
              %endif
 
              <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
 
              <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
 

	
 
              %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
 
                %if c.rhodecode_db_repo.locked[0]:
 
                  <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
 
                %else:
 
                  <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
 
                %endif
 
              %endif
 
		      ## TODO: this check feels wrong, it would be better to have a check for permissions
 
		      ## also it feels like a job for the controller
 
		      %if c.rhodecode_user.username != 'default':
 
		          <li>
 
		           <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
 
		            <span class="show-follow">${_('Follow')}</span>
 
		            <span class="show-following">${_('Unfollow')}</span>
 
		          </a>
 
		          </li>
 
		          <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
 
		          %if h.is_hg(c.rhodecode_repo):
 
		          <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
 
		          %endif
 
		      %endif
 
             </ul>
 
        </li>
 
        <li ${is_current('showpullrequest')}>
 
          <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
 
            %if c.repository_pull_requests:
 
              <span>${c.repository_pull_requests}</span>
 
            %endif
 
          </a>
 
        </li>
 
      </ul>
 
    </div>
 
  </div>
0 comments (0 inline, 0 general)