Added possibility to give feedbacks via ajax form. Closes #2
* Feedback message will send to error_recipients, configured in app_config.yml
This commit is contained in:
parent
b84ec884bd
commit
c7e37fc7b2
12 changed files with 66 additions and 7 deletions
8
app/views/feedback/_new.html.haml
Normal file
8
app/views/feedback/_new.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
%h2 Fehler gefunden? Vorschlag? Idee? Kritik?
|
||||
|
||||
- form_remote_tag :url => {:action => "create"}, :before => "Element.show('loader')", :success => "Element.hide('loader')" do
|
||||
%p
|
||||
= text_area_tag :message, nil, :size => "40x15"
|
||||
= submit_tag "Absenden"
|
||||
oder
|
||||
= link_to_function "Abbrechen", "Element.hide('ajax_box')"
|
||||
4
app/views/feedback/_success.html.haml
Normal file
4
app/views/feedback/_success.html.haml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
%h2 Nachricht wurde verschickt!
|
||||
|
||||
%p Vielen Dank, Deine Nachricht wurde soeben dem Foodcooft Team zugestellt.
|
||||
%p= link_to_function "Schließen", "Element.hide('ajax_box')"
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= Foodsoft.config[:name]
|
||||
#nav= render :partial => 'layouts/main_tabnav'
|
||||
|
||||
#ajax_box(style="display:none")
|
||||
#main
|
||||
#content
|
||||
- if flash[:notice]
|
||||
|
|
|
|||
3
app/views/mailer/feedback.erb
Normal file
3
app/views/mailer/feedback.erb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<%= @user.nick %> schrieb am <%= I18n.l Time.now, :format => :short %>:
|
||||
|
||||
<%= @message %>
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
%ul
|
||||
%li
|
||||
= image_tag 'b_user.png' , :size => '7x10', :border => 0, :alt => _("User")
|
||||
= link_to h(@current_user.nick), my_profile_path, { :title => _("User Settings") }
|
||||
= image_tag 'b_user.png' , :size => '7x10', :border => 0, :alt => "Profil"
|
||||
= link_to h(@current_user.nick), my_profile_path, { :title => "Profil bearbeiten" }
|
||||
- if Foodsoft.config[:homepage]
|
||||
%li= link_to Foodsoft.config[:name], Foodsoft.config[:homepage], { :title => _("Go to your FoodCoop-Hompage") }
|
||||
%li= link_to _("Hilfe"), 'http://dev.foodcoops.net/wiki/FoodsoftDoku'
|
||||
%li= link_to _("Logout"), :controller => '/login', :action => 'logout'
|
||||
%li= link_to "Hilfe", 'http://dev.foodcoops.net/wiki/FoodsoftDoku'
|
||||
%li= link_to_remote "Feedback", :url => {:controller => "/feedback", :action => "new"}, |
|
||||
:method => :get, :html => {:title => "Fehler gefunden? Vorschlag? Idee? Kritik?"} |
|
||||
%li= link_to "Abmelden", logout_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue