[Xfce4-commits] <moka:nick/maintainer-improvements> Also group project on user page.
Nick Schermer
noreply at xfce.org
Sat Oct 15 21:16:05 CEST 2011
Updating branch refs/heads/nick/maintainer-improvements
to c04c42ed788b42a26efede9860a40647d5439de3 (commit)
from 00e971302eec4b298a740095bc5d95bb56aaea18 (commit)
commit c04c42ed788b42a26efede9860a40647d5439de3
Author: Nick Schermer <nick at xfce.org>
Date: Sat Oct 15 19:55:07 2011 +0200
Also group project on user page.
lib/models/maintainer.rb | 9 +++++++++
lib/views/index_login.haml | 18 +++++++++++-------
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/lib/models/maintainer.rb b/lib/models/maintainer.rb
index efb15aa..880b1e8 100755
--- a/lib/models/maintainer.rb
+++ b/lib/models/maintainer.rb
@@ -62,6 +62,15 @@ module Moka
end
names.join(', ')
end
+
+ def project_classifications
+ classes = []
+ for project in self.projects
+ pclass = project.classification
+ classes << pclass if pclass
+ end
+ classes.uniq.sort
+ end
end
end
end
diff --git a/lib/views/index_login.haml b/lib/views/index_login.haml
index 156a9a2..5c202ac 100644
--- a/lib/views/index_login.haml
+++ b/lib/views/index_login.haml
@@ -13,11 +13,15 @@
%a{:href => "/collection/#{collection.name}/new-release"} Release new version
%h2 Projects
+- projects = authentication_user.projects.sort
%table
- %tr
- - for project in authentication_user.projects.sort
- %tr
- %th
- %a{:href => "/project/#{project.name}"} #{project.name}
- %td
- %a{:href => "/project/#{project.name}/new-release"} Release new version
+ - for classification in authentication_user.project_classifications
+ %tr{:class => 'head'}
+ %th{:colspan => 2} #{classification.name.capitalize}
+ - for project in projects
+ - if project.classification.eql? classification
+ %tr
+ %th
+ %a{:href => "/project/#{project.name}"} #{project.name}
+ %td
+ %a{:href => "/project/#{project.name}/new-release"} Release new version
More information about the Xfce4-commits
mailing list