[#229] - Add a blog tool

Rick Copeland Rick Copeland 2010-08-23

<< < 1 2 (Page 2 of 2)
removed Allura/allura/pastetemplates/forgeapp/+package+/static/+plugin_name+/js
removed Allura/allura/pastetemplates/forgeapp/+package+/static/+plugin_name+/js/comments.js
changed Allura/allura/lib/widgets/templates/forge_form.html
changed Allura/allura/lib/widgets/templates/label_edit.html
changed Allura/allura/lib/widgets/form_fields.py
changed Allura/allura/lib/widgets/subscriptions.py
changed Allura/allura/model/artifact.py
changed Allura/allura/pastetemplates/forgeapp/+package+/main.py_tmpl
copied Allura/allura/pastetemplates/forgeapp/+package+/nf/+plugin_name+/js/comments.js -> ForgeBlog/forgeblog/templates/widgets/preview_post.html
Allura/allura/lib/widgets/templates/forge_form.html Diff Switch to side-by-side view
Loading...
Allura/allura/lib/widgets/templates/label_edit.html Diff Switch to side-by-side view
Loading...
Allura/allura/lib/widgets/form_fields.py Diff Switch to side-by-side view
Loading...
Allura/allura/lib/widgets/subscriptions.py Diff Switch to side-by-side view
Loading...
Allura/allura/model/artifact.py Diff Switch to side-by-side view
Loading...
Allura/allura/pastetemplates/forgeapp/+package+/main.py_tmpl Diff Switch to side-by-side view
Loading...
Allura/allura/pastetemplates/forgeapp/+package+/nf/+plugin_name+/js/comments.js to ForgeBlog/forgeblog/templates/widgets/preview_post.html
--- a/Allura/allura/pastetemplates/forgeapp/+package+/nf/+plugin_name+/js/comments.js
+++ b/ForgeBlog/forgeblog/templates/widgets/preview_post.html
@@ -1,11 +1,18 @@
-(function($){
-    $(function() {
-        console.log('in comments.js');
-        $('div.reply').each(function() {
-            var form = $('form', this).addClass('hidden');
-            $('h3', this).click(function() {
-                form.toggleClass('hidden');
-            });
-        });
-    });
-})(jQuery);
+<div xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://genshi.edgewall.org/"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
+  <?python
+    from allura.lib.security import has_artifact_access
+    ?>
+  <p>
+    <strong><a href="${value.url()}">$value.title</a></strong>
+    <em>Posted ${h.ago(value.timestamp)}</em>
+    <em py:if="value.state != 'published'">($value.state)</em>
+    <py:if test="has_artifact_access('write', value)()">
+      <a href="${value.url()}edit">Edit</a>
+    </py:if>
+  </p>
+  <strong>Labels:</strong>
+  <a py:for="l in value.labels" href="${c.app.url}search?q=labels_t:$l">$l</a>
+  ${Markup(value.html_text_preview)}
+</div>
<< < 1 2 (Page 2 of 2)