[ckan-changes] [okfn/ckan] 09cfae: Reformat indentation of add-related.html snippet

GitHub noreply at github.com
Tue Apr 24 09:57:44 UTC 2012


  Branch: refs/heads/feature-2204-related
  Home:   https://github.com/okfn/ckan
  Commit: 09cfae85fbd6c1219e8d650ad3e7cd4f210805f2
      https://github.com/okfn/ckan/commit/09cfae85fbd6c1219e8d650ad3e7cd4f210805f2
  Author: Aron Carroll <self at aroncarroll.com>
  Date:   2012-04-23 (Mon, 23 Apr 2012)

  Changed paths:
    M ckan/templates/_snippet/add-related.html

  Log Message:
  -----------
  Reformat indentation of add-related.html snippet


diff --git a/ckan/templates/_snippet/add-related.html b/ckan/templates/_snippet/add-related.html
index d8d4f26..80388e6 100644
--- a/ckan/templates/_snippet/add-related.html
+++ b/ckan/templates/_snippet/add-related.html
@@ -4,17 +4,14 @@
   xmlns:py="http://genshi.edgewall.org/"
   xmlns:xi="http://www.w3.org/2001/XInclude"
   py:strip=""
-  >
-
-<div class="modal-add-related modal fade in" style="display: none; height: 640px;"
+>
+<div class="modal-add-related modal fade in" style="display: none"
   py:def="add_related(dataset)">
-<div class="modal-header">
-  <a class="close" data-dismiss="modal">×</a>
-  <h3>
-    Add related item
-  </h3>
-</div>
-<div class="modal-body">
+  <div class="modal-header">
+    <a class="close" data-dismiss="modal">×</a>
+    <h3>Add related item</h3>
+  </div>
+  <div class="modal-body">
     <form class="well">
       <input id="related-dataset" type="hidden" value="${c.pkg.id}"/>
 
@@ -23,9 +20,9 @@
 
       <label>Type of item</label>
       <select id="related-type" class="span6 chzn-select">
-          <option value="app">Application</option>
-          <option value="idea">Idea</option>
-          <option value="visualization">Visualization</option>
+        <option value="app">Application</option>
+        <option value="idea">Idea</option>
+        <option value="visualization">Visualization</option>
       </select>
 
       <label>Description</label>
@@ -38,11 +35,10 @@
       <input id="related-image-url" type="text" class="span6" placeholder="Please add a link to the image"/>
 
       <div>
-          <button id='add-related-submit' type="submit" class="btn btn-primary">Submit</button>
-          <button class="btn">Cancel</button>
+        <button id='add-related-submit' type="submit" class="btn btn-primary">Submit</button>
+        <button class="btn">Cancel</button>
       </div>
     </form>
-
-</div>
+  </div>
 </div>
 </html>


================================================================
  Commit: c8eb5ae75b81c46ccb05c50c36370366ddf6154b
      https://github.com/okfn/ckan/commit/c8eb5ae75b81c46ccb05c50c36370366ddf6154b
  Author: Aron Carroll <self at aroncarroll.com>
  Date:   2012-04-23 (Mon, 23 Apr 2012)

  Changed paths:
    M ckan/templates/_snippet/add-related.html

  Log Message:
  -----------
  [2204] Add "for" attribute to labels in add related form

This improves accessibility by focusing form inputs when the labels are
clicked.


diff --git a/ckan/templates/_snippet/add-related.html b/ckan/templates/_snippet/add-related.html
index 80388e6..342bd25 100644
--- a/ckan/templates/_snippet/add-related.html
+++ b/ckan/templates/_snippet/add-related.html
@@ -15,23 +15,23 @@
     <form class="well">
       <input id="related-dataset" type="hidden" value="${c.pkg.id}"/>
 
-      <label>Title</label>
+      <label for="related-title">Title</label>
       <input id="related-title" type="text" class="span6" placeholder="Please add the title for the item"/>
 
