Changeset - 78f08233a28c
[Not reviewed]
default
0 4 0
Mads Kiilerich - 9 years ago 2017-02-16 01:54:36
mads@kiilerich.com
style: introduce Bootstrap list-group and list-group-item

Based on work by Dominik Ruf.
4 files changed with 20 insertions and 22 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -1129,61 +1129,59 @@ div.form div.form-horizontal div.form-gr
 

	
 
#content div.panel div.traffic table {
 
    width: auto;
 
}
 

	
 
#content div.panel div.traffic table td {
 
    background: transparent;
 
    border: none;
 
    padding: 2px 3px 3px;
 
}
 

	
 
#content div.panel div.traffic table td.legendLabel {
 
    padding: 0 3px 2px;
 
}
 

	
 
#content div.panel #summary-panel-body {
 
    position: relative;
 
}
 

	
 
#content div.panel #summary {
 
    margin-right: 200px;
 
    min-height: 240px;
 
}
 

	
 
#summary-menu-stats {
 
ul#summary-menu-stats {
 
    float: left;
 
    width: 180px;
 
    position: absolute;
 
    top: 0;
 
    right: 0;
 
}
 

	
 
#summary-menu-stats ul {
 
    display: block;
 
    background-color: #f9f9f9;
 
    border: 1px solid #d1d1d1;
 
    border-radius: 4px;
 
    margin: 10px 20px;
 
}
 

	
 
#content #summary-menu-stats li {
 
    border-top: 1px solid #d1d1d1;
 
    padding: 0;
 
}
 

	
 
#content #summary-menu-stats li:hover {
 
    background: #f0f0f0;
 
}
 

	
 
#content #summary-menu-stats li:first-child {
 
    border-top: none;
 
}
 

	
 
#summary-menu-stats a {
 
    display: block;
 
    padding: 12px 10px;
 
    background-repeat: no-repeat;
 
    background-position: 10px 50%;
 
    padding-right: 10px;
 
}
 

	
 
#repo_size_2.loaded {
kallithea/templates/admin/notifications/notifications_data.html
Show inline comments
 

	
 
%if c.notifications:
 
<%
 
unread = lambda n:{False:'unread'}.get(n)
 
%>
 

	
 
<div class="notification-list notification-table">
 
<div class="notification-list notification-table list-group">
 
%for notification in c.notifications:
 
  <div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}">
 
    <div class="notification-header">
 
  <div id="notification_${notification.notification.notification_id}" class="list-group-item ${unread(notification.read)}">
 
    <div>
 
      ${h.gravatar_div(notification.notification.created_by_user.email, size=24)}
 
      <span class="desc ${unread(notification.read)}">
 
        <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a>
 
      </span>
 
      <span class="delete-notifications">
 
        <span id="${notification.notification.notification_id}" class="delete-notification"><i class="icon-minus-circled" style="color: #b94a48; padding: 2px;"></i></span>
 
        <span id="${notification.notification.notification_id}" class="delete-notification"><i class="btn icon-minus-circled"></i></span>
 
      </span>
 
      %if not notification.read:
 
      <span class="read-notifications">
 
        <span id="${notification.notification.notification_id}" class="read-notification"><i class="icon-ok" style="color: #4CBB17; padding: 2px;"></i></span>
 
        <span id="${notification.notification.notification_id}" class="read-notification"><i class="btn icon-ok"></i></span>
 
      </span>
 
      %endif
 
    </div>
 
    <div class="notification-subject"></div>
 
  </div>
 
%endfor
 
</div>
 

	
 
<ul class="pagination">
 
    ${c.notifications.pager(controller='admin/notifications', **request.GET.mixed())}
 
</ul>
 

	
 
%else:
 
    <div>${_('No notifications here yet')}</div>
 
%endif
kallithea/templates/files/files_source.html
Show inline comments
 
