diff rhodecode/templates/admin/settings/settings.html @ 4116:ffd45b185016 rhodecode-2.2.5-gpl

Imported some of the GPLv3'd changes from RhodeCode v2.2.5. This imports changes between changesets 21af6c4eab3d and 6177597791c2 in RhodeCode's original repository, including only changes to Python files and HTML. RhodeCode clearly licensed its changes to these files under GPLv3 in their /LICENSE file, which states the following: The Python code and integrated HTML are licensed under the GPLv3 license. (See: https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE or http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE for an online copy of that LICENSE file) Conservancy reviewed these changes and confirmed that they can be licensed as a whole to the Kallithea project under GPLv3-only. While some of the contents committed herein are clearly licensed GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the statement above from RhodeCode indicates that they intend GPLv3-only as their license, per GPLv3ยง14 and other relevant sections of GPLv3.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:03:13 -0400
parents 38ab60c1fb2b
children 31e119cb02ef
line wrap: on
line diff
--- a/rhodecode/templates/admin/settings/settings.html	Wed Jul 02 19:03:10 2014 -0400
+++ b/rhodecode/templates/admin/settings/settings.html	Wed Jul 02 19:03:13 2014 -0400
@@ -2,7 +2,10 @@
 <%inherit file="/base/base.html"/>
 
 <%def name="title()">
-    ${_('Settings administration')} &middot; ${c.rhodecode_name}
+    ${_('Settings administration')}
+    %if c.rhodecode_name:
+        &middot; ${c.rhodecode_name}
+    %endif
 </%def>
 
 <%def name="breadcrumbs_links()">
@@ -17,351 +20,39 @@
 
 <%def name="main()">
 <div class="box">
-    <!-- box / title -->
     <div class="title">
         ${self.breadcrumbs()}
     </div>
-    <!-- end box / title -->
-
-    <h3>${_('Remap and rescan repositories')}</h3>
-    ${h.form(url('admin_setting', setting_id='mapping'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-            <div class="field">
-                <div class="label label-checkbox">
-                    <label for="destroy">${_('Rescan option')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('destroy',True)}
-                        <label for="destroy">
-                        <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}">
-                        ${_('Destroy old data')}</span> </label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('invalidate',True)}
-                        <label for="invalidate">
-                        <span class="tooltip" title="${h.tooltip(_('Invalidate cache for all repositories during scan'))}">
-                        ${_('Invalidate cache for all repositories')}</span> </label>
-                    </div>
-                    <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span>
-                </div>
-            </div>
-
-            <div class="buttons">
-            ${h.submit('rescan',_('Rescan repositories'),class_="ui-btn large")}
-            </div>
-        </div>
-    </div>
-    ${h.end_form()}
-
-    <h3>${_('Whoosh indexing')}</h3>
-    ${h.form(url('admin_setting', setting_id='whoosh'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-            <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Index build option')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('full_index',True)}
-                        <label for="full_index">${_('Build from scratch')}</label>
-                    </div>
-                </div>
-            </div>
-
-            <div class="buttons">
-            ${h.submit('reindex',_('Reindex'),class_="ui-btn large")}
-            </div>
-        </div>
-    </div>
-    ${h.end_form()}
-
-    <h3>${_('Global application settings')}</h3>
-    ${h.form(url('admin_setting', setting_id='global'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-
-             <div class="field">
-                <div class="label">
-                    <label for="rhodecode_title">${_('Site branding')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('rhodecode_title',size=30)}
-                </div>
-             </div>
-
-            <div class="field">
-                <div class="label">
-                    <label for="rhodecode_realm">${_('HTTP authentication realm')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('rhodecode_realm',size=30)}
-                </div>
-            </div>
-
-            <div class="field">
-                <div class="label">
-                    <label for="rhodecode_ga_code">${_('Google Analytics code')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('rhodecode_ga_code',size=30)}
-                </div>
-            </div>
-
-            <div class="buttons">
-                ${h.submit('save',_('Save settings'),class_="ui-btn large")}
-                ${h.reset('reset',_('Reset'),class_="ui-btn large")}
-           </div>
-        </div>
-    </div>
-    ${h.end_form()}
-
-    <h3>${_('Visualisation settings')}</h3>
-    ${h.form(url('admin_setting', setting_id='visual'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-             <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('General')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('rhodecode_repository_fields','True')}
-                        <label for="rhodecode_repository_fields">${_('Use repository extra fields')}</label>
-                    </div>
-                    <span class="help-block">${_('Allows storing additional customized fields per repository.')}</span>
-                    <div class="checkbox">
-                        ${h.checkbox('rhodecode_show_version','True')}
-                        <label for="rhodecode_show_version">${_('Show RhodeCode version')}</label>
-                    </div>
-                    <span class="help-block">${_('Shows or hides displayed version of RhodeCode in the footer')}</span>
-                </div>
-             </div>
-            <div class="field">
-                <div class="label">
-                    <label for="rhodecode_realm">${_('Dashboard items')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('rhodecode_dashboard_items',size=5)}
-                    <span class="help-block">${_('Number of items displayed in lightweight dashboard before pagination is shown.')}</span>
-                </div>
-            </div>
-             <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Icons')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('rhodecode_show_public_icon','True')}
-                        <label for="rhodecode_show_public_icon">${_('Show public repo icon on repositories')}</label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('rhodecode_show_private_icon','True')}
-                        <label for="rhodecode_show_private_icon">${_('Show private repo icon on repositories')}</label>
-                    </div>
-                    <span class="help-block">${_('Show public/private icons next to repositories names')}</span>
-                 </div>
-             </div>
 
-             <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Meta-Tagging')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('rhodecode_stylify_metatags','True')}
-                        <label for="rhodecode_stylify_metatags">${_('Stylify recognised metatags:')}</label>
-                    </div>
-                    <div style="padding-left: 20px;">
-                        <ul> <!-- Fix style here -->
-                            <li>[featured] <span class="metatag" tag="featured">featured</span></li>
-                            <li>[stale] <span class="metatag" tag="stale">stale</span></li>
-                            <li>[dead] <span class="metatag" tag="dead">dead</span></li>
-                            <li>[lang =&gt; lang] <span class="metatag" tag="lang" >lang</span></li>
-                            <li>[license =&gt; License] <span class="metatag" tag="license"><a href="http://www.opensource.org/licenses/License" >License</a></span></li>
-                            <li>[requires =&gt; Repo] <span class="metatag" tag="requires" >requires =&gt; <a href="#" >Repo</a></span></li>
-                            <li>[recommends =&gt; Repo] <span class="metatag" tag="recommends" >recommends =&gt; <a href="#" >Repo</a></span></li>
-                            <li>[see =&gt; URI] <span class="metatag" tag="see">see =&gt; <a href="#">URI</a> </span></li>
-                        </ul>
-                    </div>
-                 </div>
-             </div>
-
-             <div class="buttons">
-                 ${h.submit('save',_('Save settings'),class_="ui-btn large")}
-                 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
-             </div>
-
-        </div>
-    </div>
-    ${h.end_form()}
-
-
-    <h3>${_('VCS settings')}</h3>
-    ${h.form(url('admin_setting', setting_id='vcs'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-
-            <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Web')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('web_push_ssl', 'True')}
-                        <label for="web_push_ssl">${_('Require SSL for vcs operations')}</label>
-                    </div>
-                    <span class="help-block">${_('RhodeCode will require SSL for pushing or pulling. If SSL is missing it will return HTTP Error 406: Not Acceptable')}</span>
-                </div>
-             </div>
+    ##main
+    <div style="width: 150px; float:left">
+        <ul class="nav nav-pills nav-stacked">
+          <li>
+           <div class="gravatar_box" style="height: 26px">
+               <div class="gravatar" style="float: left">
+                <i class="icon-cog" style="font-size: 26px"></i>
+               </div>
+               <div style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left">
+                <strong>${_('Settings')}</strong>
+               </div>
+           </div>
+          </li>
+          <li class="${'active' if c.active=='vcs' else ''}"><a href="${h.url('admin_settings')}">${_('VCS')}</a></li>
+          <li class="${'active' if c.active=='mapping' else ''}"><a href="${h.url('admin_settings_mapping')}">${_('Remap and rescan')}</a></li>
+          <li class="${'active' if c.active=='global' else ''}"><a href="${h.url('admin_settings_global')}">${_('Global')}</a></li>
+          <li class="${'active' if c.active=='visual' else ''}"><a href="${h.url('admin_settings_visual')}">${_('Visual')}</a></li>
+          <li class="${'active' if c.active=='email' else ''}"><a href="${h.url('admin_settings_email')}">${_('Email')}</a></li>
+          <li class="${'active' if c.active=='hooks' else ''}"><a href="${h.url('admin_settings_hooks')}">${_('Hooks')}</a></li>
+          <li class="${'active' if c.active=='search' else ''}"><a href="${h.url('admin_settings_search')}">${_('Full text search')}</a></li>
+          <li class="${'active' if c.active=='system' else ''}"><a href="${h.url('admin_settings_system')}">${_('System Info')}</a></li>
+          <li class="${'active' if c.active=='license' else ''}"><a href="${h.url('admin_settings_license')}">${_('License')}</a></li>
 
-             <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Hooks')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('hooks_changegroup_update','True')}
-                        <label for="hooks_changegroup_update">${_('Update repository after push (hg update)')}</label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('hooks_changegroup_repo_size','True')}
-                        <label for="hooks_changegroup_repo_size">${_('Show repository size after push')}</label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('hooks_changegroup_push_logger','True')}
-                        <label for="hooks_changegroup_push_logger">${_('Log user push commands')}</label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('hooks_outgoing_pull_logger','True')}
-                        <label for="hooks_outgoing_pull_logger">${_('Log user pull commands')}</label>
-                    </div>
-                </div>
-                <div class="input" style="margin-top:10px">
-                    ${h.link_to(_('Advanced setup'),url('admin_edit_setting',setting_id='hooks'))}
-                </div>
-             </div>
-             <div class="field">
-                <div class="label label-checkbox">
-                    <label>${_('Mercurial Extensions')}:</label>
-                </div>
-                <div class="checkboxes">
-                    <div class="checkbox">
-                        ${h.checkbox('extensions_largefiles','True')}
-                        <label for="extensions_largefiles">${_('Enable largefiles extension')}</label>
-                    </div>
-                    <div class="checkbox">
-                        ${h.checkbox('extensions_hgsubversion','True')}
-                        <label for="extensions_hgsubversion">${_('Enable hgsubversion extension')}</label>
-                    </div>
-                    <span class="help-block">${_('Requires hgsubversion library installed. Allows cloning from svn remote locations')}</span>
-                    ##<div class="checkbox">
-                    ##    ${h.checkbox('extensions_hggit','True')}
-                    ##    <label for="extensions_hggit">${_('Enable hg-git extension')}</label>
-                    ##</div>
-                    ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span>
-                </div>
-            </div>
-            %if c.visual.allow_repo_location_change:
-            <div class="field">
-                <div class="label">
-                    <label for="paths_root_path">${_('Repositories location')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('paths_root_path',size=30,readonly="readonly", class_="disabled")}
-                    <span id="path_unlock" class="tooltip" style="cursor: pointer"
-                            title="${h.tooltip(_('Click to unlock. You must restart RhodeCode in order to make this setting take effect.'))}">
-                        ${_('Unlock')}
-                    </span>
-                    <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span>
-                </div>
-            </div>
-            %else:
-            ## form still requires this but we cannot internally change it anyway
-            ${h.hidden('paths_root_path',size=30,readonly="readonly", class_="disabled")}
-            %endif
-            <div class="buttons">
-                ${h.submit('save',_('Save settings'),class_="ui-btn large")}
-                ${h.reset('reset',_('Reset'),class_="ui-btn large")}
-           </div>
-        </div>
-    </div>
-    ${h.end_form()}
-
-    <script type="text/javascript">
-        YAHOO.util.Event.onDOMReady(function(){
-            YUE.on('path_unlock','click',function(){
-                YUD.get('paths_root_path').removeAttribute('readonly');
-                YUD.removeClass('paths_root_path', 'disabled')
-            });
-        });
-    </script>
-
-    <h3>${_('Test Email')}</h3>
-    ${h.form(url('admin_setting', setting_id='email'),method='put')}
-    <div class="form">
-        <!-- fields -->
-
-        <div class="fields">
-            <div class="field">
-                <div class="label">
-                    <label for="test_email">${_('Email to')}:</label>
-                </div>
-                <div class="input">
-                    ${h.text('test_email',size=30)}
-                </div>
-            </div>
-
-            <div class="buttons">
-            ${h.submit('send',_('Send'),class_="ui-btn large")}
-            </div>
-        </div>
-    </div>
-    ${h.end_form()}
-
-    <h3>${_('System Info and Packages')}</h3>
-    <div class="form">
-      <div>
-        <h5 id="expand_modules" style="cursor: pointer">&darr; ${_('Show')} &darr;</h5>
-      </div>
-      <div id="expand_modules_table"  style="display:none">
-      <h5>Python - ${c.py_version}</h5>
-      <h5>System - ${c.platform}</h5>
-
-      <table class="table" style="margin:0px 0px 0px 20px">
-          <colgroup>
-              <col style="width:220px">
-          </colgroup>
-          <tbody>
-              %for key, value in c.modules:
-                  <tr>
-                      <th style="text-align: right;padding-right:5px;">${key}</th>
-                      <td>${value}</td>
-                  </tr>
-              %endfor
-          </tbody>
-      </table>
-      </div>
+        </ul>
     </div>
 
-    <script type="text/javascript">
-    YUE.on('expand_modules','click',function(e){
-            YUD.setStyle('expand_modules_table','display','');
-            YUD.setStyle('expand_modules','display','none');
-    })
-    </script>
+    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
+        <%include file="/admin/settings/settings_${c.active}.html"/>
+    </div>
+</div>
 
-</div>
 </%def>