incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1430457 - in /sling/site/trunk: ./ lib/view.pm templates/skeleton.html
Date Tue, 08 Jan 2013 19:33:35 GMT
Author: fmeschbe
Date: Tue Jan  8 19:33:35 2013
New Revision: 1430457

URL: http://svn.apache.org/viewvc?rev=1430457&view=rev
Log:
* Ignore target folder (from manual generation for testing)
* Add reference to old page if the translation_pending header is set

Modified:
    sling/site/trunk/   (props changed)
    sling/site/trunk/lib/view.pm
    sling/site/trunk/templates/skeleton.html

Propchange: sling/site/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan  8 19:33:35 2013
@@ -0,0 +1 @@
+target

Modified: sling/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/sling/site/trunk/lib/view.pm?rev=1430457&r1=1430456&r2=1430457&view=diff
==============================================================================
--- sling/site/trunk/lib/view.pm (original)
+++ sling/site/trunk/lib/view.pm Tue Jan  8 19:33:35 2013
@@ -38,6 +38,12 @@ sub single_narrative {
 
     $args{refs} = {};
 
+    # render tip box with reference to Confluence export
+    # if translation for a page is still pending
+    if($args{headers}->{translation_pending}) {
+        $args{oldpage} = "/site/" . basename($args{path});
+    }
+
     # ensure loading child pages
     my $page_path = $file;
     $page_path =~ s/\.[^.]+$//;

Modified: sling/site/trunk/templates/skeleton.html
URL: http://svn.apache.org/viewvc/sling/site/trunk/templates/skeleton.html?rev=1430457&r1=1430456&r2=1430457&view=diff
==============================================================================
--- sling/site/trunk/templates/skeleton.html (original)
+++ sling/site/trunk/templates/skeleton.html Tue Jan  8 19:33:35 2013
@@ -46,6 +46,14 @@
       <div class="breadcrump" style="font-size: 80%;">
         {{ breadcrumbs|safe }}
       </div>
+
+      {%if oldpage %}
+      <div class="tip">
+           This page is a translated version of <a href="{{ oldpage }}" target="sling_cwiki">{{
oldpage }}</a>. In case of
+           doubt you might want to refer to the old page.
+      </div>
+      {% endif %}
+      
       <h1>{% block title %}{% endblock %}</h1>
       {% block content %}{% endblock %}
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">



Mime
View raw message