incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rjol...@apache.org
Subject svn commit: r1444499 - /incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html
Date Sun, 10 Feb 2013 08:10:05 GMT
Author: rjollos
Date: Sun Feb 10 08:10:04 2013
New Revision: 1444499

URL: http://svn.apache.org/r1444499
Log:
Refs #248: Modified Repository Admin panel to use a horizontal layout. Patch by Olemis.

Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html?rev=1444499&r1=1444498&r2=1444499&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html
(original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_admin_repositories.html
Sun Feb 10 08:10:04 2013
@@ -32,40 +32,40 @@
   <body>
     <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>
+    <py:def function="type_field(editable, inline=False, selected=None)">
+        <div class="control-group" py:strip="inline">
+          <label class="control-label" for="trac-type">Type:</label>
+          <div class="controls" py:strip="inline">
+            <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-inline" >
+              <span class="label label-info">Default</span> $default_type
+            </p>
+          </div>
         </div>
-      </div>
     </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>
+    <py:def function="alias_field(editable, inline=False, selected=None)">
+        <div class="control-group" py:strip="inline">
+          <label class="control-label" for="trac-repository">Repository:</label>
+          <div class="controls" py:strip="inline">
+            <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>
-      </div>
     </py:def>
 
     <py:choose test="view">
       <form py:when="'detail'" py:with="info = repositories[reponame]"
-          class="well form-horizontal" id="trac-modrepos" method="post"
-          action="">
+            class="well form-horizontal" id="trac-modrepos" method="post"
+            action="">
         <fieldset py:choose="" py:with="readonly = not info.editable or None">
           <legend py:when="info.editable">Modify Repository:</legend>
           <legend py:otherwise="">View Repository:</legend>
@@ -78,27 +78,27 @@
             <label class="control-label" for="name">Name:</label>
             <div class="controls">
               <input type="text" id="name" name="name" value="$info.name"
-                  readonly="$readonly"/>
+                     readonly="$readonly"/>
             </div>
           </div>
           <py:choose>
             <py:when test="'alias' in info">
-              ${alias_field(info.editable, info.alias)}
+              ${alias_field(info.editable, selected=info.alias)}
             </py:when>
             <py:otherwise>
-              ${type_field(info.editable, info.type)}
+                ${type_field(info.editable, selected=info.type)}
               <div class="control-group">
                 <label class="control-label" for="dir">Directory:</label>
                 <div class="controls">
                   <input type="text" id="dir" name="dir" size="48"
-                      value="$info.dir" readonly="$readonly"/>
+                         value="$info.dir" readonly="$readonly"/>
                 </div>
               </div>
               <div class="control-group">
                 <label class="control-label" for="url">URL:</label>
                 <div class="controls">
                   <input type="text" id="url" name="url" size="48"
-                      value="$info.url" readonly="$readonly"/>
+                         value="$info.url" readonly="$readonly"/>
                 </div>
               </div>
             </py:otherwise>
@@ -106,7 +106,7 @@
           <div class="control-group">
             <div class="controls">
               <input type="checkbox" name="hidden" value="1"
-                  checked="${info.hidden or None}" disabled="$readonly"/>
+                     checked="${info.hidden or None}" disabled="$readonly"/>
               Hide from repository index
             </div>
           </div>
@@ -117,8 +117,8 @@
               </label>
              <div class="controls">
                 <textarea id="description" name="description" class="wikitext trac-resizable"
-                    placeholder="Describe this repository using WikiFormatting"
-                    rows="6" cols="60" readonly="$readonly">$info.description</textarea>
+                          placeholder="Describe this repository using WikiFormatting"
+                          rows="6" cols="60" readonly="$readonly">$info.description</textarea>
                 <p class="help-block">
                   <span class="label label-info">Tip</span>
                   you may use <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
here
@@ -129,22 +129,55 @@
           <div class="control-group">
             <input class="btn" type="submit" name="cancel" value="${_('Cancel')}"/>
             <input class="btn" py:if="info.editable" type="submit"
-                name="save" value="${_('Save')}"/>
+                   name="save" value="${_('Save')}"/>
           </div>
         </fieldset>
       </form>
 
       <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 class="control-label" for="name">Name:</label>
+                  <input class="input-medium" type="text" id="name" name="name"/>
+                  ${type_field(True, 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, True)}
+                </div>
+                <div class="control-group">
+                  <input class="btn" type="submit" name="add_alias"
+                         value="${_('Add')}"/>
+                </div>
+              </fieldset>
+            </form>
             <form id="trac-repository_table" method="post" action="">
               <table id="trac-reposlist"
                   class="table table-striped table-condensed table-bordered">
                 <thead>
                   <tr><th class="sel"><i class="icon-check"></i></th>
                     <th>Name</th><th>Type</th>
-                    <th class="full-x">Directory</th><th>Revision</th>
+                    <th>Directory</th><th>Revision</th>
                   </tr>
                 </thead>
                 <tbody>
@@ -164,43 +197,12 @@
               </table>
               <div class="control-group">
                 <input class="btn" type="submit" name="refresh"
-                    value="${_('Refresh')}"/>
+                       value="${_('Refresh')}"/>
                 <input class="btn" type="submit" name="remove"
-                    value="${_('Remove selected items')}"/>
+                       value="${_('Remove selected items')}"/>
               </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>



Mime
View raw message