fix and cleanup routing (closes foodcoops#190)
This commit is contained in:
parent
70c12b7c1f
commit
de948d7692
9 changed files with 21 additions and 18 deletions
|
|
@ -1,3 +1,3 @@
|
|||
%tr.edit_inline{:id=> "edit_"+@article.id.to_s}
|
||||
%td{:colspan=>"10"}
|
||||
= t('.note', article: h(@article.name), drop_link: link_to(t('.drop'), :controller => 'orders', :action => 'edit', :id => @order)).html_safe
|
||||
= t('.note', article: h(@article.name), drop_link: link_to(t('.drop'), edit_order_path(@order))).html_safe
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
%li.nav-header= t '.foodcoop'
|
||||
%li= link_to t('.members'), foodcoop_users_path
|
||||
%li= link_to t('.tasks'), user_tasks_path
|
||||
%li= link_to t('.write_message'), :controller => "messages", :action => "new"
|
||||
%li= link_to t('.write_message'), new_message_path
|
||||
|
||||
- has_ordergroup = !@current_user.ordergroup.nil?
|
||||
- has_orders_role = @current_user.role_orders?
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
%h3
|
||||
= h(t('.user.title', user: @current_user.nick))
|
||||
%small= t '.user.since', when: distance_of_time_in_words(Time.now, @current_user.created_on)
|
||||
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
|
||||
= simple_form_for(@current_user, :url => update_profile_path) do |f|
|
||||
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
|
||||
.form-actions
|
||||
= submit_tag t('ui.save'), class: 'btn'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- title t('.title')
|
||||
= t('.body').html_safe
|
||||
= simple_form_for User.new, url: {action: 'reset_password'} do |form|
|
||||
= simple_form_for User.new, url: reset_password_path do |form|
|
||||
= form.input :email
|
||||
.form-actions
|
||||
= form.submit t('.submit'), class: 'btn'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- title t('.title')
|
||||
= t('.body', user: h(@user.nick)).html_safe
|
||||
= simple_form_for @user, :url => {:action => 'update_password', :id => @user.id, :token => @user.reset_password_token} do |form|
|
||||
= simple_form_for @user, :url => update_password_path(@user.id, :token => @user.reset_password_token) do |form|
|
||||
= form.input :password
|
||||
= form.input :password_confirmation
|
||||
.form-actions
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
%li= order_pdf(@order, :articles, t('.download.article_pdf'))
|
||||
%li= order_pdf(@order, :matrix, t('.download.matrix_pdf'))
|
||||
%li= order_pdf(@order, :fax, t('.download.fax_pdf'))
|
||||
%li= link_to t('.download.fax_txt'), {action: 'text_fax_template', id: @order }, {title: t('.download.download_file')}
|
||||
%li= link_to t('.download.fax_txt'), order_path(@order, format: :txt), {title: t('.download.download_file')}
|
||||
|
||||
%section#articles_table
|
||||
= render 'articles', order: @order
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@
|
|||
- @tasks.each do |task|
|
||||
%tr
|
||||
%td= task.due_date unless task.due_date.nil?
|
||||
%td= link_to t('.task_format', name: task.name, duration: task.duration), :controller => "tasks", :action => "show", :id => task
|
||||
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task)
|
||||
%td= task_assignments task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue