Commits

Olemis Lang  committed 6f592d1

BH Theme #248 : Rebase patches for #248 against r1433074

  • Participants
  • Parent commits 3459851
  • Branches t248_admin_vcs_v2

Comments (0)

Files changed (2)

+t248/t248_r1433074_admin_vcs_v2.diff

File t248/t248_r1433074_admin_vcs_v2.diff

+# HG changeset patch
+# Parent 843c80a5433534853ff06399c15d76138801d11d
+BH Theme #248 : Stacked sections in repositories admin panel
+
+diff -r 843c80a54335 bloodhound_theme/bhtheme/templates/bh_admin_repositories.html
+--- a/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html	Sat Oct 27 18:15:42 2012 -0500
++++ b/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html	Sat Oct 27 19:10:20 2012 -0500
+@@ -33,33 +33,25 @@
+     <h2>Manage Repositories</h2>
+ 
+     <py:def function="type_field(editable, selected=None)">
+-      <div class="control-group">
+         <label class="control-label" for="trac-typetype">Type:</label>
+-        <div class="controls">
+-          <select class="input-medium" size="1" id="trac-type" name="type"
+-              disabled="${not editable or None}">
+-            <option py:for="type in types" value="$type" selected="${type == selected or None}">${type or _('(default)')}</option>
+-            <option py:if="selected and selected not in types" selected="selected">$selected</option>
+-          </select>
+-          <p class="help-block">
+-            <span class="label label-info">Default</span> $default_type
+-          </p>
+-        </div>
+-      </div>
++        <select class="input-medium" size="1" id="trac-type" name="type"
++            disabled="${not editable or None}">
++          <option py:for="type in types" value="$type" selected="${type == selected or None}">${type or _('(default)')}</option>
++          <option py:if="selected and selected not in types" selected="selected">$selected</option>
++        </select>
++        <p class="help-block" style="display: inline">
++          <span class="label label-info">Default</span> $default_type
++        </p>
+     </py:def>
+ 
+     <py:def function="alias_field(editable, selected=None)">
+-      <div class="control-group">
+-        <label class="control-label" for="trac-repository">Repository:</label>
+-        <div class="controls">
+-          <select class="input-medium" size="1" id="trac-repository"
+-              name="alias" disabled="${not editable or None}">
+-            <option py:for="(reponame, info) in sorted(repositories.iteritems())" py:if="not info.alias"
+-                    value="$info.name" selected="${info.name == selected or None}">${info.name or _('(default)')}</option>
+-            <option py:if="selected is not None and selected not in repositories" selected="selected">$selected</option>
+-          </select>
+-        </div>
+-      </div>
++      <label class="control-label" for="trac-repository">Repository:</label>
++      <select class="input-medium" size="1" id="trac-repository"
++          name="alias" disabled="${not editable or None}">
++        <option py:for="(reponame, info) in sorted(repositories.iteritems())" py:if="not info.alias"
++                value="$info.name" selected="${info.name == selected or None}">${info.name or _('(default)')}</option>
++        <option py:if="selected is not None and selected not in repositories" selected="selected">$selected</option>
++      </select>
+     </py:def>
+ 
+     <py:choose test="view">
+@@ -136,7 +128,44 @@
+ 
+       <py:otherwise>
+         <div class="row">
+-          <div class="span6">
++          <div class="span9">
++            <form class="well form-inline" id="trac-addrepos" method="post" action="">
++              <fieldset>
++                <legend>Add Repository:</legend>
++                <div class="control-group">
++                  <label for="name">Name:</label>
++                  <input class="input-medium" type="text" id="name" name="name"/>
++                  ${type_field(True)}
++                </div>
++                <div class="control-group">
++                  <label for="dir">Directory:</label>
++                  <input class="input-xxlarge" type="text" id="dir" name="dir"/>
++                </div>
++                <div class="control-group">
++                  <input class="btn" type="submit" name="add_repos"
++                      value="${_('Add')}"/>
++                </div>
++              </fieldset>
++            </form>
++
++            <form py:if="any(not info.alias for info in repositories.itervalues())"
++                  class="well form-inline" id="trac-addalias" method="post" action="">
++              <fieldset>
++                <legend>Add Alias:</legend>
++                <div class="control-group">
++                  <label for="alias_name">Name:</label>
++                  <input class="input-medium" type="text" id="alias_name" 
++                      name="name"/>
++                  ${alias_field(True)}
++                </div>
++                <div class="control-group">
++                  <input class="btn" type="submit" name="add_alias"
++                      value="${_('Add')}"/>
++                </div>
++              </fieldset>
++            </form>
++          </div>
++          <div class="span9">
+     
+             <form id="trac-repository_table" method="post" action="">
+               <table id="trac-reposlist"
+@@ -170,37 +199,6 @@
+               </div>
+             </form>
+           </div>
+-          <div class="span3">
+-            <form class="well" id="trac-addrepos" method="post" action="">
+-              <fieldset>
+-                <legend>Add Repository:</legend>
+-                <label for="name">Name:</label>
+-                <input class="input-medium" type="text" id="name" name="name"/>
+-                ${type_field(True)}
+-                <label for="dir">Directory:</label>
+-                <input class="input-medium" type="text" id="dir" name="dir"/>
+-                <div class="control-group">
+-                  <input class="btn" type="submit" name="add_repos"
+-                      value="${_('Add')}"/>
+-                </div>
+-              </fieldset>
+-            </form>
+-
+-            <form py:if="any(not info.alias for info in repositories.itervalues())"
+-                  class="well" id="trac-addalias" method="post" action="">
+-              <fieldset>
+-                <legend>Add Alias:</legend>
+-                <label for="alias_name">Name:</label>
+-                <input class="input-medium" type="text" id="alias_name" 
+-                    name="name"/>
+-                ${alias_field(True)}
+-                <div class="control-group">
+-                  <input class="btn" type="submit" name="add_alias"
+-                      value="${_('Add')}"/>
+-                </div>
+-              </fieldset>
+-            </form>
+-          </div>
+         </div>
+ 
+       </py:otherwise>