annotate 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
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()">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
4 ${_('%s Files Add') % c.repo_name}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
5 %if c.rhodecode_name:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
6 &middot; ${c.rhodecode_name}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
7 %endif
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 <%def name="js_extra()">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 <script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
4026
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
13 <script type="text/javascript" src="${h.url('/js/mode/meta.js')}"></script>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
14 <script type="text/javascript" src="${h.url('/js/mode/meta_ext.js')}"></script>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 <%def name="css_extra()">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <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
18 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19
3620
a2afaf84330c fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents: 3602
diff changeset
20 <%def name="page_nav()">
a2afaf84330c fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents: 3602
diff changeset
21 ${self.menu('repositories')}
a2afaf84330c fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents: 3602
diff changeset
22 </%def>
a2afaf84330c fixed missing page_nav in files edit/add
Marcin Kuzminski <marcin@python-works.com>
parents: 3602
diff changeset
23
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <%def name="breadcrumbs_links()">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
25 ${_('Add new 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
26 </%def>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 <%def name="main()">
3988
072a37c44f58 templates: drop context_bar, use repo_context_bar directly
Mads Kiilerich <madski@unity3d.com>
parents: 3887
diff changeset
29 ${self.repo_context_bar('files')}
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 <div class="box">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 <!-- box / title -->
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 <div class="title">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 ${self.breadcrumbs()}
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 <ul class="links">
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 <li>
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 <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
37 <a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
38 </li>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
39 </ul>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 </div>
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
41 <div class="table" id="edit">
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
42 <div id="files_data">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
43 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal")}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
44 <h3 class="files_location">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
45 ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} /
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
46 <span id="filename_container" class="file reviewer_ac">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
47 <input class="input-small" type="text" value="" size="30" name="filename" id="filename" placeholder="${_('Enter filename...')}">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
48 <input type="hidden" value="${c.f_path}" size="30" name="location" id="location">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
49 ${_('or')} <div class="btn btn-small" id="upload_file_enable">${_('Upload File')}</div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
50 </span>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
51 <span id="upload_file_container" class="reviewer_ac" style="display:none">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
52 <input type="file" size="20" name="upload_file" id="upload_file">
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
53 ${_('or')} <div class="btn btn-small" id="file_enable">${_('Create New File')}</div>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
54 </span>
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
55 </h3>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
56 <div id="body" class="codeblock">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
57 <div class="code-header" id="set_mode_header">
4026
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
58 <label class="commit" for="set_mode">${_('New file mode')}</label>
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
59 ${h.select('set_mode','plain',[('plain',_('plain'))])}
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
60 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
61 <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
62 <pre id="editor_pre"></pre>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
63 <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
64 </div>
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3620
diff changeset
65 <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
66 <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
67 </div>
3887
4930abd96a7e minor css fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 3654
diff changeset
68 <div style="text-align: left;padding-top: 5px">
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
69 ${h.submit('commit',_('Commit changes'),class_="btn btn-small btn-success")}
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
70 ${h.reset('reset',_('Reset'),class_="btn btn-small")}
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
71 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
72 ${h.end_form()}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
73 <script type="text/javascript">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
74 var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
4026
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
75 var myCodeMirror = initCodeMirror('editor',reset_url);
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
76 CodeMirror.modeURL = "${h.url('/js/mode/%N/%N.js')}";
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
77
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4026
diff changeset
78 //inject new modes, based on codeMirrors modeInfo object
4026
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
79 var modes_select = YUD.get('set_mode');
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
80 for(var i=0;i<CodeMirror.modeInfo.length;i++){
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
81 var m = CodeMirror.modeInfo[i];
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
82 var opt = new Option(m.name, m.mode);
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
83 modes_select.options[i+1] = opt
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
84 }
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
85 YUE.on(modes_select, 'change', function(e){
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
86 var selected = e.currentTarget;
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
87 var new_mode = selected.options[selected.selectedIndex].value;
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
88 setCodeMirrorMode(myCodeMirror, new_mode);
a60a0e9092c6 added codemirror edit mode with autodetection
Marcin Kuzminski <marcin@python-works.com>
parents: 3988
diff changeset
89 })
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
90 </script>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2492
diff changeset
91 </div>
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
92 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
93 </div>
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
94 </%def>