whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch public-orgchart updated: Fixup copypasta'd variables and attempt restyling
Date Thu, 08 Jun 2017 20:31:31 GMT
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch public-orgchart
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/public-orgchart by this push:
     new fe7343b  Fixup copypasta'd variables and attempt restyling
fe7343b is described below

commit fe7343b1b95651d19d6d8f955e8f772f644248b9
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Thu Jun 8 16:31:26 2017 -0400

    Fixup copypasta'd variables and attempt restyling
---
 www/docs/orgchart.cgi | 46 ++++++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 22 deletions(-)

diff --git a/www/docs/orgchart.cgi b/www/docs/orgchart.cgi
index 6b14696..04f63ba 100755
--- a/www/docs/orgchart.cgi
+++ b/www/docs/orgchart.cgi
@@ -56,14 +56,12 @@ def emit_role(role: {}, oversees: {}, desc: {})
   id = role['info']['id'] || role['info']['chair']
   _whimsy_panel_table(
   title: "#{role['info']['role']} - #{ASF::Person.find(id).public_name}",
-  helpblock: -> {
-    _ 'This officer of the ASF has the following responsibilities.' 
-  }
   ) do
     _table.table.table_striped do
       _tbody do
         role['info'].each do |key, value|
           next if key == 'role'
+          next if key == 'roster' # No purpose in public display
           next if key =~ /private/i
           next unless value
           _tr_ do
@@ -99,33 +97,37 @@ def emit_role(role: {}, oversees: {}, desc: {})
               _td value
             end
             _td do
-              _(@desc[key]) if @desc.key?(key)
+              _(desc[key]) if desc.key?(key)
             end
           end
         end
       end
     end
-    
     unless oversees.empty?
       oversees = oversees.sort_by {|name, duties| duties['info']['role']}
-      _h3 'This Officer Oversees'
-      _table.table do
-        _tbody do
-          oversees.each do |name, duties|
-            _tr do
-              _td do
-                _a duties['info']['role'], href: "orgchart/#{name}"
-              end
-            end
+      _ul.list_group do
+        _li.list_group_item.active do
+          _h4 'This Officer Oversees'
+        end
+        oversees.each do |name, duties|
+          _li.list_group_item do
+            _a duties['info']['role'], href: "orgchart/#{name}"
           end
         end
       end
     end
-    role.each do |title, text|
-      next if title == 'info' or title == 'mtime'
-      next if title =~ /private/i
-      _h3.text_capitalize(title)
-      _markdown text
+    
+    _ul.list_group do
+      role.each do |title, text|
+        next if title == 'info' or title == 'mtime'
+        next if title =~ /private/i
+        _li.list_group_item.active do 
+          _h4 title.capitalize
+        end
+        _li.list_group_item do
+          _p text
+        end
+      end
     end
   end
 end
@@ -147,7 +149,7 @@ _html do
           _li do
             _a desc, href: url
           end
-        end
+        end 
       end
     }
     ) do
@@ -163,11 +165,11 @@ _html do
           end
           emit_role(role: orgchart[name], oversees: oversees, desc: ASF::OrgChart.desc)
         else
-          _whimsy_panel("ERROR: role #{role} not found", style: 'panel-danger') do
+          _whimsy_panel("ERROR: role '#{name}' not found", style: 'panel-danger') do
             _ 'Sorry, the URL you attempted to access '
             _code request
             _ ' is not a valid role.'
-            _a 'Back to the orgchart.', href: ENV['SCRIPT_NAME']
+            _a 'Go back to the orgchart', href: ENV['SCRIPT_NAME']
           end
         end
       else

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

Mime
View raw message