whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] 02/03: Use _whimsy_accordion_item with better style
Date Sat, 04 May 2019 21:05:55 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

commit 1bcae598d6f6c4f0d1b308a991111200b68be09a
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Sat May 4 17:01:56 2019 -0400

    Use _whimsy_accordion_item with better style
---
 www/members/mentors.cgi | 52 +++++++++++++++++++------------------------------
 1 file changed, 20 insertions(+), 32 deletions(-)

diff --git a/www/members/mentors.cgi b/www/members/mentors.cgi
index eca438f..27f2786 100755
--- a/www/members/mentors.cgi
+++ b/www/members/mentors.cgi
@@ -77,42 +77,30 @@ _html do
     ) do
       _div.panel_group id: MENTORS_LIST, role: "tablist", aria_multiselectable: "true" do
         mentors.each_with_index do |(apacheid, mentor), n| # TODO Should we randomize the
default listing?
-          _div!.panel.panel_default  id: apacheid do
-            _div!.panel_heading role: "tab", id: "#{MENTORS_LIST}h#{n}" do
-              _h4!.panel_title do
-                _a!.collapsed role: "button", data_toggle: "collapse",  aria_expanded: "false",
data_parent: "##{MENTORS_LIST}", href: "##{MENTORS_LIST}c#{n}", aria_controls: "#{MENTORS_LIST}c#{n}"
do
-                  _ "#{mentor[MentorFormat::PUBLICNAME]}  (#{apacheid})  Timezone: #{mentor[MentorFormat::TIMEZONE]}
 "
-                  _span.glyphicon.glyphicon_chevron_down id: "#{apacheid}-nav"
-                  mentor.delete(MentorFormat::PUBLICNAME) # So not re-displayed below
-                end
-              end
-            end
-            _div!.panel_collapse.collapse id: "#{MENTORS_LIST}c#{n}", role: "tabpanel", aria_labelledby:
"#{MENTORS_LIST}h#{n}" do
-              _div!.panel_body do
-                _table.table.table_hover do
-                  _tbody do
-                    mentor.each do |k, v|
-                      _tr do
-                        _td!.text_right do
-                          _span.text_primary uimap.has_key?(k) ? "#{uimap[k][0]}" : "#{k}"
-                        end
-                        _td!.text_left do
-                          v = v.join(', ') if v.kind_of?(Array)
-                          _markdown v
-                        end
-                      end
+          _whimsy_accordion_item(listid: MENTORS_LIST, itemid: apacheid, itemtitle: "#{mentor[MentorFormat::PUBLICNAME]}
 (#{apacheid})  Timezone: #{mentor[MentorFormat::TIMEZONE]}  ", n: n, itemclass: 'panel-primary')
do
+            _table.table.table_hover do
+              _tbody do
+                mentor.delete(MentorFormat::PUBLICNAME) # So not re-displayed again
+                mentor.each do |k, v|
+                  _tr do
+                    _td!.text_right do
+                      _span.text_primary uimap.has_key?(k) ? "#{uimap[k][0]}" : "#{k}"
                     end
-                    _tr do
-                      _td!.text_right do
-                        _ 'ASF Projects/Podlings Involved In'
-                      end
-                      _td!.text_left do
-                        # TODO: instead of link to roster, this could read and display here
-                        _a "#{MentorFormat::ROSTER}#{apacheid}", href: "#{MentorFormat::ROSTER}#{apacheid}"
-                      end
+                    _td!.text_left do
+                      v = v.join(', ') if v.kind_of?(Array)
+                      _markdown v
                     end
                   end
                 end
+                _tr do
+                  _td!.text_right do
+                    _ 'ASF Projects/Podlings Involved In'
+                  end
+                  _td!.text_left do
+                    # TODO: instead of link to roster, this could read and display here
+                    _a "#{MentorFormat::ROSTER}#{apacheid}", href: "#{MentorFormat::ROSTER}#{apacheid}"
+                  end
+                end
               end
             end
           end


Mime
View raw message