Changeset - 7bca124ef278
[Not reviewed]
default
0 3 0
Mads Kiilerich - 8 years ago 2017-06-11 15:02:09
mads@kiilerich.com
style: drop dynamic width of repo summary labels - it should be the same no matter if statistics is shown or not
3 files changed with 8 insertions and 17 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -821,55 +821,48 @@ div.panel div.panel-heading {
 
    margin: 8px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > label {
 
    margin: 0;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > label {
 
    width: 155px;
 
    position: absolute;
 
    margin: 0;
 
    padding: 0px 0 0 0px;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > label {
 
    color: #393939;
 
    font-weight: 700;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > div {
 
    margin: 0 20px 0 200px;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > div.summary,
 
#content div.panel div.form div.form-horizontal div.form-group > div.summary-short {
 
    margin: 0 20px 10px 110px;
 
}
 
#content div.panel div.form div.form-horizontal div.form-group > div.summary-short input {
 
    margin: 0;
 
}
 
#content div.panel div.form div.form-horizontal div.form-group > div.file {
 
    margin: 0 20px 0 200px;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > label > input[type=text],
 
#content div.panel div.form div.form-horizontal div.form-group > label > input[type=password],
 
#content div.panel div.form div.form-horizontal div.form-group > div input[type=text],
 
#content div.panel div.form div.form-horizontal div.form-group > div input[type=password],
 
#content div.panel div.form div.form-horizontal div.form-group > label > textarea,
 
#content div.panel div.form div.form-horizontal div.form-group > div textarea,
 
.reviewer_ac input {
 
    background: #FFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000;
 
    font-size: 12px;
 
    margin: 5px 0 10px;
 
    padding: 7px 7px 6px;
 
}
 

	
 
#content div.panel div.form div.form-horizontal div.form-group > div input#clone_url,
 
#content div.panel div.form div.form-horizontal div.form-group > div input#clone_url_id
 
@@ -1127,51 +1120,55 @@ div.form div.form-horizontal div.form-gr
 
}
 

	
 
#content div.panel div.traffic div.legend li.pageviews {
 
    border-left: 12px solid #afd8f8;
 
}
 

	
 
#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 div#summary-panel-body.form div.form-horizontal div.form-group > div {
 
    margin: 0 20px 10px 110px;
 
}
 

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

	
 
ul#summary-menu-stats {
 
    float: left;
 
    width: 180px;
 
    position: absolute;
 
    top: 0;
 
    right: 0;
 
    display: block;
 
    background-color: #f9f9f9;
 
    border: 1px solid #d1d1d1;
 
    border-radius: 4px;
 
    margin: 20px;
 
}
 

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

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

	
kallithea/templates/summary/statistics.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Statistics') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Statistics')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%block name="head_extra">
 
  <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=request.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
 
  <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=request.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('summary')}
 
    <%
 
    summary = lambda n:{False:'summary-short'}.get(n)
 
    %>
 
    <div class="panel panel-primary">
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="graph panel-body">
 
         <div style="padding:0 10px 10px 17px;">
 
         %if c.no_data:
 
           ${c.no_data_msg}
 
           %if h.HasPermissionAny('hg.admin')('enable stats on from summary'):
 
                ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name),class_="btn btn-default btn-xs")}
 
           %endif
 
        %else:
 
            ${_('Stats gathered: ')} ${c.stats_percentage}%
 
        %endif
 
        </div>
 
        <div id="commit_history" style="width:450px;height:300px;float:left"></div>
 

	
 
        <div id="legend_data" style="float: left;">
 
            <div id="legend_container"></div>
 
            <div id="legend_choices">
 
                <table class="table" id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
 
            </div>
 
        </div>
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -35,95 +35,92 @@
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%block name="head_extra">
 
  <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=request.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
 
  <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=request.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 

	
 
  <script>
 
  redirect_hash_branch = function(){
 
    var branch = window.location.hash.replace(/^#(.*)/, '$1');
 
    if (branch){
 
      window.location = ${h.js(h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__'))}
 
        .replace('__BRANCH__',branch);
 
    }
 
  }
 
  redirect_hash_branch();
 
  window.onhashchange = function() {
 
    redirect_hash_branch();
 
  };
 
  </script>
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('summary')}
 
<%
 
summary = lambda n:{False:'summary-short'}.get(n)
 
%>
 
<div class="panel panel-primary">
 
    <div class="panel-heading clearfix">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div id="summary-panel-body" class="form panel-body">
 
        <div id="summary" class="form-horizontal">
 
            <div class="form-group form-inline clearfix">
 
                <label>${_('Clone URL')}:</label>
 
                <div id="clone-url">
 
                  <div id="clone_by_name" class="input-group">
 
                    <span class="input-group-addon">${self.repotag(c.db_repo)}</span>
 
                    <input class="form-control" size="80" readonly="readonly" value="${c.clone_repo_url}"/>
 
                    <span class="input-group-addon btn">${_('Show by ID')}</span>
 
                  </div>
 
                  <div id="clone_by_id" class="input-group" style="display:none">
 
                    <span class="input-group-addon">${self.repotag(c.db_repo)}</span>
 
                    <input class="form-control" size="80" readonly="readonly" value="${c.clone_repo_url_id}"/>
 
                    <span class="input-group-addon btn">${_('Show by Name')}</span>
 
                  </div>
 
                </div>
 
            </div>
 

	
 
            <div class="form-group clearfix">
 
              <label>${_('Description')}:</label>
 
              <div class="${summary(c.show_stats)} desc">${h.urlify_text(c.db_repo.description, stylize=c.visual.stylify_metatags)}</div>
 
              <div class="desc">${h.urlify_text(c.db_repo.description, stylize=c.visual.stylify_metatags)}</div>
 
            </div>
 

	
 
            <div class="form-group clearfix">
 
              <label>${_('Trending files')}:</label>
 
              <div class="${summary(c.show_stats)}">
 
              <div>
 
                %if c.show_stats:
 
                <div id="lang_stats"></div>
 
                %else:
 
                   ${_('Statistics are disabled for this repository')}
 
                   %if h.HasPermissionAny('hg.admin')('enable stats on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'),class_="btn btn-default btn-xs")}
 
                   %endif
 
                %endif
 
              </div>
 
            </div>
 

	
 
            <div class="form-group clearfix">
 
              <label>${_('Download')}:</label>
 
              <div class="${summary(c.show_stats)}">
 
              <div>
 
                %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>
 
        <ul id="summary-menu-stats" class="list-group">
 
            <li class="list-group-item">
0 comments (0 inline, 0 general)