Changeset - 387b8d551003
[Not reviewed]
default
0 4 0
domruf - 8 years ago 2017-07-02 21:14:37
dominikruf@gmail.com
style: rely on css to truncate author name in tables instead of truncating to fixed length

Dynamic truncation allows us in the future to use different length on different
screen sizes.
4 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -1261,48 +1261,55 @@ h3.files_location {
 
    overflow: hidden;
 
}
 

	
 
#changeset_compare_view_content .compare_view_commits {
 
    width: auto !important;
 
}
 

	
 
#changeset_compare_view_content .compare_view_commits td {
 
    padding: 0px 0px 0px 12px !important;
 
}
 

	
 
#changeset_content .changeset_content_header .right {
 
    float: right;
 
    width: 20%;
 
    text-align: right;
 
}
 

	
 
#changeset_content .changeset_content_header .message {
 
    white-space: pre-wrap;
 
}
 
#changeset_content .changeset_content_header .message a:hover {
 
    text-decoration: none;
 
}
 

	
 
td.author {
 
    overflow: hidden;
 
    text-overflow: ellipsis;
 
    white-space: nowrap;
 
    max-width: 210px;
 
}
 

	
 
.cs_files .progress {
 
    margin-bottom: 0;
 
}
 

	
 
.cs_files .cur_cs {
 
    margin: 10px 2px;
 
    font-weight: bold;
 
}
 

	
 
.cs_files .node {
 
    float: left;
 
}
 

	
 
.cs_files .changes {
 
    float: right;
 
    color: #577632;
 
}
 

	
 
.cs_files .changes .added {
 
    color: inherit;
 
    background-color: #BBFFBB;
 
    float: left;
 
    text-align: center;
 
    font-size: 9px;
 
@@ -1419,70 +1426,63 @@ BIN_FILENODE = 6
 
    margin: 0px 0px 0px 3px;
 
}
 

	
 
#graph_content #rev_range_clear {
 
    float: left;
 
    margin: 0px 0px 0px 3px;
 
}
 

	
 
#graph_content #changesets {
 
    border-collapse: collapse;
 
    border: none;
 
    border-color: #cdcdcd;
 
}
 

	
 
tr.mergerow > td.author .user,
 
tr.mergerow > td.mid .message,
 
tr.mergerow > td.mid .message > a,
 
tr.out-of-range > td.author .user,
 
tr.out-of-range > td.mid .message,
 
tr.out-of-range > td.mid .message > a {
 
    color: #aaa !important;
 
}
 

	
 
#graph_content #changesets td {
 
    overflow: hidden;
 
    text-overflow: ellipsis;
 
    white-space: nowrap;
 
    height: 31px;
 
    border-color: #cdcdcd;
 
    text-align: left;
 
}
 

	
 
#graph_content tr .checkbox-column {
 
    width: 14px;
 
    font-size: 0.85em;
 
}
 

	
 
#graph_content tr .status {
 
    width: 14px;
 
    font-size: 0.85em;
 
}
 

	
 
#graph_content tr .author {
 
   width: 105px;
 
}
 

	
 
#graph_content tr .hash {
 
    width: 100px;
 
    font-size: 0.85em;
 
}
 

	
 
#graph_content tr .date {
 
    width: 76px;
 
    color: #666;
 
    font-size: 10px;
 
}
 

	
 
#graph_content_pr .compare_view_commits .expand_commit,
 
#graph_content tr .expand_commit {
 
    width: 24px;
 
    cursor: pointer;
 
    color: #999;
 
}
 

	
 
