##// END OF EJS Templates
Changed order of add file form inputs.
marcink -
r1603:53d07666 beta
parent child Browse files
Show More
@@ -1,111 +1,110 b''
1 <%inherit file="/base/base.html"/>
1 <%inherit file="/base/base.html"/>
2
2
3 <%def name="title()">
3 <%def name="title()">
4 ${c.repo_name} ${_('Edit file')} - ${c.rhodecode_name}
4 ${c.repo_name} ${_('Edit file')} - ${c.rhodecode_name}
5 </%def>
5 </%def>
6
6
7 <%def name="js_extra()">
7 <%def name="js_extra()">
8 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
8 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
9 </%def>
9 </%def>
10 <%def name="css_extra()">
10 <%def name="css_extra()">
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
12 </%def>
12 </%def>
13
13
14 <%def name="breadcrumbs_links()">
14 <%def name="breadcrumbs_links()">
15 ${h.link_to(u'Home',h.url('/'))}
15 ${h.link_to(u'Home',h.url('/'))}
16 &raquo;
16 &raquo;
17 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
17 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
18 &raquo;
18 &raquo;
19 ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
19 ${_('add file')} @ R${c.cs.revision}:${h.short_id(c.cs.raw_id)}
20 </%def>
20 </%def>
21
21
22 <%def name="page_nav()">
22 <%def name="page_nav()">
23 ${self.menu('files')}
23 ${self.menu('files')}
24 </%def>
24 </%def>
25 <%def name="main()">
25 <%def name="main()">
26 <div class="box">
26 <div class="box">
27 <!-- box / title -->
27 <!-- box / title -->
28 <div class="title">
28 <div class="title">
29 ${self.breadcrumbs()}
29 ${self.breadcrumbs()}
30 <ul class="links">
30 <ul class="links">
31 <li>
31 <li>
32 <span style="text-transform: uppercase;">
32 <span style="text-transform: uppercase;">
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
33 <a href="#">${_('branch')}: ${c.cs.branch}</a></span>
34 </li>
34 </li>
35 </ul>
35 </ul>
36 </div>
36 </div>
37 <div class="table">
37 <div class="table">
38 <div id="files_data">
38 <div id="files_data">
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
40 <h3>${_('Add new file')}</h3>
40 <h3>${_('Add new file')}</h3>
41 <div class="form">
41 <div class="form">
42 <div class="fields">
42 <div class="fields">
43 <div class="field">
43 <div id="filename_container" class="field file">
44 <div class="label">
44 <div class="label">
45 <label for="location">${_('Location')}</label>
45 <label for="filename">${_('File Name')}:</label>
46 </div>
46 </div>
47 <div class="input">
47 <div class="input">
48 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
48 <input type="text" value="" size="30" name="filename" id="filename">
49 ${_('use / to separate directories')}
49 <input type="button" class="ui-button-small" value="upload file" id="upload_file_enable">
50 </div>
50 </div>
51 </div>
51 </div>
52
52 <div id="upload_file_container" class="field" style="display:none">
53 <div id="filename_container" class="field file">
53 <div class="label">
54 <div class="label">
54 <label for="location">${_('Upload file')}</label>
55 <label for="filename">${_('File Name')}:</label>
56 </div>
57 <div class="input">
58 <input type="text" value="" size="30" name="filename" id="filename">
59 <input type="button" class="ui-button-small" value="upload file" id="upload_file_enable">
60 </div>
61 </div>
62 <div id="upload_file_container" class="field" style="display:none">
63 <div class="label">
64 <label for="location">${_('Upload file')}</label>
65 </div>
66 <div class="file">
67 <input type="file" size="30" name="upload_file" id="upload_file">
68 <input type="button" class="ui-button-small" value="create file" id="file_enable">
69 </div>
70 </div>
71 </div>
55 </div>
56 <div class="file">
57 <input type="file" size="30" name="upload_file" id="upload_file">
58 <input type="button" class="ui-button-small" value="create file" id="file_enable">
59 </div>
60 </div>
61 <div class="field">
62 <div class="label">
63 <label for="location">${_('Location')}</label>
64 </div>
65 <div class="input">
66 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
67 ${_('use / to separate directories')}
68 </div>
69 </div>
70 </div>
72 </div>
71 </div>
73 <div id="body" class="codeblock">
72 <div id="body" class="codeblock">
74 <div id="editor_container">
73 <div id="editor_container">
75 <pre id="editor_pre"></pre>
74 <pre id="editor_pre"></pre>
76 <textarea id="editor" name="content" style="display:none"></textarea>
75 <textarea id="editor" name="content" style="display:none"></textarea>
77 </div>
76 </div>
78 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
77 <div style="padding: 10px;color:#666666">${_('commit message')}</div>
79 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
78 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px"></textarea>
80 </div>
79 </div>
81 <div style="text-align: right;padding-top: 5px">
80 <div style="text-align: right;padding-top: 5px">
82 <input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" />
81 <input id="reset" type="button" value="${_('Reset')}" class="ui-button-small" />
83 ${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")}
82 ${h.submit('commit',_('Commit changes'),class_="ui-button-small-blue")}
84 </div>
83 </div>
85 ${h.end_form()}
84 ${h.end_form()}
86 <script type="text/javascript">
85 <script type="text/javascript">
87 var myCodeMirror = CodeMirror.fromTextArea(YUD.get('editor'),{
86 var myCodeMirror = CodeMirror.fromTextArea(YUD.get('editor'),{
88 mode: "null",
87 mode: "null",
89 lineNumbers:true
88 lineNumbers:true
90 });
89 });
91 YUE.on('reset','click',function(e){
90 YUE.on('reset','click',function(e){
92 window.location="${h.url('files_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path)}";
91 window.location="${h.url('files_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path)}";
93 });
92 });
94
93
95 YUE.on('file_enable','click',function(){
94 YUE.on('file_enable','click',function(){
96 YUD.setStyle('editor_container','display','');
95 YUD.setStyle('editor_container','display','');
97 YUD.setStyle('upload_file_container','display','none');
96 YUD.setStyle('upload_file_container','display','none');
98 YUD.setStyle('filename_container','display','');
97 YUD.setStyle('filename_container','display','');
99 });
98 });
100
99
101 YUE.on('upload_file_enable','click',function(){
100 YUE.on('upload_file_enable','click',function(){
102 YUD.setStyle('editor_container','display','none');
101 YUD.setStyle('editor_container','display','none');
103 YUD.setStyle('upload_file_container','display','');
102 YUD.setStyle('upload_file_container','display','');
104 YUD.setStyle('filename_container','display','none');
103 YUD.setStyle('filename_container','display','none');
105 });
104 });
106
105
107 </script>
106 </script>
108 </div>
107 </div>
109 </div>
108 </div>
110 </div>
109 </div>
111 </%def> No newline at end of file
110 </%def>
General Comments 0
You need to be logged in to leave comments. Login now