Files @ 9447a8b26da0
Branch filter:

Location: kallithea/kallithea/templates/admin/repos/repo_edit_advanced.html

Mads Kiilerich
style: consistently use label markup wrapping around input elements

The 'for="..."' markup is error prone.
<h3>${_('Parent')}</h3>
${h.form(url('edit_repo_advanced_fork', repo_name=c.repo_info.repo_name))}
<div class="form">
       ${h.select('id_fork_of','',c.repos_list)}
       ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('Set'),class_="btn btn-default btn-sm")}
       <div class="text-muted" style="border:none">
       <ul>
            <li>${_('''Manually set this repository as a fork of another from the list.''')}</li>
       </ul>
       </div>
</div>
${h.end_form()}

<script>
    $(document).ready(function(){
        $("#id_fork_of").select2({
            'dropdownAutoWidth': true
        });
    });
</script>

<h3>${_('Public Journal Visibility')}</h3>
${h.form(url('edit_repo_advanced_journal', repo_name=c.repo_info.repo_name))}
<div class="form">
  <div>
  %if c.in_public_journal:
    <button class="btn btn-default btn-sm" type="submit">
        <i class="icon-minus"></i>
        ${_('Remove from public journal')}
    </button>
  %else:
    <button class="btn btn-default btn-sm" type="submit">
        <i class="icon-plus"></i>
        ${_('Add to Public Journal')}
    </button>
  %endif
  </div>
 <div class="text-muted" style="border:none">
 <ul>
      <li>${_('All actions done in this repository will be visible to everyone in the public journal.')}</li>
 </ul>
 </div>
</div>
${h.end_form()}

<h3>${_('Change Locking')}</h3>
${h.form(url('edit_repo_advanced_locking', repo_name=c.repo_info.repo_name))}
<div class="form">
      %if c.repo_info.locked[0]:
        ${h.hidden('set_unlock', '1')}
        <button class="btn btn-default btn-sm" type="submit"
                onclick="return confirm('${_('Confirm to unlock repository.')}');">
            <i class="icon-lock-open-alt"></i>
            ${_('Unlock Repository')}
        </button>
       ${_('Locked by %s on %s') % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
      %else:
        ${h.hidden('set_lock', '1')}
        <button class="btn btn-default btn-sm" type="submit"
                onclick="return confirm('${_('Confirm to lock repository.')}');">
            <i class="icon-lock"></i>
            ${_('Lock Repository')}
        </button>
        ${_('Repository is not locked')}
      %endif
   <div class="text-muted" style="border:none">
   <ul>
        <li>${_('Force locking on the repository. Works only when anonymous access is disabled. Triggering a pull locks the repository.  The user who is pulling locks the repository; only the user who pulled and locked it can unlock it by doing a push.')}
        </li>
   </ul>
   </div>
</div>
${h.end_form()}

<h3>${_('Delete')}</h3>
${h.form(url('delete_repo', repo_name=c.repo_name))}
<div class="form">
    <button class="btn btn-danger btn-sm" type="submit"
            onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');">
        <i class="icon-minus-circled"></i>
        ${_('Delete this Repository')}
    </button>
    %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()}
        <label>
            <input type="radio" name="forks" value="detach_forks" checked="checked"/>
            ${_('Detach forks')}
        </label>
        <label>
            <input type="radio" name="forks" value="delete_forks" />
            ${_('Delete forks')}
        </label>
    %endif
    <div class="text-muted" style="border:none">
        <ul>
        <li>${_('The deleted repository will be moved away and hidden until the administrator expires it. The administrator can both permanently delete it or restore it.')}</li>
        </ul>
    </div>
</div>
${h.end_form()}