@@ -33,67 +33,69 @@
 
                ${h.link_to(_('Show Annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
              %endif
 
              ${h.link_to(_('Show as Raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
              ${h.link_to(_('Download as Raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
              %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
               %if c.on_branch_head and not c.file.is_binary:
 
                ${h.link_to(_('Edit on Branch: %s') % c.changeset.branch, h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path, anchor='edit'),class_="btn btn-default btn-xs")}
 
                ${h.link_to(_('Delete'), h.url('files_delete_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path, anchor='edit'),class_="btn btn-danger btn-xs")}
 
               %elif c.on_branch_head and c.file.is_binary:
 
                ${h.link_to(_('Edit'), '#', class_="btn btn-default btn-xs disabled", title=_('Editing binary files not allowed'),**{'data-toggle':'tooltip'})}
 
                ${h.link_to(_('Delete'), h.url('files_delete_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path, anchor='edit'),class_="btn btn-danger btn-xs")}
 
               %else:
 
                ${h.link_to(_('Edit'), '#', class_="btn btn-default btn-xs disabled", title=_('Editing files allowed only when on branch head revision'),**{'data-toggle':'tooltip'})}
 
                ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-xs disabled", title=_('Deleting files allowed only when on branch head revision'),**{'data-toggle':'tooltip'})}
 
               %endif
 
              %endif
 
          </div>
 
        </div>
 
        <div class="author">
 
            ${h.gravatar_div(h.email_or_none(c.changeset.author), size=16)}
 
            <div title="${c.changeset.author}" class="user">${h.person(c.changeset.author)}</div>
 
        </div>
 
        <div class="commit">${h.urlify_text(c.changeset.message,c.repo_name)}</div>
 
    </div>
 
    <div class="code-body">
 
    <ul class="list-group">
 
      <li class="list-group-item">
 
      %if c.file.is_browser_compatible_image():
 
        <img src="${h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path)}" class="img-preview"/>
 
      %elif c.file.is_binary:
 
        <div style="padding:5px">
 
        <div>
 
          ${_('Binary file (%s)') % c.file.mimetype}
 
        </div>
 
      %else:
 
        %if c.file.size < c.cut_off_limit or c.fulldiff:
 
            %if c.annotate:
 
              ${h.pygmentize_annotation(c.repo_name,c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
 
            %else:
 
              ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
 
            %endif
 
        %else:
 
            <h4>
 
            ${_('File is too big to display.')}
 
            %if c.annotate:
 
              ${h.link_to(_('Show full annotation anyway.'), h.url.current(fulldiff=1, **request.GET.mixed()))}
 
            %else:
 
              ${h.link_to(_('Show as raw.'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
 
            %endif
 
            </h4>
 
        %endif
 
      %endif
 
    </div>
 
      </li>
 
    </ul>
 
</div>
 

	
 
<script>
 
    $(document).ready(function(){
 
        // fake html5 history state
 
        var _State = {
 
           url: "${h.url.current()}",
 
           data: {
 
             node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
 
             url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
 
             rev:"${c.changeset.raw_id}",
 
             f_path: "${h.safe_unicode(c.file.path)}"
 
           }
 
        }
 
        callbacks(_State); // defined in files.html, main callbacks. Triggered in pjax calls
 
    });
 
</script>
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -99,93 +99,91 @@ summary = lambda n:{False:'summary-short
 
              <label>${_('Download')}:</label>
 
              <div class="${summary(c.show_stats)}">
 
                %if len(c.db_repo_scm_instance.revisions) == 0:
 
                  ${_('There are no downloads yet')}
 
                %elif not c.enable_downloads:
 
                  ${_('Downloads are disabled for this repository')}
 
                    %if h.HasPermissionAny('hg.admin')('enable downloads on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'),class_="btn btn-default btn-xs")}
 
                    %endif
 
                %else:
 
                    <span id="${'zip_link'}">
 
                        <a class="btn btn-default btn-sm" href="${h.url('files_archive_home',repo_name=c.db_repo.repo_name,fname='tip.zip')}"><i class="icon-file-zip"></i> ${_('Download as zip')}</a>
 
                    </span>
 
                    ${h.hidden('download_options')}
 
                    <span style="vertical-align: bottom">
 
                      <label data-toggle="tooltip" title="${_('Check this to download archive with subrepos')}">
 
                          <input id="archive_subrepos" type="checkbox" name="subrepos" />
 
                          ${_('With subrepos')}
 
                      </label>
 
                    </span>
 
                %endif
 
              </div>
 
            </div>
 
        </div>
 
        <div id="summary-menu-stats">
 
          <ul>
 
            <li>
 
        <ul id="summary-menu-stats" class="list-group">
 
            <li class="list-group-item">
 
               <a title="${_('Owner')} ${c.db_repo.owner.email}">
 
                <i class="icon-user"></i> ${c.db_repo.owner.username}
 
                ${h.gravatar_div(c.db_repo.owner.email, size=18, div_style="float: right; margin: 0px 0px 0px 0px", div_title=c.db_repo.owner.full_name)}
 
              </a>
 
            </li>
 
            <li>
 
            <li class="list-group-item">
 
               <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
 
                <i class="icon-heart"></i> ${_('Followers')}
 
                <span class="badge" id="current_followers_count">${c.repository_followers}</span>
 
              </a>
 
            </li>
 
            <li>
 
            <li class="list-group-item">
 
              <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
 
                <i class="icon-fork"></i> ${_('Forks')}
 
                <span class="badge">${c.repository_forks}</span>
 
              </a>
 
            </li>
 

	
 
            %if request.authuser.username != 'default':
 
            <li class="repo_size clearfix">
 
            <li class="list-group-item clearfix">
 
              <a href="#" onclick="javascript:showRepoSize('repo_size_2','${c.db_repo.repo_name}')"><i class="icon-ruler"></i> ${_('Repository Size')}</a>
 
              <span  class="stats-bullet" id="repo_size_2"></span>
 
            </li>
 
            %endif
 

	
 
            <li>
 
            <li class="list-group-item">
 
            %if request.authuser.username != 'default':
 
              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=request.authuser.api_key)}"><i class="icon-rss-squared"></i> ${_('Feed')}</a>
 
            %else:
 
              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name)}"><i class="icon-rss-squared"></i> ${_('Feed')}</a>
 
            %endif
 
            </li>
 

	
 
            %if c.show_stats:
 
            <li>
 
            <li class="list-group-item">
 
              <a title="${_('Statistics')}" href="${h.url('repo_stats_home',repo_name=c.repo_name)}">
 
                <i class="icon-graph"></i> ${_('Statistics')}
 
              </a>
 
            </li>
 
            %endif
 
          </ul>
 
        </div>
 
        </ul>
 
    </div>
 
</div>
 

	
 

	
 
<div class="panel panel-primary">
 
    <div class="panel-heading">
 
        <div class="breadcrumbs panel-title">
 
        %if c.repo_changesets:
 
            ${h.link_to(_('Latest Changes'),h.url('changelog_home',repo_name=c.repo_name))}
 
        %else:
 
            ${_('Quick Start')}
 
         %endif
 
        </div>
 
    </div>
 
    <div class="panel-body">
 
        <div id="shortlog_data">
 
            <%include file='../changelog/changelog_summary_data.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
%if c.readme_data:
 
<div id="readme" class="anchor">
 
<div class="panel panel-primary">
0 comments (0 inline, 0 general)