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