Changeset - 727119201a42
[Not reviewed]
beta
0 2 0
Mads Kiilerich - 13 years ago 2013-03-26 17:16:04
madski@unity3d.com
repository: cleanup and alignment of repository editing templates

Too much duplicated code.
2 files changed with 24 insertions and 22 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/admin/repos/repo_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
##
 
## See also repo_settings.html
 
##
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
@@ -152,6 +155,7 @@ ${self.context_bar('options')}
 
                <div class="input">
 
                    <%include file="repo_edit_perms.html"/>
 
                </div>
 
            </div>
 

	
 
                <div class="buttons">
 
                  ${h.submit('save',_('Save'),class_="ui-btn large")}
 
@@ -159,7 +163,6 @@ ${self.context_bar('options')}
 
                </div>
 
            </div>
 
    </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
@@ -291,19 +294,24 @@ ${self.context_bar('options')}
 
        ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
 
        <div class="form">
 
           <div class="fields">
 
            <div class="field" style="border:none;color:#888">
 
##              <div class="label">
 
##                  <label for="">${_('Remove repository')}:</label>
 
##              </div>
 
                <div class="checkboxes">
 
               ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
 
              %if c.repo_info.forks.count():
 
                    - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
 
                    <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
 
                    <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
 
              %endif
 
           </div>
 
           <div class="field" style="border:none;color:#888">
 
           <ul>
 
                <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
 
           </ul>
 
           </div>
 
        </div>
 
        </div>
 
    </div>
 
        ${h.end_form()}
 
</div>
 

	
rhodecode/templates/settings/repo_settings.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
##
 
## See also repo_edit.html
 
##
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
@@ -30,8 +33,8 @@
 
                <div class="label">
 
                    <label for="repo_name">${_('Name')}:</label>
 
                </div>
 
                <div class="input input-medium">
 
                    ${h.text('repo_name',class_="small")}
 
                <div class="input">
 
                    ${h.text('repo_name',class_="medium")}
 
                </div>
 
             </div>
 
           <div class="field">
 
@@ -96,10 +99,9 @@
 
               </div>
 
            %endfor
 
            %endif
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="">${_('Permissions')}:</label>
 
                    <label for="input">${_('Permissions')}:</label>
 
                </div>
 
                <div class="input">
 
                    <%include file="../admin/repos/repo_edit_perms.html"/>
 
@@ -112,35 +114,27 @@
 
            </div>
 

	
 
    </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<h3>${_('Delete repository')}</h3>
 
    <h3>${_('Delete')}</h3>
 
    ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
 
<div class="form">
 
    <!-- fields -->
 
    <div class="fields">
 

	
 
        <div class="field">
 
            <div class="field" style="border:none;color:#888">
 
            <div class="label">
 
                <label for="">${_('Remove repo')}:</label>
 
                    <label for="">${_('Remove repository')}:</label>
 
            </div>
 
            <div class="checkboxes">
 
              ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
 
              <div class="">
 
                 <div class="fields">
 
                     ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
 
                 </div>
 
                 <div class="field" style="border:none;color:#888">
 
                 <ul>
 
                    <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need fully delete it from file system please do it manually')}</li>
 
                        <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
 
                 </ul>
 
                 </div>
 
              </div>
 
              ${h.end_form()}
 
            </div>
 
        </div>
 
   </div>
 
</div>
 
    ${h.end_form()}
 

	
 
</div>
 
</%def>
0 comments (0 inline, 0 general)