Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated footer #295

Merged
merged 1 commit into from
Jun 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions app/assets/stylesheets/bootstrap_and_overrides.css.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,18 @@ section {
}

footer {
margin-top: 50px;
padding-top: 20px;
border-top: 1px solid lightGrey;
color: #888;
margin-top: 40px;
padding-top: 14px;
margin-bottom: 20px;
border-top: 1px solid #e4e4e4;

a {
color: mix(#888, @linkColor, 70%);
}
}


table {

a.sortdown:after {
Expand Down
13 changes: 13 additions & 0 deletions app/views/layouts/_footer.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- unless FoodsoftConfig[:page_footer].to_s == 'blank'
%footer
.pull-right
= link_to_unless FoodsoftConfig[:foodsoft_url].blank?, I18n.t('layouts.foodsoft'), FoodsoftConfig[:foodsoft_url]
- if Foodsoft::REVISION.blank?
= "v#{Foodsoft::VERSION}"
- else
%abbr{title: t('.revision', revision: Foodsoft::REVISION)}= "v#{Foodsoft::VERSION}"
%p
- if (s = FoodsoftConfig[:page_footer]).blank?
= link_to FoodsoftConfig[:name], FoodsoftConfig[:homepage]
- else
= raw s
3 changes: 1 addition & 2 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@
%h1= yield(:title)
= yield

%footer
%p= t '.footer'
= render 'layouts/footer'
#modalContainer.modal.hide.fade(tabindex="-1" role="dialog")
3 changes: 1 addition & 2 deletions app/views/layouts/login.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
%h1= yield(:title)
= yield

%footer
%p= t '.footer'
= render 'layouts/footer'
6 changes: 6 additions & 0 deletions config/app_config.yml.SAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ default: &defaults
# documentation URL for the apples&pears work system
applepear_url: https://github.com/foodcoops/foodsoft/wiki/%C3%84pfel-u.-Birnen

# custom foodsoft software URL (used in footer)
#foodsoft_url: https://github.com/foodcoops/foodsoft

# Default language
#default_locale: en
# By default, foodsoft takes the language from the webbrowser/operating system.
Expand Down Expand Up @@ -81,6 +84,9 @@ default: &defaults
# after each sublist.
#pdf_add_page_breaks: true

# Page footer (html allowed). Default is a Foodsoft footer. Set to `blank` for no footer.
#page_footer: <a href="http://www.foodcoop.test/">FC Test</a> is supported by <a href="http://www.hoster.test/">Hoster</a>.

# email address to be used as sender
email_sender: foodsoft@foodcoop.test

Expand Down
5 changes: 5 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ class Application < Rails::Application
config.assets.precompile += [ 'vendor/assets/javascripts/*.js' ]

end

# Foodsoft version
VERSION = File.read(Rails.root.join('VERSION')).strip
# Current revision, or +nil+
REVISION = (File.read(Rails.root.join('REVISION')).strip rescue nil)
end
3 changes: 2 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,12 @@ de:
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Hilfe: %{url}'
foodsoft: Foodsoft
footer:
revision: Revision %{revision}
header:
feedback:
desc: Fehler gefunden? Vorschlag? Idee? Kritik?
title: Feedback
footer: Foodsoft, open source software to manage a non-profit food coop.
help: Hilfe
logout: Abmelden
ordergroup: Meine Bestellgruppe
Expand Down
3 changes: 2 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -862,11 +862,12 @@ en:
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Help: %{url}'
foodsoft: Foodsoft
footer:
revision: revision %{revision}
header:
feedback:
desc: Found a bug? Suggestions? Ideas? Review?
title: Feedback
footer: Foodsoft, open source software to manage a non-profit food coop.
help: Help
logout: Logout
ordergroup: My ordergroup
Expand Down
1 change: 0 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,6 @@ fr:
feedback:
desc: Tu as trouvé une erreur? Tu as des propositions, des idées, des critiques?
title: Retours
footer: Foodsoft, un logiciel libre pour gérer les Boufcoops.
help: Aide
logout: Déconnexion
ordergroup: Ta cellule
Expand Down
3 changes: 2 additions & 1 deletion config/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -862,11 +862,12 @@ nl:
footer_3_homepage: 'Foodcoop: %{url}'
footer_4_help: 'Help: %{url}'
foodsoft: Foodsoft
footer:
revision: revisie %{revision}
header:
feedback:
desc: Foutje gevonden? Suggesties? Ideeën? Commentaar?
title: Feedback
footer: Foodsoft, open source software voor non-profit voedselcoops.
help: Help
logout: Uitloggen
ordergroup: Mijn huishouden
Expand Down
3 changes: 2 additions & 1 deletion lib/foodsoft_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def setup_database
def set_missing
config.replace({
use_nick: true,
use_apple_points: true
use_apple_points: true,
foodsoft_url: 'https://github.com/foodcoops/foodsoft'
}.merge(config))
end

Expand Down