whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch roster-style updated: Add whimsy style and minor layout updates
Date Mon, 03 Jul 2017 14:10:42 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/roster-style by this push:
     new aea32bd  Add whimsy style and minor layout updates
aea32bd is described below

commit aea32bd6539c8db1e62a52a938340ce1e1133844
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Mon Jul 3 10:10:37 2017 -0400

    Add whimsy style and minor layout updates
    
    Also remove unneeded table margin-left since it interferes with updated
    bootstrap layout
---
 www/roster/public/stylesheets/app.css |   2 +-
 www/roster/views/committee.html.rb    |  28 +++---
 www/roster/views/committees.html.rb   |  76 ++++++++------
 www/roster/views/committer.html.rb    |  28 +++---
 www/roster/views/committers.html.rb   |  26 +++--
 www/roster/views/duties.html.rb       | 184 ++++++++++++++++++----------------
 www/roster/views/errors.html.rb       |  12 ++-
 www/roster/views/group.html.rb        |  28 +++---
 www/roster/views/groups.html.rb       | 108 +++++++++++---------
 www/roster/views/not_found.html.rb    |   8 +-
 www/roster/views/orgchart.html.rb     |  68 +++++++------
 11 files changed, 315 insertions(+), 253 deletions(-)

diff --git a/www/roster/public/stylesheets/app.css b/www/roster/public/stylesheets/app.css
index eb7075e..7d5ebe3 100644
--- a/www/roster/public/stylesheets/app.css
+++ b/www/roster/public/stylesheets/app.css
@@ -11,7 +11,7 @@ div.value {border-spacing: 0}
 .wide td:first-child {text-align: right; padding: 0}
 .wide td:first-child:after {content: ' —'}
 .wide td:last-child {border-left: solid 1px #000; padding: 0 0.5em}
-table {margin-left: 1em; margin-top: 0.5em}
+table {margin-top: 0.5em}
 td, th {padding-left: 0.5em; padding-right: 0.5em}
 .issue:before, .chair:before {content: '\21d0  '}
 .issue, .not-found {color: red; font-weight:bold} 
diff --git a/www/roster/views/committee.html.rb b/www/roster/views/committee.html.rb
index 071a45f..a35fd66 100644
--- a/www/roster/views/committee.html.rb
+++ b/www/roster/views/committee.html.rb
@@ -4,19 +4,21 @@
 
 _html do
   _base href: '..'
-  _title @committee[:display_name]
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
-
-  _banner breadcrumbs: {
-    roster: '.',
-    committee: 'committee/',
-    @committee[:id] => "committee/#{@committee[:id]}"
-  }
-
-  _div_.main!
-
-  _script src: 'app.js'
-  _.render '#main' do
-    _PMC committee: @committee, auth: @auth
+  _body? do
+    _whimsy_body(
+      title: @committee[:display_name],
+      breadcrumbs: {
+        roster: '.',
+        committee: 'committee/',
+        @committee[:id] => "committee/#{@committee[:id]}"
+      }
+    ) do
+      _div_.main!
+      _script src: 'app.js'
+      _.render '#main' do
+        _PMC committee: @committee, auth: @auth
+      end
+    end
   end
 end
diff --git a/www/roster/views/committees.html.rb b/www/roster/views/committees.html.rb
index 01cbea0..f2ba861 100644
--- a/www/roster/views/committees.html.rb
+++ b/www/roster/views/committees.html.rb
@@ -4,48 +4,58 @@
 
 _html do
   _base href: '..'
-  _title 'ASF Committee Roster'
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
+  _whimsy_body(
+    title: 'ASF Committees Listing',
+    breadcrumbs: {
+      roster: '.',
+      committee: 'committee/'
+    }
+  ) do
+    _whimsy_panel_table(
+      title: 'Summary List of Apache PMCs',
+      helpblock: -> {
+        _ 'A full list of Apache PMCs; click on the name for a detail page about that PMC.
 Non-PMC groups of various kinds '
+        _a href: '/roster/group/' do
+          _span.glyphicon.glyphicon_lock :aria_hidden, class: 'text-primary', aria_label:
'ASF Members Private'
+          _ 'are listed privately.'
+        end
+      }
+    ) do
+      _table.table.table_hover do
+        _thead do
+          _tr do
+            _th 'Name'
+            _th 'Chair(s)'
+            _th 'Description'
+          end
+        end
 
-  _banner breadcrumbs: {
-    roster: '.',
-    committee: 'committee/'
-  }
-
-  _h1 'PMCs'
-
-  _table.table.table_hover do
-    _thead do
-      _tr do
-        _th 'Name'
-        _th 'Chair(s)'
-        _th 'Description'
-      end
-    end
+        @committees.sort_by {|pmc| pmc.display_name.downcase}.each do |pmc|
+          _tr_ do
+            _td do
+              _a pmc.display_name, href: "committee/#{pmc.name}"
+            end
 
-    @committees.sort_by {|pmc| pmc.display_name.downcase}.each do |pmc|
-      _tr_ do
-        _td do
-          _a pmc.display_name, href: "committee/#{pmc.name}"
-        end
+            _td do
+              pmc.chairs.each_with_index do |chair, index|
+                _span ', ' unless index == 0
 
-        _td do
-          pmc.chairs.each_with_index do |chair, index|
-            _span ', ' unless index == 0
+                if @members.include? chair[:id]
+                  _b! {_a chair[:name], href: "committer/#{chair[:id]}"}
+                else
+                  _a chair[:name], href: "committer/#{chair[:id]}"
+                end
+              end
+            end
 
-            if @members.include? chair[:id]
-              _b! {_a chair[:name], href: "committer/#{chair[:id]}"}
+            if not pmc.established
+              _td.issue 'Not in committee-info.txt'
             else
-              _a chair[:name], href: "committer/#{chair[:id]}"
+              _td pmc.description
             end
           end
         end
-
-        if not pmc.established
-          _td.issue 'Not in committee-info.txt'
-        else
-          _td pmc.description
-        end
       end
     end
   end
diff --git a/www/roster/views/committer.html.rb b/www/roster/views/committer.html.rb
index 3a53fd7..e1bd704 100644
--- a/www/roster/views/committer.html.rb
+++ b/www/roster/views/committer.html.rb
@@ -4,19 +4,21 @@
 
 _html do
   _base href: '..'
-  _title @committer[:name][:public_name]
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
-
-  _banner breadcrumbs: {
-    roster: '.',
-    committer: 'committer/',
-    @committer[:id] => "committer/#{@committer[:id]}"
-  }
-
-  _div_.main!
-
-  _script src: 'app.js'
-  _.render '#main' do
-    _Person committer: @committer, auth: @auth
+  _body? do
+    _whimsy_body(
+      title: @committer[:name][:public_name],
+      breadcrumbs: {
+        roster: '.',
+        committer: 'committer/',
+        @committer[:id] => "committer/#{@committer[:id]}"
+      }
+    ) do
+      _div_.main!
+      _script src: 'app.js'
+      _.render '#main' do
+        _Person committer: @committer, auth: @auth
+      end
+    end
   end
 end
diff --git a/www/roster/views/committers.html.rb b/www/roster/views/committers.html.rb
index c6c075b..e0f0844 100644
--- a/www/roster/views/committers.html.rb
+++ b/www/roster/views/committers.html.rb
@@ -4,20 +4,18 @@
 
 _html do
   _base href: '..'
-  _title 'ASF Committer Search'
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
-
-  _banner breadcrumbs: {
-    roster: '.',
-    committer: 'committer/'
-  }
-
-  _h1 'Committer - Search'
-
-  _div_.main!
-
-  _script src: 'app.js'
-  _.render '#main' do
-    _CommitterSearch
+  _whimsy_body(
+    title: 'ASF Committer Search',
+    breadcrumbs: {
+      roster: '.',
+      committer: 'committer/'
+    }
+  ) do
+    _div_.main!
+    _script src: 'app.js'
+    _.render '#main' do
+      _CommitterSearch
+    end
   end
 end
diff --git a/www/roster/views/duties.html.rb b/www/roster/views/duties.html.rb
index ac50070..b661dc1 100644
--- a/www/roster/views/duties.html.rb
+++ b/www/roster/views/duties.html.rb
@@ -3,112 +3,120 @@
 # NOTE: this view of the data is Member-private
 PVTCLASS = 'text-warning'
 _html do
-  _title @role['info']['role']
   _base href: '..'
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
 
-  _banner breadcrumbs: {
-    roster: '.',
-    orgchart: 'orgchart/'
-  }
+  _body? do
+    _whimsy_body(
+      title: @role['info']['role'],
+      breadcrumbs: {
+        roster: '.',
+        orgchart: 'orgchart/'
+      }
+    ) do
+      id = @role['info']['id'] || @role['info']['chair']
+      _whimsy_panel_table(
+        title: "#{@role['info']['role']} - #{ASF::Person.find(id).public_name}",
+        helpblock: -> {
+          _ 'Note that this detail page includes  '
+          _span.glyphicon.glyphicon_lock :aria_hidden, class: 'text-primary', aria_label:
'ASF Members Private'
+          _span ' Member private data.', class: PVTCLASS
+        }
+      ) do
+        # ********************************************************************
+        # *                             Summary                              *
+        # ********************************************************************
+        _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, class: pvt
 
-  # ********************************************************************
-  # *                             Summary                              *
-  # ********************************************************************
-
-   id = @role['info']['id'] || @role['info']['chair']
-  _h1_ "#{@role['info']['role']} - #{ASF::Person.find(id).public_name}"
-
-  _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, class: pvt
-
-          if %w(id chair).include? key
-            _td class: pvt do
-              if value == 'tbd'
-                _span value
-              else
-                _a value, href: "roster/#{value}"
-              end
-            end
-          elsif %w(reports-to).include? key
-            _td! class: pvt do
-              value.split(/[, ]+/).each_with_index do |role, index|
-                _span ', ' if index > 0
-                if role == 'members'
-                  _a role, href: "roster/members"
+                if %w(id chair).include? key
+                  _td class: pvt do
+                    if value == 'tbd'
+                      _span value
+                    else
+                      _a value, href: "roster/#{value}"
+                    end
+                  end
+                elsif %w(reports-to).include? key
+                  _td! class: pvt do
+                    value.split(/[, ]+/).each_with_index do |role, index|
+                      _span ', ' if index > 0
+                      if role == 'members'
+                        _a role, href: "roster/members"
+                      else
+                        _a role, href: "orgchart/#{role}"
+                      end
+                    end
+                  end
+                elsif %w(email).include? key
+                  _td class: pvt do
+                    _a value, href: "mailto:#{value}"
+                  end
+                elsif %w(private-list).include? key
+                  _td class: pvt do
+                    if value == 'board-private@apache.org'
+                      _a value, href: "mailto:#{value}"
+                    else
+                      _a value, href: "https://lists.apache.org/list.html?#{value}"
+                    end
+                  end
+                elsif %w(roster resolution).include? key
+                  _td class: pvt do
+                    _a value, href: value
+                  end
                 else
-                  _a role, href: "orgchart/#{role}"
+                  _td value, class: pvt 
+                end
+                _td class: pvt do
+                  _(@desc[key]) if @desc.key?(key)
                 end
               end
             end
-          elsif %w(email).include? key
-            _td class: pvt do
-              _a value, href: "mailto:#{value}"
+          end
+        end
+
+        # ********************************************************************
+        # *                             Oversees                             *
+        # ********************************************************************
+        unless @oversees.empty?
+          @oversees = @oversees.sort_by {|name, duties| duties['info']['role']}
+          _ul.list_group do
+            _li.list_group_item.active do
+              _h4 'This Officer Oversees'
             end
-          elsif %w(private-list).include? key
-            _td class: pvt do
-              if value == 'board-private@apache.org'
-                _a value, href: "mailto:#{value}"
-              else
-                _a value, href: "https://lists.apache.org/list.html?#{value}"
+            _li.list_unstyled do
+              _ul style: 'margin-top: 15px; margin-bottom: 15px;' do
+                oversees.each do |name, duties|
+                  _li do
+                    _a duties['info']['role'], href: "orgchart/#{name}"
+                  end
+                end
               end
             end
-          elsif %w(roster resolution).include? key
-            _td class: pvt do
-              _a value, href: value
-            end
-          else
-            _td value, class: pvt 
-          end
-          _td class: pvt do
-            _(@desc[key]) if @desc.key?(key)
           end
         end
-      end
-    end
-  end
 
-  # ********************************************************************
-  # *                             Oversees                             *
-  # ********************************************************************
-
-  unless @oversees.empty?
-    @oversees = @oversees.sort_by {|name, duties| duties['info']['role']}
-    _h2 'Oversees'
-    _table.table do
-      _tbody do
-        @oversees.each do |name, duties|
-          _tr do
-            _td do
-              _a duties['info']['role'], href: "orgchart/#{name}"
+        # ********************************************************************
+        # *                             Details                              *
+        # ********************************************************************
+        _ul.list_group do
+          @role.each do |title, text|
+            next if title == 'info' or title == 'mtime'
+            _li.list_group_item.active do 
+              (title =~ /private/i) ? _h4.text_capitalize.text_warning(title) : _h4.text_capitalize(title)
+            end
+            _li.list_group_item do
+              _markdown text
             end
           end
         end
       end
     end
   end
-
-  # ********************************************************************
-  # *                             Details                              *
-  # ********************************************************************
-
-  @role.each do |title, text|
-    next if title == 'info' or title == 'mtime'
-    (title =~ /private/i) ? _h2.text_capitalize.text_warning(title) : _h2.text_capitalize(title)
-    _markdown text
-  end
 end
diff --git a/www/roster/views/errors.html.rb b/www/roster/views/errors.html.rb
index 53ff55f..aba03af 100644
--- a/www/roster/views/errors.html.rb
+++ b/www/roster/views/errors.html.rb
@@ -7,8 +7,12 @@ _html do
     _link rel: 'stylesheet', href: 'stylesheets/app.css'
   end
   _body? do
-    _whimsy_header '500 Error - Apache Whimsy'
-    _whimsy_content do
+    _whimsy_body(
+      title: '500 Internal Server Error - Apache Whimsy',
+      breadcrumbs: {
+        roster: '.',
+      }
+    ) do
       _div.row do
         _div.col_sm_10 do
           _div.panel.panel_danger do
@@ -21,6 +25,10 @@ _html do
                   _li "#{k} = #{@errors[k]}"
                 end
               end
+              _p do
+                _ 'ASF Members may also review access protected: '
+                _a '/members/log/', href: '/members/log/'
+              end 
             end
           end
         end
diff --git a/www/roster/views/group.html.rb b/www/roster/views/group.html.rb
index c34ab13..3509d6a 100644
--- a/www/roster/views/group.html.rb
+++ b/www/roster/views/group.html.rb
@@ -4,19 +4,21 @@
 
 _html do
   _base href: '..'
-  _title @group[:id]
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
-
-  _banner breadcrumbs: {
-    roster: '.',
-    group: 'group/',
-    @group[:id] => "group/#{@group[:id]}"
-  }
-
-  _div_.main!
-
-  _script src: 'app.js'
-  _.render '#main' do
-    _Group group: @group, auth: @auth
+  _body? do
+    _whimsy_body(
+      title: @group[:id],
+      breadcrumbs: {
+        roster: '.',
+        group: 'group/',
+        @group[:id] => "group/#{@group[:id]}"
+      }
+    ) do
+      _div_.main!
+      _script src: 'app.js'
+      _.render '#main' do
+        _Group group: @group, auth: @auth
+      end
+    end
   end
 end
diff --git a/www/roster/views/groups.html.rb b/www/roster/views/groups.html.rb
index 6b3be34..4e962b5 100644
--- a/www/roster/views/groups.html.rb
+++ b/www/roster/views/groups.html.rb
@@ -4,67 +4,85 @@
 
 _html do
   _base href: '..'
-  _title 'ASF Group list'
+  _title 
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
 
   _banner breadcrumbs: {
     roster: '.',
     group: 'group'
   }
-
-  # ********************************************************************
-  # *                             Summary                              *
-  # ********************************************************************
-
-  _h1_ 'Summary'
- 
-  _table.counts do
-    @groups.group_by(&:last).sort.each do |name, list|
-      _tr do
-        _td list.count
-        _td name
+  _body? do
+    _whimsy_body(
+      title: 'ASF Non-PMC Group list',
+      breadcrumbs: {
+        roster: '.',
+        group: 'group'
+      }
+    ) do
+      # ********************************************************************
+      # *                             Summary                              *
+      # ********************************************************************
+      _whimsy_panel_table(
+        title: 'Summary - Count of non-PMC Groups',
+        helpblock: -> {
+          _ 'This data is for non-PMC groups, including unix groups and other LDAP groups;
many of which are '
+          _span.glyphicon.glyphicon_lock :aria_hidden, class: 'text-primary', aria_label:
'ASF Members Private'
+          _ ' private to the ASF.'
+        }
+      ) do
+        _table.counts do
+          @groups.group_by(&:last).sort.each do |name, list|
+            _tr do
+              _td list.count
+              _td name
+            end
+          end
+        end
       end
-    end
-  end
-
-  # ********************************************************************
-  # *                          Complete list                           *
-  # ********************************************************************
 
-  _h1_ 'Groups'
-  _h5_ 'Click on a column heading to change the sort order'
-
-  _table.table.table_hover do
-    _thead do
-      _tr do
-        _th.sorting_asc 'Name', data_sort: 'string-ins'
-        _th 'Group type', data_sort: 'string'
-        _th 'Notes', data_sort: 'notes'
-      end
-    end
+      # ********************************************************************
+      # *                          Complete list                           *
+      # ********************************************************************
+      _whimsy_panel_table(
+        title: 'List of non-PMC Groups',
+        helpblock: -> {
+          _ 'Click on column headers to sort; click on name for '
+          _span.glyphicon.glyphicon_lock :aria_hidden, class: 'text-primary', aria_label:
'ASF Members Private'
+          _' detail page.'
+        }
+      ) do
+        _table.table.table_hover do
+          _thead do
+            _tr do
+              _th.sorting_asc 'Name', data_sort: 'string-ins'
+              _th 'Group type', data_sort: 'string'
+              _th 'Notes', data_sort: 'notes'
+            end
+          end
 
-    _tbody do
-      @groups.each do |name, type|
-        next if name == 'apldap'
-        _tr_ do
-          _td {_a name, href: "group/#{name}"}
-          _td type
+          _tbody do
+            @groups.each do |name, type|
+              next if name == 'apldap'
+              _tr_ do
+                _td {_a name, href: "group/#{name}"}
+                _td type
 
-          if @podlings[name]
-            if @podlings[name].status == 'retired'
-              _td.issue "retired podling"
-            else
-              _td "#{@podlings[name].status} podling"
+                if @podlings[name]
+                  if @podlings[name].status == 'retired'
+                    _td.issue "retired podling"
+                  else
+                    _td "#{@podlings[name].status} podling"
+                  end
+                else
+                  _td
+                end
+              end
             end
-          else
-            _td
           end
         end
       end
     end
   end
-
-
   _script %{
     $(".table").stupidtable();
   }
diff --git a/www/roster/views/not_found.html.rb b/www/roster/views/not_found.html.rb
index d1360fe..d6d4271 100644
--- a/www/roster/views/not_found.html.rb
+++ b/www/roster/views/not_found.html.rb
@@ -7,8 +7,12 @@ _html do
     _link rel: 'stylesheet', href: 'stylesheets/app.css'
   end
   _body? do
-    _whimsy_header '404 Error - Apache Whimsy'
-    _whimsy_content do
+    _whimsy_body(
+      title: '404 Not Found Error - Apache Whimsy',
+      breadcrumbs: {
+        roster: '.',
+      }
+    ) do
       _div.row do
         _div.col_sm_10 do
           _div.panel.panel_danger do
diff --git a/www/roster/views/orgchart.html.rb b/www/roster/views/orgchart.html.rb
index 108cc0a..791fa49 100644
--- a/www/roster/views/orgchart.html.rb
+++ b/www/roster/views/orgchart.html.rb
@@ -3,40 +3,50 @@
 #
 
 _html do
-  _title 'ASF Orgchart'
   _base href: '..'
   _link rel: 'stylesheet', href: 'stylesheets/app.css'
 
-  _banner breadcrumbs: {
-    roster: '.'
-  }
-
-  _h1_ 'ASF Organization Chart'
-
-  _table.table do
-    _thead do
-      _th 'Title'
-      _th 'Contact, Chair, or Person holding that title'
-      _th 'Public Website'
-    end
-
-    _tbody do
-      @org.sort_by {|key, value| value['info']['role']}.each do |key, value|
-        _tr_ do
-          # title
-          _td do
-            _a value['info']['role'], href: "orgchart/#{key}"
+  _body? do
+    _whimsy_body(
+      title: 'ASF Organization Chart',
+      breadcrumbs: {
+        roster: '.',
+        orgchart: 'orgchart/'
+      }
+    ) do
+      _whimsy_panel_table(
+        title: 'Corporate Officer Listing',
+        helpblock: -> {
+          _ 'This table lists all Corporate officers of the ASF, not including Apache TLP
project Vice Presidents (except for a few special PMCs).'
+        }
+      ) do
+        _table.table do
+          _thead do
+            _th 'Title'
+            _th 'Contact, Chair, or Person holding that title'
+            _th 'Public Website'
           end
 
-          # person holding the role
-          _td do
-            id = value['info']['id'] || value['info']['chair']
-            _a ASF::Person.find(id).public_name, href: "committer/#{id}"
-          end
-          
-          # Website - often valuable to people looking for info
-          _td do
-            value['info']['website'].nil? ? _('')  : _a('website', href: value['info']['website'])
+          _tbody do
+            @org.sort_by {|key, value| value['info']['role']}.each do |key, value|
+              _tr_ do
+                # title
+                _td do
+                  _a value['info']['role'], href: "orgchart/#{key}"
+                end
+
+                # person holding the role
+                _td do
+                  id = value['info']['id'] || value['info']['chair']
+                  _a ASF::Person.find(id).public_name, href: "committer/#{id}"
+                end
+                
+                # Website - often valuable to people looking for info
+                _td do
+                  value['info']['website'].nil? ? _('')  : _a('website', href: value['info']['website'])
+                end
+              end
+            end
           end
         end
       end

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

Mime
View raw message