#graph_content tr .right {
 
    width: 120px;
 
    padding-right: 0px;
 
    overflow: visible;
 
    position: relative;
 
}
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -75,49 +75,49 @@ ${self.repo_context_bar('changelog', c.f
 
                    <tr id="chg_${cnt+1}" class="${'mergerow' if len(cs.parents) > 1 else ''}">
 
                        <td class="checkbox-column">
 
                            %if c.changelog_for_path:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range", disabled="disabled")}
 
                            %else:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range")}
 
                            %endif
 
                        </td>
 
                        <td class="status">
 
                          %if c.statuses.get(cs.raw_id):
 
                            %if c.statuses.get(cs.raw_id)[2]:
 
                              <a data-toggle="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
 
                                <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %else:
 
                              <a data-toggle="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}"
 
                                 href="${c.comments[cs.raw_id][0].url()}">
 
                                  <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %endif
 
                          %endif
 
                        </td>
 
                        <td class="author">
 
                            ${h.gravatar(h.email_or_none(cs.author), size=16)}
 
                            <span data-toggle="tooltip" title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
 
                            <span data-toggle="tooltip" title="${cs.author}" class="user">${h.person(cs.author)}</span>
 
                        </td>
 
                        <td class="hash">
 
                            ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), class_='changeset_hash')}
 
                        </td>
 
                        <td class="date">
 
                            <div class="date" data-toggle="tooltip" title="${h.fmt_date(cs.date)}">${h.age(cs.date,True)}</div>
 
                        </td>
 
                        <td class="expand_commit" data-commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
                            <i class="icon-align-left"></i>
 
                        </td>
 
                        <td class="mid">
 
                            <div class="log-container">
 
                                <div class="message" id="C-${cs.raw_id}">${h.urlify_text(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
                                <div class="extra-container">
 
                                    %if c.comments.get(cs.raw_id):
 
                                        <a class="comments-container comments-cnt" href="${c.comments[cs.raw_id][0].url()}" data-toggle="tooltip" title="${_('%s comments') % len(c.comments[cs.raw_id])}">
 
                                            ${len(c.comments[cs.raw_id])}
 
                                            <i class="icon-comment-discussion"></i>
 
                                        </a>
 
                                    %endif
 
                                    %if cs.bumped:
 
                                        <span class="bumpedtag" title="Bumped">
 
                                            Bumped
 
                                        </span>
kallithea/templates/changeset/changeset_range.html
Show inline comments
 
@@ -15,49 +15,49 @@
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="panel panel-primary">
 
    <div class="panel-heading clearfix">
 
        <div class="pull-left">
 
            ${self.breadcrumbs()}
 
        </div>
 
        <div class="pull-right">
 
            <a href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref_name=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref_name=c.cs_ranges[-1].raw_id)}" class="btn btn-default btn-sm"><i class="icon-git-compare"></i> Compare Revisions</a>
 
        </div>
 
    </div>
 
    <div class="panel-body">
 
        <div>
 
                <table class="table compare_view_commits">
 
                %for cnt,cs in enumerate(c.cs_ranges):
 
                  <tr>
 
                    %if c.visual.use_gravatar:
 
                    <td>${h.gravatar_div(h.email_or_none(cs.author), size=14)}</td>
 
                    %endif
 
                    <td>${h.link_to(h.short_id(cs.raw_id),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</td>
 
                    <td><div class="author">${h.person(cs.author)}</div></td>
 
                    <td class="author">${h.person(cs.author)}</td>
 
                    <td><span data-toggle="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
 
                    <td>
 
                      %if c.statuses:
 
                        <i class="icon-circle changeset-status-${c.statuses[cnt]}" title="${_('Changeset status: %s') % h.changeset_status_lbl(c.statuses[cnt])}"></i>
 
                      %endif
 
                    </td>
 
                    <td><div class="message">${h.urlify_text(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
 
                  </tr>
 
                %endfor
 
                </table>
 
                <h4>${_('Files affected')}</h4>
 
                <div class="cs_files">
 
                    %for cs in c.cs_ranges:
 
                        <h6 class="cur_cs">${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</h6>
 
                        <% a_rev, cs_rev, file_diff_data = c.changes[cs.raw_id] %>
 
                        %for fid, url_fid, op, a_path, path, diff, stats in file_diff_data:
 
                            <div class="cs_${op} clearfix">
 
                                <div class="node pull-left">
 
                                    <i class="icon-diff-${op}"></i>
 
                                    ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                                </div>
 
                                <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                            </div>
 
                        %endfor
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -44,49 +44,49 @@
 
                          <i class="icon-comment"></i>
 
                      </a>
 
                  </div>
 
              </div>
 
          %endif
 
        </td>
 
        <td class="changeset-logical-index">
 
          <%
 
              num_cs = len(c.cs_ranges)
 
              index = num_cs - cnt
 
              if index == 1:
 
                  title = _('First (oldest) changeset in this list')
 
              elif index == num_cs:
 
                  title = _('Last (most recent) changeset in this list')
 
              else:
 
                  title = _('Position in this list of changesets')
 
          %>
 
          <span data-toggle="tooltip" title="${title}">
 
            ${index}
 
          </span>
 
        </td>
 
        <td><span data-toggle="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
 
        <td class="author">
 
            ${h.gravatar(h.email_or_none(cs.author), size=16)}
 
            <span data-toggle="tooltip" title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
 
            <span data-toggle="tooltip" title="${cs.author}" class="user">${h.person(cs.author)}</span>
 
        </td>
 
        <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')}</td>
 
        <td>
 
        %if cs.branch:
 
        <span class="branchtag">${h.link_to(cs.branch,h.url('changelog_home',repo_name=c.cs_repo.repo_name,branch=cs.branch))}</span>
 
        %endif
 
        </td>
 
        <td class="expand_commit" data-commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
            <i class="icon-align-left"></i>
 
        </td>
 
        <td class="mid">
 
            <div class="pull-right">
 
                %for tag in cs.tags:
 
                    <span class="tagtag" title="${_('Tag %s') % tag}">
 
                        ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
                    </span>
 
                %endfor
 
            </div>
 
            <div id="C-${cs.raw_id}" class="message">${h.urlify_text(cs.message, c.repo_name)}</div>
 
        </td>
 
      </tr>
 
    %endfor
 
    </table>
 

	
0 comments (0 inline, 0 general)