diff --git a/docs/changelog.rst b/docs/changelog.rst --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -26,6 +26,7 @@ news - limited push/pull operations are now logged for git in the journal - bumped mercurial to 2.2.X series - added support for displaying submodules in file-browser +- #421 added bookmarks in changlog view fixes +++++ diff --git a/rhodecode/lib/vcs/backends/hg/changeset.py b/rhodecode/lib/vcs/backends/hg/changeset.py --- a/rhodecode/lib/vcs/backends/hg/changeset.py +++ b/rhodecode/lib/vcs/backends/hg/changeset.py @@ -37,6 +37,10 @@ class MercurialChangeset(BaseChangeset): return safe_unicode(self._ctx.branch()) @LazyProperty + def bookmarks(self): + return map(safe_unicode, self._ctx.bookmarks()) + + @LazyProperty def message(self): return safe_unicode(self._ctx.description()) diff --git a/rhodecode/public/css/style.css b/rhodecode/public/css/style.css --- a/rhodecode/public/css/style.css +++ b/rhodecode/public/css/style.css @@ -2520,6 +2520,10 @@ h3.files_location { .right .logtags{ padding: 2px 2px 2px 2px; } +.right .logtags .branchtag,.right .logtags .tagtag,.right .logtags .booktag{ + margin: 0px 2px; +} + .right .logtags .branchtag,.logtags .branchtag { padding: 1px 3px 1px 3px; background-color: #bfbfbf; @@ -2558,10 +2562,10 @@ h3.files_location { text-decoration: none; color: #ffffff; } -.right .logbooks .bookbook,.logbooks .bookbook { - padding: 1px 3px 2px; +.right .logbooks .bookbook,.logbooks .bookbook,.right .logtags .bookbook,.logtags .bookbook { + padding: 1px 3px 1px 3px; background-color: #46A546; - font-size: 9.75px; + font-size: 10px; font-weight: bold; color: #ffffff; text-transform: uppercase; @@ -2570,10 +2574,10 @@ h3.files_location { -moz-border-radius: 3px; border-radius: 3px; } -.right .logbooks .bookbook,.logbooks .bookbook a{ +.right .logbooks .bookbook,.logbooks .bookbook a,.right .logtags .bookbook,.logtags .bookbook a{ color: #ffffff; } -.right .logbooks .bookbook,.logbooks .bookbook a:hover{ +.right .logbooks .bookbook,.logbooks .bookbook a:hover,.right .logtags .bookbook,.logtags .bookbook a:hover{ text-decoration: none; color: #ffffff; } diff --git a/rhodecode/templates/changelog/changelog.html b/rhodecode/templates/changelog/changelog.html --- a/rhodecode/templates/changelog/changelog.html +++ b/rhodecode/templates/changelog/changelog.html @@ -93,8 +93,16 @@ ${c.repo_name} ${_('Changelog')} - ${c.r %endif %if cs.branch: - ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} + ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} + %endif + %if h.is_hg(c.rhodecode_repo): + %for book in cs.bookmarks: + + ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} + + %endfor + %endif %for tag in cs.tags: ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}