Show More
@@ -1,104 +1,117 b'' | |||
|
1 | 1 | import logging |
|
2 | 2 | |
|
3 | 3 | from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g |
|
4 | 4 | from pylons.controllers.util import abort, redirect |
|
5 | 5 | |
|
6 | 6 | from pylons_app.lib.base import BaseController, render |
|
7 | 7 | from pylons_app.lib.utils import get_repo_slug |
|
8 | 8 | from pylons_app.model.hg_model import HgModel |
|
9 | 9 | from vcs.utils import diffs as differ |
|
10 | 10 | from vcs.exceptions import RepositoryError, ChangesetError |
|
11 | 11 | |
|
12 | 12 | log = logging.getLogger(__name__) |
|
13 | 13 | |
|
14 | 14 | class FilesController(BaseController): |
|
15 | 15 | def __before__(self): |
|
16 | 16 | c.repos_prefix = config['repos_name'] |
|
17 | 17 | c.repo_name = get_repo_slug(request) |
|
18 | 18 | |
|
19 | 19 | def index(self, repo_name, revision, f_path): |
|
20 | 20 | hg_model = HgModel() |
|
21 | 21 | c.repo = repo = hg_model.get_repo(c.repo_name) |
|
22 | 22 | revision = request.POST.get('at_rev', None) or revision |
|
23 | 23 | |
|
24 | 24 | def get_next_rev(cur): |
|
25 | 25 | max_rev = len(c.repo.revisions) - 1 |
|
26 | 26 | r = cur + 1 |
|
27 | 27 | if r > max_rev: |
|
28 | 28 | r = max_rev |
|
29 | 29 | return r |
|
30 | 30 | |
|
31 | 31 | def get_prev_rev(cur): |
|
32 | 32 | r = cur - 1 |
|
33 | 33 | return r |
|
34 | 34 | |
|
35 | 35 | c.f_path = f_path |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | try: |
|
39 | 39 | cur_rev = repo.get_changeset(revision).revision |
|
40 | 40 | prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).raw_id |
|
41 | 41 | next_rev = repo.get_changeset(get_next_rev(cur_rev)).raw_id |
|
42 | 42 | |
|
43 | 43 | c.url_prev = url('files_home', repo_name=c.repo_name, |
|
44 | 44 | revision=prev_rev, f_path=f_path) |
|
45 | 45 | c.url_next = url('files_home', repo_name=c.repo_name, |
|
46 | 46 | revision=next_rev, f_path=f_path) |
|
47 | 47 | |
|
48 | 48 | c.changeset = repo.get_changeset(revision) |
|
49 | 49 | try: |
|
50 | 50 | c.file_msg = c.changeset.get_file_message(f_path) |
|
51 | 51 | except: |
|
52 | 52 | c.file_msg = None |
|
53 | 53 | |
|
54 | 54 | c.cur_rev = c.changeset.raw_id |
|
55 | 55 | c.rev_nr = c.changeset.revision |
|
56 | 56 | c.files_list = c.changeset.get_node(f_path) |
|
57 | 57 | c.file_history = self._get_history(repo, c.files_list, f_path) |
|
58 | 58 | |
|
59 | 59 | except (RepositoryError, ChangesetError): |
|
60 | 60 | c.files_list = None |
|
61 | 61 | |
|
62 | 62 | return render('files/files.html') |
|
63 | 63 | |
|
64 | 64 | def rawfile(self, repo_name, revision, f_path): |
|
65 | 65 | hg_model = HgModel() |
|
66 | 66 | c.repo = hg_model.get_repo(c.repo_name) |
|
67 | 67 | file_node = c.repo.get_changeset(revision).get_node(f_path) |
|
68 |
response. |
|
|
69 |
response. |
|
|
68 | response.content_type = file_node.mimetype | |
|
69 | response.content_disposition = 'attachment; filename=%s' \ | |
|
70 | 70 | % f_path.split('/')[-1] |
|
71 | 71 | return file_node.content |
|
72 | 72 | |
|
73 | 73 | def archivefile(self, repo_name, revision, fileformat): |
|
74 | 74 | return '%s %s %s' % (repo_name, revision, fileformat) |
|
75 | 75 | |
|
76 | 76 | def diff(self, repo_name, f_path): |
|
77 | 77 | hg_model = HgModel() |
|
78 | 78 | diff1 = request.GET.get('diff1') |
|
79 | 79 | diff2 = request.GET.get('diff2') |
|
80 | c.action = action = request.GET.get('diff') | |
|
80 | 81 | c.no_changes = diff1 == diff2 |
|
81 | 82 | c.f_path = f_path |
|
82 | 83 | c.repo = hg_model.get_repo(c.repo_name) |
|
83 | 84 | c.changeset_1 = c.repo.get_changeset(diff1) |
|
84 | 85 | c.changeset_2 = c.repo.get_changeset(diff2) |
|
85 | 86 | |
|
86 | 87 | c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1._short) |
|
87 | 88 | c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2._short) |
|
88 | ||
|
89 | ||
|
90 | 89 | f_udiff = differ.get_udiff(c.changeset_1.get_node(f_path), |
|
91 | 90 | c.changeset_2.get_node(f_path)) |
|
92 | c.differ = differ.DiffProcessor(f_udiff) | |
|
91 | ||
|
92 | diff = differ.DiffProcessor(f_udiff) | |
|
93 | ||
|
94 | if action == 'download': | |
|
95 | diff_name = '%s_vs_%s.diff' % (diff1, diff2) | |
|
96 | response.content_type = 'text/plain' | |
|
97 | response.content_disposition = 'attachment; filename=%s' \ | |
|
98 | % diff_name | |
|
99 | return diff.raw_diff() | |
|
100 | ||
|
101 | elif action == 'raw': | |
|
102 | c.cur_diff = '<pre class="raw">%s</pre>' % diff.raw_diff() | |
|
103 | elif action == 'diff': | |
|
104 | c.cur_diff = diff.as_html() | |
|
105 | ||
|
93 | 106 | return render('files/file_diff.html') |
|
94 | 107 | |
|
95 | 108 | def _get_history(self, repo, node, f_path): |
|
96 | 109 | from vcs.nodes import NodeKind |
|
97 | 110 | if not node.kind is NodeKind.FILE: |
|
98 | 111 | return [] |
|
99 | 112 | changesets = node.history |
|
100 | 113 | hist_l = [] |
|
101 | 114 | for chs in changesets: |
|
102 | 115 | n_desc = 'r%s:%s' % (chs.revision, chs._short) |
|
103 | 116 | hist_l.append((chs._short, n_desc,)) |
|
104 | 117 | return hist_l |
@@ -1,103 +1,107 b'' | |||
|
1 | 1 | div.diffblock { |
|
2 | 2 | overflow: auto; |
|
3 | 3 | padding: 0px; |
|
4 | 4 | border: 1px solid #ccc; |
|
5 | 5 | background: #f8f8f8; |
|
6 | 6 | font-size: 100%; |
|
7 | 7 | line-height: 100%; |
|
8 | 8 | /* new */ |
|
9 | 9 | line-height: 125%; |
|
10 | 10 | } |
|
11 | 11 | div.diffblock .code-header{ |
|
12 | 12 | border-bottom: 1px solid #CCCCCC; |
|
13 | 13 | background: #EEEEEE; |
|
14 | 14 | color:blue; |
|
15 | 15 | padding:10px 0 10px 0; |
|
16 | 16 | } |
|
17 |
div.diffblock .code-header |
|
|
17 | div.diffblock .code-header div{ | |
|
18 | 18 | margin-left:25px; |
|
19 | 19 | font-weight: bold; |
|
20 | 20 | } |
|
21 | 21 | div.diffblock .code-body{ |
|
22 | 22 | background: #EEEEEE; |
|
23 | 23 | } |
|
24 | div.diffblock pre.raw{ | |
|
25 | background: #FFFFFF; | |
|
26 | color:#000000; | |
|
27 | } | |
|
24 | 28 | |
|
25 | 29 | .code-difftable{ |
|
26 | 30 | border-collapse: collapse; |
|
27 | 31 | width: 99%; |
|
28 | 32 | } |
|
29 | 33 | .code-difftable td:target *{ |
|
30 | 34 | background: repeat scroll 0 0 #FFFFBE !important; |
|
31 | 35 | text-decoration: underline; |
|
32 | 36 | } |
|
33 | 37 | .code-difftable .context{ |
|
34 | 38 | background:none repeat scroll 0 0 #DDE7EF; |
|
35 | 39 | } |
|
36 | 40 | .code-difftable .add{ |
|
37 | 41 | background:none repeat scroll 0 0 #DDFFDD; |
|
38 | 42 | } |
|
39 | 43 | .code-difftable .add ins{ |
|
40 | 44 | background:none repeat scroll 0 0 #AAFFAA; |
|
41 | 45 | text-decoration:none; |
|
42 | 46 | } |
|
43 | 47 | |
|
44 | 48 | .code-difftable .del{ |
|
45 | 49 | background:none repeat scroll 0 0 #FFDDDD; |
|
46 | 50 | } |
|
47 | 51 | .code-difftable .del del{ |
|
48 | 52 | background:none repeat scroll 0 0 #FFAAAA; |
|
49 | 53 | text-decoration:none; |
|
50 | 54 | } |
|
51 | 55 | |
|
52 | 56 | .code-difftable .lineno{ |
|
53 | 57 | background:none repeat scroll 0 0 #EEEEEE !important; |
|
54 | 58 | border-right:1px solid #DDDDDD; |
|
55 | 59 | padding-left:2px; |
|
56 | 60 | padding-right:2px; |
|
57 | 61 | text-align:right; |
|
58 | 62 | width:20px; |
|
59 | 63 | -moz-user-select:none; |
|
60 | 64 | -webkit-user-select: none; |
|
61 | 65 | } |
|
62 | 66 | .code-difftable .lineno pre{ |
|
63 | 67 | color:#747474 !important; |
|
64 | 68 | font:11px "Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace !important; |
|
65 | 69 | letter-spacing:-1px; |
|
66 | 70 | text-align:right; |
|
67 | 71 | width:20px; |
|
68 | 72 | } |
|
69 | 73 | .code-difftable .lineno a{ |
|
70 | 74 | color:#0000CC !important; |
|
71 | 75 | } |
|
72 | 76 | .code-difftable .code td{ |
|
73 | 77 | margin:0; |
|
74 | 78 | padding: 0; |
|
75 | 79 | } |
|
76 | 80 | .code-difftable .code pre{ |
|
77 | 81 | margin:0; |
|
78 | 82 | padding:0; |
|
79 | 83 | } |
|
80 | 84 | |
|
81 | 85 | |
|
82 | 86 | .code { |
|
83 | 87 | display: block; |
|
84 | 88 | width: 100%; |
|
85 | 89 | } |
|
86 | 90 | .code-diff { |
|
87 | 91 | padding: 0px; |
|
88 | 92 | margin-top: 5px; |
|
89 | 93 | margin-bottom: 5px; |
|
90 | 94 | border-left: 2px solid #ccc; |
|
91 | 95 | } |
|
92 | 96 | .code-diff pre, .line pre { |
|
93 | 97 | padding: 3px; |
|
94 | 98 | margin: 0; |
|
95 | 99 | } |
|
96 | 100 | .lineno a { |
|
97 | 101 | text-decoration: none; |
|
98 | 102 | } |
|
99 | 103 | |
|
100 | 104 | .line{ |
|
101 | 105 | padding:0; |
|
102 | 106 | margin:0; |
|
103 | 107 | } No newline at end of file |
@@ -1,558 +1,584 b'' | |||
|
1 | 1 | /*** Initial Settings ***/ |
|
2 | 2 | #mainhtml{ |
|
3 | 3 | margin: 15px 50px; |
|
4 | 4 | background: #DBD4C6; |
|
5 | 5 | font-family: sans-serif; |
|
6 | 6 | } |
|
7 | 7 | |
|
8 | 8 | a { |
|
9 | 9 | color: #0000cc; |
|
10 | 10 | text-decoration: none; |
|
11 | 11 | } |
|
12 | 12 | a:HOVER{ |
|
13 | 13 | text-decoration: underline; |
|
14 | 14 | } |
|
15 |
/*** end of Initial Settings ***/ |
|
|
15 | /*** end of Initial Settings ***/ | |
|
16 | ||
|
17 | /** common settings **/ | |
|
16 | 18 | div#main { |
|
17 | 19 | padding: 5px; |
|
18 | 20 | } |
|
19 | 21 | |
|
20 | 22 | div#container { |
|
21 | 23 | background: #FFFFFF; |
|
22 | 24 | position: relative; |
|
23 | 25 | color: #666; |
|
24 | 26 | } |
|
25 | 27 | |
|
26 | 28 | div.page-header { |
|
27 | 29 | padding: 50px 20px 0; |
|
28 | 30 | background: #556cb5 top left repeat-x; |
|
29 | 31 | position: relative; |
|
30 | 32 | } |
|
31 | 33 | |
|
32 | 34 | div.page-header h1 { |
|
33 | 35 | margin: 10px 0 30px; |
|
34 | 36 | font-size: 1.8em; |
|
35 | 37 | font-weight: bold; |
|
36 | 38 | font-family: sans-serif; |
|
37 | 39 | letter-spacing: 1px; |
|
38 | 40 | color: #DDD; |
|
39 | 41 | } |
|
40 | 42 | |
|
41 | 43 | div.page-header h1 a { |
|
42 | 44 | font-weight: bold; |
|
43 | 45 | color: #FFF; |
|
44 | 46 | } |
|
45 | 47 | |
|
46 | 48 | div.page-header a { |
|
47 | 49 | text-decoration: none; |
|
48 | 50 | } |
|
49 | 51 | |
|
50 | 52 | div.page-header form { |
|
51 | 53 | position: absolute; |
|
52 | 54 | margin-bottom: 2px; |
|
53 | 55 | bottom: 0; |
|
54 | 56 | right: 20px; |
|
55 | 57 | } |
|
56 | 58 | |
|
57 | 59 | div.page-header form label { |
|
58 | 60 | color: #DDD; |
|
59 | 61 | } |
|
60 | 62 | |
|
61 | 63 | div.page-header form input { |
|
62 | 64 | padding: 2px; |
|
63 | 65 | border: solid 1px #DDD; |
|
64 | 66 | } |
|
65 | 67 | |
|
66 | 68 | div.page-header form dl { |
|
67 | 69 | overflow: hidden; |
|
68 | 70 | } |
|
69 | 71 | |
|
70 | 72 | div.page-header form dl dt { |
|
71 | 73 | font-size: 1.2em; |
|
72 | 74 | } |
|
73 | 75 | |
|
74 | 76 | div.page-header form dl dt,div.page-header form dl dd { |
|
75 | 77 | margin: 0 0 0 5px; |
|
76 | 78 | float: left; |
|
77 | 79 | height: 24px; |
|
78 | 80 | line-height: 20px; |
|
79 | 81 | } |
|
80 | 82 | |
|
81 | 83 | ul.page-nav { |
|
82 | 84 | margin: 10px 0 0 0; |
|
83 | 85 | list-style-type: none; |
|
84 | 86 | overflow: hidden; |
|
85 | 87 | width: 800px; |
|
86 | 88 | padding: 0; |
|
87 | 89 | } |
|
88 | 90 | |
|
89 | 91 | ul.page-nav li { |
|
90 | 92 | margin: 0 2px 0 0; |
|
91 | 93 | float: left; |
|
92 | 94 | height: 24px; |
|
93 | 95 | font-size: 1.1em; |
|
94 | 96 | line-height: 24px; |
|
95 | 97 | text-align: center; |
|
96 | 98 | background: #DDD; |
|
97 | 99 | } |
|
98 | 100 | |
|
99 | 101 | ul.page-nav li.current { |
|
100 | 102 | background: #FFF; |
|
101 | 103 | padding-right: 5px; |
|
102 | 104 | padding-left: 5px; |
|
103 | 105 | } |
|
104 | 106 | |
|
105 | 107 | ul.page-nav li a { |
|
106 | 108 | height: 24px; |
|
107 | 109 | color: #666; |
|
108 | 110 | padding-right: 5px; |
|
109 | 111 | padding-left: 5px; |
|
110 | 112 | display: block; |
|
111 | 113 | text-decoration: none; |
|
112 | 114 | } |
|
113 | 115 | |
|
114 | 116 | ul.page-nav li a:hover { |
|
115 | 117 | color: #333; |
|
116 | 118 | background: #FFF; |
|
117 | 119 | } |
|
118 | 120 | |
|
119 | 121 | ul.submenu { |
|
120 | 122 | margin: 10px 0 -10px 20px; |
|
121 | 123 | list-style-type: none; |
|
122 | 124 | } |
|
123 | 125 | |
|
124 | 126 | ul.submenu li { |
|
125 | 127 | margin: 0 10px 0 0; |
|
126 | 128 | font-size: 1.2em; |
|
127 | 129 | display: inline; |
|
128 | 130 | } |
|
129 | 131 | |
|
130 | 132 | h2 { |
|
131 | 133 | margin: 20px 0 10px; |
|
132 | 134 | height: 30px; |
|
133 | 135 | line-height: 30px; |
|
134 | 136 | text-indent: 20px; |
|
135 | 137 | background: #FFF; |
|
136 | 138 | font-size: 1.2em; |
|
137 | 139 | border-top: dotted 1px #D5E1E6; |
|
138 | 140 | font-weight: bold; |
|
139 | 141 | } |
|
140 | 142 | |
|
141 | 143 | h2.no-link { |
|
142 | 144 | color: #006699; |
|
143 | 145 | } |
|
144 | 146 | |
|
145 | 147 | h2.no-border { |
|
146 | 148 | color: #FFF; |
|
147 | 149 | background: #556CB5; |
|
148 | 150 | border: 0; |
|
149 | 151 | } |
|
150 | 152 | |
|
151 | 153 | h2 a { |
|
152 | 154 | font-weight: bold; |
|
153 | 155 | color: #006699; |
|
154 | 156 | } |
|
155 | 157 | |
|
156 | 158 | div.page-path { |
|
157 | 159 | text-align: right; |
|
158 | 160 | padding: 20px 30px 10px 0; |
|
159 | 161 | border: solid #d9d8d1; |
|
160 | 162 | border-width: 0px 0px 1px; |
|
161 | 163 | font-size: 1.2em; |
|
162 | 164 | } |
|
163 | 165 | |
|
164 | 166 | div.page-footer { |
|
165 | 167 | margin: 50px 0 0; |
|
166 | 168 | position: relative; |
|
167 | 169 | } |
|
168 | 170 | |
|
169 | 171 | div.page-footer p { |
|
170 | 172 | position: relative; |
|
171 | 173 | left: 20px; |
|
172 | 174 | bottom: 5px; |
|
173 | 175 | font-size: 1.2em; |
|
174 | 176 | } |
|
175 | 177 | |
|
176 | 178 | ul.rss-logo { |
|
177 | 179 | position: absolute; |
|
178 | 180 | top: -10px; |
|
179 | 181 | right: 20px; |
|
180 | 182 | height: 20px; |
|
181 | 183 | list-style-type: none; |
|
182 | 184 | } |
|
183 | 185 | |
|
184 | 186 | ul.rss-logo li { |
|
185 | 187 | display: inline; |
|
186 | 188 | } |
|
187 | 189 | |
|
188 | 190 | ul.rss-logo li a { |
|
189 | 191 | padding: 3px 6px; |
|
190 | 192 | line-height: 10px; |
|
191 | 193 | border: 1px solid; |
|
192 | 194 | border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e; |
|
193 | 195 | color: #ffffff; |
|
194 | 196 | background-color: #ff6600; |
|
195 | 197 | font-weight: bold; |
|
196 | 198 | font-family: sans-serif; |
|
197 | 199 | font-size: 10px; |
|
198 | 200 | text-align: center; |
|
199 | 201 | text-decoration: none; |
|
200 | 202 | } |
|
201 | 203 | |
|
202 | 204 | div.rss-logo li a:hover { |
|
203 | 205 | background-color: #ee5500; |
|
204 | 206 | } |
|
205 | 207 | |
|
206 | 208 | p.normal { |
|
207 | 209 | margin: 20px 0 20px 30px; |
|
208 | 210 | font-size: 1.2em; |
|
209 | 211 | } |
|
210 | 212 | |
|
211 | 213 | table tr.parity0:hover,table tr.parity1:hover { |
|
212 | 214 | background: #D5E1E6; |
|
213 | 215 | } |
|
214 | 216 | |
|
215 | 217 | table tr.parity0 { |
|
216 | 218 | background: #EAEAE9; |
|
217 | 219 | } |
|
218 | 220 | |
|
219 | 221 | table tr.parity1 { |
|
220 | 222 | background: #FFFFFF; |
|
221 | 223 | } |
|
222 | 224 | |
|
223 | 225 | span.logtags span { |
|
224 | 226 | background-repeat: no-repeat; |
|
225 | 227 | height: 16px; |
|
226 | 228 | padding-left: 20px; |
|
227 | 229 | padding-top: 0px; |
|
228 | 230 | text-align: left; |
|
229 | 231 | font-weight: bold; |
|
230 | 232 | } |
|
231 | 233 | |
|
232 | 234 | span.logtags span.tagtag { |
|
233 | 235 | background-image: url("/images/label_16.png"); |
|
234 | 236 | } |
|
235 | 237 | |
|
236 | 238 | span.logtags span.branchtag { |
|
237 | 239 | background-image: url("/images/left_16.png"); |
|
238 | 240 | color: #628F53; |
|
239 | 241 | } |
|
240 | 242 | |
|
241 | 243 | span.logtags span.inbranchtag { |
|
242 | 244 | background-image: url("/images/left_16.png"); |
|
243 | 245 | } |
|
244 | 246 | |
|
245 | 247 | div.diff pre { |
|
246 | 248 | margin: 10px 0 0 0; |
|
247 | 249 | } |
|
248 | 250 | |
|
249 | 251 | div.diff pre span { |
|
250 | 252 | font-family: monospace; |
|
251 | 253 | white-space: pre; |
|
252 | 254 | font-size: 1.2em; |
|
253 | 255 | padding: 3px 0; |
|
254 | 256 | } |
|
255 | 257 | |
|
256 | 258 | td.source { |
|
257 | 259 | white-space: pre; |
|
258 | 260 | font-family: monospace; |
|
259 | 261 | margin: 10px 30px 0; |
|
260 | 262 | font-size: 1.2em; |
|
261 | 263 | font-family: monospace; |
|
262 | 264 | } |
|
263 | 265 | |
|
264 | 266 | div.source div.parity0,div.source div.parity1 { |
|
265 | 267 | padding: 1px; |
|
266 | 268 | font-size: 1.2em; |
|
267 | 269 | } |
|
268 | 270 | |
|
269 | 271 | div.source div.parity0 { |
|
270 | 272 | background: #F1F6F7; |
|
271 | 273 | } |
|
272 | 274 | |
|
273 | 275 | div.source div.parity1 { |
|
274 | 276 | background: #FFFFFF; |
|
275 | 277 | } |
|
276 | 278 | |
|
277 | 279 | div.parity0:hover,div.parity1:hover { |
|
278 | 280 | background: #D5E1E6; |
|
279 | 281 | } |
|
280 | 282 | |
|
281 | 283 | .linenr { |
|
282 | 284 | color: #999; |
|
283 | 285 | text-align: right; |
|
284 | 286 | } |
|
285 | 287 | |
|
286 | 288 | .lineno { |
|
287 | 289 | text-align: right; |
|
288 | 290 | } |
|
289 | 291 | |
|
290 | 292 | .lineno a { |
|
291 | 293 | color: #999; |
|
292 | 294 | } |
|
293 | 295 | |
|
294 | 296 | td.linenr { |
|
295 | 297 | width: 60px; |
|
296 | 298 | } |
|
297 | 299 | |
|
298 | 300 | div#powered-by { |
|
299 | 301 | position: absolute; |
|
300 | 302 | width: 75px; |
|
301 | 303 | top: 15px; |
|
302 | 304 | right: 20px; |
|
303 | 305 | font-size: 1.2em; |
|
304 | 306 | } |
|
305 | 307 | |
|
306 | 308 | div#powered-by a { |
|
307 | 309 | color: #EEE; |
|
308 | 310 | text-decoration: none; |
|
309 | 311 | } |
|
310 | 312 | |
|
311 | 313 | div#powered-by a:hover { |
|
312 | 314 | text-decoration: underline; |
|
313 | 315 | } |
|
314 | 316 | |
|
315 | 317 | dl.overview { |
|
316 | 318 | margin: 0 0 0 30px; |
|
317 | 319 | font-size: 1.1em; |
|
318 | 320 | overflow: hidden; |
|
319 | 321 | } |
|
320 | 322 | |
|
321 | 323 | dl.overview dt,dl.overview dd { |
|
322 | 324 | margin: 5px 0; |
|
323 | 325 | float: left; |
|
324 | 326 | } |
|
325 | 327 | |
|
326 | 328 | dl.overview dt { |
|
327 | 329 | clear: left; |
|
328 | 330 | font-weight: bold; |
|
329 | 331 | width: 150px; |
|
330 | 332 | } |
|
331 | 333 | |
|
332 | 334 | /** end of summary **/ |
|
333 | 335 | |
|
334 | 336 | /** chagelog **/ |
|
335 | 337 | h3.changelog { |
|
336 | 338 | margin: 20px 0 5px 30px; |
|
337 | 339 | padding: 0 0 2px; |
|
338 | 340 | font-size: 1.4em; |
|
339 | 341 | border-bottom: dotted 1px #D5E1E6; |
|
340 | 342 | } |
|
341 | 343 | |
|
342 | 344 | ul.changelog-entry { |
|
343 | 345 | margin: 0 0 10px 30px; |
|
344 | 346 | list-style-type: none; |
|
345 | 347 | position: relative; |
|
346 | 348 | } |
|
347 | 349 | |
|
348 | 350 | ul.changelog-entry li span.revdate { |
|
349 | 351 | font-size: 1.1em; |
|
350 | 352 | } |
|
351 | 353 | |
|
352 | 354 | ul.changelog-entry li.age { |
|
353 | 355 | position: absolute; |
|
354 | 356 | top: -25px; |
|
355 | 357 | right: 10px; |
|
356 | 358 | font-size: 1.4em; |
|
357 | 359 | color: #CCC; |
|
358 | 360 | font-weight: bold; |
|
359 | 361 | font-style: italic; |
|
360 | 362 | } |
|
361 | 363 | |
|
362 | 364 | ul.changelog-entry li span.name { |
|
363 | 365 | font-size: 1.2em; |
|
364 | 366 | font-weight: bold; |
|
365 | 367 | } |
|
366 | 368 | |
|
367 | 369 | ul.changelog-entry li.description { |
|
368 | 370 | margin: 10px 0 0; |
|
369 | 371 | font-size: 1.1em; |
|
370 | 372 | } |
|
371 | 373 | |
|
372 | 374 | /** end of changelog **/ |
|
373 | 375 | |
|
374 | 376 | /** file **/ |
|
375 | 377 | p.files { |
|
376 | 378 | margin: 0 0 0 20px; |
|
377 | 379 | font-size: 2.0em; |
|
378 | 380 | font-weight: bold; |
|
379 | 381 | } |
|
380 | 382 | |
|
381 | 383 | /** end of file **/ |
|
382 | 384 | |
|
383 | 385 | /** changeset **/ |
|
384 | h3.changeset { | |
|
385 | margin: 20px 0 5px 20px; | |
|
386 | padding: 0 0 2px; | |
|
387 | font-size: 1.6em; | |
|
388 | border-bottom: dotted 1px #D5E1E6; | |
|
389 | } | |
|
390 | 386 | |
|
391 | p.changeset-age { | |
|
392 | position: relative; | |
|
387 | .cs_files{ | |
|
388 | border: 2px solid #CCCCCC; | |
|
389 | width: 60%; | |
|
390 | ||
|
393 | 391 | } |
|
394 | ||
|
395 | p.changeset-age span { | |
|
396 | position: absolute; | |
|
397 | top: -25px; | |
|
398 | right: 10px; | |
|
399 | font-size: 1.4em; | |
|
400 | color: #CCC; | |
|
401 | font-weight: bold; | |
|
402 | font-style: italic; | |
|
392 | .cs_files .cs_added{ | |
|
393 | background:#BBFFBB; | |
|
403 | 394 | } |
|
404 | ||
|
405 | p.description { | |
|
406 | margin: 10px 30px 0 30px; | |
|
407 | padding: 10px; | |
|
408 | border: solid 1px #CCC; | |
|
409 | font-size: 1.2em; | |
|
395 | .cs_files .cs_changed{ | |
|
396 | background: #FFDD88; | |
|
397 | } | |
|
398 | .cs_files .cs_removed{ | |
|
399 | background: #FF8888; | |
|
410 | 400 | } |
|
411 | 401 | |
|
412 | 402 | /** end of changeset **/ |
|
413 | 403 | |
|
414 | 404 | /** canvas **/ |
|
415 | div#wrapper { | |
|
416 | position: relative; | |
|
417 | font-size: 1.2em; | |
|
418 | } | |
|
419 | ||
|
420 | 405 | canvas { |
|
421 | 406 | position: absolute; |
|
422 | 407 | z-index: 5; |
|
423 | 408 | top: -0.7em; |
|
424 | 409 | } |
|
410 | #graph{ | |
|
411 | overflow: hidden; | |
|
425 | 412 | |
|
426 | ul#nodebgs li.parity0 { | |
|
427 | background: #F1F6F7; | |
|
413 | } | |
|
414 | #graph_nodes{ | |
|
415 | width:160px; | |
|
416 | float:left; | |
|
428 | 417 | } |
|
429 | 418 | |
|
430 | ul#nodebgs li.parity1 { | |
|
431 | background: #FFFFFF; | |
|
419 | #graph_content{ | |
|
420 | width:800px; | |
|
421 | float:left; | |
|
422 | } | |
|
423 | #graph_content .container_header{ | |
|
424 | border:1px solid #CCCCCC; | |
|
425 | height:30px; | |
|
426 | background: #EEEEEE; | |
|
427 | } | |
|
428 | ||
|
429 | ||
|
430 | #graph_content .container .wrapper{ | |
|
431 | width: 600px; | |
|
432 | } | |
|
433 | #graph_content .container{ | |
|
434 | border-bottom: 1px solid #CCCCCC; | |
|
435 | border-left: 1px solid #CCCCCC; | |
|
436 | border-right: 1px solid #CCCCCC; | |
|
437 | height:120px; | |
|
432 | 438 | } |
|
433 | 439 | |
|
434 | ul#graphnodes { | |
|
435 | position: absolute; | |
|
436 | z-index: 10; | |
|
437 | top: 7px; | |
|
438 | list-style: none inside none; | |
|
440 | #graph_content .container .left{ | |
|
441 | float:left; | |
|
442 | width: 70%; | |
|
443 | padding-left: 5px; | |
|
439 | 444 | } |
|
440 | 445 | |
|
441 | ul#nodebgs { | |
|
442 | list-style: none inside none; | |
|
446 | #graph_content .container .right{ | |
|
447 | float:right; | |
|
448 | width: 25%; | |
|
449 | } | |
|
450 | #graph_content .container .left .date{ | |
|
451 | font-weight:bold; | |
|
452 | } | |
|
453 | #graph_content .container .left .author{ | |
|
454 | ||
|
455 | } | |
|
456 | #graph_content .container .left .message{ | |
|
457 | font-size: 80%; | |
|
443 | 458 | } |
|
444 | 459 | |
|
445 | ul#graphnodes li,ul#nodebgs li { | |
|
446 | height: 39px; | |
|
460 | .right .added,.changed,.removed{ | |
|
461 | border:1px solid #DDDDDD; | |
|
462 | display:block; | |
|
463 | float:right; | |
|
464 | font-size:0.75em; | |
|
465 | text-align:center; | |
|
466 | min-width:15px; | |
|
447 | 467 | } |
|
448 | ||
|
449 | ul#graphnodes li .info { | |
|
450 | display: block; | |
|
451 | position: relative; | |
|
468 | .right .added{ | |
|
469 | background:#BBFFBB; | |
|
452 | 470 | } |
|
453 | ||
|
471 | .right .changed{ | |
|
472 | background: #FFDD88; | |
|
473 | } | |
|
474 | .right .removed{ | |
|
475 | background: #FF8888; | |
|
476 | } | |
|
454 | 477 | /** end of canvas **/ |
|
455 | 478 | |
|
456 | 479 | /* FILE BROWSER */ |
|
457 | 480 | div.browserblock { |
|
458 | 481 | overflow: hidden; |
|
459 | 482 | padding: 0px; |
|
460 | 483 | border: 1px solid #ccc; |
|
461 | 484 | background: #f8f8f8; |
|
462 | 485 | font-size: 100%; |
|
463 | 486 | line-height: 100%; |
|
464 | 487 | /* new */ |
|
465 | 488 | line-height: 125%; |
|
466 | 489 | } |
|
467 | 490 | div.browserblock .browser-header{ |
|
468 | 491 | border-bottom: 1px solid #CCCCCC; |
|
469 | 492 | background: #EEEEEE; |
|
470 | 493 | color:blue; |
|
471 | 494 | padding:10px 0 10px 0; |
|
472 | 495 | } |
|
473 | 496 | div.browserblock .browser-header span{ |
|
474 | 497 | margin-left:25px; |
|
475 | 498 | font-weight: bold; |
|
476 | 499 | } |
|
477 | 500 | div.browserblock .browser-body{ |
|
478 | 501 | background: #EEEEEE; |
|
479 | 502 | } |
|
480 | 503 | |
|
481 | 504 | table.code-browser { |
|
482 |
border-collapse:collapse; |
|
|
505 | border-collapse:collapse; | |
|
506 | width: 100%; | |
|
483 | 507 | } |
|
484 | 508 | table.code-browser tr{ |
|
485 | 509 | margin:3px; |
|
486 | 510 | } |
|
487 | 511 | |
|
488 | 512 | table.code-browser thead th { |
|
489 | 513 | background-color: #EEEEEE; |
|
490 | 514 | height: 20px; |
|
491 | 515 | font-size: 1.1em; |
|
492 | 516 | font-weight: bold; |
|
493 | 517 | text-align: center; |
|
518 | text-align: left; | |
|
519 | padding-left: 10px; | |
|
494 | 520 | } |
|
495 | 521 | table.code-browser tbody tr { |
|
496 | 522 | |
|
497 | 523 | } |
|
498 | 524 | |
|
499 | 525 | table.code-browser tbody td { |
|
500 | 526 | |
|
501 | 527 | padding-left:10px; |
|
502 | 528 | height: 20px; |
|
503 | 529 | } |
|
504 | 530 | |
|
505 | 531 | .info-table { |
|
506 | 532 | background: none repeat scroll 0 0 #FAFAFA; |
|
507 | 533 | border-bottom: 1px solid #DDDDDD; |
|
508 | 534 | width: 100%; |
|
509 | 535 | } |
|
510 | 536 | |
|
511 | 537 | .rss_logo { |
|
512 | 538 | background-image: url("/images/feed.png"); |
|
513 | 539 | background-repeat: no-repeat; |
|
514 | 540 | display: block; |
|
515 | 541 | height: 16px; |
|
516 | 542 | padding-left: 20px; |
|
517 | 543 | padding-top: 0px; |
|
518 | 544 | text-align: left; |
|
519 | 545 | } |
|
520 | 546 | |
|
521 | 547 | .atom_logo { |
|
522 | 548 | background-image: url("/images/atom.png"); |
|
523 | 549 | background-repeat: no-repeat; |
|
524 | 550 | display: block; |
|
525 | 551 | height: 16px; |
|
526 | 552 | padding-left: 20px; |
|
527 | 553 | padding-top: 0px; |
|
528 | 554 | text-align: left; |
|
529 | 555 | } |
|
530 | 556 | |
|
531 | 557 | .browser-file { |
|
532 | 558 | background-image: url("/images/document_16.png"); |
|
533 | 559 | background-repeat: no-repeat; |
|
534 | 560 | display: block; |
|
535 | 561 | height: 16px; |
|
536 | 562 | padding-left: 20px; |
|
537 | 563 | padding-top: 0px; |
|
538 | 564 | text-align: left; |
|
539 | 565 | } |
|
540 | 566 | |
|
541 | 567 | .browser-dir { |
|
542 | 568 | background-image: url("/images/folder_16.png"); |
|
543 | 569 | background-repeat: no-repeat; |
|
544 | 570 | display: block; |
|
545 | 571 | height: 16px; |
|
546 | 572 | padding-left: 20px; |
|
547 | 573 | padding-top: 0px; |
|
548 | 574 | text-align: left; |
|
549 | 575 | } |
|
550 | 576 | |
|
551 | 577 | .current_submenu { |
|
552 | 578 | border-bottom: 2px solid; |
|
553 | 579 | } |
|
554 | 580 | |
|
555 | 581 | #repos_list { |
|
556 | 582 | border: 1px solid #556CB5; |
|
557 | 583 | background: #FFFFFF; |
|
558 | 584 | } No newline at end of file |
@@ -1,41 +1,50 b'' | |||
|
1 | 1 | <%inherit file="/base/base.html"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('Repository managment')} |
|
5 | 5 | </%def> |
|
6 | 6 | <%def name="breadcrumbs()"> |
|
7 | 7 | ${h.link_to(u'Home',h.url('/'))} |
|
8 | 8 | / |
|
9 | 9 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} |
|
10 | 10 | / |
|
11 | 11 | ${_('files')} |
|
12 | 12 | </%def> |
|
13 | 13 | <%def name="page_nav()"> |
|
14 | 14 | <form action="log"> |
|
15 | 15 | <dl class="search"> |
|
16 | 16 | <dt><label>Search: </label></dt> |
|
17 | 17 | <dd><input type="text" name="rev" /></dd> |
|
18 | 18 | </dl> |
|
19 | 19 | </form> |
|
20 | 20 | |
|
21 | 21 | ${self.menu('files')} |
|
22 | 22 | </%def> |
|
23 | 23 | <%def name="css()"> |
|
24 | 24 | <link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" /> |
|
25 | 25 | <link rel="stylesheet" href="/css/diff.css" type="text/css" /> |
|
26 | 26 | </%def> |
|
27 | 27 | <%def name="main()"> |
|
28 | 28 | <h2 class="no-link no-border">${'%s: %s %s %s' % (_('File diff'),c.diff2,'→',c.diff1)|n}</h2> |
|
29 | 29 | <div id="body" class="diffblock"> |
|
30 | 30 | <div class="code-header"> |
|
31 | <span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,revision=c.diff2.split(':')[1],f_path=c.f_path))}</span> | |
|
31 | <div> | |
|
32 | <span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name, | |
|
33 | revision=c.diff2.split(':')[1],f_path=c.f_path))}</span> | |
|
34 | » <span style="font-size:77%">${h.link_to(_('diff'), | |
|
35 | h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='diff'))}</span> | |
|
36 | » <span style="font-size:77%">${h.link_to(_('raw diff'), | |
|
37 | h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='raw'))}</span> | |
|
38 | » <span style="font-size:77%">${h.link_to(_('download diff'), | |
|
39 | h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='download'))}</span> | |
|
40 | </div> | |
|
32 | 41 | </div> |
|
33 | 42 | <div class="code-body"> |
|
34 | 43 | %if c.no_changes: |
|
35 | 44 | ${_('No changes')} |
|
36 | 45 | %else: |
|
37 |
${c.diff |
|
|
46 | ${c.cur_diff|n} | |
|
38 | 47 | %endif |
|
39 | 48 | </div> |
|
40 | 49 | </div> |
|
41 | 50 | </%def> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now