annotate rhodecode/templates/files/files_add.html @ 3602:bb1eecda3172 beta

clean-up of breadcrumbs on pages with repo context bar
author Mads Kiilerich <madski@unity3d.com>
date Tue, 26 Mar 2013 23:14:37 +0100
parents e2447c586e1b
children a2afaf84330c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 <%inherit file="/base/base.html"/>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
7b67b0dcad6d Added initial support for creating new nodes in repos
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: 3559
diff changeset
4 ${_('%s Files Add') % c.repo_name} &middot; ${c.rhodecode_name}
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <%def name="js_extra()">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 <%def name="css_extra()">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 <%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
15 ${_('Add file')} @ ${h.show_id(c.cs)}
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <%def name="main()">
3583
e2447c586e1b files edit/add is displayed with repo context menu
Marcin Kuzminski <marcin@python-works.com>
parents: 3582
diff changeset
19 ${self.context_bar('files')}
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 <div class="box">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 <!-- box / title -->
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 <div class="title">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 ${self.breadcrumbs()}
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <ul class="links">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 <li>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 <span style="text-transform: uppercase;">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
28 </li>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
29 </ul>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 </div>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 <div class="table">
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
32 <div id="files_data">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
33 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 <h3>${_('Add new file')}</h3>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 <div class="form">
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
36 <div class="fields">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
37 <div id="filename_container" class="field file">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
38 <div class="label">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
39 <label for="filename">${_('File Name')}:</label>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
40 </div>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
41 <div class="input">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
42 <input type="text" value="" size="30" name="filename" id="filename">
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1720
diff changeset
43 ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span>
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
44 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
45 </div>
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
46 <div id="upload_file_container" class="field" style="display:none">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
47 <div class="label">
3559
328eb707fe3f added more strict checks for file path in add file controller
Marcin Kuzminski <marcin@python-works.com>
parents: 3237
diff changeset
48 <label for="upload_file_container">${_('Upload file')}</label>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
49 </div>
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
50 <div class="file">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
51 <input type="file" size="30" name="upload_file" id="upload_file">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
52 ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span>
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
53 </div>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
54 </div>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
55 <div class="field">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
56 <div class="label">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
57 <label for="location">${_('Location')}</label>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
58 </div>
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
59 <div class="input">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
60 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
61 ${_('use / to separate directories')}
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
62 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
63 </div>
1603
53d076664e08 Changed order of add file form inputs.
Marcin Kuzminski <marcin@python-works.com>
parents: 1485
diff changeset
64 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
65 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
66 <div id="body" class="codeblock">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
67 <div id="editor_container">
1485
269905fac50a added uploading of files from web interface directly into repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1484
diff changeset
68 <pre id="editor_pre"></pre>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
69 <textarea id="editor" name="content" style="display:none"></textarea>
1485
269905fac50a added uploading of files from web interface directly into repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1484
diff changeset
70 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
71 <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
72 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
73 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
74 <div style="text-align: l;padding-top: 5px">
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1720
diff changeset
75 ${h.submit('commit',_('Commit changes'),class_="ui-btn")}
Marcin Kuzminski <marcin@python-works.com>
parents: 1720
diff changeset
76 ${h.reset('reset',_('Reset'),class_="ui-btn")}
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
77 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
78 ${h.end_form()}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
79 <script type="text/javascript">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
80 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
81 initCodeMirror('editor',reset_url);
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
82 </script>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
83 </div>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
84 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
85 </div>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
86 </%def>