comparison rhodecode/templates/files/files_add.html @ 4116:ffd45b185016 rhodecode-2.2.5-gpl

Imported some of the GPLv3'd changes from RhodeCode v2.2.5. This imports changes between changesets 21af6c4eab3d and 6177597791c2 in RhodeCode's original repository, including only changes to Python files and HTML. RhodeCode clearly licensed its changes to these files under GPLv3 in their /LICENSE file, which states the following: The Python code and integrated HTML are licensed under the GPLv3 license. (See: https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE or http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE for an online copy of that LICENSE file) Conservancy reviewed these changes and confirmed that they can be licensed as a whole to the Kallithea project under GPLv3-only. While some of the contents committed herein are clearly licensed GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the statement above from RhodeCode indicates that they intend GPLv3-only as their license, per GPLv3ยง14 and other relevant sections of GPLv3.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:03:13 -0400
parents a60a0e9092c6
children
comparison
equal deleted inserted replaced
4115:8b7294a804a0 4116:ffd45b185016
1 <%inherit file="/base/base.html"/> 1 <%inherit file="/base/base.html"/>
2 2
3 <%def name="title()"> 3 <%def name="title()">
4 ${_('%s Files Add') % c.repo_name} &middot; ${c.rhodecode_name} 4 ${_('%s Files Add') % c.repo_name}
5 %if c.rhodecode_name:
6 &middot; ${c.rhodecode_name}
7 %endif
5 </%def> 8 </%def>
6 9
7 <%def name="js_extra()"> 10 <%def name="js_extra()">
8 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script> 11 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
9 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script> 12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
10 <script type="text/javascript" src="${h.url('/js/mode/meta.js')}"></script> 13 <script type="text/javascript" src="${h.url('/js/mode/meta.js')}"></script>
14 <script type="text/javascript" src="${h.url('/js/mode/meta_ext.js')}"></script>
11 </%def> 15 </%def>
12 <%def name="css_extra()"> 16 <%def name="css_extra()">
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/> 17 <link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
14 </%def> 18 </%def>
15 19
16 <%def name="page_nav()"> 20 <%def name="page_nav()">
17 ${self.menu('repositories')} 21 ${self.menu('repositories')}
18 </%def> 22 </%def>
19 23
20 <%def name="breadcrumbs_links()"> 24 <%def name="breadcrumbs_links()">
21 ${_('Add file')} @ ${h.show_id(c.cs)} 25 ${_('Add new file')} @ ${h.show_id(c.cs)}
22 </%def> 26 </%def>
23 27
24 <%def name="main()"> 28 <%def name="main()">
25 ${self.repo_context_bar('files')} 29 ${self.repo_context_bar('files')}
26 <div class="box"> 30 <div class="box">
32 <span style="text-transform: uppercase;"> 36 <span style="text-transform: uppercase;">
33 <a href="#">${_('Branch')}: ${c.cs.branch}</a></span> 37 <a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
34 </li> 38 </li>
35 </ul> 39 </ul>
36 </div> 40 </div>
37 <div class="table"> 41 <div class="table" id="edit">
38 <div id="files_data"> 42 <div id="files_data">
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")} 43 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal")}
40 <h3>${_('Add new file')}</h3> 44 <h3 class="files_location">
41 <div class="form"> 45 ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} /
42 <div class="fields"> 46 <span id="filename_container" class="file reviewer_ac">
43 <div id="filename_container" class="field file"> 47 <input class="input-small" type="text" value="" size="30" name="filename" id="filename" placeholder="${_('Enter filename...')}">
44 <div class="label"> 48 <input type="hidden" value="${c.f_path}" size="30" name="location" id="location">
45 <label for="filename">${_('File Name')}:</label> 49 ${_('or')} <div class="btn btn-small" id="upload_file_enable">${_('Upload File')}</div>
46 </div> 50 </span>
47 <div class="input"> 51 <span id="upload_file_container" class="reviewer_ac" style="display:none">
48 <input type="text" value="" size="30" name="filename" id="filename"> 52 <input type="file" size="20" name="upload_file" id="upload_file">
49 ${_('or')} <span class="ui-btn" id="upload_file_enable">${_('Upload file')}</span> 53 ${_('or')} <div class="btn btn-small" id="file_enable">${_('Create New File')}</div>
50 </div> 54 </span>
51 </div> 55 </h3>
52 <div id="upload_file_container" class="field" style="display:none">
53 <div class="label">
54 <label for="upload_file_container">${_('Upload file')}</label>
55 </div>
56 <div class="file">
57 <input type="file" size="30" name="upload_file" id="upload_file">
58 ${_('or')} <span class="ui-btn" id="file_enable">${_('Create new file')}</span>
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>
71 </div>
72 <div id="body" class="codeblock"> 56 <div id="body" class="codeblock">
73 <div class="code-header"> 57 <div class="code-header" id="set_mode_header">
74 <label class="commit" for="set_mode">${_('New file mode')}</label> 58 <label class="commit" for="set_mode">${_('New file mode')}</label>
75 ${h.select('set_mode','plain',[('plain',_('plain'))])} 59 ${h.select('set_mode','plain',[('plain',_('plain'))])}
76 </div> 60 </div>
77 <div id="editor_container"> 61 <div id="editor_container">
78 <pre id="editor_pre"></pre> 62 <pre id="editor_pre"></pre>
80 </div> 64 </div>
81 <div style="padding: 10px;color:#666666">${_('Commit message')}</div> 65 <div style="padding: 10px;color:#666666">${_('Commit message')}</div>
82 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea> 66 <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
83 </div> 67 </div>
84 <div style="text-align: left;padding-top: 5px"> 68 <div style="text-align: left;padding-top: 5px">
85 ${h.submit('commit',_('Commit changes'),class_="ui-btn")} 69 ${h.submit('commit',_('Commit changes'),class_="btn btn-small btn-success")}
86 ${h.reset('reset',_('Reset'),class_="ui-btn")} 70 ${h.reset('reset',_('Reset'),class_="btn btn-small")}
87 </div> 71 </div>
88 ${h.end_form()} 72 ${h.end_form()}
89 <script type="text/javascript"> 73 <script type="text/javascript">
90 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}"; 74 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
91 var myCodeMirror = initCodeMirror('editor',reset_url); 75 var myCodeMirror = initCodeMirror('editor',reset_url);
92 CodeMirror.modeURL = "${h.url('/js/mode/%N/%N.js')}"; 76 CodeMirror.modeURL = "${h.url('/js/mode/%N/%N.js')}";
93 77
94 //inject new modes 78 //inject new modes, based on codeMirrors modeInfo object
95 var modes_select = YUD.get('set_mode'); 79 var modes_select = YUD.get('set_mode');
96 for(var i=0;i<CodeMirror.modeInfo.length;i++){ 80 for(var i=0;i<CodeMirror.modeInfo.length;i++){
97 var m = CodeMirror.modeInfo[i]; 81 var m = CodeMirror.modeInfo[i];
98 var opt = new Option(m.name, m.mode); 82 var opt = new Option(m.name, m.mode);
99 modes_select.options[i+1] = opt 83 modes_select.options[i+1] = opt