Download:
child 20:4bfe24e85356
parent 18:305bd086b730
19:1d308b29151a
Anton Shestakov <av6@dwimlabs.net>, Wed, 07 Feb 2018 12:21:53 +0800
badges: add phase, obsolescence, instabilities (from hg 4.5)

2 файлов изменено, 20 вставок(+), 1 удалений(-) [+]
templates/kit/map file | annotate | diff | comparison | revisions
templates/static/style-kit.css file | annotate | diff | comparison | revisions
--- a/templates/kit/map Wed Feb 07 12:01:22 2018 +0800
+++ b/templates/kit/map Wed Feb 07 12:21:53 2018 +0800
@@ -254,11 +254,14 @@
shortlog = shortlog.tmpl
graph = graph.tmpl
graphentry = graphentry.tmpl
+phasetag = '{ifeq(phase, 'public', '', '<span class="uk-badge kit-badge-phase-{phase|escape}" title="Phase: {phase|escape}">{phase|escape}</span> ')}'
+obsoletetag = '{if(obsolete, '<span class="uk-badge kit-badge-obsolete" title="Obsolete commit">obsolete</span> ')}'
+instabilitytag = '<span class="uk-badge kit-badge-instability" title="Instability: {instability|escape}">{instability|escape}</span> '
tagtag = '<a href="{url|urlescape}rev/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-tag" title="Tag: {name|escape}">{name|escape}</span></a> '
branchtag = '<a href="{url|urlescape}shortlog/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-branch-head" title="A head of branch: {name|escape}">{name|escape}</span></a> '
inbranchtag = '<a href="{url|urlescape}shortlog/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-branch" title="Branch: {name|escape}">{name|escape}</span></a> '
bookmarktag = '<a href="{url|urlescape}rev/{name|revescape}{sessionvars%urlparameter}"><span class="uk-badge kit-badge-bookmark" title="Bookmark: {name|escape}">{name|escape}</span></a> '
-alltags = '<span>{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>'
+alltags = '<span>{phasetag}{obsoletetag}{instabilities%instabilitytag}{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>'
successorlink = '<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> '
obsfatesuccessors = '{if(successors, ' as ')}{successors%successorlink}'
obsfateverb = '{obsfateverb(successors, markers)}'
--- a/templates/static/style-kit.css Wed Feb 07 12:01:22 2018 +0800
+++ b/templates/static/style-kit.css Wed Feb 07 12:21:53 2018 +0800
@@ -51,6 +51,22 @@
margin-right: 5px;
}
+.kit-badge-phase-draft {
+ background-color: #faa732;
+}
+
+.kit-badge-phase-secret {
+ background-color: #faa732;
+}
+
+.kit-badge-obsolete {
+ background-color: #a1a1a1;
+}
+
+.kit-badge-instability {
+ background-color: #da314b;
+}
+
.kit-badge-branch-head,
.kit-badge-branch-open {
background-color: #00a8e6;