Mercurial > kallithea
diff rhodecode/templates/summary/summary.html @ 1813:a8c66e870bd0 beta
implements #285: Implemented non changeable urls for clone url, and web views
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 29 Dec 2011 00:01:05 +0200 |
parents | 60a00fd76d58 |
children | f91d3f9b7230 |
line wrap: on
line diff
--- a/rhodecode/templates/summary/summary.html Wed Dec 28 23:57:57 2011 +0200 +++ b/rhodecode/templates/summary/summary.html Thu Dec 29 00:01:05 2011 +0200 @@ -74,7 +74,7 @@ %endif ##REPO NAME - <span class="repo_name">${h.repo_link(c.dbrepo.groups_and_repo)}</span> + <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span> ##FORK %if c.dbrepo.fork: @@ -121,7 +121,10 @@ <label>${_('Clone url')}:</label> </div> <div class="input ${summary(c.show_stats)}"> - <input type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}" size="70"/> + <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> + <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> + <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> + <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> </div> </div> @@ -240,6 +243,28 @@ } }) +YUE.on('clone_by_name','click',function(e){ + // show url by name and hide name button + YUD.setStyle('clone_url','display',''); + YUD.setStyle('clone_by_name','display','none'); + + // hide url by id and show name button + YUD.setStyle('clone_by_id','display',''); + YUD.setStyle('clone_url_id','display','none'); + +}) +YUE.on('clone_by_id','click',function(e){ + + // show url by id and hide id button + YUD.setStyle('clone_by_id','display','none'); + YUD.setStyle('clone_url_id','display',''); + + // hide url by name and show id button + YUD.setStyle('clone_by_name','display',''); + YUD.setStyle('clone_url','display','none'); +}) + + var tmpl_links = {}; %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}';