You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2014/03/11 16:41:35 UTC

[2/4] git commit: [#4602] ticket:541 Add strikethrough to artifact links

[#4602] ticket:541 Add strikethrough to artifact links


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/40aa4332
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/40aa4332
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/40aa4332

Branch: refs/heads/master
Commit: 40aa43320e6303a27396bd4d0e4f886eb8c5d55d
Parents: 7999221
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Feb 21 13:46:24 2014 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Mar 11 14:17:19 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/markdown_extensions.py                | 2 ++
 Allura/allura/nf/allura/css/site_style.css              | 1 +
 ForgeTracker/forgetracker/tests/functional/test_root.py | 3 +++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/40aa4332/Allura/allura/lib/markdown_extensions.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index 60bf943..ebfc4bf 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -335,6 +335,8 @@ class ForgeLinkPattern(markdown.inlinepatterns.LinkPattern):
         shortlink = M.Shortlink.lookup(link)
         if shortlink and not getattr(shortlink.ref.artifact, 'deleted', False):
             href = shortlink.url
+            if getattr(shortlink.ref.artifact, 'is_closed', False):
+                classes += ' strikethrough'
             self.ext.forge_link_tree_processor.alinks.append(shortlink)
         elif is_link_with_brackets:
             href = h.urlquote(link)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/40aa4332/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index a82fa4a..ee8959b 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3490,3 +3490,4 @@ ul.dropdown ul li a:hover {
 #user-message {
     top: 10px;
 }
+.strikethrough { text-decoration: line-through; }

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/40aa4332/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 59c878d..f04e1c8 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -891,6 +891,9 @@ class TestFunctionalController(TrackerTestController):
         assert_not_in('<s>Ticket: #1</s>', r)
         assert_in('<s>Ticket: #2</s>', r)
 
+        assert_in('<a class="alink" href="/p/test/bugs/1/">[#1]</a>', r)
+        assert_in('<a class="alink strikethrough" href="/p/test/bugs/2/">[#2]</a>', r)
+
     def test_ticket_view_editable(self):
         summary = 'test ticket view page can be edited'
         self.new_ticket(summary=summary)