whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch master updated: Annotate which data bits are private
Date Tue, 02 May 2017 18:16:57 GMT
This is an automated email from the ASF dual-hosted git repository.

curcuru 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  3b4e3e1   Annotate which data bits are private
3b4e3e1 is described below

commit 3b4e3e1c357a1dd08b01e186fa471791e5356f56
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Tue May 2 14:16:52 2017 -0400

    Annotate which data bits are private
---
 www/roster/views/duties.html.rb | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/www/roster/views/duties.html.rb b/www/roster/views/duties.html.rb
index e23cc0c..032a916 100644
--- a/www/roster/views/duties.html.rb
+++ b/www/roster/views/duties.html.rb
@@ -1,7 +1,7 @@
 #
 # Organization Chart
-#
-
+# NOTE: this view of the data is Member-private
+PVTCLASS = 'text-warning'
 _html do
   _title @role['info']['role']
   _base href: '..'
@@ -19,19 +19,25 @@ _html do
    id = @role['info']['id'] || @role['info']['chair']
   _h1_ "#{@role['info']['role']} - #{ASF::Person.find(id).public_name}"
 
-  _h2_ 'Quick Info'
+  _h2_ do
+    _ 'Quick Info'
+    _small do 
+      _ ' - includes '
+      _span 'Member private data', class: PVTCLASS
+    end
+  end
 
   _table.table do
     _tbody do
       @role['info'].each do |key, value|
         next if key == 'role'
         next unless value
-
+        (key =~ /private/i) ? (pvt = PVTCLASS) : (pvt = '')
         _tr_ do
-          _td key
+          _td key, class: pvt
 
           if %w(id chair).include? key
-            _td do
+            _td class: pvt do
               if value == 'tbd'
                 _span value
               else
@@ -39,7 +45,7 @@ _html do
               end
             end
           elsif %w(reports-to).include? key
-            _td! do
+            _td! class: pvt do
               value.split(/[, ]+/).each_with_index do |role, index|
                 _span ', ' if index > 0
                 if role == 'members'
@@ -50,11 +56,11 @@ _html do
               end
             end
           elsif %w(email).include? key
-            _td do
+            _td class: pvt do
               _a value, href: "mailto:#{value}"
             end
           elsif %w(private-list).include? key
-            _td do
+            _td class: pvt do
               if value == 'board-private@apache.org'
                 _a value, href: "mailto:#{value}"
               else
@@ -62,11 +68,11 @@ _html do
               end
             end
           elsif %w(roster resolution).include? key
-            _td do
+            _td class: pvt do
               _a value, href: value
             end
           else
-            _td value
+            _td value, class: pvt 
           end
         end
       end
@@ -99,7 +105,7 @@ _html do
 
   @role.each do |title, text|
     next if title == 'info' or title == 'mtime'
-    _h2.text_capitalize title
+    (title =~ /private/i) ? _h2.text_capitalize.text_warning(title) : _h2.text_capitalize(title)
     _markdown text
   end
 end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message