Mercurial > kallithea
annotate rhodecode/templates/files/files_edit.html @ 3665:690a955ba785 beta
use placeholders in qfilter, not the ugly JS logic
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 04 Apr 2013 13:18:24 +0200 |
parents | ec6354949623 |
children | 072a37c44f58 |
rev | line source |
---|---|
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 <%inherit file="/base/base.html"/> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%def name="title()"> |
3582
1f334a68d057
improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents:
3237
diff
changeset
|
4 ${_('%s Files Edit') % c.repo_name} · ${c.rhodecode_name} |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 </%def> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 <%def name="js_extra()"> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 </%def> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 <%def name="css_extra()"> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 </%def> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
13 |
3620
a2afaf84330c
fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents:
3602
diff
changeset
|
14 <%def name="page_nav()"> |
a2afaf84330c
fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents:
3602
diff
changeset
|
15 ${self.menu('repositories')} |
a2afaf84330c
fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents:
3602
diff
changeset
|
16 </%def> |
a2afaf84330c
fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents:
3602
diff
changeset
|
17 |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 <%def name="breadcrumbs_links()"> |
3602
bb1eecda3172
clean-up of breadcrumbs on pages with repo context bar
Mads Kiilerich <madski@unity3d.com>
parents:
3583
diff
changeset
|
19 ${_('Edit file')} @ ${h.show_id(c.cs)} |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
20 </%def> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <%def name="main()"> |
3583
e2447c586e1b
files edit/add is displayed with repo context menu
Marcin Kuzminski <marcin@python-works.com>
parents:
3582
diff
changeset
|
23 ${self.context_bar('files')} |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 <div class="box"> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 <!-- box / title --> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 <div class="title"> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 ${self.breadcrumbs()} |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 <ul class="links"> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 <li> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 <span style="text-transform: uppercase;"> |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
31 <a href="#">${_('Branch')}: ${c.cs.branch}</a></span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
32 </li> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
33 </ul> |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
34 </div> |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
35 <div class="table"> |
3197 | 36 <div id="files_data"> |
37 <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3> | |
38 ${h.form(h.url.current(),method='post',id='eform')} | |
39 <div id="body" class="codeblock"> | |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
40 <div class="code-header"> |
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
41 <div class="stats"> |
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
42 <div class="left"><img src="${h.url('/images/icons/file.png')}"/></div> |
2084
feb0fccdcf83
fixed vcs issue with last_changeset for filenodes
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
43 <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div> |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
44 <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div> |
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
45 <div class="left item last">${c.file.mimetype}</div> |
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
46 <div class="buttons"> |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
47 ${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-btn")} |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
48 ${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-btn")} |
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
49 ${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-btn")} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
50 % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
51 % if not c.file.is_binary: |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
52 ${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-btn")} |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
53 % endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
54 % endif |
1737
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
55 </div> |
61eda8bf70d0
new files views
Marcin Kuzminski <marcin@python-works.com>
parents:
1720
diff
changeset
|
56 </div> |
2199
31ebf7010566
various fixes for git and mercurial with InMemoryCommit backend and non-ascii files
Marcin Kuzminski <marcin@python-works.com>
parents:
2084
diff
changeset
|
57 <div class="commit">${_('Editing file')}: ${c.file.unicode_path}</div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
58 </div> |
3197 | 59 <pre id="editor_pre"></pre> |
60 <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea> | |
3654
ec6354949623
Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents:
3620
diff
changeset
|
61 <div style="padding: 10px;color:#666666">${_('Commit message')}</div> |
3237
f5dd76e2a7af
disable file editing when not on branch head fixes issue #462
Marcin Kuzminski <marcin@python-works.com>
parents:
3198
diff
changeset
|
62 <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> |
3197 | 63 </div> |
64 <div style="text-align: left;padding-top: 5px"> | |
1756 | 65 ${h.submit('commit',_('Commit changes'),class_="ui-btn")} |
66 ${h.reset('reset',_('Reset'),class_="ui-btn")} | |
3197 | 67 </div> |
68 ${h.end_form()} | |
69 <script type="text/javascript"> | |
70 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}"; | |
71 initCodeMirror('editor',reset_url); | |
72 </script> | |
73 </div> | |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
74 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
75 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1789
diff
changeset
|
76 </%def> |