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