Mercurial > kallithea
changeset 4976:8924172b07ff
summary: repeat repo type in front of clone URL
Repeatedly, users report cloning problems of the Kallithea sources on IRC,
caused by them assuming that it is a Git repository.
Try to solve this problem by repeating the repository tag, indicating 'hg'
or 'git' in front of the clone URL.
Additionally, decrease the font size of the URL a notch, and improve
alignment with the repotag by removing top/bottom padding.
To avoid duplication of the repotag logic, introduce a mako def for it.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Mon, 06 Apr 2015 21:05:05 +0200 |
parents | beb4cbf30d00 |
children | 0c4f2c53ea4c |
files | kallithea/public/css/style.css kallithea/templates/base/base.html kallithea/templates/data_table/_dt_elements.html kallithea/templates/summary/summary.html |
diffstat | 4 files changed, 16 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Sun Apr 05 21:52:05 2015 +0200 +++ b/kallithea/public/css/style.css Mon Apr 06 21:05:05 2015 +0200 @@ -1276,8 +1276,8 @@ #content div.box div.form div.fields div.field div.input input#clone_url, #content div.box div.form div.fields div.field div.input input#clone_url_id { - font-size: 16px; - padding: 2px; + font-size: 14px; + padding: 0 2px; } #content div.box div.form div.fields div.field div.file input {
--- a/kallithea/templates/base/base.html Sun Apr 05 21:52:05 2015 +0200 +++ b/kallithea/templates/base/base.html Mon Apr 06 21:05:05 2015 +0200 @@ -85,6 +85,15 @@ </ul> </%def> +<%def name="repotag(repo)"> + %if h.is_hg(repo): + <span class="repotag" title="${_('Mercurial repository')}">hg</span> + %endif + %if h.is_git(repo): + <span class="repotag" title="${_('Git repository')}">git</span> + %endif +</%def> + <%def name="repo_context_bar(current=None, rev=None)"> <% rev = None if rev == 'tip' else rev %> <% @@ -103,12 +112,7 @@ <!--- CONTEXT BAR --> <div id="context-bar" class="box"> <h2> - %if h.is_hg(c.db_repo): - <span class="repotag">hg</span> - %endif - %if h.is_git(c.db_repo): - <span class="repotag">git</span> - %endif + ${repotag(c.db_repo)} ## public/private %if c.db_repo.private:
--- a/kallithea/templates/data_table/_dt_elements.html Sun Apr 05 21:52:05 2015 +0200 +++ b/kallithea/templates/data_table/_dt_elements.html Mon Apr 06 21:05:05 2015 +0200 @@ -2,6 +2,8 @@ ## usage: ## <%namespace name="dt" file="/data_table/_dt_elements.html"/> +<%namespace name="base" file="/base/base.html"/> + <%def name="quick_menu(repo_name)"> <ul class="menu_items hidden"> ##<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> @@ -63,11 +65,7 @@ <a href="${h.url('edit_repo' if admin else 'summary_home', repo_name=name)}"> ##TYPE OF REPO - %if h.is_hg(rtype): - <span class="repotag" title="${_('Mercurial repository')}">hg</span> - %elif h.is_git(rtype): - <span class="repotag" title="${_('Git repository')}">git</span> - %endif + ${base.repotag(rtype)} ##PRIVATE/PUBLIC %if private and c.visual.show_private_icon:
--- a/kallithea/templates/summary/summary.html Sun Apr 05 21:52:05 2015 +0200 +++ b/kallithea/templates/summary/summary.html Mon Apr 06 21:05:05 2015 +0200 @@ -72,6 +72,7 @@ <label>${_('Clone URL')}:</label> </div> <div class="input ${summary(c.show_stats)}"> + ${self.repotag(c.db_repo)} <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> <div style="display:none" id="clone_by_name" class="btn btn-small">${_('Show by Name')}</div>