-      <label>Type of item</label>
+      <label for="related-type">Type of item</label>
       <select id="related-type" class="span6 chzn-select">
         <option value="app">Application</option>
         <option value="idea">Idea</option>
         <option value="visualization">Visualization</option>
       </select>
 
-      <label>Description</label>
+      <label for="related-description">Description</label>
       <textarea id="related-description" class="input-xlarge span6" rows="4" placeholder="Please describe the item"></textarea>
 
-      <label>URL</label>
+      <label for="related-url">URL</label>
       <input id="related-url" type="text" class="span6" placeholder="Please add a url"/>
 
-      <label>Image URL</label>
+      <label for="related-image-url">Image URL</label>
       <input id="related-image-url" type="text" class="span6" placeholder="Please add a link to the image"/>
 
       <div>


================================================================
  Commit: e1f24c7a4e4e5e1e913b5a67110d172edc89bc7c
      https://github.com/okfn/ckan/commit/e1f24c7a4e4e5e1e913b5a67110d172edc89bc7c
  Author: Aron Carroll <self at aroncarroll.com>
  Date:   2012-04-23 (Mon, 23 Apr 2012)

  Changed paths:
    M ckan/public/css/style.css
    M ckan/templates/_snippet/add-related.html

  Log Message:
  -----------
  Tidy up spacing in the add-related.html dialog


diff --git a/ckan/public/css/style.css b/ckan/public/css/style.css
index 354734e..1f459d1 100644
--- a/ckan/public/css/style.css
+++ b/ckan/public/css/style.css
@@ -1398,3 +1398,24 @@ body.editresources .error-explanation {
   /* Let JS render the resource errors inline */
   display: none;
 }
+
+/* Modal Dialog Styles */
+
+.modal-header .heading {
+  margin-bottom: 0;
+}
+
+.modal-body form {
+  margin-bottom: 0;
+}
+
+/* Chosen Form Styles */
+
+.chzn-container-single {
+  margin-bottom: 9px; /* Keep Chosen inline with Bootstrap */
+}
+
+.form-inline .chzn-container-single,
+.form-horizontal .chzn-select {
+  margin-bottom: 0;
+}
diff --git a/ckan/templates/_snippet/add-related.html b/ckan/templates/_snippet/add-related.html
index 342bd25..5abe4ba 100644
--- a/ckan/templates/_snippet/add-related.html
+++ b/ckan/templates/_snippet/add-related.html
@@ -9,7 +9,7 @@
   py:def="add_related(dataset)">
   <div class="modal-header">
     <a class="close" data-dismiss="modal">×</a>
-    <h3>Add related item</h3>
+    <h3 class="heading">Add related item</h3>
   </div>
   <div class="modal-body">
     <form class="well">


================================================================
  Commit: cb3b17139ee61fdfcf6b3ec81db2670a1e238e7c
      https://github.com/okfn/ckan/commit/cb3b17139ee61fdfcf6b3ec81db2670a1e238e7c
  Author: Aron Carroll <self at aroncarroll.com>
  Date:   2012-04-23 (Mon, 23 Apr 2012)

  Changed paths:
    M ckan/templates/package/related_list.html

  Log Message:
  -----------
  Related heading is now h3 inline with other pages


diff --git a/ckan/templates/package/related_list.html b/ckan/templates/package/related_list.html
index 7735775..33dd6e6 100644
--- a/ckan/templates/package/related_list.html
+++ b/ckan/templates/package/related_list.html
@@ -30,7 +30,7 @@
 
   <div py:match="content">
     ${add_related(c.pkg)}
-    <h2>Related items</h2>
+    <h3>Related items</h3>
     <div class="row-fluid">
       <div class="span12">
           <div py:if="not c.pkg.related" class="span8">


================================================================
Compare: https://github.com/okfn/ckan/compare/75dfc3e...cb3b171


More information about the ckan-changes mailing list