Mercurial > kallithea
changeset 524:63212fea2471
a lot of fixes in templates,
added options to each repository showing fork/serach/settings fixed emtpy changeset (again !)
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 29 Sep 2010 22:36:53 +0200 |
parents | d64a3ab18845 |
children | 87d80c84df09 |
files | pylons_app/lib/utils.py pylons_app/public/css/style.css pylons_app/templates/admin/repos/repo_add.html pylons_app/templates/base/base.html pylons_app/templates/index.html pylons_app/templates/settings/repo_settings.html pylons_app/templates/summary/summary.html |
diffstat | 7 files changed, 67 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/lib/utils.py Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/lib/utils.py Wed Sep 29 22:36:53 2010 +0200 @@ -229,8 +229,9 @@ """ return '0' * 40 + @LazyProperty def short_id(self): - self.raw_id[:12] + return self.raw_id[:12] def repo2db_mapper(initial_repo_list, remove_obsolete=False): """
--- a/pylons_app/public/css/style.css Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/public/css/style.css Wed Sep 29 22:36:53 2010 +0200 @@ -569,18 +569,47 @@ width:167px; } -#header #header-inner #quick li ul li a.branches,#header #header-inner #quick li ul li a.branches:hover -{ - + +#header #header-inner #quick li ul li a.fork, +#header #header-inner #quick li ul li a.fork:hover +{ + + background: #FFFFFF url("../images/icons/arrow_divide.png") no-repeat 4px 9px; + margin:0; + padding:12px 9px 7px 24px; + width:167px; +} + +#header #header-inner #quick li ul li a.search, +#header #header-inner #quick li ul li a.search:hover +{ + background: #FFFFFF url("../images/icons/search_16.png") no-repeat 4px 9px; + margin:0; + padding:12px 9px 7px 24px; + width:167px; +} + +#header #header-inner #quick li ul li a.delete, +#header #header-inner #quick li ul li a.delete:hover +{ + background: #FFFFFF url("../images/icons/delete.png") no-repeat 4px 9px; + margin:0; + padding:12px 9px 7px 24px; + width:167px; +} + +#header #header-inner #quick li ul li a.branches, +#header #header-inner #quick li ul li a.branches:hover +{ background: #FFFFFF url("../images/icons/arrow_branch.png") no-repeat 4px 9px; margin:0; padding:12px 9px 7px 24px; width:167px; } -#header #header-inner #quick li ul li a.tags,#header #header-inner #quick li ul li a.tags:hover -{ - +#header #header-inner #quick li ul li a.tags, +#header #header-inner #quick li ul li a.tags:hover +{ background: #FFFFFF url("../images/icons/tag_blue.png") no-repeat 4px 9px; margin:0; padding:12px 9px 7px 24px; @@ -3464,12 +3493,14 @@ .action_button { border: 0px; display: block; + color:#0066CC; } .action_button:hover { border: 0px; - font-style: italic; + text-decoration:underline; cursor: pointer; + color:#0066CC; } /* -----------------------------------------------------------
--- a/pylons_app/templates/admin/repos/repo_add.html Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/templates/admin/repos/repo_add.html Wed Sep 29 22:36:53 2010 +0200 @@ -2,7 +2,7 @@ <%inherit file="/base/base.html"/> <%def name="title()"> - ${_('Repositories administration')} + ${_('Add new repository')} </%def> <%def name="breadcrumbs_links()">
--- a/pylons_app/templates/base/base.html Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/templates/base/base.html Wed Sep 29 22:36:53 2010 +0200 @@ -174,16 +174,30 @@ <span>${_('Files')}</span> </a> </li> - %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): - <li ${is_current('settings')}> - <a title="${_('Settings')}" href="${h.url('repo_settings_home',repo_name=c.repo_name)}"> + + <li ${is_current('options')}> + <a title="${_('Options')}" href="#"> <span class="icon"> - <img src="/images/icons/cog_edit.png" alt="${_('Settings')}" /> + <img src="/images/icons/table_gear.png" alt="${_('Admin')}" /> </span> - <span>${_('Settings')}</span> - </a> - </li> - %endif + <span>${_('Options')}</span> + </a> + <ul> + %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): + <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> + %endif + <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> + <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> + %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): + <li class="last"> + ${h.link_to(_('delete'),'#',class_='delete')} +## ${h.form(url('repo_settings_delete', repo_name=c.repo_name),method='delete')} +## ${h.submit('remove_%s' % c.repo_name,'delete',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} +## ${h.end_form()} + </li> + %endif + </ul> + </li> </ul> %else: ##ROOT MENU
--- a/pylons_app/templates/index.html Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/templates/index.html Wed Sep 29 22:36:53 2010 +0200 @@ -31,7 +31,7 @@ %if h.HasPermissionAny('hg.admin','hg.create.repository')(): <ul class="links"> <li> - <span>${h.link_to(u'ADD NEW REPOSITORY',h.url('admin_settings_create_repository'),class_="add_icon")}</span> + <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'),class_="add_icon")}</span> </li> </ul> %endif
--- a/pylons_app/templates/settings/repo_settings.html Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/templates/settings/repo_settings.html Wed Sep 29 22:36:53 2010 +0200 @@ -2,7 +2,7 @@ <%inherit file="/base/base.html"/> <%def name="title()"> - ${_('Repositories administration')} + ${_('Repository settings')} </%def> <%def name="breadcrumbs_links()">
--- a/pylons_app/templates/summary/summary.html Tue Sep 28 22:38:34 2010 +0000 +++ b/pylons_app/templates/summary/summary.html Wed Sep 29 22:36:53 2010 +0200 @@ -76,7 +76,7 @@ <label>${_('Last change')}:</label> </div> <div class="input-short"> - ${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)} + ${h.age(c.repo_info.last_change)} - ${h.rfc822date_notz(c.repo_info.last_change)} ${_('by')} ${h.get_changeset_safe(c.repo_info,'tip').author} </div> @@ -122,7 +122,7 @@ var td2 = document.createElement('td'); var trending_language = document.createElement('div'); trending_language.title = k; - trending_language.innerHTML = "<b>"+value+" ${_('files')} - "+percentage+" %</b>"; + trending_language.innerHTML = "<b>"+percentage+"% "+value+" ${_('files')}</b>"; trending_language.setAttribute("class", 'trending_language'); trending_language.style.width=percentage+"%"; td2.appendChild(trending_language); @@ -130,7 +130,6 @@ tr.appendChild(td1); tr.appendChild(td2); tbl.appendChild(tr); - //YAHOO.util.Dom.get('lang_stats').appendChild(trending_language_label); } if(no_data){