From f970cf5e7c2c68e51e886e77278e328d4d353e46 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 17 Sep 2013 13:51:00 +0100 Subject: Remove demo customizations --- lib/config/custom-routes.rb | 4 ---- lib/controller_patches.rb | 10 ---------- lib/customstates.rb | 18 +++++------------- lib/public_body_categories_en.rb | 8 +------- lib/views/general/mycontroller.html.erb | 7 ------- lib/views/help/about.es.html.erb | 8 -------- lib/views/help/help_out.html.erb | 9 --------- lib/views/help/help_out.rhml | 9 --------- lib/views/outgoing_mailer/initial_request.text.erb | 9 --------- 9 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 lib/views/general/mycontroller.html.erb delete mode 100644 lib/views/help/about.es.html.erb delete mode 100644 lib/views/help/help_out.html.erb delete mode 100644 lib/views/help/help_out.rhml delete mode 100644 lib/views/outgoing_mailer/initial_request.text.erb diff --git a/lib/config/custom-routes.rb b/lib/config/custom-routes.rb index 5aeb7c2..41feae8 100644 --- a/lib/config/custom-routes.rb +++ b/lib/config/custom-routes.rb @@ -1,8 +1,4 @@ # Here you can override or add to the pages in the core website Rails.application.routes.draw do - # brand new controller example - match '/mycontroller' => 'general#mycontroller' - # Additional help page example - match '/help/help_out' => 'help#help_out' end diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index 9959f86..8695d30 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -5,14 +5,4 @@ # See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode # Rails.configuration.to_prepare do - # Example adding an instance variable to the frontpage controller - GeneralController.class_eval do - def mycontroller - @say_something = "Greetings friend" - end - end - HelpController.class_eval do - def help_out - end - end end diff --git a/lib/customstates.rb b/lib/customstates.rb index c09eb8c..15704d4 100644 --- a/lib/customstates.rb +++ b/lib/customstates.rb @@ -19,17 +19,13 @@ module InfoRequestCustomStates end # Mixin methods for InfoRequest - module ClassMethods + module ClassMethods def theme_display_status(status) - if status == 'transferred' - _("Transferred.") - else - raise _("unknown status ") + status - end + raise _("unknown status ") + status end def theme_extra_states - return ['transferred'] + return [] end end end @@ -39,12 +35,8 @@ module RequestControllerCustomStates def theme_describe_state(info_request) # called after the core describe_state code. It should # end by raising an error if the status is unknown - if info_request.calculate_status == 'transferred' - flash[:notice] = _("Authority has transferred your request to a different public body.") - redirect_to request_url(@info_request) - else - raise "unknown calculate_status " + info_request.calculate_status - end + + raise "unknown calculate_status " + info_request.calculate_status end end diff --git a/lib/public_body_categories_en.rb b/lib/public_body_categories_en.rb index a8969ba..3bf90c5 100644 --- a/lib/public_body_categories_en.rb +++ b/lib/public_body_categories_en.rb @@ -7,10 +7,4 @@ # [ "another_tag_2", "Another sub category title", "another descriptive sentence"] # ]) -PublicBodyCategories.add(:en, [ - "Silly ministries", - [ "useless_agency", "Useless ministries", "a useless ministry" ], - [ "lonely_agency", "Lonely agencies", "a lonely agency"], - "Popular agencies", - [ "popular_agency", "Popular agencies", "a lonely agency"] -]) +PublicBodyCategories.add(:en, []) diff --git a/lib/views/general/mycontroller.html.erb b/lib/views/general/mycontroller.html.erb deleted file mode 100644 index ad642d3..0000000 --- a/lib/views/general/mycontroller.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% @title = "My new controller" %> - -

My new controller

- -

This is a view of a controller that does almost nothing, except output the words <%= @say_something %>

- - diff --git a/lib/views/help/about.es.html.erb b/lib/views/help/about.es.html.erb deleted file mode 100644 index 9588249..0000000 --- a/lib/views/help/about.es.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% @title = "Sobre" %> -<%#-*- coding: utf8 -*-%> -<%= render :partial => 'sidebar' %> - -
-

¡Bonjiorno amis!

-

Esta sito tu aidare a faire los requestio

-
diff --git a/lib/views/help/help_out.html.erb b/lib/views/help/help_out.html.erb deleted file mode 100644 index 6fadca4..0000000 --- a/lib/views/help/help_out.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<% @title = "Help out" %> - -<%= render :partial => 'sidebar' %> -
-

Help us!

- -

This is a custom "help out" page, showing how you can add new pages to Alaveteli from within a theme.

-
- diff --git a/lib/views/help/help_out.rhml b/lib/views/help/help_out.rhml deleted file mode 100644 index 6744a27..0000000 --- a/lib/views/help/help_out.rhml +++ /dev/null @@ -1,9 +0,0 @@ -<% @title = "Help out" %> - -<%= render :partial => 'sidebar' %> - -

Help us!

- -

This is a custom "help out" page, showing how you can add new pages to Alaveteli from a theme. There's no navigation to it, though! You'd need to add that in your own custom _sidebar.rhtml

- - diff --git a/lib/views/outgoing_mailer/initial_request.text.erb b/lib/views/outgoing_mailer/initial_request.text.erb deleted file mode 100644 index f927ad2..0000000 --- a/lib/views/outgoing_mailer/initial_request.text.erb +++ /dev/null @@ -1,9 +0,0 @@ -<%= raw @outgoing_message.body.strip %> - -------------------------------------------------------------------- - -<%= _('This is an FOI request done via the {{site_name}} website. This footer has been overriden by the sample Alaveteli theme.', :site_name => site_name) %> - -<%= render :partial => 'followup_footer' %> - -------------------------------------------------------------------- -- cgit v1.2.3