summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-22 12:15:48 +0100
committerJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-22 12:15:48 +0100
commit5d15c975b7d4509d786ab7b95ec61ed7ad166b14 (patch)
tree8d19a54d7db235f0fe6266ffe9ed58e702285055
parentab63774d954fe1f967a97ffe5a0a66016eca2257 (diff)
add GS_BUILDNAME as tooltip in the footer
-rw-r--r--app/views/layouts/_footer.html.haml8
-rw-r--r--config/initializers/update_gs_version_number.rb7
-rw-r--r--db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb9
3 files changed, 22 insertions, 2 deletions
diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml
index a0f2940..73f12e0 100644
--- a/app/views/layouts/_footer.html.haml
+++ b/app/views/layouts/_footer.html.haml
@@ -1,8 +1,12 @@
- cache(['application_footer', I18n.locale]) do
%footer
%ul{:class => 'nav nav-pills'}
- %li
- %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
+ - if !GsParameter.get('GEMEINSCHAFT_BUILDNAME').nil?
+ %li
+ %a{:href => "http://amooma.de/gemeinschaft/gs5", :ref => 'tooltip', :title => "Gemeinschaft Version " + GsParameter.get('GEMEINSCHAFT_VERSION') + "\nBuild #" + GsParameter.get('GEMEINSCHAFT_BUILDNAME')} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
+ - else
+ %li
+ %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
- if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user)
%li
%a{:href => "http://amooma.de"} Support und Consulting
diff --git a/config/initializers/update_gs_version_number.rb b/config/initializers/update_gs_version_number.rb
index 4770858..d9e1aae 100644
--- a/config/initializers/update_gs_version_number.rb
+++ b/config/initializers/update_gs_version_number.rb
@@ -7,3 +7,10 @@ if !ENV['GS_VERSION'].nil? && GsParameter.table_exists? && GsParameter.get('GEME
version.value = ENV['GS_VERSION']
version.save
end
+
+if !ENV['GS_BUILDNAME'].nil? && GsParameter.table_exists? && GsParameter.get('GS_BUILDNAME') != ENV['GS_BUILDNAME']
+ buildname = GsParameter.find_or_create_by_name('GEMEINSCHAFT_BUILDNAME')
+ buildname.section = 'Generic'
+ buildname.value = ENV['GS_BUILDNAME']
+ buildname.save
+end
diff --git a/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb b/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb
new file mode 100644
index 0000000..d4cd660
--- /dev/null
+++ b/db/migrate/20130122121100_add_gemeinschaft_buildname_to_gs_parameter.rb
@@ -0,0 +1,9 @@
+class AddGemeinschaftBuildnameToGsParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'GEMEINSCHAFT_BUILDNAME', :section => 'Generic', :value => '', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:name => 'GEMEINSCHAFT_BUILDNAME').destroy_all
+ end
+end