##// END OF EJS Templates
ui: add arrow navigation for parent/child in changelog view....
marcink -
r2884:7ca400b0 default
parent child Browse files
Show More
@@ -1,157 +1,161 b''
1 @font-face {
1 @font-face {
2 font-family: 'rcicons';
2 font-family: 'rcicons';
3 src: url('../fonts/RCIcons/rcicons.eot?74666722');
3 src: url('../fonts/RCIcons/rcicons.eot?74666722');
4 src: url('../fonts/RCIcons/rcicons.eot?74666722#iefix') format('embedded-opentype'),
4 src: url('../fonts/RCIcons/rcicons.eot?74666722#iefix') format('embedded-opentype'),
5 url('../fonts/RCIcons/rcicons.woff2?74666722') format('woff2'),
5 url('../fonts/RCIcons/rcicons.woff2?74666722') format('woff2'),
6 url('../fonts/RCIcons/rcicons.woff?74666722') format('woff'),
6 url('../fonts/RCIcons/rcicons.woff?74666722') format('woff'),
7 url('../fonts/RCIcons/rcicons.ttf?74666722') format('truetype'),
7 url('../fonts/RCIcons/rcicons.ttf?74666722') format('truetype'),
8 url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg');
8 url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg');
9 font-weight: normal;
9 font-weight: normal;
10 font-style: normal;
10 font-style: normal;
11 }
11 }
12 /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
12 /* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
13 /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
13 /* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
14 /*
14 /*
15 @media screen and (-webkit-min-device-pixel-ratio:0) {
15 @media screen and (-webkit-min-device-pixel-ratio:0) {
16 @font-face {
16 @font-face {
17 font-family: 'rcicons';
17 font-family: 'rcicons';
18 src: url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg');
18 src: url('../fonts/RCIcons/rcicons.svg?74666722#rcicons') format('svg');
19 }
19 }
20 }
20 }
21 */
21 */
22
22
23 [class^="icon-"]:before, [class*=" icon-"]:before {
23 [class^="icon-"]:before, [class*=" icon-"]:before {
24 font-family: "rcicons";
24 font-family: "rcicons";
25 font-style: normal;
25 font-style: normal;
26 font-weight: normal;
26 font-weight: normal;
27 speak: none;
27 speak: none;
28
28
29 display: inline-block;
29 display: inline-block;
30 text-decoration: inherit;
30 text-decoration: inherit;
31 width: 1em;
31 width: 1em;
32 margin-right: .2em;
32 margin-right: .2em;
33 text-align: center;
33 text-align: center;
34 /* opacity: .8; */
34 /* opacity: .8; */
35
35
36 /* For safety - reset parent styles, that can break glyph codes*/
36 /* For safety - reset parent styles, that can break glyph codes*/
37 font-variant: normal;
37 font-variant: normal;
38 text-transform: none;
38 text-transform: none;
39
39
40 /* fix buttons height, for twitter bootstrap */
40 /* fix buttons height, for twitter bootstrap */
41 line-height: 1em;
41 line-height: 1em;
42
42
43 /* Animation center compensation - margins should be symmetric */
43 /* Animation center compensation - margins should be symmetric */
44 /* remove if not needed */
44 /* remove if not needed */
45 margin-left: .2em;
45 margin-left: .2em;
46
46
47 /* you can be more comfortable with increased icons size */
47 /* you can be more comfortable with increased icons size */
48 /* font-size: 120%; */
48 /* font-size: 120%; */
49
49
50 /* Font smoothing. That was taken from TWBS */
50 /* Font smoothing. That was taken from TWBS */
51 -webkit-font-smoothing: antialiased;
51 -webkit-font-smoothing: antialiased;
52 -moz-osx-font-smoothing: grayscale;
52 -moz-osx-font-smoothing: grayscale;
53
53
54 /* Uncomment for 3D effect */
54 /* Uncomment for 3D effect */
55 /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
55 /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
56 }
56 }
57
57
58 .icon-no-margin::before {
59 margin: 0;
60
61 }
58 // -- ICON CLASSES -- //
62 // -- ICON CLASSES -- //
59
63
60 .icon-bookmark:before { content: '\e803'; } /* 'ξ ƒ' */
64 .icon-bookmark:before { content: '\e803'; } /* 'ξ ƒ' */
61 .icon-branch:before { content: '\e804'; } /* 'ξ „' */
65 .icon-branch:before { content: '\e804'; } /* 'ξ „' */
62 .icon-lock:before { content: '\e806'; } /* 'ξ †' */
66 .icon-lock:before { content: '\e806'; } /* 'ξ †' */
63 .icon-unlock:before { content: '\e807'; } /* 'ξ ‡' */
67 .icon-unlock:before { content: '\e807'; } /* 'ξ ‡' */
64 .icon-delete:before { content: '\e808'; } /* '' */
68 .icon-delete:before { content: '\e808'; } /* '' */
65 .icon-false:before { content: '\e808'; } /* '' */
69 .icon-false:before { content: '\e808'; } /* '' */
66
70
67 .icon-ok:before { content: '\e809'; } /* 'ξ ‰' */
71 .icon-ok:before { content: '\e809'; } /* 'ξ ‰' */
68 .icon-true:before { content: '\e809'; } /* 'ξ ‰' */
72 .icon-true:before { content: '\e809'; } /* 'ξ ‰' */
69
73
70 .icon-comment:before { content: '\e80a'; } /* '' */
74 .icon-comment:before { content: '\e80a'; } /* '' */
71 .icon-comment-add:before { content: '\e816'; } /* 'ξ –' */
75 .icon-comment-add:before { content: '\e816'; } /* 'ξ –' */
72 .icon-comment_toggle:before { content: '\e818'; } /* '' */
76 .icon-comment_toggle:before { content: '\e818'; } /* '' */
73
77
74 .icon-feed:before { content: '\e80b'; } /* 'ξ ‹' */
78 .icon-feed:before { content: '\e80b'; } /* 'ξ ‹' */
75
79
76 .icon-right:before { content: '\e80c'; } /* '' */
80 .icon-right:before { content: '\e80c'; } /* '' */
77 .icon-left:before { content: '\e80d'; } /* '' */
81 .icon-left:before { content: '\e80d'; } /* '' */
78
82
79 .icon-arrow_down:before { content: '\e80e'; } /* '' */
83 .icon-arrow_down:before { content: '\e80e'; } /* '' */
80 .icon-arrow_up:before { content: '\e80e'; } /* '' */
84 .icon-arrow_up:before { content: '\e80e'; } /* '' */
81
85
82 .icon-group:before { content: '\e812'; } /* 'ξ ’' */
86 .icon-group:before { content: '\e812'; } /* 'ξ ’' */
83
87
84 .icon-fork:before { content: '\e814'; } /* 'ξ ”' */
88 .icon-fork:before { content: '\e814'; } /* 'ξ ”' */
85 .icon-merge:before { content: '\e814'; } /* 'ξ ”' */
89 .icon-merge:before { content: '\e814'; } /* 'ξ ”' */
86
90
87 .icon-more:before { content: '\e815'; } /* 'ξ •' */
91 .icon-more:before { content: '\e815'; } /* 'ξ •' */
88
92
89 .icon-git-inv:before { content: '\e80f'; } /* '' */
93 .icon-git-inv:before { content: '\e80f'; } /* '' */
90 .icon-hg-inv:before { content: '\e810'; } /* '' */
94 .icon-hg-inv:before { content: '\e810'; } /* '' */
91 .icon-svn-inv:before { content: '\e811'; } /* 'ξ ‘' */
95 .icon-svn-inv:before { content: '\e811'; } /* 'ξ ‘' */
92
96
93 .icon-git:before { content: '\e81a'; } /* '' */
97 .icon-git:before { content: '\e81a'; } /* '' */
94 .icon-hg:before { content: '\e81b'; } /* 'ξ ›' */
98 .icon-hg:before { content: '\e81b'; } /* 'ξ ›' */
95 .icon-svn:before { content: '\e820'; } /* 'ξ  ' */
99 .icon-svn:before { content: '\e820'; } /* 'ξ  ' */
96
100
97 .icon-minus:before { content: '\e81c'; } /* '' */
101 .icon-minus:before { content: '\e81c'; } /* '' */
98 .icon-plus:before { content: '\e81d'; } /* '' */
102 .icon-plus:before { content: '\e81d'; } /* '' */
99 .icon-remove:before { content: '\e81e'; } /* '' */
103 .icon-remove:before { content: '\e81e'; } /* '' */
100 .icon-remove-sign:before { content: '\e81e'; } /* '' */
104 .icon-remove-sign:before { content: '\e81e'; } /* '' */
101
105
102 .icon-rhodecode:before { content: '\e81f'; } /* '' */
106 .icon-rhodecode:before { content: '\e81f'; } /* '' */
103
107
104 .icon-tag:before { content: '\e821'; } /* 'ξ ‘' */
108 .icon-tag:before { content: '\e821'; } /* 'ξ ‘' */
105 .icon-copy:before { content: '\f0c5'; } /* 'οƒ…' */
109 .icon-copy:before { content: '\f0c5'; } /* 'οƒ…' */
106 .icon-clipboard:before { content: '\f0c5'; } /* 'οƒ…' */
110 .icon-clipboard:before { content: '\f0c5'; } /* 'οƒ…' */
107
111
108
112
109 .icon-folder:before { content: '\e813'; } /* 'ξ “' */
113 .icon-folder:before { content: '\e813'; } /* 'ξ “' */
110 .icon-folder-close:before { content: '\e813'; } /* 'ξ “' */
114 .icon-folder-close:before { content: '\e813'; } /* 'ξ “' */
111
115
112 .icon-directory:before { content: '\e800'; } /* 'ξ €' */
116 .icon-directory:before { content: '\e800'; } /* 'ξ €' */
113 .icon-directory-empty:before { content: '\f114'; } /* 'ο„”' */
117 .icon-directory-empty:before { content: '\f114'; } /* 'ο„”' */
114 .icon-file-text:before { content: '\f0f6'; } /* 'οƒΆ' */
118 .icon-file-text:before { content: '\f0f6'; } /* 'οƒΆ' */
115 .icon-file-text-inv:before { content: '\f15c'; } /* 'ο…œ' */
119 .icon-file-text-inv:before { content: '\f15c'; } /* 'ο…œ' */
116 .icon-file-code:before { content: '\f1c9'; } /* '' */
120 .icon-file-code:before { content: '\f1c9'; } /* '' */
117
121
118 // MERGED ICONS
122 // MERGED ICONS
119
123
120 .icon-repo-private:before { &:extend(.icon-lock:before); }
124 .icon-repo-private:before { &:extend(.icon-lock:before); }
121 .icon-repo-lock:before { &:extend(.icon-lock:before); }
125 .icon-repo-lock:before { &:extend(.icon-lock:before); }
122 .icon-unlock-alt:before { &:extend(.icon-unlock:before); }
126 .icon-unlock-alt:before { &:extend(.icon-unlock:before); }
123 .icon-repo-unlock:before { &:extend(.icon-unlock:before); }
127 .icon-repo-unlock:before { &:extend(.icon-unlock:before); }
124 .icon-repo-public:before { &:extend(.icon-unlock:before); }
128 .icon-repo-public:before { &:extend(.icon-unlock:before); }
125 .icon-rss-sign:before { &:extend(.icon-feed:before); }
129 .icon-rss-sign:before { &:extend(.icon-feed:before); }
126 .icon-code-fork:before { &:extend(.icon-fork:before); }
130 .icon-code-fork:before { &:extend(.icon-fork:before); }
127
131
128 // TRANSFORM
132 // TRANSFORM
129 .icon-arrow_up:before {transform: rotate(180deg);}
133 .icon-arrow_up:before {transform: rotate(180deg);}
130 .icon-merge:before {transform: rotate(180deg);}
134 .icon-merge:before {transform: rotate(180deg);}
131
135
132 // -- END ICON CLASSES -- //
136 // -- END ICON CLASSES -- //
133
137
134
138
135 //--- ICONS STYLING ------------------//
139 //--- ICONS STYLING ------------------//
136
140
137 .icon-git { color: @color4 !important; }
141 .icon-git { color: @color4 !important; }
138 .icon-hg { color: @color8 !important; }
142 .icon-hg { color: @color8 !important; }
139 .icon-svn { color: @color1 !important; }
143 .icon-svn { color: @color1 !important; }
140 .icon-git-inv { color: @color4 !important; }
144 .icon-git-inv { color: @color4 !important; }
141 .icon-hg-inv { color: @color8 !important; }
145 .icon-hg-inv { color: @color8 !important; }
142 .icon-svn-inv { color: @color1 !important; }
146 .icon-svn-inv { color: @color1 !important; }
143 .icon-repo-lock { color: #FF0000; }
147 .icon-repo-lock { color: #FF0000; }
144 .icon-repo-unlock { color: #FF0000; }
148 .icon-repo-unlock { color: #FF0000; }
145
149
146 .repo-switcher-dropdown .select2-result-label {
150 .repo-switcher-dropdown .select2-result-label {
147 .icon-git:before {
151 .icon-git:before {
148 &:extend(.icon-git-transparent:before);
152 &:extend(.icon-git-transparent:before);
149 }
153 }
150 .icon-hg:before {
154 .icon-hg:before {
151 &:extend(.icon-hg-transparent:before);
155 &:extend(.icon-hg-transparent:before);
152 color: @alert4;
156 color: @alert4;
153 }
157 }
154 .icon-svn:before {
158 .icon-svn:before {
155 &:extend(.icon-svn-transparent:before);
159 &:extend(.icon-svn-transparent:before);
156 }
160 }
157 }
161 }
@@ -1,354 +1,354 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.mako"/>
3 <%inherit file="/base/base.mako"/>
4 <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
4 <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
5
5
6 <%def name="title()">
6 <%def name="title()">
7 ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)}
7 ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)}
8 %if c.rhodecode_name:
8 %if c.rhodecode_name:
9 &middot; ${h.branding(c.rhodecode_name)}
9 &middot; ${h.branding(c.rhodecode_name)}
10 %endif
10 %endif
11 </%def>
11 </%def>
12
12
13 <%def name="menu_bar_nav()">
13 <%def name="menu_bar_nav()">
14 ${self.menu_items(active='repositories')}
14 ${self.menu_items(active='repositories')}
15 </%def>
15 </%def>
16
16
17 <%def name="menu_bar_subnav()">
17 <%def name="menu_bar_subnav()">
18 ${self.repo_menu(active='changelog')}
18 ${self.repo_menu(active='changelog')}
19 </%def>
19 </%def>
20
20
21 <%def name="main()">
21 <%def name="main()">
22 <script>
22 <script>
23 // TODO: marcink switch this to pyroutes
23 // TODO: marcink switch this to pyroutes
24 AJAX_COMMENT_DELETE_URL = "${h.route_path('repo_commit_comment_delete',repo_name=c.repo_name,commit_id=c.commit.raw_id,comment_id='__COMMENT_ID__')}";
24 AJAX_COMMENT_DELETE_URL = "${h.route_path('repo_commit_comment_delete',repo_name=c.repo_name,commit_id=c.commit.raw_id,comment_id='__COMMENT_ID__')}";
25 templateContext.commit_data.commit_id = "${c.commit.raw_id}";
25 templateContext.commit_data.commit_id = "${c.commit.raw_id}";
26 </script>
26 </script>
27 <div class="box">
27 <div class="box">
28 <div class="title">
28 <div class="title">
29 ${self.repo_page_title(c.rhodecode_db_repo)}
29 ${self.repo_page_title(c.rhodecode_db_repo)}
30 </div>
30 </div>
31
31
32 <div id="changeset_compare_view_content" class="summary changeset">
32 <div id="changeset_compare_view_content" class="summary changeset">
33 <div class="summary-detail">
33 <div class="summary-detail">
34 <div class="summary-detail-header">
34 <div class="summary-detail-header">
35 <div class="breadcrumbs files_location">
35 <div class="breadcrumbs files_location">
36 <h4>
36 <h4>
37 ${_('Commit')}
37 ${_('Commit')}
38
38
39 <code>
39 <code>
40 ${h.show_id(c.commit)}
40 ${h.show_id(c.commit)}
41 </code>
41 </code>
42 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i>
42 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i>
43 % if hasattr(c.commit, 'phase'):
43 % if hasattr(c.commit, 'phase'):
44 <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span>
44 <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span>
45 % endif
45 % endif
46
46
47 ## obsolete commits
47 ## obsolete commits
48 % if hasattr(c.commit, 'obsolete'):
48 % if hasattr(c.commit, 'obsolete'):
49 % if c.commit.obsolete:
49 % if c.commit.obsolete:
50 <span class="tag obsolete-${c.commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span>
50 <span class="tag obsolete-${c.commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span>
51 % endif
51 % endif
52 % endif
52 % endif
53
53
54 ## hidden commits
54 ## hidden commits
55 % if hasattr(c.commit, 'hidden'):
55 % if hasattr(c.commit, 'hidden'):
56 % if c.commit.hidden:
56 % if c.commit.hidden:
57 <span class="tag hidden-${c.commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span>
57 <span class="tag hidden-${c.commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span>
58 % endif
58 % endif
59 % endif
59 % endif
60 </h4>
60 </h4>
61
61
62 </div>
62 </div>
63 <div class="pull-right">
63 <div class="pull-right">
64 <span id="parent_link">
64 <span id="parent_link">
65 <a href="#parentCommit" title="${_('Parent Commit')}">${_('Parent')}</a>
65 <a href="#parentCommit" title="${_('Parent Commit')}"><i class="icon-left icon-no-margin"></i>${_('parent')}</a>
66 </span>
66 </span>
67 |
67 |
68 <span id="child_link">
68 <span id="child_link">
69 <a href="#childCommit" title="${_('Child Commit')}">${_('Child')}</a>
69 <a href="#childCommit" title="${_('Child Commit')}">${_('child')}<i class="icon-right icon-no-margin"></i></a>
70 </span>
70 </span>
71 </div>
71 </div>
72 </div>
72 </div>
73
73
74 <div class="fieldset">
74 <div class="fieldset">
75 <div class="left-label">
75 <div class="left-label">
76 ${_('Description')}:
76 ${_('Description')}:
77 </div>
77 </div>
78 <div class="right-content">
78 <div class="right-content">
79 <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
79 <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div>
80 <div id="message_expand" style="display:none;">
80 <div id="message_expand" style="display:none;">
81 ${_('Expand')}
81 ${_('Expand')}
82 </div>
82 </div>
83 </div>
83 </div>
84 </div>
84 </div>
85
85
86 %if c.statuses:
86 %if c.statuses:
87 <div class="fieldset">
87 <div class="fieldset">
88 <div class="left-label">
88 <div class="left-label">
89 ${_('Commit status')}:
89 ${_('Commit status')}:
90 </div>
90 </div>
91 <div class="right-content">
91 <div class="right-content">
92 <div class="changeset-status-ico">
92 <div class="changeset-status-ico">
93 <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div>
93 <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div>
94 </div>
94 </div>
95 <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div>
95 <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div>
96 </div>
96 </div>
97 </div>
97 </div>
98 %endif
98 %endif
99
99
100 <div class="fieldset">
100 <div class="fieldset">
101 <div class="left-label">
101 <div class="left-label">
102 ${_('References')}:
102 ${_('References')}:
103 </div>
103 </div>
104 <div class="right-content">
104 <div class="right-content">
105 <div class="tags">
105 <div class="tags">
106
106
107 %if c.commit.merge:
107 %if c.commit.merge:
108 <span class="mergetag tag">
108 <span class="mergetag tag">
109 <i class="icon-merge"></i>${_('merge')}
109 <i class="icon-merge"></i>${_('merge')}
110 </span>
110 </span>
111 %endif
111 %endif
112
112
113 %if h.is_hg(c.rhodecode_repo):
113 %if h.is_hg(c.rhodecode_repo):
114 %for book in c.commit.bookmarks:
114 %for book in c.commit.bookmarks:
115 <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}">
115 <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}">
116 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
116 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a>
117 </span>
117 </span>
118 %endfor
118 %endfor
119 %endif
119 %endif
120
120
121 %for tag in c.commit.tags:
121 %for tag in c.commit.tags:
122 <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}">
122 <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}">
123 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=tag))}"><i class="icon-tag"></i>${tag}</a>
123 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=tag))}"><i class="icon-tag"></i>${tag}</a>
124 </span>
124 </span>
125 %endfor
125 %endfor
126
126
127 %if c.commit.branch:
127 %if c.commit.branch:
128 <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % c.commit.branch)}">
128 <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % c.commit.branch)}">
129 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=c.commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a>
129 <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=c.commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a>
130 </span>
130 </span>
131 %endif
131 %endif
132 </div>
132 </div>
133 </div>
133 </div>
134 </div>
134 </div>
135
135
136 <div class="fieldset">
136 <div class="fieldset">
137 <div class="left-label">
137 <div class="left-label">
138 ${_('Diff options')}:
138 ${_('Diff options')}:
139 </div>
139 </div>
140 <div class="right-content">
140 <div class="right-content">
141 <div class="diff-actions">
141 <div class="diff-actions">
142 <a href="${h.route_path('repo_commit_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}">
142 <a href="${h.route_path('repo_commit_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}">
143 ${_('Raw Diff')}
143 ${_('Raw Diff')}
144 </a>
144 </a>
145 |
145 |
146 <a href="${h.route_path('repo_commit_patch',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}">
146 <a href="${h.route_path('repo_commit_patch',repo_name=c.repo_name,commit_id=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}">
147 ${_('Patch Diff')}
147 ${_('Patch Diff')}
148 </a>
148 </a>
149 |
149 |
150 <a href="${h.route_path('repo_commit_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(diff='download'))}" class="tooltip" title="${h.tooltip(_('Download diff'))}">
150 <a href="${h.route_path('repo_commit_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(diff='download'))}" class="tooltip" title="${h.tooltip(_('Download diff'))}">
151 ${_('Download Diff')}
151 ${_('Download Diff')}
152 </a>
152 </a>
153 |
153 |
154 ${c.ignorews_url(request)}
154 ${c.ignorews_url(request)}
155 |
155 |
156 ${c.context_url(request)}
156 ${c.context_url(request)}
157 </div>
157 </div>
158 </div>
158 </div>
159 </div>
159 </div>
160
160
161 <div class="fieldset">
161 <div class="fieldset">
162 <div class="left-label">
162 <div class="left-label">
163 ${_('Comments')}:
163 ${_('Comments')}:
164 </div>
164 </div>
165 <div class="right-content">
165 <div class="right-content">
166 <div class="comments-number">
166 <div class="comments-number">
167 %if c.comments:
167 %if c.comments:
168 <a href="#comments">${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>,
168 <a href="#comments">${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>,
169 %else:
169 %else:
170 ${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}
170 ${_ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}
171 %endif
171 %endif
172 %if c.inline_cnt:
172 %if c.inline_cnt:
173 <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a>
173 <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a>
174 %else:
174 %else:
175 ${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}
175 ${_ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}
176 %endif
176 %endif
177 </div>
177 </div>
178 </div>
178 </div>
179 </div>
179 </div>
180
180
181 <div class="fieldset">
181 <div class="fieldset">
182 <div class="left-label">
182 <div class="left-label">
183 ${_('Unresolved TODOs')}:
183 ${_('Unresolved TODOs')}:
184 </div>
184 </div>
185 <div class="right-content">
185 <div class="right-content">
186 <div class="comments-number">
186 <div class="comments-number">
187 % if c.unresolved_comments:
187 % if c.unresolved_comments:
188 % for co in c.unresolved_comments:
188 % for co in c.unresolved_comments:
189 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','}
189 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','}
190 % endfor
190 % endfor
191 % else:
191 % else:
192 ${_('There are no unresolved TODOs')}
192 ${_('There are no unresolved TODOs')}
193 % endif
193 % endif
194 </div>
194 </div>
195 </div>
195 </div>
196 </div>
196 </div>
197
197
198 </div> <!-- end summary-detail -->
198 </div> <!-- end summary-detail -->
199
199
200 <div id="commit-stats" class="sidebar-right">
200 <div id="commit-stats" class="sidebar-right">
201 <div class="summary-detail-header">
201 <div class="summary-detail-header">
202 <h4 class="item">
202 <h4 class="item">
203 ${_('Author')}
203 ${_('Author')}
204 </h4>
204 </h4>
205 </div>
205 </div>
206 <div class="sidebar-right-content">
206 <div class="sidebar-right-content">
207 ${self.gravatar_with_user(c.commit.author)}
207 ${self.gravatar_with_user(c.commit.author)}
208 <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div>
208 <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div>
209 </div>
209 </div>
210 </div><!-- end sidebar -->
210 </div><!-- end sidebar -->
211 </div> <!-- end summary -->
211 </div> <!-- end summary -->
212 <div class="cs_files">
212 <div class="cs_files">
213 <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
213 <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/>
214 ${cbdiffs.render_diffset_menu()}
214 ${cbdiffs.render_diffset_menu()}
215 ${cbdiffs.render_diffset(
215 ${cbdiffs.render_diffset(
216 c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,inline_comments=c.inline_comments )}
216 c.changes[c.commit.raw_id], commit=c.commit, use_comments=True,inline_comments=c.inline_comments )}
217 </div>
217 </div>
218
218
219 ## template for inline comment form
219 ## template for inline comment form
220 <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
220 <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
221
221
222 ## render comments
222 ## render comments
223 ${comment.generate_comments(c.comments)}
223 ${comment.generate_comments(c.comments)}
224
224
225 ## main comment form and it status
225 ## main comment form and it status
226 ${comment.comments(h.route_path('repo_commit_comment_create', repo_name=c.repo_name, commit_id=c.commit.raw_id),
226 ${comment.comments(h.route_path('repo_commit_comment_create', repo_name=c.repo_name, commit_id=c.commit.raw_id),
227 h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))}
227 h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))}
228 </div>
228 </div>
229
229
230 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
230 ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
231 <script type="text/javascript">
231 <script type="text/javascript">
232
232
233 $(document).ready(function() {
233 $(document).ready(function() {
234
234
235 var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10);
235 var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10);
236 if($('#trimmed_message_box').height() === boxmax){
236 if($('#trimmed_message_box').height() === boxmax){
237 $('#message_expand').show();
237 $('#message_expand').show();
238 }
238 }
239
239
240 $('#message_expand').on('click', function(e){
240 $('#message_expand').on('click', function(e){
241 $('#trimmed_message_box').css('max-height', 'none');
241 $('#trimmed_message_box').css('max-height', 'none');
242 $(this).hide();
242 $(this).hide();
243 });
243 });
244
244
245 $('.show-inline-comments').on('click', function(e){
245 $('.show-inline-comments').on('click', function(e){
246 var boxid = $(this).attr('data-comment-id');
246 var boxid = $(this).attr('data-comment-id');
247 var button = $(this);
247 var button = $(this);
248
248
249 if(button.hasClass("comments-visible")) {
249 if(button.hasClass("comments-visible")) {
250 $('#{0} .inline-comments'.format(boxid)).each(function(index){
250 $('#{0} .inline-comments'.format(boxid)).each(function(index){
251 $(this).hide();
251 $(this).hide();
252 });
252 });
253 button.removeClass("comments-visible");
253 button.removeClass("comments-visible");
254 } else {
254 } else {
255 $('#{0} .inline-comments'.format(boxid)).each(function(index){
255 $('#{0} .inline-comments'.format(boxid)).each(function(index){
256 $(this).show();
256 $(this).show();
257 });
257 });
258 button.addClass("comments-visible");
258 button.addClass("comments-visible");
259 }
259 }
260 });
260 });
261
261
262
262
263 // next links
263 // next links
264 $('#child_link').on('click', function(e){
264 $('#child_link').on('click', function(e){
265 // fetch via ajax what is going to be the next link, if we have
265 // fetch via ajax what is going to be the next link, if we have
266 // >1 links show them to user to choose
266 // >1 links show them to user to choose
267 if(!$('#child_link').hasClass('disabled')){
267 if(!$('#child_link').hasClass('disabled')){
268 $.ajax({
268 $.ajax({
269 url: '${h.route_path('repo_commit_children',repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
269 url: '${h.route_path('repo_commit_children',repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
270 success: function(data) {
270 success: function(data) {
271 if(data.results.length === 0){
271 if(data.results.length === 0){
272 $('#child_link').html("${_('No Child Commits')}").addClass('disabled');
272 $('#child_link').html("${_('No Child Commits')}").addClass('disabled');
273 }
273 }
274 if(data.results.length === 1){
274 if(data.results.length === 1){
275 var commit = data.results[0];
275 var commit = data.results[0];
276 window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id});
276 window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id});
277 }
277 }
278 else if(data.results.length === 2){
278 else if(data.results.length === 2){
279 $('#child_link').addClass('disabled');
279 $('#child_link').addClass('disabled');
280 $('#child_link').addClass('double');
280 $('#child_link').addClass('double');
281 var _html = '';
281 var _html = '';
282 _html +='<a title="__title__" href="__url__">__rev__</a> '
282 _html +='<a title="__title__" href="__url__">__rev__</a> '
283 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
283 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
284 .replace('__title__', data.results[0].message)
284 .replace('__title__', data.results[0].message)
285 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id}));
285 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id}));
286 _html +=' | ';
286 _html +=' | ';
287 _html +='<a title="__title__" href="__url__">__rev__</a> '
287 _html +='<a title="__title__" href="__url__">__rev__</a> '
288 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
288 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
289 .replace('__title__', data.results[1].message)
289 .replace('__title__', data.results[1].message)
290 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id}));
290 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id}));
291 $('#child_link').html(_html);
291 $('#child_link').html(_html);
292 }
292 }
293 }
293 }
294 });
294 });
295 e.preventDefault();
295 e.preventDefault();
296 }
296 }
297 });
297 });
298
298
299 // prev links
299 // prev links
300 $('#parent_link').on('click', function(e){
300 $('#parent_link').on('click', function(e){
301 // fetch via ajax what is going to be the next link, if we have
301 // fetch via ajax what is going to be the next link, if we have
302 // >1 links show them to user to choose
302 // >1 links show them to user to choose
303 if(!$('#parent_link').hasClass('disabled')){
303 if(!$('#parent_link').hasClass('disabled')){
304 $.ajax({
304 $.ajax({
305 url: '${h.route_path("repo_commit_parents",repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
305 url: '${h.route_path("repo_commit_parents",repo_name=c.repo_name, commit_id=c.commit.raw_id)}',
306 success: function(data) {
306 success: function(data) {
307 if(data.results.length === 0){
307 if(data.results.length === 0){
308 $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled');
308 $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled');
309 }
309 }
310 if(data.results.length === 1){
310 if(data.results.length === 1){
311 var commit = data.results[0];
311 var commit = data.results[0];
312 window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id});
312 window.location = pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': commit.raw_id});
313 }
313 }
314 else if(data.results.length === 2){
314 else if(data.results.length === 2){
315 $('#parent_link').addClass('disabled');
315 $('#parent_link').addClass('disabled');
316 $('#parent_link').addClass('double');
316 $('#parent_link').addClass('double');
317 var _html = '';
317 var _html = '';
318 _html +='<a title="__title__" href="__url__">Parent __rev__</a>'
318 _html +='<a title="__title__" href="__url__">Parent __rev__</a>'
319 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
319 .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6)))
320 .replace('__title__', data.results[0].message)
320 .replace('__title__', data.results[0].message)
321 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id}));
321 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[0].raw_id}));
322 _html +=' | ';
322 _html +=' | ';
323 _html +='<a title="__title__" href="__url__">Parent __rev__</a>'
323 _html +='<a title="__title__" href="__url__">Parent __rev__</a>'
324 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
324 .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6)))
325 .replace('__title__', data.results[1].message)
325 .replace('__title__', data.results[1].message)
326 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id}));
326 .replace('__url__', pyroutes.url('repo_commit', {'repo_name': '${c.repo_name}','commit_id': data.results[1].raw_id}));
327 $('#parent_link').html(_html);
327 $('#parent_link').html(_html);
328 }
328 }
329 }
329 }
330 });
330 });
331 e.preventDefault();
331 e.preventDefault();
332 }
332 }
333 });
333 });
334
334
335 if (location.hash) {
335 if (location.hash) {
336 var result = splitDelimitedHash(location.hash);
336 var result = splitDelimitedHash(location.hash);
337 var line = $('html').find(result.loc);
337 var line = $('html').find(result.loc);
338 if (line.length > 0){
338 if (line.length > 0){
339 offsetScroll(line, 70);
339 offsetScroll(line, 70);
340 }
340 }
341 }
341 }
342
342
343 // browse tree @ revision
343 // browse tree @ revision
344 $('#files_link').on('click', function(e){
344 $('#files_link').on('click', function(e){
345 window.location = '${h.route_path('repo_files:default_path',repo_name=c.repo_name, commit_id=c.commit.raw_id)}';
345 window.location = '${h.route_path('repo_files:default_path',repo_name=c.repo_name, commit_id=c.commit.raw_id)}';
346 e.preventDefault();
346 e.preventDefault();
347 });
347 });
348
348
349 // inject comments into their proper positions
349 // inject comments into their proper positions
350 var file_comments = $('.inline-comment-placeholder');
350 var file_comments = $('.inline-comment-placeholder');
351 })
351 })
352 </script>
352 </script>
353
353
354 </%def>
354 </%def>
General Comments 0
You need to be logged in to leave comments. Login now