bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1335525 - in /incubator/bloodhound/trunk/bloodhound_theme/bhtheme: templates/bh_wiki_delete.html theme.py
Date Tue, 08 May 2012 13:57:54 GMT
Author: gjm
Date: Tue May  8 13:57:54 2012
New Revision: 1335525

URL: http://svn.apache.org/viewvc?rev=1335525&view=rev
Log:
theme: wiki delete using bootstrap - #58 (from olemis)

Added:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html   (with
props)
Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py

Added: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html?rev=1335525&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html (added)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html Tue
May  8 13:57:54 2012
@@ -0,0 +1,109 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://genshi.edgewall.org/"
+      xmlns:xi="http://www.w3.org/2001/XInclude"
+      xmlns:i18n="http://genshi.edgewall.org/i18n">
+  <xi:include href="layout.html" />
+  <head>
+    <title>$title</title>
+  </head>
+
+  <body>
+    <div id="content" class="wiki row"
+        py:with="current_href = href.wiki(page.name)">
+      <div class="span12">
+        <h1 py:choose="what">
+          <py:when test="'multiple'">
+            <i18n:msg params="from, to, name">
+              Delete versions ${old_version + 1} to $new_version of <a href="$current_href">$page.name</a>
+            </i18n:msg>
+          </py:when>
+          <py:when test="'single'">
+            <i18n:msg params="version, name">
+              Delete version $new_version of <a href="$current_href">$page.name</a>
+            </i18n:msg>
+          </py:when>
+          <py:otherwise>
+            <i18n:msg params="name">
+              Delete <a href="$current_href">$page.name</a>
+            </i18n:msg>
+          </py:otherwise>
+        </h1>
+        <form action="$current_href" method="post">
+          <input type="hidden" name="action" value="delete" />
+          <p class="alert">
+            <span class="label label-important">Caution</span>
+            <py:choose test="what">
+              <py:when test="'multiple'">
+                <i18n:msg params="from, to, versions, first_modified, last_modified">
+                  <strong>
+                    Are you sure you want to delete versions ${old_version + 1} to $new_version
of this page?
+                  </strong>
+                  <br />
+                    Removing <a href="${href.wiki(page.name, action='history', version=page.version)}">
+                      $num_versions versions</a> of the page, 
+                    which was first modified ${pretty_dateinfo(old_date)} and last modified
${pretty_dateinfo(new_date)}.
+                </i18n:msg>
+              </py:when>
+              <py:when test="'single'">
+                <strong>
+                <i18n:msg params="version">
+                  Are you sure you want to delete version $new_version of this page?
+                </i18n:msg>
+                </strong>
+                <br />
+                <py:choose test="num_versions">
+                  <py:when test="1">
+                    <i18n:msg params="created">
+                      This is the only <a href="${href.wiki(page.name, action='history',
version=page.version)}">
+                        version</a> of the page,
+                      created ${pretty_dateinfo(new_date)}, so the page will be removed completely!
+                    </i18n:msg>
+                  </py:when>
+                  <py:otherwise>
+                    <i18n:msg params="modified">
+                      Modified ${pretty_dateinfo(new_date)}.
+                    </i18n:msg>
+                  </py:otherwise>
+                </py:choose>
+              </py:when>
+              <py:otherwise>
+                <strong>
+                  Are you sure you want to completely delete this page?
+                </strong>
+                <br />
+                <py:choose test="num_versions">
+                  <py:when test="1">
+                    <i18n:msg params="created">
+                        Removing the one and only <a href="${href.wiki(page.name, action='history',
version=page.version)}">
+                          version</a> of the page, which was created ${pretty_dateinfo(new_date)}.
+                    </i18n:msg>
+                  </py:when>
+                  <py:otherwise>
+                    <i18n:msg params="versions, created, modified">
+                        Removing all <a href="${href.wiki(page.name, action='history',
version=page.version)}">
+                          $num_versions versions</a> of the page, 
+                        which was created ${pretty_dateinfo(old_date)} and last modified
${pretty_dateinfo(new_date)}.
+                    </i18n:msg>
+                  </py:otherwise>
+                </py:choose>
+              </py:otherwise>
+            </py:choose>
+            <input py:if="new_version" type="hidden" name="version" value="$new_version"
/>
+            <input py:if="old_version" type="hidden" name="old_version" value="$old_version"
/>
+            <br />
+            <strong>This is an irreversible operation.</strong>
+          </p>
+          <div class="control-group">
+            <input class="btn btn-inverse" type="submit" name="cancel" value="${_('Cancel')}"
/>
+            <input class="btn" type="submit" value="${what == 'multiple' and _('Delete
those versions')
+                                          or what == 'single' and _('Delete this version')
+                                          or _('Delete page')}" />
+          </div>
+        </form>
+      </div>
+    </div>
+  </body>
+</html>

Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_wiki_delete.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1335525&r1=1335524&r2=1335525&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Tue May  8 13:57:54 2012
@@ -94,6 +94,7 @@ class BloodhoundTheme(ThemeBase):
         'search.html' : ('bh_search.html', '_modify_search_data'),
 
         # Wiki
+        'wiki_delete.html' : ('bh_wiki_delete.html', None),
         'wiki_edit.html' : ('bh_wiki_edit.html', None),
         'wiki_rename.html' : ('bh_wiki_rename.html', None),
         'wiki_view.html' : ('bh_wiki_view.html', '_modify_wiki_page_path'),



Mime
View raw message