You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2019/06/15 19:20:17 UTC
[whimsy] branch master updated: inline attachments for special
orders too
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new bd02ebf inline attachments for special orders too
bd02ebf is described below
commit bd02ebf07b32d49ef3e21d1ca1cba15a2847ae7e
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat Jun 15 15:19:28 2019 -0400
inline attachments for special orders too
---
www/board/agenda/views/pages/report.js.rb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/www/board/agenda/views/pages/report.js.rb b/www/board/agenda/views/pages/report.js.rb
index 61da0e0..53b738c 100644
--- a/www/board/agenda/views/pages/report.js.rb
+++ b/www/board/agenda/views/pages/report.js.rb
@@ -72,7 +72,7 @@ class Report < Vue
list << self.names if @@item.people
list << self.president_attachments if @@item.title == 'President'
- list = [self.linkMinutes] if @@item.attach =~ /^3[A-Z]$/
+ list = [self.linkMinutes] if @@item.attach =~ /^[37][A-Z]$/
list
end
@@ -250,17 +250,19 @@ class Report < Vue
"<a href='#{link}'>#{match}</a>"
end
+ footer = ''
+
text.gsub! /Attachment (\w+)/ do |match, attach|
item = Agenda.index.find {|item| item.attach == attach}
if item
- "<a href='#{item.title.gsub(' ', '-')}'>#{match}</a>" +
- "<pre>#{item.text}</pre>"
+ footer += "<hr/><h4>#{match}</h4><pre>#{item.text}</pre>"
+ "<a href='#{item.title.gsub(' ', '-')}'>#{match}</a>"
else
match
end
end
- return text
+ return text + footer
end
# highlight private sections - these sections appear in the agenda but