Commits

Olemis Lang committed ac4979e

BH Theme #137: Button classes for wiki view

Comments (0)

Files changed (2)

 hgsvn/rm_files.diff
 t137/t137_r1365626_bncls_admin.diff
+t137/t137_r1365626_btncls_wiki.diff

t137/t137_r1365626_btncls_wiki.diff

+# HG changeset patch
+# Parent c1edf8f8744785448c3efec493905e5db065c73b
+BH Theme #137: Button classes for wiki pages
+
+diff --git a/bhtheme/htdocs/bloodhound.css b/bhtheme/htdocs/bloodhound.css
+--- a/bhtheme/htdocs/bloodhound.css
++++ b/bhtheme/htdocs/bloodhound.css
+@@ -405,6 +405,36 @@
+   margin-top: 2px !important;
+ }
+ 
++.btn-link:focus {
++  outline: thin dotted #333;
++  outline: 5px auto -webkit-focus-ring-color;
++  outline-offset: -2px;
++}
++
++.btn-link:hover,
++.btn-link:active {
++  outline: 0;
++}
++
++.btn-link {
++  background: none;
++  border: none;
++  color: #0088cc;
++  padding: 4px 10px;
++  text-decoration: none;
++}
++
++.btn-link:hover {
++  color: #005580;
++  text-decoration: underline;
++}
++
++.btn-group > .btn-link {
++  float: left;
++  margin-left: -1px;
++  position: relative;
++}
++
+ /* @end */
+ 
+ /* @group Bootstrap extensions */
+diff --git a/bhtheme/templates/bh_wiki_view.html b/bhtheme/templates/bh_wiki_view.html
+--- a/bhtheme/templates/bh_wiki_view.html
++++ b/bhtheme/templates/bh_wiki_view.html
+@@ -111,14 +111,25 @@
+               <div class="btn-group">
+                 <py:choose>
+                   <py:when test="is_not_latest">
+-                    <button class="btn" type="submit" name="revert_version_button">${_('Revert to this version')}</button>
++                    <button class="btn" type="submit" name="revert_version_button">
++                      <i class="icon-edit"></i>
++                      ${_('Revert to this version')}
++                    </button>
+                   </py:when>
+                   <py:when test="page.exists">
+-                    <button class="btn" type="submit" name="edit_page_button" accesskey="e">${_('Edit this page')}</button>
++                    <button class="btn" type="submit" name="edit_page_button" accesskey="e">
++                      <i class="icon-edit"></i>
++                      ${_('Edit this page')}
++                    </button>
+                   </py:when>
+                   <py:otherwise>
+-                    <button class="btn" type="submit" name="create_page_button" accesskey="e">${_('Create this page')}</button>
+-                    <div py:if="templates" id="template" style="display:inline">
++                    <button class="btn btn-primary" type="submit" 
++                        name="create_page_button" accesskey="e">
++                      <i class="icon-plus-sign icon-white"></i>
++                      ${_('Create this page')}
++                    </button>
++                    <div py:if="templates" id="template"
++                        style="display:inline-block; padding-left: 15px">
+                       <label for="template">Using the template:</label>
+                       <select name="template">
+                         <option selected="${not default_template in templates or None}"
+@@ -137,7 +148,9 @@
+             <form method="get" style="display:inline" action="${href.wiki(page.name)}" id="rename" py:if="page.exists and rename_perm">
+               <input type="hidden" name="action" value="rename" />
+               <div class="btn-group">
+-                <button class="btn" type="submit" name="rename_page_button">${_('Rename page')}</button>
++                <button class="btn" type="submit" name="rename_page_button">
++                  <i class="icon-pencil"></i> ${_('Rename page')}
++                </button>
+               </div>
+             </form>
+             <form method="get" style="display:inline" action="${href.wiki(page.name)}" py:if="page.exists and delete_perm">
+@@ -145,9 +158,15 @@
+               <input type="hidden" name="version" value="$page.version" />
+               <div id="delete" class="btn-group">
+                 <py:if test="page.version == latest_version">
+-                  <button class="btn" type="submit" name="delete_version">${_('Delete this version')}</button>
++                  <button class="btn-link" type="submit" name="delete_version">
++                    <i class="icon-remove-sign"></i>
++                    ${_('Delete this version')}
++                  </button>
+                 </py:if>
+-                <button class="btn" type="submit" name="delete_page_button">${_('Delete page')}</button>
++                <button class="btn-link" type="submit" name="delete_page_button">
++                  <i class="icon-trash"></i>
++                  ${_('Delete page')}
++                </button>
+               </div>
+             </form>
+           </div>