Show More
@@ -1,105 +1,111 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Add repository group')} |
|
6 | 6 | %if c.rhodecode_name: |
|
7 | 7 | · ${h.branding(c.rhodecode_name)} |
|
8 | 8 | %endif |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="breadcrumbs_links()"> |
|
12 | 12 | ${h.link_to(_('Admin'),h.route_path('admin_home'))} |
|
13 | 13 | » |
|
14 | 14 | ${h.link_to(_('Repository groups'),h.route_path('repo_groups'))} |
|
15 | 15 | » |
|
16 | 16 | ${_('Add Repository Group')} |
|
17 | 17 | </%def> |
|
18 | 18 | |
|
19 | 19 | <%def name="menu_bar_nav()"> |
|
20 | 20 | ${self.menu_items(active='admin')} |
|
21 | 21 | </%def> |
|
22 | 22 | |
|
23 | 23 | <%def name="menu_bar_subnav()"> |
|
24 | 24 | ${self.admin_menu(active='repository_groups')} |
|
25 | 25 | </%def> |
|
26 | 26 | |
|
27 | 27 | <%def name="main()"> |
|
28 | 28 | <div class="box"> |
|
29 | 29 | ${h.secure_form(h.route_path('repo_group_create'), request=request)} |
|
30 | 30 | <div class="form"> |
|
31 | 31 | <!-- fields --> |
|
32 | 32 | <div class="fields"> |
|
33 | 33 | <div class="field"> |
|
34 | 34 | <div class="label"> |
|
35 | 35 | <label for="group_name">${_('Group name')}:</label> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="input"> |
|
38 | 38 | ${h.text('group_name', class_="medium")} |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <div class="field"> |
|
43 | 43 | <div class="label"> |
|
44 | 44 | <label for="group_parent_id">${_('Repository group')}:</label> |
|
45 | 45 | </div> |
|
46 | 46 | <div class="select"> |
|
47 | 47 | ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | |
|
51 | 51 | <div class="field"> |
|
52 | 52 | <div class="label"> |
|
53 | 53 | <label for="group_description">${_('Description')}:</label> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="textarea editor"> |
|
56 | 56 | ${h.textarea('group_description',cols=23,rows=5,class_="medium")} |
|
57 | 57 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
58 | <span class="help-block">${_('Plain text format with support of {metatags}').format(metatags=metatags_url)|n}</span> | |
|
58 | <span class="help-block"> | |
|
59 | % if c.visual.stylify_metatags: | |
|
60 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
61 | % else: | |
|
62 | ${_('Plain text format.')} | |
|
63 | % endif | |
|
64 | </span> | |
|
59 | 65 | <span id="meta-tags-desc" style="display: none"> |
|
60 | 66 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
61 | 67 | ${dt.metatags_help()} |
|
62 | 68 | </span> |
|
63 | 69 | </div> |
|
64 | 70 | </div> |
|
65 | 71 | |
|
66 | 72 | <div id="copy_perms" class="field"> |
|
67 | 73 | <div class="label label-checkbox"> |
|
68 | 74 | <label for="group_copy_permissions">${_('Copy Parent Group Permissions')}:</label> |
|
69 | 75 | </div> |
|
70 | 76 | <div class="checkboxes"> |
|
71 | 77 | ${h.checkbox('group_copy_permissions', value="True", checked="checked")} |
|
72 | 78 | <span class="help-block">${_('Copy permissions from parent repository group.')}</span> |
|
73 | 79 | </div> |
|
74 | 80 | </div> |
|
75 | 81 | |
|
76 | 82 | <div class="buttons"> |
|
77 | 83 | ${h.submit('save',_('Create Repository Group'),class_="btn")} |
|
78 | 84 | </div> |
|
79 | 85 | </div> |
|
80 | 86 | </div> |
|
81 | 87 | ${h.end_form()} |
|
82 | 88 | </div> |
|
83 | 89 | <script> |
|
84 | 90 | $(document).ready(function(){ |
|
85 | 91 | var setCopyPermsOption = function(group_val){ |
|
86 | 92 | if(group_val !== "-1"){ |
|
87 | 93 | $('#copy_perms').show() |
|
88 | 94 | } |
|
89 | 95 | else{ |
|
90 | 96 | $('#copy_perms').hide(); |
|
91 | 97 | } |
|
92 | 98 | }; |
|
93 | 99 | $("#group_parent_id").select2({ |
|
94 | 100 | 'containerCssClass': "drop-menu", |
|
95 | 101 | 'dropdownCssClass': "drop-menu-dropdown", |
|
96 | 102 | 'dropdownAutoWidth': true |
|
97 | 103 | }); |
|
98 | 104 | setCopyPermsOption($('#group_parent_id').val()); |
|
99 | 105 | $("#group_parent_id").on("change", function(e) { |
|
100 | 106 | setCopyPermsOption(e.val) |
|
101 | 107 | }); |
|
102 | 108 | $('#group_name').focus(); |
|
103 | 109 | }) |
|
104 | 110 | </script> |
|
105 | 111 | </%def> |
@@ -1,83 +1,89 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | <div class="panel panel-default"> |
|
5 | 5 | <div class="panel-heading"> |
|
6 | 6 | <h3 class="panel-title">${_('Repository Group Settings: {}').format(c.repo_group.name)}</h3> |
|
7 | 7 | </div> |
|
8 | 8 | <div class="panel-body"> |
|
9 | 9 | ${h.secure_form(h.route_path('edit_repo_group', repo_group_name=c.repo_group.group_name), request=request)} |
|
10 | 10 | <div class="form"> |
|
11 | 11 | <!-- fields --> |
|
12 | 12 | <div class="fields"> |
|
13 | 13 | <div class="field"> |
|
14 | 14 | <div class="label"> |
|
15 | 15 | <label for="group_name">${_('Group name')}:</label> |
|
16 | 16 | </div> |
|
17 | 17 | <div class="input"> |
|
18 | 18 | ${c.form['repo_group_name'].render(css_class='medium', oid='group_name')|n} |
|
19 | 19 | ${c.form.render_error(request, c.form['repo_group_name'])|n} |
|
20 | 20 | </div> |
|
21 | 21 | </div> |
|
22 | 22 | |
|
23 | 23 | <div class="field"> |
|
24 | 24 | <div class="label"> |
|
25 | 25 | <label for="repo_group">${_('Repository group')}:</label> |
|
26 | 26 | </div> |
|
27 | 27 | <div class="select"> |
|
28 | 28 | ${c.form['repo_group'].render(css_class='medium', oid='repo_group')|n} |
|
29 | 29 | ${c.form.render_error(request, c.form['repo_group'])|n} |
|
30 | 30 | |
|
31 | 31 | <p class="help-block">${_('Optional select a parent group to move this repository group into.')}</p> |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | |
|
35 | 35 | <div class="field badged-field"> |
|
36 | 36 | <div class="label"> |
|
37 | 37 | <label for="repo_group_owner">${_('Owner')}:</label> |
|
38 | 38 | </div> |
|
39 | 39 | <div class="input"> |
|
40 | 40 | <div class="badge-input-container"> |
|
41 | 41 | <div class="user-badge"> |
|
42 | 42 | ${base.gravatar_with_user(c.repo_group.user.email, show_disabled=not c.repo_group.user.active)} |
|
43 | 43 | </div> |
|
44 | 44 | <div class="badge-input-wrap"> |
|
45 | 45 | ${c.form['repo_group_owner'].render(css_class='medium', oid='repo_group_owner')|n} |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | ${c.form.render_error(request, c.form['repo_group_owner'])|n} |
|
49 | 49 | <p class="help-block">${_('Change owner of this repository group.')}</p> |
|
50 | 50 | </div> |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class="field"> |
|
54 | 54 | <div class="label label-textarea"> |
|
55 | 55 | <label for="repo_group_description">${_('Description')}:</label> |
|
56 | 56 | </div> |
|
57 | 57 | <div class="textarea text-area editor"> |
|
58 | 58 | ${c.form['repo_group_description'].render(css_class='medium', oid='repo_group_description')|n} |
|
59 | 59 | ${c.form.render_error(request, c.form['repo_group_description'])|n} |
|
60 | 60 | |
|
61 | 61 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
62 | <span class="help-block">${_('Plain text format with support of {metatags}').format(metatags=metatags_url)|n}</span> | |
|
62 | <span class="help-block"> | |
|
63 | % if c.visual.stylify_metatags: | |
|
64 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
65 | % else: | |
|
66 | ${_('Plain text format.')} | |
|
67 | % endif | |
|
68 | </span> | |
|
63 | 69 | <span id="meta-tags-desc" style="display: none"> |
|
64 | 70 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
65 | 71 | ${dt.metatags_help()} |
|
66 | 72 | </span> |
|
67 | 73 | </div> |
|
68 | 74 | </div> |
|
69 | 75 | |
|
70 | 76 | <div class="buttons"> |
|
71 | 77 | ${h.submit('save',_('Save'),class_="btn")} |
|
72 | 78 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
73 | 79 | </div> |
|
74 | 80 | </div> |
|
75 | 81 | </div> |
|
76 | 82 | ${h.end_form()} |
|
77 | 83 | </div> |
|
78 | 84 | </div> |
|
79 | 85 | <script> |
|
80 | 86 | $(document).ready(function(){ |
|
81 | 87 | UsersAutoComplete('repo_group_owner', '${c.rhodecode_user.user_id}'); |
|
82 | 88 | }) |
|
83 | 89 | </script> |
@@ -1,151 +1,158 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | ${h.secure_form(h.route_path('repo_create'), request=request)} |
|
4 | 4 | <div class="form"> |
|
5 | 5 | <!-- fields --> |
|
6 | 6 | <div class="fields"> |
|
7 | 7 | <div class="field"> |
|
8 | 8 | <div class="label"> |
|
9 | 9 | <label for="repo_name">${_('Repository name')}:</label> |
|
10 | 10 | </div> |
|
11 | 11 | <div class="input"> |
|
12 | 12 | ${h.text('repo_name', class_="medium")} |
|
13 | 13 | <div class="info-block"> |
|
14 | 14 | <a id="remote_clone_toggle" href="#">${_('Import Existing Repository ?')}</a> |
|
15 | 15 | </div> |
|
16 | 16 | %if not c.rhodecode_user.is_admin: |
|
17 | 17 | ${h.hidden('user_created',True)} |
|
18 | 18 | %endif |
|
19 | 19 | </div> |
|
20 | 20 | </div> |
|
21 | 21 | <div id="remote_clone" class="field" style="display: none;"> |
|
22 | 22 | <div class="label"> |
|
23 | 23 | <label for="clone_uri">${_('Clone from')}:</label> |
|
24 | 24 | </div> |
|
25 | 25 | <div class="input"> |
|
26 | 26 | ${h.text('clone_uri', class_="medium")} |
|
27 | 27 | <span class="help-block"> |
|
28 | 28 | <pre> |
|
29 | 29 | - The repository must be accessible over http:// or https:// |
|
30 | 30 | - For Git projects it's recommended appending .git to the end of clone url. |
|
31 | 31 | - Make sure to select proper repository type from the below selector before importing it. |
|
32 | 32 | - If your HTTP[S] repository is not publicly accessible, |
|
33 | 33 | add authentication information to the URL: https://username:password@server.company.com/repo-name. |
|
34 | 34 | - The Git LFS/Mercurial Largefiles objects will not be imported. |
|
35 | 35 | - For very large repositories, it's recommended to manually copy them into the |
|
36 | 36 | RhodeCode <a href="${h.route_path('admin_settings_vcs', _anchor='vcs-storage-options')}">storage location</a> and run <a href="${h.route_path('admin_settings_mapping')}">Remap and Rescan</a>. |
|
37 | 37 | </pre> |
|
38 | 38 | </span> |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="field"> |
|
42 | 42 | <div class="label"> |
|
43 | 43 | <label for="repo_group">${_('Repository group')}:</label> |
|
44 | 44 | </div> |
|
45 | 45 | <div class="select"> |
|
46 | 46 | ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")} |
|
47 | 47 | % if c.personal_repo_group: |
|
48 | 48 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> |
|
49 | 49 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} |
|
50 | 50 | </a> |
|
51 | 51 | % endif |
|
52 | 52 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> |
|
53 | 53 | </div> |
|
54 | 54 | </div> |
|
55 | 55 | <div class="field"> |
|
56 | 56 | <div class="label"> |
|
57 | 57 | <label for="repo_type">${_('Type')}:</label> |
|
58 | 58 | </div> |
|
59 | 59 | <div class="select"> |
|
60 | 60 | ${h.select('repo_type','hg',c.backends)} |
|
61 | 61 | <span class="help-block">${_('Set the type of repository to create.')}</span> |
|
62 | 62 | </div> |
|
63 | 63 | </div> |
|
64 | 64 | <div class="field"> |
|
65 | 65 | <div class="label"> |
|
66 | 66 | <label for="repo_description">${_('Description')}:</label> |
|
67 | 67 | </div> |
|
68 | 68 | <div class="textarea editor"> |
|
69 | 69 | ${h.textarea('repo_description',cols=23,rows=5,class_="medium")} |
|
70 | 70 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
71 | <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span> | |
|
71 | <span class="help-block"> | |
|
72 | % if c.visual.stylify_metatags: | |
|
73 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
74 | % else: | |
|
75 | ${_('Plain text format.')} | |
|
76 | % endif | |
|
77 | ${_('Add a README file for longer descriptions')} | |
|
78 | </span> | |
|
72 | 79 | <span id="meta-tags-desc" style="display: none"> |
|
73 | 80 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
74 | 81 | ${dt.metatags_help()} |
|
75 | 82 | </span> |
|
76 | 83 | </div> |
|
77 | 84 | </div> |
|
78 | 85 | <div id="copy_perms" class="field"> |
|
79 | 86 | <div class="label label-checkbox"> |
|
80 | 87 | <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label> |
|
81 | 88 | </div> |
|
82 | 89 | <div class="checkboxes"> |
|
83 | 90 | ${h.checkbox('repo_copy_permissions', value="True", checked="checked")} |
|
84 | 91 | <span class="help-block">${_('Copy permissions from parent repository group.')}</span> |
|
85 | 92 | </div> |
|
86 | 93 | </div> |
|
87 | 94 | <div class="field"> |
|
88 | 95 | <div class="label label-checkbox"> |
|
89 | 96 | <label for="repo_private">${_('Private Repository')}:</label> |
|
90 | 97 | </div> |
|
91 | 98 | <div class="checkboxes"> |
|
92 | 99 | ${h.checkbox('repo_private',value="True")} |
|
93 | 100 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
94 | 101 | </div> |
|
95 | 102 | </div> |
|
96 | 103 | <div class="buttons"> |
|
97 | 104 | ${h.submit('save',_('Create Repository'),class_="btn")} |
|
98 | 105 | </div> |
|
99 | 106 | </div> |
|
100 | 107 | </div> |
|
101 | 108 | <script> |
|
102 | 109 | $(document).ready(function(){ |
|
103 | 110 | var setCopyPermsOption = function(group_val){ |
|
104 | 111 | if(group_val != "-1"){ |
|
105 | 112 | $('#copy_perms').show() |
|
106 | 113 | } |
|
107 | 114 | else{ |
|
108 | 115 | $('#copy_perms').hide(); |
|
109 | 116 | } |
|
110 | 117 | }; |
|
111 | 118 | |
|
112 | 119 | $('#remote_clone_toggle').on('click', function(e){ |
|
113 | 120 | $('#remote_clone').show(); |
|
114 | 121 | e.preventDefault(); |
|
115 | 122 | }); |
|
116 | 123 | |
|
117 | 124 | if($('#remote_clone input').hasClass('error')){ |
|
118 | 125 | $('#remote_clone').show(); |
|
119 | 126 | } |
|
120 | 127 | if($('#remote_clone input').val()){ |
|
121 | 128 | $('#remote_clone').show(); |
|
122 | 129 | } |
|
123 | 130 | |
|
124 | 131 | $("#repo_group").select2({ |
|
125 | 132 | 'containerCssClass': "drop-menu", |
|
126 | 133 | 'dropdownCssClass': "drop-menu-dropdown", |
|
127 | 134 | 'dropdownAutoWidth': true, |
|
128 | 135 | 'width': "resolve" |
|
129 | 136 | }); |
|
130 | 137 | |
|
131 | 138 | setCopyPermsOption($('#repo_group').val()); |
|
132 | 139 | $("#repo_group").on("change", function(e) { |
|
133 | 140 | setCopyPermsOption(e.val) |
|
134 | 141 | }); |
|
135 | 142 | |
|
136 | 143 | $("#repo_type").select2({ |
|
137 | 144 | 'containerCssClass': "drop-menu", |
|
138 | 145 | 'dropdownCssClass': "drop-menu-dropdown", |
|
139 | 146 | 'minimumResultsForSearch': -1, |
|
140 | 147 | }); |
|
141 | 148 | |
|
142 | 149 | $('#repo_name').focus(); |
|
143 | 150 | |
|
144 | 151 | $('#select_my_group').on('click', function(e){ |
|
145 | 152 | e.preventDefault(); |
|
146 | 153 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
147 | 154 | }) |
|
148 | 155 | |
|
149 | 156 | }) |
|
150 | 157 | </script> |
|
151 | 158 | ${h.end_form()} |
@@ -1,329 +1,336 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | <div class="panel panel-default"> |
|
5 | 5 | <div class="panel-heading"> |
|
6 | 6 | <h3 class="panel-title">${_('Settings for Repository: %s') % c.rhodecode_db_repo.repo_name}</h3> |
|
7 | 7 | </div> |
|
8 | 8 | <div class="panel-body"> |
|
9 | 9 | ${h.secure_form(h.route_path('edit_repo', repo_name=c.rhodecode_db_repo.repo_name), request=request)} |
|
10 | 10 | <div class="form"> |
|
11 | 11 | <!-- fields --> |
|
12 | 12 | <div class="fields"> |
|
13 | 13 | |
|
14 | 14 | <div class="field"> |
|
15 | 15 | <div class="label"> |
|
16 | 16 | <label for="repo_name">${_('Name')}:</label> |
|
17 | 17 | </div> |
|
18 | 18 | <div class="input"> |
|
19 | 19 | ${c.form['repo_name'].render(css_class='medium', oid='repo_name')|n} |
|
20 | 20 | ${c.form.render_error(request, c.form['repo_name'])|n} |
|
21 | 21 | |
|
22 | 22 | <p class="help-block">${_('permalink id')}: `_${c.rhodecode_db_repo.repo_id}` <span><a href="#" onclick="$('#clone_id').toggle();return false">${_('what is that ?')}</a></span></p> |
|
23 | 23 | <p id="clone_id" style="display:none;"> |
|
24 | 24 | ${_('URL by id')}: `${c.rhodecode_db_repo.clone_url(with_id=True)}` <br/> |
|
25 | 25 | ${_('''In case this repository is renamed or moved into another group the repository url changes. |
|
26 | 26 | Using above url guarantees that this repository will always be accessible under such url. |
|
27 | 27 | Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</p> |
|
28 | 28 | </div> |
|
29 | 29 | </div> |
|
30 | 30 | |
|
31 | 31 | <div class="field"> |
|
32 | 32 | <div class="label"> |
|
33 | 33 | <label for="repo_group">${_('Repository group')}:</label> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="select"> |
|
36 | 36 | ${c.form['repo_group'].render(css_class='medium', oid='repo_group')|n} |
|
37 | 37 | ${c.form.render_error(request, c.form['repo_group'])|n} |
|
38 | 38 | |
|
39 | 39 | % if c.personal_repo_group: |
|
40 | 40 | <a class="btn" href="#" data-personal-group-name="${c.personal_repo_group.group_name}" data-personal-group-id="${c.personal_repo_group.group_id}" onclick="selectMyGroup(this); return false"> |
|
41 | 41 | ${_('Select my personal group (`%(repo_group_name)s`)') % {'repo_group_name': c.personal_repo_group.group_name}} |
|
42 | 42 | </a> |
|
43 | 43 | % endif |
|
44 | 44 | <p class="help-block">${_('Optional select a group to put this repository into.')}</p> |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | |
|
48 | 48 | % if c.rhodecode_db_repo.repo_type != 'svn': |
|
49 | 49 | <% sync_link = h.literal(h.link_to('remote sync', h.route_path('edit_repo_remote', repo_name=c.repo_name))) %> |
|
50 | 50 | <div class="field"> |
|
51 | 51 | <div class="label"> |
|
52 | 52 | <label for="clone_uri">${_('Remote pull uri')}:</label> |
|
53 | 53 | </div> |
|
54 | 54 | <div class="input"> |
|
55 | 55 | %if c.rhodecode_db_repo.clone_uri: |
|
56 | 56 | ## display, if we don't have any errors |
|
57 | 57 | % if not c.form['repo_clone_uri'].error: |
|
58 | 58 | <div id="clone_uri_hidden" class='text-as-placeholder'> |
|
59 | 59 | <span id="clone_uri_hidden_value">${c.rhodecode_db_repo.clone_uri_hidden}</span> |
|
60 | 60 | <span class="link" id="edit_clone_uri">${_('edit')}</span> |
|
61 | 61 | </div> |
|
62 | 62 | % endif |
|
63 | 63 | |
|
64 | 64 | ## alter field |
|
65 | 65 | <div id="alter_clone_uri" style="${'' if c.form['repo_clone_uri'].error else 'display: none'}"> |
|
66 | 66 | ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri', placeholder=_('enter new value, or leave empty to remove'))|n} |
|
67 | 67 | ${c.form.render_error(request, c.form['repo_clone_uri'])|n} |
|
68 | 68 | % if c.form['repo_clone_uri'].error: |
|
69 | 69 | ## we got error from form subit, means we modify the url |
|
70 | 70 | ${h.hidden('repo_clone_uri_change', 'MOD')} |
|
71 | 71 | % else: |
|
72 | 72 | ${h.hidden('repo_clone_uri_change', 'OLD')} |
|
73 | 73 | % endif |
|
74 | 74 | |
|
75 | 75 | % if not c.form['repo_clone_uri'].error: |
|
76 | 76 | <span class="link" id="cancel_edit_clone_uri">${_('cancel')}</span> |
|
77 | 77 | % endif |
|
78 | 78 | |
|
79 | 79 | </div> |
|
80 | 80 | %else: |
|
81 | 81 | ## not set yet, display form to set it |
|
82 | 82 | ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri')|n} |
|
83 | 83 | ${c.form.render_error(request, c.form['repo_clone_uri'])|n} |
|
84 | 84 | ${h.hidden('repo_clone_uri_change', 'NEW')} |
|
85 | 85 | %endif |
|
86 | 86 | <p id="alter_clone_uri_help_block" class="help-block"> |
|
87 | 87 | ${_('http[s] url where from repository was imported. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/> |
|
88 | 88 | ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')} |
|
89 | 89 | </p> |
|
90 | 90 | </div> |
|
91 | 91 | </div> |
|
92 | 92 | <div class="field"> |
|
93 | 93 | <div class="label"> |
|
94 | 94 | <label for="push_uri">${_('Remote push uri')}:</label> |
|
95 | 95 | </div> |
|
96 | 96 | <div class="input"> |
|
97 | 97 | %if c.rhodecode_db_repo.push_uri: |
|
98 | 98 | ## display, if we don't have any errors |
|
99 | 99 | % if not c.form['repo_push_uri'].error: |
|
100 | 100 | <div id="push_uri_hidden" class='text-as-placeholder'> |
|
101 | 101 | <span id="push_uri_hidden_value">${c.rhodecode_db_repo.push_uri_hidden}</span> |
|
102 | 102 | <span class="link" id="edit_push_uri">${_('edit')}</span> |
|
103 | 103 | </div> |
|
104 | 104 | % endif |
|
105 | 105 | |
|
106 | 106 | ## alter field |
|
107 | 107 | <div id="alter_push_uri" style="${'' if c.form['repo_push_uri'].error else 'display: none'}"> |
|
108 | 108 | ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri', placeholder=_('enter new value, or leave empty to remove'))|n} |
|
109 | 109 | ${c.form.render_error(request, c.form['repo_push_uri'])|n} |
|
110 | 110 | % if c.form['repo_push_uri'].error: |
|
111 | 111 | ## we got error from form subit, means we modify the url |
|
112 | 112 | ${h.hidden('repo_push_uri_change', 'MOD')} |
|
113 | 113 | % else: |
|
114 | 114 | ${h.hidden('repo_push_uri_change', 'OLD')} |
|
115 | 115 | % endif |
|
116 | 116 | |
|
117 | 117 | % if not c.form['repo_push_uri'].error: |
|
118 | 118 | <span class="link" id="cancel_edit_push_uri">${_('cancel')}</span> |
|
119 | 119 | % endif |
|
120 | 120 | |
|
121 | 121 | </div> |
|
122 | 122 | %else: |
|
123 | 123 | ## not set yet, display form to set it |
|
124 | 124 | ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri')|n} |
|
125 | 125 | ${c.form.render_error(request, c.form['repo_push_uri'])|n} |
|
126 | 126 | ${h.hidden('repo_push_uri_change', 'NEW')} |
|
127 | 127 | %endif |
|
128 | 128 | <p id="alter_push_uri_help_block" class="help-block"> |
|
129 | 129 | ${_('http[s] url to sync data back. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/> |
|
130 | 130 | ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')} |
|
131 | 131 | </p> |
|
132 | 132 | </div> |
|
133 | 133 | </div> |
|
134 | 134 | % else: |
|
135 | 135 | ${h.hidden('repo_clone_uri', '')} |
|
136 | 136 | ${h.hidden('repo_push_uri', '')} |
|
137 | 137 | % endif |
|
138 | 138 | |
|
139 | 139 | <div class="field"> |
|
140 | 140 | <div class="label"> |
|
141 | 141 | <label for="repo_landing_commit_ref">${_('Landing commit')}:</label> |
|
142 | 142 | </div> |
|
143 | 143 | <div class="select"> |
|
144 | 144 | ${c.form['repo_landing_commit_ref'].render(css_class='medium', oid='repo_landing_commit_ref')|n} |
|
145 | 145 | ${c.form.render_error(request, c.form['repo_landing_commit_ref'])|n} |
|
146 | 146 | <p class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</p> |
|
147 | 147 | </div> |
|
148 | 148 | </div> |
|
149 | 149 | |
|
150 | 150 | <div class="field badged-field"> |
|
151 | 151 | <div class="label"> |
|
152 | 152 | <label for="repo_owner">${_('Owner')}:</label> |
|
153 | 153 | </div> |
|
154 | 154 | <div class="input"> |
|
155 | 155 | <div class="badge-input-container"> |
|
156 | 156 | <div class="user-badge"> |
|
157 | 157 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email or c.rhodecode_db_repo.user.username, show_disabled=not c.rhodecode_db_repo.user.active)} |
|
158 | 158 | </div> |
|
159 | 159 | <div class="badge-input-wrap"> |
|
160 | 160 | ${c.form['repo_owner'].render(css_class='medium', oid='repo_owner')|n} |
|
161 | 161 | </div> |
|
162 | 162 | </div> |
|
163 | 163 | ${c.form.render_error(request, c.form['repo_owner'])|n} |
|
164 | 164 | <p class="help-block">${_('Change owner of this repository.')}</p> |
|
165 | 165 | </div> |
|
166 | 166 | </div> |
|
167 | 167 | |
|
168 | 168 | <div class="field"> |
|
169 | 169 | <div class="label label-textarea"> |
|
170 | 170 | <label for="repo_description">${_('Description')}:</label> |
|
171 | 171 | </div> |
|
172 | 172 | <div class="textarea text-area editor"> |
|
173 | 173 | ${c.form['repo_description'].render(css_class='medium', oid='repo_description')|n} |
|
174 | 174 | ${c.form.render_error(request, c.form['repo_description'])|n} |
|
175 | 175 | |
|
176 | 176 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
177 | <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span> | |
|
177 | <span class="help-block"> | |
|
178 | % if c.visual.stylify_metatags: | |
|
179 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
180 | % else: | |
|
181 | ${_('Plain text format.')} | |
|
182 | % endif | |
|
183 | ${_('Add a README file for longer descriptions')} | |
|
184 | </span> | |
|
178 | 185 | <span id="meta-tags-desc" style="display: none"> |
|
179 | 186 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
180 | 187 | ${dt.metatags_help()} |
|
181 | 188 | </span> |
|
182 | 189 | </div> |
|
183 | 190 | </div> |
|
184 | 191 | |
|
185 | 192 | <div class="field"> |
|
186 | 193 | <div class="label label-checkbox"> |
|
187 | 194 | <label for="${c.form['repo_private'].oid}">${_('Private repository')}:</label> |
|
188 | 195 | </div> |
|
189 | 196 | <div class="checkboxes"> |
|
190 | 197 | ${c.form['repo_private'].render(css_class='medium')|n} |
|
191 | 198 | ${c.form.render_error(request, c.form['repo_private'])|n} |
|
192 | 199 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
193 | 200 | </div> |
|
194 | 201 | </div> |
|
195 | 202 | <div class="field"> |
|
196 | 203 | <div class="label label-checkbox"> |
|
197 | 204 | <label for="${c.form['repo_enable_statistics'].oid}">${_('Enable statistics')}:</label> |
|
198 | 205 | </div> |
|
199 | 206 | <div class="checkboxes"> |
|
200 | 207 | ${c.form['repo_enable_statistics'].render(css_class='medium')|n} |
|
201 | 208 | ${c.form.render_error(request, c.form['repo_enable_statistics'])|n} |
|
202 | 209 | <span class="help-block">${_('Enable statistics window on summary page.')}</span> |
|
203 | 210 | </div> |
|
204 | 211 | </div> |
|
205 | 212 | <div class="field"> |
|
206 | 213 | <div class="label label-checkbox"> |
|
207 | 214 | <label for="${c.form['repo_enable_downloads'].oid}">${_('Enable downloads')}:</label> |
|
208 | 215 | </div> |
|
209 | 216 | <div class="checkboxes"> |
|
210 | 217 | ${c.form['repo_enable_downloads'].render(css_class='medium')|n} |
|
211 | 218 | ${c.form.render_error(request, c.form['repo_enable_downloads'])|n} |
|
212 | 219 | <span class="help-block">${_('Enable download menu on summary page.')}</span> |
|
213 | 220 | </div> |
|
214 | 221 | </div> |
|
215 | 222 | <div class="field"> |
|
216 | 223 | <div class="label label-checkbox"> |
|
217 | 224 | <label for="${c.form['repo_enable_locking'].oid}">${_('Enable automatic locking')}:</label> |
|
218 | 225 | </div> |
|
219 | 226 | <div class="checkboxes"> |
|
220 | 227 | ${c.form['repo_enable_locking'].render(css_class='medium')|n} |
|
221 | 228 | ${c.form.render_error(request, c.form['repo_enable_locking'])|n} |
|
222 | 229 | <span class="help-block">${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}</span> |
|
223 | 230 | </div> |
|
224 | 231 | </div> |
|
225 | 232 | |
|
226 | 233 | %if c.visual.repository_fields: |
|
227 | 234 | ## EXTRA FIELDS |
|
228 | 235 | %for field in c.repo_fields: |
|
229 | 236 | <div class="field"> |
|
230 | 237 | <div class="label"> |
|
231 | 238 | <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label> |
|
232 | 239 | </div> |
|
233 | 240 | <div class="input input-medium"> |
|
234 | 241 | ${h.text(field.field_key_prefixed, field.field_value, class_='medium')} |
|
235 | 242 | %if field.field_desc: |
|
236 | 243 | <span class="help-block">${field.field_desc}</span> |
|
237 | 244 | %endif |
|
238 | 245 | </div> |
|
239 | 246 | </div> |
|
240 | 247 | %endfor |
|
241 | 248 | %endif |
|
242 | 249 | <div class="buttons"> |
|
243 | 250 | ${h.submit('save',_('Save'),class_="btn")} |
|
244 | 251 | ${h.reset('reset',_('Reset'),class_="btn")} |
|
245 | 252 | </div> |
|
246 | 253 | </div> |
|
247 | 254 | </div> |
|
248 | 255 | ${h.end_form()} |
|
249 | 256 | </div> |
|
250 | 257 | </div> |
|
251 | 258 | |
|
252 | 259 | <script> |
|
253 | 260 | $(document).ready(function () { |
|
254 | 261 | var cloneUrl = function ( |
|
255 | 262 | alterButton, editButton, cancelEditButton, |
|
256 | 263 | hiddenUrl, hiddenUrlValue, input, helpBlock, changedFlag) { |
|
257 | 264 | |
|
258 | 265 | var originalText = helpBlock.html(); |
|
259 | 266 | var obfuscatedUrl = hiddenUrlValue.html(); |
|
260 | 267 | |
|
261 | 268 | var edit = function(e) { |
|
262 | 269 | alterButton.show(); |
|
263 | 270 | editButton.hide(); |
|
264 | 271 | hiddenUrl.hide(); |
|
265 | 272 | |
|
266 | 273 | //add the old value next to input for verification |
|
267 | 274 | helpBlock.html("(" + obfuscatedUrl + ")" + "<br\>" + originalText); |
|
268 | 275 | changedFlag.val('MOD'); |
|
269 | 276 | }; |
|
270 | 277 | |
|
271 | 278 | var cancelEdit = function(e) { |
|
272 | 279 | alterButton.hide(); |
|
273 | 280 | editButton.show(); |
|
274 | 281 | hiddenUrl.show(); |
|
275 | 282 | |
|
276 | 283 | helpBlock.html(originalText); |
|
277 | 284 | changedFlag.val('OLD'); |
|
278 | 285 | input.val(''); |
|
279 | 286 | }; |
|
280 | 287 | |
|
281 | 288 | var initEvents = function() { |
|
282 | 289 | editButton.on('click', edit); |
|
283 | 290 | cancelEditButton.on('click', cancelEdit); |
|
284 | 291 | }; |
|
285 | 292 | |
|
286 | 293 | var setInitialState = function() { |
|
287 | 294 | if (input.hasClass('error')) { |
|
288 | 295 | alterButton.show(); |
|
289 | 296 | editButton.hide(); |
|
290 | 297 | hiddenUrl.hide(); |
|
291 | 298 | } |
|
292 | 299 | }; |
|
293 | 300 | |
|
294 | 301 | setInitialState(); |
|
295 | 302 | initEvents(); |
|
296 | 303 | }; |
|
297 | 304 | |
|
298 | 305 | |
|
299 | 306 | var alterButton = $('#alter_clone_uri'); |
|
300 | 307 | var editButton = $('#edit_clone_uri'); |
|
301 | 308 | var cancelEditButton = $('#cancel_edit_clone_uri'); |
|
302 | 309 | var hiddenUrl = $('#clone_uri_hidden'); |
|
303 | 310 | var hiddenUrlValue = $('#clone_uri_hidden_value'); |
|
304 | 311 | var input = $('#clone_uri'); |
|
305 | 312 | var helpBlock = $('#alter_clone_uri_help_block'); |
|
306 | 313 | var changedFlag = $('#repo_clone_uri_change'); |
|
307 | 314 | cloneUrl( |
|
308 | 315 | alterButton, editButton, cancelEditButton, hiddenUrl, |
|
309 | 316 | hiddenUrlValue, input, helpBlock, changedFlag); |
|
310 | 317 | |
|
311 | 318 | var alterButton = $('#alter_push_uri'); |
|
312 | 319 | var editButton = $('#edit_push_uri'); |
|
313 | 320 | var cancelEditButton = $('#cancel_edit_push_uri'); |
|
314 | 321 | var hiddenUrl = $('#push_uri_hidden'); |
|
315 | 322 | var hiddenUrlValue = $('#push_uri_hidden_value'); |
|
316 | 323 | var input = $('#push_uri'); |
|
317 | 324 | var helpBlock = $('#alter_push_uri_help_block'); |
|
318 | 325 | var changedFlag = $('#repo_push_uri_change'); |
|
319 | 326 | cloneUrl( |
|
320 | 327 | alterButton, editButton, cancelEditButton, hiddenUrl, |
|
321 | 328 | hiddenUrlValue, input, helpBlock, changedFlag); |
|
322 | 329 | |
|
323 | 330 | selectMyGroup = function(element) { |
|
324 | 331 | $("#repo_group").val($(element).data('personalGroupId')).trigger("change"); |
|
325 | 332 | }; |
|
326 | 333 | |
|
327 | 334 | UsersAutoComplete('repo_owner', '${c.rhodecode_user.user_id}'); |
|
328 | 335 | }); |
|
329 | 336 | </script> |
@@ -1,164 +1,170 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <div class="panel panel-default user-profile"> |
|
4 | 4 | <div class="panel-heading"> |
|
5 | 5 | <h3 class="panel-title"> |
|
6 | 6 | ${base.gravatar_with_user(c.user.username, 16, tooltip=False, _class='pull-left')} |
|
7 | 7 | - ${_('User Profile')} |
|
8 | 8 | </h3> |
|
9 | 9 | </div> |
|
10 | 10 | <div class="panel-body"> |
|
11 | 11 | <div class="user-profile-content"> |
|
12 | 12 | ${h.secure_form(h.route_path('user_update', user_id=c.user.user_id), class_='form', request=request)} |
|
13 | 13 | <% readonly = None %> |
|
14 | 14 | <% disabled = "" %> |
|
15 | 15 | %if c.extern_type != 'rhodecode': |
|
16 | 16 | <% readonly = "readonly" %> |
|
17 | 17 | <% disabled = " disabled" %> |
|
18 | 18 | <div class="alert-warning" style="margin:0px 0px 20px 0px; padding: 10px"> |
|
19 | 19 | <strong>${_('This user was created from external source (%s). Editing some of the settings is limited.' % c.extern_type)}</strong> |
|
20 | 20 | </div> |
|
21 | 21 | %endif |
|
22 | 22 | <div class="form"> |
|
23 | 23 | <div class="fields"> |
|
24 | 24 | <div class="field"> |
|
25 | 25 | <div class="label photo"> |
|
26 | 26 | ${_('Photo')}: |
|
27 | 27 | </div> |
|
28 | 28 | <div class="input profile"> |
|
29 | 29 | %if c.visual.use_gravatar: |
|
30 | 30 | ${base.gravatar(c.user.email, 100)} |
|
31 | 31 | <p class="help-block">${_('Change the avatar at')} <a href="http://gravatar.com">gravatar.com</a>.</p> |
|
32 | 32 | %else: |
|
33 | 33 | ${base.gravatar(c.user.email, 100)} |
|
34 | 34 | %endif |
|
35 | 35 | </div> |
|
36 | 36 | </div> |
|
37 | 37 | <div class="field"> |
|
38 | 38 | <div class="label"> |
|
39 | 39 | ${_('Username')}: |
|
40 | 40 | </div> |
|
41 | 41 | <div class="input"> |
|
42 | 42 | ${h.text('username', class_='%s medium' % disabled, readonly=readonly)} |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 | <div class="field"> |
|
46 | 46 | <div class="label"> |
|
47 | 47 | <label for="name">${_('First Name')}:</label> |
|
48 | 48 | </div> |
|
49 | 49 | <div class="input"> |
|
50 | 50 | ${h.text('firstname', class_="medium")} |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | |
|
54 | 54 | <div class="field"> |
|
55 | 55 | <div class="label"> |
|
56 | 56 | <label for="lastname">${_('Last Name')}:</label> |
|
57 | 57 | </div> |
|
58 | 58 | <div class="input"> |
|
59 | 59 | ${h.text('lastname', class_="medium")} |
|
60 | 60 | </div> |
|
61 | 61 | </div> |
|
62 | 62 | |
|
63 | 63 | <div class="field"> |
|
64 | 64 | <div class="label"> |
|
65 | 65 | <label for="email">${_('Email')}:</label> |
|
66 | 66 | </div> |
|
67 | 67 | <div class="input"> |
|
68 | 68 | ## we should be able to edit email ! |
|
69 | 69 | ${h.text('email', class_="medium")} |
|
70 | 70 | </div> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="field"> |
|
73 | 73 | <div class="label"> |
|
74 | 74 | <label for="description">${_('Description')}:</label> |
|
75 | 75 | </div> |
|
76 | 76 | <div class="input textarea editor"> |
|
77 | 77 | ${h.textarea('description', rows=10, class_="medium")} |
|
78 | 78 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
79 | <span class="help-block">${_('Plain text format with support of {metatags}.').format(metatags=metatags_url)|n}</span> | |
|
79 | <span class="help-block"> | |
|
80 | % if c.visual.stylify_metatags: | |
|
81 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
82 | % else: | |
|
83 | ${_('Plain text format.')} | |
|
84 | % endif | |
|
85 | </span> | |
|
80 | 86 | <span id="meta-tags-desc" style="display: none"> |
|
81 | 87 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
82 | 88 | ${dt.metatags_help()} |
|
83 | 89 | </span> |
|
84 | 90 | </div> |
|
85 | 91 | </div> |
|
86 | 92 | <div class="field"> |
|
87 | 93 | <div class="label"> |
|
88 | 94 | ${_('New Password')}: |
|
89 | 95 | </div> |
|
90 | 96 | <div class="input"> |
|
91 | 97 | ${h.password('new_password',class_='%s medium' % disabled,autocomplete="off",readonly=readonly)} |
|
92 | 98 | </div> |
|
93 | 99 | </div> |
|
94 | 100 | <div class="field"> |
|
95 | 101 | <div class="label"> |
|
96 | 102 | ${_('New Password Confirmation')}: |
|
97 | 103 | </div> |
|
98 | 104 | <div class="input"> |
|
99 | 105 | ${h.password('password_confirmation',class_="%s medium" % disabled,autocomplete="off",readonly=readonly)} |
|
100 | 106 | </div> |
|
101 | 107 | </div> |
|
102 | 108 | <div class="field"> |
|
103 | 109 | <div class="label-text"> |
|
104 | 110 | ${_('Active')}: |
|
105 | 111 | </div> |
|
106 | 112 | <div class="input user-checkbox"> |
|
107 | 113 | ${h.checkbox('active',value=True)} |
|
108 | 114 | </div> |
|
109 | 115 | </div> |
|
110 | 116 | <div class="field"> |
|
111 | 117 | <div class="label-text"> |
|
112 | 118 | ${_('Super-admin')}: |
|
113 | 119 | </div> |
|
114 | 120 | <div class="input user-checkbox"> |
|
115 | 121 | ${h.checkbox('admin',value=True)} |
|
116 | 122 | </div> |
|
117 | 123 | </div> |
|
118 | 124 | <div class="field"> |
|
119 | 125 | <div class="label-text"> |
|
120 | 126 | ${_('Authentication type')}: |
|
121 | 127 | </div> |
|
122 | 128 | <div class="input"> |
|
123 | 129 | ${h.select('extern_type', c.extern_type, c.allowed_extern_types)} |
|
124 | 130 | <p class="help-block">${_('When user was created using an external source. He is bound to authentication using this method.')}</p> |
|
125 | 131 | </div> |
|
126 | 132 | </div> |
|
127 | 133 | <div class="field"> |
|
128 | 134 | <div class="label-text"> |
|
129 | 135 | ${_('Name in Source of Record')}: |
|
130 | 136 | </div> |
|
131 | 137 | <div class="input"> |
|
132 | 138 | <p>${c.extern_name}</p> |
|
133 | 139 | ${h.hidden('extern_name', readonly="readonly")} |
|
134 | 140 | </div> |
|
135 | 141 | </div> |
|
136 | 142 | <div class="field"> |
|
137 | 143 | <div class="label"> |
|
138 | 144 | ${_('Language')}: |
|
139 | 145 | </div> |
|
140 | 146 | <div class="input"> |
|
141 | 147 | ## allowed_languages is defined in the users.py |
|
142 | 148 | ## c.language comes from base.py as a default language |
|
143 | 149 | ${h.select('language', c.language, c.allowed_languages)} |
|
144 | 150 | <p class="help-block">${h.literal(_('User interface language. Help translate %(rc_link)s into your language.') % {'rc_link': h.link_to('RhodeCode Enterprise', h.route_url('rhodecode_translations'))})}</p> |
|
145 | 151 | </div> |
|
146 | 152 | </div> |
|
147 | 153 | <div class="buttons"> |
|
148 | 154 | ${h.submit('save', _('Save'), class_="btn")} |
|
149 | 155 | ${h.reset('reset', _('Reset'), class_="btn")} |
|
150 | 156 | </div> |
|
151 | 157 | </div> |
|
152 | 158 | </div> |
|
153 | 159 | ${h.end_form()} |
|
154 | 160 | </div> |
|
155 | 161 | </div> |
|
156 | 162 | </div> |
|
157 | 163 | |
|
158 | 164 | <script> |
|
159 | 165 | $('#language').select2({ |
|
160 | 166 | 'containerCssClass': "drop-menu", |
|
161 | 167 | 'dropdownCssClass': "drop-menu-dropdown", |
|
162 | 168 | 'dropdownAutoWidth': true |
|
163 | 169 | }); |
|
164 | 170 | </script> |
@@ -1,117 +1,124 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('Fork repository %s') % c.repo_name} |
|
6 | 6 | %if c.rhodecode_name: |
|
7 | 7 | · ${h.branding(c.rhodecode_name)} |
|
8 | 8 | %endif |
|
9 | 9 | </%def> |
|
10 | 10 | |
|
11 | 11 | <%def name="breadcrumbs_links()"></%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="menu_bar_nav()"> |
|
14 | 14 | ${self.menu_items(active='repositories')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="menu_bar_subnav()"> |
|
18 | 18 | ${self.repo_menu(active='options')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <div class="box"> |
|
23 | 23 | ${h.secure_form(h.route_path('repo_fork_create',repo_name=c.rhodecode_db_repo.repo_name), request=request)} |
|
24 | 24 | <div class="form"> |
|
25 | 25 | <!-- fields --> |
|
26 | 26 | <div class="fields"> |
|
27 | 27 | |
|
28 | 28 | <div class="field"> |
|
29 | 29 | <div class="label"> |
|
30 | 30 | <label for="repo_name">${_('Fork name')}:</label> |
|
31 | 31 | </div> |
|
32 | 32 | <div class="input"> |
|
33 | 33 | ${h.text('repo_name', class_="medium")} |
|
34 | 34 | ${h.hidden('repo_type',c.rhodecode_db_repo.repo_type)} |
|
35 | 35 | ${h.hidden('fork_parent_id',c.rhodecode_db_repo.repo_id)} |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
|
38 | 38 | |
|
39 | 39 | <div class="field"> |
|
40 | 40 | <div class="label"> |
|
41 | 41 | <label for="repo_group">${_('Repository group')}:</label> |
|
42 | 42 | </div> |
|
43 | 43 | <div class="select"> |
|
44 | 44 | ${h.select('repo_group','',c.repo_groups,class_="medium")} |
|
45 | 45 | % if c.personal_repo_group: |
|
46 | 46 | <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}"> |
|
47 | 47 | ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}} |
|
48 | 48 | </a> |
|
49 | 49 | % endif |
|
50 | 50 | <span class="help-block">${_('Optionally select a group to put this repository into.')}</span> |
|
51 | 51 | </div> |
|
52 | 52 | </div> |
|
53 | 53 | |
|
54 | 54 | <div class="field"> |
|
55 | 55 | <div class="label label-textarea"> |
|
56 | 56 | <label for="description">${_('Description')}:</label> |
|
57 | 57 | </div> |
|
58 | 58 | <div class="textarea editor"> |
|
59 | 59 | ${h.textarea('description',cols=23,rows=5,class_="medium")} |
|
60 | 60 | <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %> |
|
61 | <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span> | |
|
61 | <span class="help-block"> | |
|
62 | % if c.visual.stylify_metatags: | |
|
63 | ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} | |
|
64 | % else: | |
|
65 | ${_('Plain text format.')} | |
|
66 | % endif | |
|
67 | ${_('Add a README file for longer descriptions')} | |
|
68 | </span> | |
|
62 | 69 | <span id="meta-tags-desc" style="display: none"> |
|
63 | 70 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
64 | 71 | ${dt.metatags_help()} |
|
65 | 72 | </span> |
|
66 | 73 | </div> |
|
67 | 74 | </div> |
|
68 | 75 | |
|
69 | 76 | <div class="field"> |
|
70 | 77 | <div class="label label-checkbox"> |
|
71 | 78 | <label for="private">${_('Copy permissions')}:</label> |
|
72 | 79 | </div> |
|
73 | 80 | <div class="checkboxes"> |
|
74 | 81 | ${h.checkbox('copy_permissions',value="True", checked="checked")} |
|
75 | 82 | <span class="help-block">${_('Copy permissions from parent repository.')}</span> |
|
76 | 83 | </div> |
|
77 | 84 | </div> |
|
78 | 85 | |
|
79 | 86 | <div class="field"> |
|
80 | 87 | <div class="label label-checkbox"> |
|
81 | 88 | <label for="private">${_('Private')}:</label> |
|
82 | 89 | </div> |
|
83 | 90 | <div class="checkboxes"> |
|
84 | 91 | ${h.checkbox('private',value="True")} |
|
85 | 92 | <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span> |
|
86 | 93 | </div> |
|
87 | 94 | </div> |
|
88 | 95 | |
|
89 | 96 | <div class="buttons"> |
|
90 | 97 | ${h.submit('',_('Fork this Repository'),class_="btn")} |
|
91 | 98 | </div> |
|
92 | 99 | </div> |
|
93 | 100 | </div> |
|
94 | 101 | ${h.end_form()} |
|
95 | 102 | </div> |
|
96 | 103 | <script> |
|
97 | 104 | $(document).ready(function(){ |
|
98 | 105 | $("#repo_group").select2({ |
|
99 | 106 | 'dropdownAutoWidth': true, |
|
100 | 107 | 'containerCssClass': "drop-menu", |
|
101 | 108 | 'dropdownCssClass': "drop-menu-dropdown", |
|
102 | 109 | 'width': "resolve" |
|
103 | 110 | }); |
|
104 | 111 | $("#landing_rev").select2({ |
|
105 | 112 | 'containerCssClass': "drop-menu", |
|
106 | 113 | 'dropdownCssClass': "drop-menu-dropdown", |
|
107 | 114 | 'minimumResultsForSearch': -1 |
|
108 | 115 | }); |
|
109 | 116 | $('#repo_name').focus(); |
|
110 | 117 | |
|
111 | 118 | $('#select_my_group').on('click', function(e){ |
|
112 | 119 | e.preventDefault(); |
|
113 | 120 | $("#repo_group").val($(this).data('personalGroupId')).trigger("change"); |
|
114 | 121 | }) |
|
115 | 122 | }) |
|
116 | 123 | </script> |
|
117 | 124 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now