Fixed feedback.
This commit is contained in:
parent
181695d1bd
commit
dce79802e0
5 changed files with 16 additions and 10 deletions
|
@ -4,9 +4,9 @@ class FeedbackController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
unless params[:message].blank?
|
||||
Mailer.feedback(current_user, params[:message]).deliver
|
||||
redirect_to new_feedback_url, :notice => 'The message was successfully delivered.'
|
||||
if params[:message].present?
|
||||
Mailer.feedback(FoodsoftConfig.scope, current_user, params[:message]).deliver
|
||||
redirect_to root_url, :notice => "Das Feedback wurde erfolgreich verschickt. Vielen Dank!"
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
|
|
@ -65,7 +65,8 @@ class Mailer < ActionMailer::Base
|
|||
:subject => "[#{FoodsoftConfig[:name]}] Gruppenkonto im Minus"
|
||||
end
|
||||
|
||||
def feedback(user, feedback)
|
||||
def feedback(foodcoop, user, feedback)
|
||||
set_foodcoop_scope(foodcoop)
|
||||
@user = user
|
||||
@feedback = feedback
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
%h2 Fehler gefunden? Vorschlag? Idee? Kritik?
|
||||
- title "Gib Feedback"
|
||||
|
||||
%p Fehler gefunden? Vorschlag? Idee? Kritik? Wir freuen uns über jegliches Feedback.
|
||||
%p
|
||||
Bitte beachte, dass das Foodsoft Team nur die Software wartet. Bei Fragen zur Organisation in Deiner Foodcoop,
|
||||
kontaktiere besser die entsprechenden Ansprechpartner.
|
||||
|
||||
= form_tag feedback_path do
|
||||
%p
|
||||
= text_area_tag :message, nil, :size => "40x15"
|
||||
= submit_tag "Absenden"
|
||||
= text_area_tag :message, nil, class: 'input-xxlarge', rows: 10, required: 'required'
|
||||
.form-actions
|
||||
= submit_tag "Absenden", class: 'btn btn-primary'
|
|
@ -1,4 +1,4 @@
|
|||
= @user.nick
|
||||
schrieb am #{I18n.l Time.now, :format => :short}:
|
||||
|
||||
\#{@feedback}
|
||||
= @feedback
|
||||
|
|
|
@ -51,7 +51,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
|||
primary.item :homepage, FoodsoftConfig[:name], FoodsoftConfig[:homepage]
|
||||
end
|
||||
primary.item :help, 'Hilfe', 'https://github.com/bennibu/foodsoft/wiki/Doku', id: nil
|
||||
primary.item :feedback, 'Feedback', 'new_feedback_path', title: "Fehler gefunden? Vorschlag? Idee? Kritik?", id: nil
|
||||
primary.item :feedback, 'Feedback', new_feedback_path, title: "Fehler gefunden? Vorschlag? Idee? Kritik?", id: nil
|
||||
primary.item :nick, current_user.nick, '#' do |subnav|
|
||||
subnav.item :edit_profile, 'Profil bearbeiten', my_profile_path, title: 'Profil bearbeiten', id: nil
|
||||
subnav.item :logout, 'Abmelden', logout_path, id: nil
|
||||
|
|
Loading…
Reference in a new issue