whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] 03/03: Ow, my eyes! Add some style
Date Fri, 10 May 2019 12:11:36 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 22c67e28d4efcdfa4252a6bd0bd6c3d6636329c1
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Fri May 10 08:11:21 2019 -0400

    Ow, my eyes! Add some style
---
 www/board/missing-reports.cgi | 72 +++++++++++++++++++++++++++++++------------
 1 file changed, 52 insertions(+), 20 deletions(-)

diff --git a/www/board/missing-reports.cgi b/www/board/missing-reports.cgi
index 28a6eea..97efe39 100755
--- a/www/board/missing-reports.cgi
+++ b/www/board/missing-reports.cgi
@@ -1,34 +1,66 @@
 #!/usr/bin/env ruby
+PAGETITLE = "Missing Board Reports" # Wvisible:board
 
 $LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require 'whimsy/asf'
 require 'whimsy/asf/agenda'
 
-records = 'http://www.apache.org/foundation/records/minutes/'
+RECORDS = 'http://www.apache.org/foundation/records/minutes/'
 
-Dir.chdir ASF::SVN['foundation_board']
-
-agendas = Dir['**/board_agenda_*'].sort_by {|name| File.basename(name)}[-12..-1]
 
+# Produce HTML
 _html do
-  _h1 'Missing reports by month'
-
-  _table do
-    agendas.reverse.each do |agenda|
-      parsed = ASF::Board::Agenda.parse(File.read(agenda.untaint), true)
-
-      _tr_ do
-        _td parsed.count {|report| report["missing"]}, align: 'right'
-        _td do
-          if agenda.include? 'archived'
-            year = agenda[/\d+/]
-            minutes = File.basename(agenda).sub('agenda', 'minutes')
-            _a File.basename(agenda), href: "#{records}/#{year}/#{minutes}"
-          else
-            date = agenda[/\d+_\d+_\d+/].gsub('_', '-')
-            _a File.basename(agenda), href: "agenda/#{date}/"
+  _body? do
+    _whimsy_body(
+      title: PAGETITLE,
+      related: {
+        "/board/agenda" => "Current Month Board Agenda",
+        "/board/minutes" => "Past Minutes, Categorized",
+        "https://www.apache.org/foundation/board/calendar.html" => "Past Minutes, Dated",
+        "https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See
This Source Code"
+      },
+      helpblock: -> {
+        _p %{
+          This counts the number of expected reports to the board that were not timely submitted
each month.
+          There are a variety of reasons this happens; often projects ask to report a month
late if the chair is unavailable.
+          Note that the missing number for the current month is as of now; some projects
report only a few days before the meeting.
+        }
+      }
+    ) do
+      _h1 'Missing Board Reports by Month'
+      Dir.chdir ASF::SVN['foundation_board']
+      agendas = Dir['**/board_agenda_*'].sort_by {|name| File.basename(name)}[-12..-1]
+      _table.table.table_hover.table_striped do
+        _thead_ do
+          _tr do
+            _th.col_md_1 '# Reports'
+            _th.col_md_1 '# Missing'
+            _th 'Board Minutes or Agenda'
+          end
+        end
+        _tbody do
+          agendas.reverse.each do |agenda|
+            parsed = ASF::Board::Agenda.parse(File.read(agenda.untaint), true)
+            _tr_ do
+              _td parsed.count, align: 'right'
+              _td parsed.count {|report| report["missing"]}, align: 'right'
+              _td do
+                if agenda.include? 'archived'
+                  year = agenda[/\d+/]
+                  minutes = File.basename(agenda).sub('agenda', 'minutes')
+                  _a File.basename(agenda), href: "#{RECORDS}/#{year}/#{minutes}"
+                else
+                  date = agenda[/\d+_\d+_\d+/].gsub('_', '-')
+                  _a File.basename(agenda), href: "agenda/#{date}/"
+                end
+              end
+            end
           end
         end
       end
     end
   end
 end
+


Mime
View raw message