Show More
@@ -162,9 +162,9 b' class FilesController(BaseRepoController' | |||||
162 |
|
162 | |||
163 | #files or dirs |
|
163 | #files or dirs | |
164 | try: |
|
164 | try: | |
165 |
c.file |
|
165 | c.file = c.changeset.get_node(f_path) | |
166 |
|
166 | |||
167 |
if c.file |
|
167 | if c.file.is_file(): | |
168 | c.file_history = self._get_node_history(c.changeset, f_path) |
|
168 | c.file_history = self._get_node_history(c.changeset, f_path) | |
169 | else: |
|
169 | else: | |
170 | c.file_history = [] |
|
170 | c.file_history = [] |
@@ -7,15 +7,47 b' div.codeblock {' | |||||
7 | line-height: 100%; |
|
7 | line-height: 100%; | |
8 | /* new */ |
|
8 | /* new */ | |
9 | line-height: 125%; |
|
9 | line-height: 125%; | |
|
10 | -webkit-border-radius: 4px; | |||
|
11 | -moz-border-radius: 4px; | |||
|
12 | border-radius: 4px; | |||
10 | } |
|
13 | } | |
11 | div.codeblock .code-header{ |
|
14 | div.codeblock .code-header{ | |
12 | border-bottom: 1px solid #CCCCCC; |
|
15 | border-bottom: 1px solid #CCCCCC; | |
13 | background: #EEEEEE; |
|
16 | background: #EEEEEE; | |
14 | padding:10px 0 10px 0; |
|
17 | padding:10px 0 10px 0; | |
15 | } |
|
18 | } | |
16 | div.codeblock .code-header .revision{ |
|
19 | ||
|
20 | div.codeblock .code-header .stats{ | |||
|
21 | clear: both; | |||
|
22 | margin-top:-3px; | |||
|
23 | padding-left: 8px; | |||
|
24 | border-bottom: 1px solid rgb(204, 204, 204); | |||
|
25 | margin-bottom: 5px; height: 23px; | |||
|
26 | } | |||
|
27 | ||||
|
28 | div.codeblock .code-header .stats .left{ | |||
|
29 | float:left; | |||
|
30 | } | |||
|
31 | div.codeblock .code-header .stats .left.item{ | |||
|
32 | float:left; | |||
|
33 | padding: 0 9px 0 9px; | |||
|
34 | border-right:1px solid #ccc; | |||
|
35 | } | |||
|
36 | div.codeblock .code-header .stats .left.item.last{ | |||
|
37 | border-right:none; | |||
|
38 | } | |||
|
39 | div.codeblock .code-header .stats .buttons{ | |||
|
40 | float:right; | |||
|
41 | padding-right:4px; | |||
|
42 | } | |||
|
43 | ||||
|
44 | div.codeblock .code-header .author{ | |||
17 | margin-left:25px; |
|
45 | margin-left:25px; | |
18 | font-weight: bold; |
|
46 | font-weight: bold; | |
|
47 | height: 25px; | |||
|
48 | } | |||
|
49 | div.codeblock .code-header .author .user{ | |||
|
50 | padding-top:3px; | |||
19 | } |
|
51 | } | |
20 | div.codeblock .code-header .commit{ |
|
52 | div.codeblock .code-header .commit{ | |
21 | margin-left:25px; |
|
53 | margin-left:25px; |
@@ -642,20 +642,22 b' div.options a {' | |||||
642 | } |
|
642 | } | |
643 |
|
643 | |||
644 | .quick_repo_menu { |
|
644 | .quick_repo_menu { | |
645 | background: #FFF url("../images/vertical-indicator.png") 8px 50% |
|
645 | background: #FFF url("../images/vertical-indicator.png") 8px 50% no-repeat !important; | |
646 | no-repeat !important; |
|
|||
647 | cursor: pointer; |
|
646 | cursor: pointer; | |
648 | width: 8px; |
|
647 | width: 8px; | |
|
648 | border: 1px solid transparent; | |||
649 | } |
|
649 | } | |
650 |
|
650 | |||
651 | .quick_repo_menu.active { |
|
651 | .quick_repo_menu.active { | |
652 |
|
|
652 | background: url("../images/horizontal-indicator.png") no-repeat scroll 5px 50% #FFFFFF !important; | |
653 | no-repeat !important; |
|
653 | border: 1px solid #003367; | |
|
654 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); | |||
654 |
|
|
655 | cursor: pointer; | |
655 | } |
|
656 | } | |
656 |
|
657 | |||
657 | .quick_repo_menu .menu_items { |
|
658 | .quick_repo_menu .menu_items { | |
658 |
margin-top: |
|
659 | margin-top: 10px; | |
|
660 | margin-left:-6px; | |||
659 | width: 150px; |
|
661 | width: 150px; | |
660 | position: absolute; |
|
662 | position: absolute; | |
661 | background-color: #FFF; |
|
663 | background-color: #FFF; | |
@@ -664,7 +666,8 b' div.options a {' | |||||
664 | border-right: 1px solid #666666; |
|
666 | border-right: 1px solid #666666; | |
665 | border-style: solid; |
|
667 | border-style: solid; | |
666 | border-width: 1px; |
|
668 | border-width: 1px; | |
667 |
box-shadow: |
|
669 | box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2); | |
|
670 | border-top-style: none; | |||
668 | } |
|
671 | } | |
669 |
|
672 | |||
670 | .quick_repo_menu .menu_items li { |
|
673 | .quick_repo_menu .menu_items li { | |
@@ -807,7 +810,7 b' div.options a {' | |||||
807 | } |
|
810 | } | |
808 |
|
811 | |||
809 | #content div.box dl { |
|
812 | #content div.box dl { | |
810 |
margin: 10px |
|
813 | margin: 10px 0px; | |
811 | } |
|
814 | } | |
812 |
|
815 | |||
813 | #content div.box dt { |
|
816 | #content div.box dt { | |
@@ -1825,7 +1828,7 b' h3.files_location {' | |||||
1825 |
|
1828 | |||
1826 | #files_data dl dt { |
|
1829 | #files_data dl dt { | |
1827 | float: left; |
|
1830 | float: left; | |
1828 |
width: |
|
1831 | width: 60px; | |
1829 | margin: 0 !important; |
|
1832 | margin: 0 !important; | |
1830 | padding: 5px; |
|
1833 | padding: 5px; | |
1831 | } |
|
1834 | } |
@@ -10,7 +10,7 b'' | |||||
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} |
|
10 | ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))} | |
11 | » |
|
11 | » | |
12 | ${_('files')} |
|
12 | ${_('files')} | |
13 |
%if c.file |
|
13 | %if c.file: | |
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} |
|
14 | @ r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} | |
15 | %endif |
|
15 | %endif | |
16 | </%def> |
|
16 | </%def> | |
@@ -39,8 +39,8 b'' | |||||
39 | <script type="text/javascript"> |
|
39 | <script type="text/javascript"> | |
40 | var YPJAX_TITLE = "${c.repo_name} ${_('Files')} - ${c.rhodecode_name}"; |
|
40 | var YPJAX_TITLE = "${c.repo_name} ${_('Files')} - ${c.rhodecode_name}"; | |
41 | var current_url = "${h.url.current()}"; |
|
41 | var current_url = "${h.url.current()}"; | |
42 |
var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file |
|
42 | var node_list_url = '${h.url("files_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}'; | |
43 |
var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file |
|
43 | var url_base = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.path)}'; | |
44 | var truncated_lbl = "${_('search truncated')}"; |
|
44 | var truncated_lbl = "${_('search truncated')}"; | |
45 | var nomatch_lbl = "${_('no matching files')}"; |
|
45 | var nomatch_lbl = "${_('no matching files')}"; | |
46 | fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl); |
|
46 | fileBrowserListeners(current_url, node_list_url, url_base, truncated_lbl, nomatch_lbl); |
@@ -29,29 +29,8 b'' | |||||
29 | <div class="table"> |
|
29 | <div class="table"> | |
30 | <div id="files_data"> |
|
30 | <div id="files_data"> | |
31 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
31 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
32 | <dl class="overview"> |
|
32 | <dl> | |
33 | <dt>${_('Revision')}</dt> |
|
33 | <dt style="padding-top:10px;font-size:16px">${_('History')}</dt> | |
34 | <dd>${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)), |
|
|||
35 | h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))} </dd> |
|
|||
36 | <dt>${_('Size')}</dt> |
|
|||
37 | <dd>${h.format_byte_size(c.file.size,binary=True)}</dd> |
|
|||
38 | <dt>${_('Mimetype')}</dt> |
|
|||
39 | <dd>${c.file.mimetype}</dd> |
|
|||
40 | <dt>${_('Options')}</dt> |
|
|||
41 | <dd>${h.link_to(_('show source'), |
|
|||
42 | h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
|||
43 | / ${h.link_to(_('show as raw'), |
|
|||
44 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
|||
45 | / ${h.link_to(_('download as raw'), |
|
|||
46 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
|||
47 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
|||
48 | % if not c.file.is_binary: |
|
|||
49 | / ${h.link_to(_('edit'), |
|
|||
50 | h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path))} |
|
|||
51 | % endif |
|
|||
52 | % endif |
|
|||
53 | </dd> |
|
|||
54 | <dt>${_('History')}</dt> |
|
|||
55 | <dd> |
|
34 | <dd> | |
56 | <div> |
|
35 | <div> | |
57 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
36 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
@@ -65,8 +44,29 b'' | |||||
65 | </dl> |
|
44 | </dl> | |
66 | <div id="body" class="codeblock"> |
|
45 | <div id="body" class="codeblock"> | |
67 |
|
|
46 | <div class="code-header"> | |
68 | <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${h.short_id(c.file.last_changeset.raw_id)}</div> |
|
47 | <div class="stats"> | |
69 | <div class="commit">"${c.file.message}"</div> |
|
48 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
|
49 | <div class="left item">${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</div> | |||
|
50 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |||
|
51 | <div class="left item last">${c.file.mimetype}</div> | |||
|
52 | <div class="buttons"> | |||
|
53 | ${h.link_to(_('show source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
54 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
55 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
56 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |||
|
57 | % if not c.file.is_binary: | |||
|
58 | ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
59 | % endif | |||
|
60 | % endif | |||
|
61 | </div> | |||
|
62 | </div> | |||
|
63 | <div class="author"> | |||
|
64 | <div class="gravatar"> | |||
|
65 | <img alt="gravatar" src="${h.gravatar_url(h.email(c.cs.author),16)}"/> | |||
|
66 | </div> | |||
|
67 | <div title="${h.email_or_none(c.cs.author)}" class="user">${h.person(c.cs.author)}</div> | |||
|
68 | </div> | |||
|
69 | <div class="commit">${c.file.last_changeset.message}</div> | |||
70 | </div> |
|
70 | </div> | |
71 | <div class="code-body"> |
|
71 | <div class="code-body"> | |
72 | %if c.file.is_binary: |
|
72 | %if c.file.is_binary: |
@@ -34,7 +34,7 b'' | |||||
34 | <div> |
|
34 | <div> | |
35 | <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div> |
|
35 | <div id="node_filter_box_loading" style="display:none">${_('Loading file list...')}</div> | |
36 | <div id="node_filter_box" style="display:none"> |
|
36 | <div id="node_filter_box" style="display:none"> | |
37 |
${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file |
|
37 | ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)}/<input type="text" value="type to search..." name="filter" size="25" id="node_filter" autocomplete="off"> | |
38 | </div> |
|
38 | </div> | |
39 | </div> |
|
39 | </div> | |
40 | </div> |
|
40 | </div> | |
@@ -54,10 +54,10 b'' | |||||
54 | </thead> |
|
54 | </thead> | |
55 |
|
55 | |||
56 | <tbody id="tbody"> |
|
56 | <tbody id="tbody"> | |
57 |
%if c.file |
|
57 | %if c.file.parent: | |
58 | <tr class="parity0"> |
|
58 | <tr class="parity0"> | |
59 | <td> |
|
59 | <td> | |
60 |
${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file |
|
60 | ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.file.parent.path),class_="browser-dir ypjax-link")} | |
61 | </td> |
|
61 | </td> | |
62 | <td></td> |
|
62 | <td></td> | |
63 | <td></td> |
|
63 | <td></td> | |
@@ -67,7 +67,7 b'' | |||||
67 | </tr> |
|
67 | </tr> | |
68 | %endif |
|
68 | %endif | |
69 |
|
69 | |||
70 |
%for cnt,node in enumerate(c.file |
|
70 | %for cnt,node in enumerate(c.file): | |
71 | <tr class="parity${cnt%2}"> |
|
71 | <tr class="parity${cnt%2}"> | |
72 | <td> |
|
72 | <td> | |
73 | ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")} |
|
73 | ${h.link_to(node.name,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")} |
@@ -39,6 +39,25 b'' | |||||
39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> |
|
39 | <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
40 | ${h.form(h.url.current(),method='post',id='eform')} |
|
40 | ${h.form(h.url.current(),method='post',id='eform')} | |
41 | <div id="body" class="codeblock"> |
|
41 | <div id="body" class="codeblock"> | |
|
42 | <div class="code-header"> | |||
|
43 | <div class="stats"> | |||
|
44 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |||
|
45 | <div class="left item">${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</div> | |||
|
46 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |||
|
47 | <div class="left item last">${c.file.mimetype}</div> | |||
|
48 | <div class="buttons"> | |||
|
49 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
50 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
51 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
52 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |||
|
53 | % if not c.file.is_binary: | |||
|
54 | ${h.link_to(_('source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
55 | % endif | |||
|
56 | % endif | |||
|
57 | </div> | |||
|
58 | </div> | |||
|
59 | <div class="commit">${_('Editing file')}: ${c.file.path}</div> | |||
|
60 | </div> | |||
42 | <pre id="editor_pre"></pre> |
|
61 | <pre id="editor_pre"></pre> | |
43 | <textarea id="editor" name="content" style="display:none">${c.file.content|n}</textarea> |
|
62 | <textarea id="editor" name="content" style="display:none">${c.file.content|n}</textarea> | |
44 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
|
63 | <div style="padding: 10px;color:#666666">${_('commit message')}</div> |
@@ -1,33 +1,10 b'' | |||||
1 | <dl> |
|
1 | <dl> | |
2 | <dt>${_('Revision')}</dt> |
|
2 | <dt style="padding-top:10px;font-size:16px">${_('History')}</dt> | |
3 | <dd> |
|
|||
4 | ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,h.short_id(c.files_list.last_changeset.raw_id)), |
|
|||
5 | h.url('changeset_home',repo_name=c.repo_name,revision=c.files_list.last_changeset.raw_id))} |
|
|||
6 | </dd> |
|
|||
7 | <dt>${_('Size')}</dt> |
|
|||
8 | <dd>${h.format_byte_size(c.files_list.size,binary=True)}</dd> |
|
|||
9 | <dt>${_('Mimetype')}</dt> |
|
|||
10 | <dd>${c.files_list.mimetype}</dd> |
|
|||
11 | <dt>${_('Options')}</dt> |
|
|||
12 | <dd>${h.link_to(_('show annotation'), |
|
|||
13 | h.url('files_annotate_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
|||
14 | / ${h.link_to(_('show as raw'), |
|
|||
15 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
|||
16 | / ${h.link_to(_('download as raw'), |
|
|||
17 | h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
|||
18 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
|||
19 | % if not c.files_list.is_binary: |
|
|||
20 | / ${h.link_to(_('edit'), |
|
|||
21 | h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
|||
22 | % endif |
|
|||
23 | % endif |
|
|||
24 | </dd> |
|
|||
25 | <dt>${_('History')}</dt> |
|
|||
26 | <dd> |
|
3 | <dd> | |
27 | <div> |
|
4 | <div> | |
28 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
|
5 | ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | |
29 |
${h.hidden('diff2',c.file |
|
6 | ${h.hidden('diff2',c.file.last_changeset.raw_id)} | |
30 |
${h.select('diff1',c.file |
|
7 | ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} | |
31 | ${h.submit('diff','diff to revision',class_="ui-button-small")} |
|
8 | ${h.submit('diff','diff to revision',class_="ui-button-small")} | |
32 | ${h.submit('show_rev','show at revision',class_="ui-button-small")} |
|
9 | ${h.submit('show_rev','show at revision',class_="ui-button-small")} | |
33 | ${h.end_form()} |
|
10 | ${h.end_form()} | |
@@ -38,15 +15,36 b'' | |||||
38 |
|
15 | |||
39 | <div id="body" class="codeblock"> |
|
16 | <div id="body" class="codeblock"> | |
40 | <div class="code-header"> |
|
17 | <div class="code-header"> | |
41 | <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${h.short_id(c.files_list.last_changeset.raw_id)}</div> |
|
18 | <div class="stats"> | |
42 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
19 | <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> | |
|
20 | <div class="left item">${h.link_to("r%s:%s" % (c.file.last_changeset.revision,h.short_id(c.file.last_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.last_changeset.raw_id))}</div> | |||
|
21 | <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> | |||
|
22 | <div class="left item last">${c.file.mimetype}</div> | |||
|
23 | <div class="buttons"> | |||
|
24 | ${h.link_to(_('show annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
25 | ${h.link_to(_('show as raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
26 | ${h.link_to(_('download as raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
27 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |||
|
28 | % if not c.file.is_binary: | |||
|
29 | ${h.link_to(_('edit'),h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path),class_="ui-button-small")} | |||
|
30 | % endif | |||
|
31 | % endif | |||
|
32 | </div> | |||
|
33 | </div> | |||
|
34 | <div class="author"> | |||
|
35 | <div class="gravatar"> | |||
|
36 | <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),16)}"/> | |||
|
37 | </div> | |||
|
38 | <div title="${h.email_or_none(c.changeset.author)}" class="user">${h.person(c.changeset.author)}</div> | |||
|
39 | </div> | |||
|
40 | <div class="commit">${c.file.last_changeset.message}</div> | |||
43 | </div> |
|
41 | </div> | |
44 | <div class="code-body"> |
|
42 | <div class="code-body"> | |
45 |
%if c.file |
|
43 | %if c.file.is_binary: | |
46 |
${_('Binary file (%s)') % c.file |
|
44 | ${_('Binary file (%s)') % c.file.mimetype} | |
47 | %else: |
|
45 | %else: | |
48 |
% if c.file |
|
46 | % if c.file.size < c.cut_off_limit: | |
49 |
${h.pygmentize(c.file |
|
47 | ${h.pygmentize(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
50 | %else: |
|
48 | %else: | |
51 | ${_('File is too big to display')} ${h.link_to(_('show as raw'), |
|
49 | ${_('File is too big to display')} ${h.link_to(_('show as raw'), | |
52 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
|
50 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
@@ -1,8 +1,8 b'' | |||||
1 |
%if c.file |
|
1 | %if c.file: | |
2 | <h3 class="files_location"> |
|
2 | <h3 class="files_location"> | |
3 |
${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file |
|
3 | ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.changeset.raw_id,c.file.path)} | |
4 | </h3> |
|
4 | </h3> | |
5 |
%if c.file |
|
5 | %if c.file.is_dir(): | |
6 | <%include file='files_browser.html'/> |
|
6 | <%include file='files_browser.html'/> | |
7 | %else: |
|
7 | %else: | |
8 | <%include file='files_source.html'/> |
|
8 | <%include file='files_source.html'/> |
@@ -66,6 +66,7 b'' | |||||
66 | <tr class="parity${cnt%2}"> |
|
66 | <tr class="parity${cnt%2}"> | |
67 | <td class="quick_repo_menu"> |
|
67 | <td class="quick_repo_menu"> | |
68 | <ul class="menu_items hidden"> |
|
68 | <ul class="menu_items hidden"> | |
|
69 | <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li> | |||
69 | <li> |
|
70 | <li> | |
70 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}"> |
|
71 | <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}"> | |
71 | <span class="icon"> |
|
72 | <span class="icon"> |
@@ -129,11 +129,11 b' class TestFilesController(TestController' | |||||
129 | </optgroup>""" in response.body |
|
129 | </optgroup>""" in response.body | |
130 |
|
130 | |||
131 |
|
131 | |||
132 |
assert """<div class="commit"> |
|
132 | assert """<div class="commit">Partially implemented #16. filecontent/commit message/author/node name are safe_unicode now. | |
133 | In addition some other __str__ are unicode as well |
|
133 | In addition some other __str__ are unicode as well | |
134 | Added test for unicode |
|
134 | Added test for unicode | |
135 | Improved test to clone into uniq repository. |
|
135 | Improved test to clone into uniq repository. | |
136 |
removed extra unicode conversion in diff. |
|
136 | removed extra unicode conversion in diff.</div>""" in response.body | |
137 |
|
137 | |||
138 | assert """<span style="text-transform: uppercase;"><a href="#">branch: default</a></span>""" in response.body, 'missing or wrong branch info' |
|
138 | assert """<span style="text-transform: uppercase;"><a href="#">branch: default</a></span>""" in response.body, 'missing or wrong branch info' | |
139 |
|
139 |
General Comments 0
You need to be logged in to leave comments.
Login now