aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <a3li@gentoo.org>2012-07-01 19:56:15 +0200
committerAlex Legler <a3li@gentoo.org>2012-07-01 19:56:15 +0200
commit290fff07c055f278dd78238ff5db4ab92fde88c8 (patch)
tree8ca891bd710979e52cfc84183be155be9a527699
parentUse correct release and revision dates. (diff)
downloadglsamaker-290fff07c055f278dd78238ff5db4ab92fde88c8.tar.gz
glsamaker-290fff07c055f278dd78238ff5db4ab92fde88c8.tar.bz2
glsamaker-290fff07c055f278dd78238ff5db4ab92fde88c8.zip
Add meaningful page titles
-rw-r--r--app/controllers/glsa_controller.rb14
-rw-r--r--app/controllers/index_controller.rb2
2 files changed, 12 insertions, 4 deletions
diff --git a/app/controllers/glsa_controller.rb b/app/controllers/glsa_controller.rb
index c76f5ed..c3e2faa 100644
--- a/app/controllers/glsa_controller.rb
+++ b/app/controllers/glsa_controller.rb
@@ -13,13 +13,13 @@
class GlsaController < ApplicationController
def requests
@pageID = "requests"
- @pageTitle = "Pooled GLSA requests"
+ @pageTitle = "GLSA requests"
@glsas = Glsa.where(:status => 'request').order('updated_at DESC')
end
def drafts
@pageID = "drafts"
- @pageTitle = "Pooled GLSA drafts"
+ @pageTitle = "GLSA drafts"
@glsas = Glsa.where(:status => 'draft').order('updated_at DESC')
end
@@ -98,6 +98,7 @@ class GlsaController < ApplicationController
@glsa = Glsa.find(params[:id])
return unless check_object_access!(@glsa)
@rev = params[:rev_id].nil? ? @glsa.last_revision : @glsa.revisions.find_by_revid(params[:rev_id])
+ @pageTitle = "GLSA #{@glsa.glsa_id} (#{@rev.title})"
if @rev == nil
flash[:error] = "Invalid revision ID"
@@ -147,7 +148,8 @@ class GlsaController < ApplicationController
@glsa = Glsa.find(params[:id])
return unless check_object_access!(@glsa)
@rev = @glsa.last_revision
-
+ @pageTitle = "Edit GLSA #{@glsa.glsa_id}"
+
set_up_editing
end
@@ -293,6 +295,7 @@ class GlsaController < ApplicationController
def prepare_release
@glsa = Glsa.find(params[:id])
return unless check_object_access!(@glsa)
+ @pageTitle = "Releasing GLSA #{@glsa.glsa_id}"
if current_user.access < 2
deny_access "Tried to prepare release"
@@ -319,9 +322,10 @@ class GlsaController < ApplicationController
def release
@glsa = Glsa.find(params[:id])
return unless check_object_access!(@glsa)
+ @pageTitle = "Releasing GLSA #{@glsa.glsa_id}"
if current_user.access < 2
- deny_access "Tried to prepare release"
+ deny_access "Tried to release"
return
end
@@ -370,6 +374,7 @@ class GlsaController < ApplicationController
def finalize_release
@glsa = Glsa.find(params[:id])
+ @pageTitle = "Released GLSA #{@glsa.glsa_id}"
if params[:close_bugs] == '1'
message = "GLSA #{@glsa.glsa_id}"
@@ -384,6 +389,7 @@ class GlsaController < ApplicationController
def diff
@glsa = Glsa.find(params[:id])
return unless check_object_access!(@glsa)
+ @pageTitle = "Comparing GLSA #{@glsa.glsa_id}"
rev_old = @glsa.revisions.find_by_revid(params[:old])
rev_new = @glsa.revisions.find_by_revid(params[:new])
diff --git a/app/controllers/index_controller.rb b/app/controllers/index_controller.rb
index b9f2a8b..2420092 100644
--- a/app/controllers/index_controller.rb
+++ b/app/controllers/index_controller.rb
@@ -15,6 +15,7 @@ class IndexController < ApplicationController
def index
@my_drafts = Glsa.where(:status => 'draft', :submitter => current_user.id).order("updated_at DESC").limit(10)
+ @pageTitle = "Welcome"
end
def error
@@ -30,6 +31,7 @@ class IndexController < ApplicationController
end
def about
+ @pageTitle = "About GLSAMaker 2"
end
def profile