summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2018-04-25 22:37:46 +0100
committerbill-auger <mr.j.spam.me@gmail.com>2018-04-27 11:05:24 -0400
commitb39654fb4a70555fd00429d5b8ed1d582fc97a12 (patch)
tree443626c61b8285c09886c397dba45fddc53662e9
parente8b2cb9df196024fdfb71607282836613909190d (diff)
new home page
-rw-r--r--app/models/project.rb20
-rw-r--r--app/views/hooks/welcome/_view_welcome_index_left.html.erb64
-rw-r--r--lib/plugins/welcome/init.rb9
-rw-r--r--lib/welcome/hooks.rb7
-rw-r--r--public/themes/parabola/stylesheets/application.css2
5 files changed, 102 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 42413924a..774c2ece6 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -317,6 +317,26 @@ class Project < ActiveRecord::Base
self.find(*args)
end
+ def self.branding
+ @@branding ||= (self.where :name => 'Branding').first
+ end
+
+ def self.documentation
+ @@documentation ||= (self.where :name => 'Documentation').first
+ end
+
+ def self.isos
+ @@isos ||= (self.where :name => 'Installation media').first
+ end
+
+ def self.packages
+ @@packages ||= (self.where :name => 'Packages').first
+ end
+
+ def self.servers
+ @@servers ||= (self.where :name => 'Servers').first
+ end
+
alias :base_reload :reload
def reload(*args)
@principals = nil
diff --git a/app/views/hooks/welcome/_view_welcome_index_left.html.erb b/app/views/hooks/welcome/_view_welcome_index_left.html.erb
new file mode 100644
index 000000000..9fb021357
--- /dev/null
+++ b/app/views/hooks/welcome/_view_welcome_index_left.html.erb
@@ -0,0 +1,64 @@
+<% projects =
+[
+ {
+ :title => "Branding" ,
+ :instance => Project.branding ,
+ :desc => "Parabola branding and artwork"
+ } ,
+ {
+ :title => "Documentation" ,
+ :instance => Project.documentation ,
+ :desc => "Parabola documentation"
+ } ,
+ {
+ :title => "Installation media" ,
+ :instance => Project.isos ,
+ :desc => "ISO images and installers"
+ } ,
+ {
+ :title => "Packages" ,
+ :instance => Project.packages ,
+ :desc => "Freedom issues, malfunctioning packages, packaging requests"
+ } ,
+ {
+ :title => "Servers" ,
+ :instance => Project.servers ,
+ :desc => "Parabola servers and websites"
+ }
+] %>
+
+
+<h2>Welcome to the Parabola Issue Tracker</h2>
+
+<img src="https://wiki.parabola.nu/images/a/af/Parabolagnu%2Blinuxlibre-dark-scalable.svg" />
+
+<p></p>
+
+<h3>View my watched issues:</h3>
+<table class="welcome-issues-table">
+ <tr><td><%= link_to "View my issues" , my_page_path %></td></tr>
+</table>
+
+<h3>View current open issues:</h3>
+<table class="welcome-issues-table">
+<% projects.each do | project | %>
+ <tr>
+ <td><%= link_to project[:title] , (project_issues_path project[:instance]) %></td>
+ <td><%= project[:desc] %></td>
+ </tr>
+<% end %>
+</table>
+
+<h3>Open a new issue:</h3>
+<table class="welcome-issues-table">
+<% projects.each do | project | %>
+ <tr>
+ <td><%= link_to project[:title] , (new_project_issue_path project[:instance]) %></td>
+ <td><%= project[:desc] %></td>
+ </tr>
+<% end %>
+</table>
+
+Please use the
+<%= link_to "'Assist' Mailing List" , 'https://lists.parabola.nu/mailman/listinfo/assist' %>
+for other general questions, help, and comments.
diff --git a/lib/plugins/welcome/init.rb b/lib/plugins/welcome/init.rb
new file mode 100644
index 000000000..b61a87177
--- /dev/null
+++ b/lib/plugins/welcome/init.rb
@@ -0,0 +1,9 @@
+require 'redmine'
+require_dependency 'welcome/hooks'
+
+Redmine::Plugin.register :welcome do
+ name 'Welcome'
+ author 'Parabola'
+ description 'Parabola content for home page'
+ version '0.0.1'
+end
diff --git a/lib/welcome/hooks.rb b/lib/welcome/hooks.rb
new file mode 100644
index 000000000..cf08b2bf7
--- /dev/null
+++ b/lib/welcome/hooks.rb
@@ -0,0 +1,7 @@
+module Welcome
+ HOOKS = [ :view_welcome_index_left ]
+
+ class Hooks < Redmine::Hook::ViewListener
+ HOOKS.each { | hook |render_on hook , :partial => "hooks/welcome/#{hook}" }
+ end
+end
diff --git a/public/themes/parabola/stylesheets/application.css b/public/themes/parabola/stylesheets/application.css
index 006ad81d8..14584dd7f 100644
--- a/public/themes/parabola/stylesheets/application.css
+++ b/public/themes/parabola/stylesheets/application.css
@@ -52,3 +52,5 @@ h4 { border-bottom: dotted 1px #c0c0c0; }
#top-menu a.projects { background-image: url(../../../images/projects.png); }
#top-menu a.administration { background-image: url(../images/wrench.png); }
#top-menu a.help { background-image: url(../../../images/help.png); }
+
+.welcome-issues-table { margin-bottom: 2em ; }