Fixed admin, orders, wiki views. Converted all erb to haml.

This commit is contained in:
benni 2012-10-15 21:19:17 +02:00
parent 699fb9b233
commit 552c553b77
169 changed files with 1158 additions and 1307 deletions

View file

@ -2,44 +2,42 @@
%p
%i Hier kannst Du die Gruppen und Benutzerinnen der Foodsoft verwalten.
.left_column{:style => "width:48%"}
.box_title
%h2 Neuste Benutzerinnen
.column_content
%table
%tr
%th Benutzername
%th Name
%th Erstellt am
- for user in @users
%tr{:class => cycle('even','odd', :name => 'users')}
%td= link_to user.nick, [:admin, user]
%td=h user.name
%td= format_date(user.created_on)
%br/
= link_to 'Alle Benutzerinnen', admin_users_path
|
= link_to "Neue Benutzerin", new_admin_user_path
.right_column{:style => "width:48%"}
.box_title
%h2 Neuste Gruppen
.column_content
%table
%tr
%th Gruppenname
%th Typ
%th Mitglieder
- for group in @groups
%tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to group.name, [:admin, group]
%td= group.class.model_name.human
%td= group.users.size
%br/
= link_to 'Alle Bestellgruppen', admin_ordergroups_path
|
= link_to "Neue Bestellgruppe", new_admin_ordergroup_path
|
= link_to 'Alle Arbeitsgruppen', admin_workgroups_path
|
= link_to "Neue Arbeitsgruppe", new_admin_workgroup_path
.row-fluid
.span6
%section
%h2 Neuste Benutzerinnen
%table.table.table-striped
%thead
%tr
%th Benutzername
%th Name
%th Erstellt am
- for user in @users
%tr{:class => cycle('even','odd', :name => 'users')}
%td= link_to user.nick, [:admin, user]
%td=h user.name
%td= format_date(user.created_on)
= link_to 'Alle Benutzerinnen', admin_users_path
|
= link_to "Neue Benutzerin", new_admin_user_path, class: 'btn btn-primary btn-small'
.span6
%section
%h2 Neuste Gruppen
%table.table.table-striped
%thead
%tr
%th Gruppenname
%th Typ
%th Mitglieder
- for group in @groups
%tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to group.name, [:admin, group]
%td= group.class.model_name.human
%td= group.users.size
= link_to 'Alle Bestellgruppen', admin_ordergroups_path
|
= link_to "Neue Bestellgruppe", new_admin_ordergroup_path, class: 'btn btn-primary btn-small'
|
= link_to 'Alle Arbeitsgruppen', admin_workgroups_path
|
= link_to "Neue Arbeitsgruppe", new_admin_workgroup_path, class: 'btn btn-primary btn-small'

View file

@ -1,12 +1,14 @@
%p
Neue Mitglieder kannst du
= link_to "hier", new_invite_path(id: @ordergroup.id)
einladen.
- unless @ordergroup.new_record?
%p
Neue Mitglieder kannst du
= link_to "hier", new_invite_path(id: @ordergroup.id), remote: true
einladen.
= simple_form_for [:admin, @ordergroup] do |f|
= render :layout => 'shared/group_form_fields', :locals => {:f => f} do
= f.input :contact_person
= f.input :contact_phone
= f.input :contact_address
= f.input :ignore_apple_restriction
= f.submit
= link_to "oder abbrechen", admin_ordergroups_path
.form-actions
= f.button :submit
= link_to "oder abbrechen", :back

View file

@ -1,18 +1,14 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @ordergroups
%td{:style => "text-align:right"}
= items_per_page
%table.list
- if Ordergroup.count > 20
= items_per_page
= pagination_links_remote @ordergroups
%table.table.table-striped
%thead
%tr
%th Name
%th Kontakt
%th Adresse
%th Mitglieder
%th
%th Aktionen
%tbody
- for ordergroup in @ordergroups
%tr{:class => cycle('even','odd', :name => 'groups')}
@ -21,6 +17,6 @@
%td= link_to_gmaps ordergroup.contact_address
%td= ordergroup.users.size
%td
= link_to icon(:edit), edit_admin_ordergroup_path(ordergroup)
= link_to icon(:delete), [:admin, ordergroup], :confirm => "Willst du #{ordergroup.name} wirklich löschen?",
:method => :delete
= link_to "Bearbeiten", edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini'
= link_to "Löschen", [:admin, ordergroup], :confirm => "Willst du #{ordergroup.name} wirklich löschen?",
:method => :delete, class: 'btn btn-mini btn-danger'

View file

@ -1,26 +1,23 @@
- title "Bestellgruppen"
%p
%i
- content_for :sidebar do
%p= link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path, class: 'btn btn-primary'
%p
Hier kannst du
= link_to 'neue Bestellgruppen', new_admin_ordergroup_path
anlegen, Gruppen bearbeiten und löschen.
%p
Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>:
Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer
%em= link_to 'Arbeitsgruppe', admin_workgroups_path
(z.b. 'Soritiergruppe')
koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten.
Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.
.left_column{:style => "width:100%"}
.box_title
%h2 Gruppenübersicht
.column_content
#group_filter
= form_tag admin_ordergroups_path, :method => :get, :style=>"display:inline;", :id => 'ordergroup_search',
:remote => true, 'data-submit-onchange' => true do
%label{:for => 'article_name'} Suche nach Name:
= text_field_tag :query, params[:query], :size => 10
#ordergroups
= render :partial => "ordergroups"
%p
Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>:
Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer
%em= link_to 'Arbeitsgruppe', admin_workgroups_path
(z.b. 'Soritiergruppe')
koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten.
Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.
.well.well-small
= form_tag admin_ordergroups_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :query, params[:query], class: 'input-medium search-query',
placeholder: 'Name ...'
#ordergroups
= render "ordergroups"

View file

@ -1 +0,0 @@
$('#ordergroups').html('<%= escape_javascript(render("ordergroups")) %>');

View file

@ -0,0 +1 @@
$('#ordergroups').html('#{escape_javascript(render("ordergroups"))}');

View file

@ -1,3 +1,3 @@
- title "Bestellgruppe anlegen"
= render :partial => 'form'
= render 'form'

View file

@ -1,13 +1,6 @@
- title "Bestellgruppe #{@ordergroup.name}"
.left_column{:style => "width:45em"}
.box_title
%h2 Übersicht
.column_content
= render :partial => 'shared/group', :locals => { :group => @ordergroup }
%p
= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_ordergroup_path(@ordergroup)
|
= link_to 'Löschen', [:admin, @ordergroup], :confirm => 'Bist Du sicher?', :method => :delete
|
= link_to 'Nachricht senden', new_message_path(:message => {:group_id => @ordergroup.id})
%p{:style => "clear:both"}= link_to "Gruppenübersicht", admin_ordergroups_path
%section= render 'shared/group', group: @ordergroup
= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_ordergroup_path(@ordergroup), class: 'btn'
= link_to 'Löschen', [:admin, @ordergroup], :confirm => 'Bist Du sicher?', :method => :delete, class: 'btn btn-danger'
= link_to 'Nachricht senden', new_message_path(:message => {:group_id => @ordergroup.id}), class: 'btn'

View file

@ -0,0 +1,5 @@
= simple_form_for([:admin, @user]) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
.form-actions
= f.submit
= link_to 'oder abbrechen', :back

View file

@ -1,12 +1,7 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @users
%td{:style => "text-align:right"}
- if @users.size > 20
= items_per_page
%table.list
- if User.count > 20
= items_per_page
= pagination_links_remote @users
%table.table.table-striped
%thead
%tr
%th Login
@ -14,17 +9,16 @@
%th Email
%th Zugriff auf
%th Letzter login
%th{:style => "width:3em"}
%th Aktionen
%tbody
- for user in @users
%tr{:class => cycle('even','odd', :name => 'users')}
%tr
%td= link_to user.nick, [:admin, user]
%td=h user.name
%td=h user.email
%td=h format_roles(user)
%td=h format_time(user.last_login)
%td
= link_to icon(:edit), edit_admin_user_path(user)
= link_to icon(:delete), [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?",
:method => :delete
= link_to 'Bearbeiten', edit_admin_user_path(user), class: 'btn btn-mini'
= link_to 'Löschen', [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?",
:method => :delete, class: 'btn btn-danger btn-mini'

View file

@ -1,9 +1,3 @@
%h1 Benutzerin bearbeiten
#newUser{:style => "width:65em"}
.box_title
%h2 Benutzerin bearbeiten
#userForm.column_content
- simple_form_for([:admin, @user]) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
= f.submit
= link_to 'oder abbrechen', admin_users_path
- title "Benutzerin bearbeiten"
= render 'form'

View file

@ -1,18 +1,16 @@
- title "Admin/Benutzerinnen"
%p
%i
Hier kannst du Benutzer_innen
= link_to 'neu Anlegen', new_admin_user_path
, bearbeiten und natürlich auch löschen.
.left_column{:style => "width:100%"}
.box_title
%h2 Benutzerinnenübersicht
.column_content
#user_filter{:style => "float:left; margin-right:2em;"}
= form_tag admin_users_path, :method => :get, :style=>"display:inline;", :id => 'user_search',
:remote => true, 'data-submit-onchange' => true do
%label{:for => 'article_name'} Suche nach Name:
= text_field_tag :query, params[:query], :size => 10
#users
= render :partial => "users"
%p= link_to 'Neue Benutzerin', new_admin_user_path
- content_for :sidebar do
%p= link_to 'Neue Benutzerin anlegen', new_admin_user_path, class: 'btn btn-primary'
%p
Hier kannst du Benutzer_innen #{link_to 'neu Anlegen', new_admin_user_path},
bearbeiten und natürlich auch löschen.
.well.well-small
= form_tag admin_users_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :user_name, params[:user_name], class: 'input-medium search-query',
placeholder: 'Name ...'
#users
= render "users"

View file

@ -1 +0,0 @@
$('#users').html('<%= escape_javascript(render("users")) %>');

View file

@ -0,0 +1 @@
$('#users').html('#{escape_javascript(render("users"))}');

View file

@ -1,11 +1,3 @@
- title "Neue Benutzerin"
- title "Neue Benutzerin anlegen"
#newUser
.box_title
%h2 Neue Benutzerin
.column_content#userForm
= simple_form_for([:admin, @user]) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
= f.submit
= link_to 'oder abbrechen', admin_users_path
%p= link_to 'Benutzerinnenübersicht', admin_users_path
= render 'form'

View file

@ -1,52 +0,0 @@
<h1><%=h @user.nick %></h1>
<div class="left_column" style="width:100%">
<div class="box_title">
<h2>Übersicht</h2>
</div>
<div class="column_content">
<p>
Mitglied seit <%= distance_of_time_in_words(Time.now, @user.created_on) -%>
</p>
<div style="float:left;margin:5px; margin-right:10px;" class="box">
<p><b>Person</b></p>
<p><b>Nick:</b> <%=h @user.nick %></p>
<p><b>Name:</b> <%=h @user.name %></p>
<p><b>Email:</b> <%=h @user.email %></p>
<p><b>Telefon:</b> <%=h @user.phone %></p>
</div>
<div style="float:left; margin:5px;" class="box">
<p>
<b>Einstellungen</b>
</p>
<table style="width:26em">
<tbody>
<% for setting in User::setting_keys.keys -%>
<tr>
<td><%= User::setting_keys[setting] %></td>
<td><%= @user.settings[setting] == '1' ? 'ja' : 'nein' %></td>
</tr>
<% end -%>
</tbody>
</table>
<p>
<b>Benutzer_in hat Zugriff auf:</b>
</p>
<p>
<%=h format_roles(@user) %>
</p>
</div>
<p style="clear:both">
<%= link_to 'Bearbeiten', edit_admin_user_path(@user) %>
| <%= link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?", :method => :delete %>
| <%= link_to "Nachricht senden", new_message_path(:message => {:mail_to => @user.id}) %>
</p>
</div>
<div class="box_title"><h2>Gruppenabos</h2></div>
<div class="column_content">
<% for membership in Membership.find_all_by_user_id(@user.id) -%>
<p>
<%= link_to(membership.group.name, [:admin, membership.group]) %>
</p>
<% end -%>
</div>
</div>

View file

@ -0,0 +1,39 @@
- title @user.nick
.row-fluid
.span3
.well
%h4 Person
%p Mitglied seit #{distance_of_time_in_words(Time.now, @user.created_on)}
%dl
%dt Nick
%dd= @user.nick
%dt Name
%dd= h @user.name
%dt Email
%dd= @user.email
%dt Telefon
%dd= @user.phone
%dt Zugriff auf
%dd= format_roles(@user)
.span5
.well
%h4 Einstellungen
%table.table
- for setting in User::setting_keys.keys
%tr
%td= User::setting_keys[setting]
%td= @user.settings[setting] == '1' ? 'ja' : 'nein'
.span3
.well
%h4 Gruppenabos
%ul.unstyled
- for membership in Membership.find_all_by_user_id(@user.id)
%li= link_to(membership.group.name, [:admin, membership.group])
%hr/
%p
= link_to 'Bearbeiten', edit_admin_user_path(@user), class: 'btn'
= link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?",
:method => :delete, class: 'btn btn-danger'
= link_to "Nachricht senden", new_message_path(:message => {:mail_to => @user.id}), class: 'btn'

View file

@ -4,11 +4,12 @@
einladen.
= simple_form_for [:admin, @workgroup] do |f|
= render :layout => 'shared/group_form_fields', :locals => {:f => f} do
%h3 Zugriff auf ..
%h4 Zugriff auf
= f.input :role_admin
= f.input :role_finance
= f.input :role_suppliers
= f.input :role_article_meta
= f.input :role_orders
= f.submit
= link_to "oder abbrechen", admin_workgroups_path
.form-actions
= f.button :submit
= link_to "oder abbrechen", :back

View file

@ -1,24 +1,20 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @workgroups
%td{:style => "text-align:right"}
= items_per_page
%table.list
- if Workgroup.count > 20
= items_per_page
= pagination_links_remote @workgroups
%table.table.table-striped
%thead
%tr
%th Name
%th Mitglieder
%th Zugriff auf
%th
%th Aktionen
%tbody
- for workgroup in @workgroups
%tr{:class => cycle('even','odd', :name => 'groups')}
%tr
%td= link_to workgroup.name, [:admin, workgroup]
%td= workgroup.users.size
%td= format_roles(workgroup)
%td
= link_to icon(:edit), edit_admin_workgroup_path(workgroup)
= link_to icon(:delete), [:admin, workgroup], :confirm => 'Willst du ' + workgroup.name + ' wirklich löschen?',
:method => :delete
= link_to "Bearbeiten", edit_admin_workgroup_path(workgroup), class: 'btn btn-mini'
= link_to "Löschen", [:admin, workgroup], :confirm => 'Willst du ' + workgroup.name + ' wirklich löschen?',
:method => :delete, class: 'btn btn-mini btn-danger'

View file

@ -1,3 +1,3 @@
- title "Arbeitsgruppe bearbeiten"
= render :partial => 'form'
= render 'form'

View file

@ -1,26 +1,22 @@
- title "List workgroups"
- title "Arbeitsgruppen"
%p
%i
- content_for :sidebar do
%p= link_to "Neue Arbeitsgruppe anlegen", new_admin_workgroup_path, class: 'btn btn-primary'
%p
Hier kannst du
= link_to 'neue Arbeitsgruppen', new_admin_workgroup_path
anlegen, Gruppen bearbeiten und löschen.
%p
Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>:
Eine
%em= link_to 'Bestellgruppe', '/admin/ordergroups'
hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. 'Soritiergruppe')
koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten.
Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.
.left_column{:style => "width:100%"}
.box_title
%h2 Gruppenübersicht
.column_content
#group_filter
= form_tag admin_workgroups_path, :method => :get, :style=>"display:inline;", :id => 'ordergroup_search',
:remote => true, 'data-submit-onchange' => true do
%label{:for => 'article_name'} Suche nach Name:
= text_field_tag :query, params[:query], :size => 10
#workgroups
= render :partial => "workgroups"
%p
Beachte dabei den <strong>Unterschied zwischen Gruppe und Bestellgruppe</strong>:
Eine #{link_to 'Bestellgruppe', '/admin/ordergroups'}
hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (z.b. 'Soritiergruppe')
koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten.
Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.
.well.well-small
= form_tag admin_workgroups_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :query, params[:query], class: 'input-medium search-query',
placeholder: 'Name ...'
#workgroups
= render "workgroups"

View file

@ -1 +0,0 @@
$('#workgroups').html('<%= escape_javascript(render("workgroups")) %>');

View file

@ -0,0 +1 @@
$('#workgroups').html('#{escape_javascript(render("workgroups"))}');

View file

@ -1,3 +1,3 @@
- title "Erstelle Arbeitsgruppe"
- title "Arbeitsgruppe anlegen"
= render :partial => 'form'
= render 'form'

View file

@ -1,14 +1,6 @@
- title "Arbeitsgruppe #{@workgroup.name}"
.left_column{:style => "width:45em"}
.box_title
%h2 Übersicht
.column_content
= render :partial => 'shared/group', :locals => { :group => @workgroup }
%p
= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_workgroup_path(@workgroup)
|
= link_to 'Löschen', [:admin, @workgroup], :confirm => 'Bist Du sicher?', :method => :delete
|
= link_to 'Nachricht senden', new_message_path(:message => {:group_id => @workgroup.id})
%p{:style => "clear:both"}= link_to "Gruppenübersicht", admin_workgroups_path
%section= render :partial => 'shared/group', :locals => { :group => @workgroup }
= link_to 'Gruppe/Mitglieder bearbeiten', edit_admin_workgroup_path(@workgroup), class: 'btn'
= link_to 'Löschen', [:admin, @workgroup], :confirm => 'Bist Du sicher?', :method => :delete, class: 'btn btn-danger'
= link_to_new_message(message_params: {group_id: @workgroup.id})

View file

@ -1,2 +0,0 @@
$('#listbody').prepend('<%= escape_javascript(render(@article)) %>');
$.fancybox.close();

View file

@ -0,0 +1,2 @@
$('#listbody').prepend('#{escape_javascript(render(@article))}');
$.fancybox.close();

View file

@ -1,5 +0,0 @@
<% if @order %>
$('#article_<%= @article.id %>').after('<%= escape_javascript(render("destroy_active_article")) %>');
<% else %>
$('#article_<%= @article.id %>').remove();
<% end %>

View file

@ -0,0 +1,4 @@
- if @order
$('#article_#{@article.id}').after('#{escape_javascript(render("destroy_active_article"))}');
- else
$('#article_#{@article.id}').remove();

View file

@ -1 +0,0 @@
$('#table').html('<%= escape_javascript(render("articles")) %>');

View file

@ -0,0 +1 @@
$('#table').html('#{escape_javascript(render("articles"))}');

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render("form")) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render("form"))}');

View file

@ -1 +0,0 @@
$('#search_results').html('<%= escape_javascript(render("import_search_results")) %>');

View file

@ -0,0 +1 @@
$('#search_results').html('#{escape_javascript(render("import_search_results"))}');

View file

@ -1,2 +0,0 @@
$('#article_<%= @article.id %>').replaceWith('<%= escape_javascript(render(@article)) %>');
$.fancybox.close();

View file

@ -0,0 +1,2 @@
$('#article_#{@article.id}').replaceWith('#{escape_javascript(render(@article))}');
$.fancybox.close();

View file

@ -1 +0,0 @@
$('#stock_changes').append('<%= escape_javascript(render(:partial => 'stock_change', :locals => {:stock_change => StockChange.new, :supplier => @supplier})) %>');

View file

@ -0,0 +1 @@
$('#stock_changes').append('#{escape_javascript(render(:partial => 'stock_change', :locals => {:stock_change => StockChange.new, :supplier => @supplier}))}');

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render("edit_note")) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render("edit_note"))}');

View file

@ -1 +0,0 @@
$('#results').html('<%= escape_javascript(render(partial: balancing_view_partial, locals: {order: @order})) %>');

View file

@ -0,0 +1 @@
$('#results').html('#{escape_javascript(render(partial: balancing_view_partial, locals: {order: @order}))}');

View file

@ -1,2 +0,0 @@
$.fancybox.close();
$('#note').html('<%= escape_javascript(simple_format(@order.note)) %>');

View file

@ -0,0 +1,2 @@
$.fancybox.close();
$('#note').html('#{escape_javascript(simple_format(@order.note))}');

View file

@ -1 +0,0 @@
$('#transactions').html('<%= escape_javascript(render("transactions")) %>');

View file

@ -0,0 +1 @@
$('#transactions').html('#{escape_javascript(render("transactions"))}');

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render('form')) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render('form'))}');

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render("form")) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render("form"))}');

View file

@ -1,5 +0,0 @@
$.fancybox.close();
$('#order_article_<%= @order_article.id %>').
html('<%= escape_javascript(render(partial: 'finance/balancing/order_article', locals: {order_article: @order_article})) %>');
$('#group_order_articles_<%= @order_article.id %>').
html('<%= escape_javascript(render(partial: 'finance/balancing/group_order_articles', locals: {order_article: @order_article})) %>');

View file

@ -0,0 +1,5 @@
$.fancybox.close();
$('#order_article_#{@order_article.id}').
html('#{escape_javascript(render(partial: 'finance/balancing/order_article', locals: {order_article: @order_article}))}');
$('#group_order_articles_#{@order_article.id}').
html('#{escape_javascript(render(partial: 'finance/balancing/group_order_articles', locals: {order_article: @order_article}))}');

View file

@ -1,6 +0,0 @@
<% title "Rechnung bearbeiten" %>
<%= render :partial => 'form' %>
<%= link_to "Anzeigen", [:finance, @invoice] %> |
<%= link_to 'Zurück', finance_invoices_path %>

View file

@ -0,0 +1,5 @@
- title "Rechnung bearbeiten"
= render :partial => 'form'
= link_to "Anzeigen", [:finance, @invoice]
|
\#{link_to 'Zurück', finance_invoices_path}

View file

@ -1,40 +0,0 @@
<% title "Rechnungen" %>
<p><%= will_paginate @invoices %></p>
<table class="list" style="width:70em">
<thead>
<tr>
<th>Nummer</th>
<th>Lieferantin</th>
<th>Datum</th>
<th>Bezahlt am</th>
<th>Betrag</th>
<th>Lieferung</th>
<th>Bestellung</th>
<th>Note</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% for invoice in @invoices %>
<tr>
<td><%= link_to h(invoice.number), finance_invoice_path(invoice)%></td>
<td><%= invoice.supplier.name %></td>
<td><%= format_date invoice.date %></td>
<td><%= format_date invoice.paid_on %></td>
<td><%= number_to_currency invoice.amount %></td>
<td><%= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery %></td>
<td><%= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order %></td>
<td><%= truncate(invoice.note) %></td>
<td><%= link_to icon(:edit), edit_finance_invoice_path(invoice) %></td>
<td><%= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</tbody>
</table>
<br />
<%= link_to 'Neue Rechnung anlegen', new_finance_invoice_path %>

View file

@ -0,0 +1,30 @@
- title "Rechnungen"
%p= will_paginate @invoices
%table.list{:style => "width:70em"}
%thead
%tr
%th Nummer
%th Lieferantin
%th Datum
%th Bezahlt am
%th Betrag
%th Lieferung
%th Bestellung
%th Note
%th
%th
%tbody
- for invoice in @invoices
%tr
%td= link_to h(invoice.number), finance_invoice_path(invoice)
%td= invoice.supplier.name
%td= format_date invoice.date
%td= format_date invoice.paid_on
%td= number_to_currency invoice.amount
%td= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
%td= truncate(invoice.note)
%td= link_to icon(:edit), edit_finance_invoice_path(invoice)
%td= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete
%br/
= link_to 'Neue Rechnung anlegen', new_finance_invoice_path

View file

@ -1,4 +0,0 @@
<% title "Neue Rechnung anlegen" -%>
<%= render :partial => 'form' %>
<%= link_to 'Zurück', finance_invoices_path %>

View file

@ -0,0 +1,3 @@
- title "Neue Rechnung anlegen"
= render :partial => 'form'
= link_to 'Zurück', finance_invoices_path

View file

@ -1,3 +0,0 @@
$.fancybox.close();
$('#result_table').
prepend('<%= escape_javascript(render(partial: 'finance/balancing/order_article_result', locals: {order_article: @order_article}))%>');

View file

@ -0,0 +1,3 @@
$.fancybox.close();
$('#result_table').
prepend('#{escape_javascript(render(partial: 'finance/balancing/order_article_result', locals: {order_article: @order_article}))}');

View file

@ -1 +0,0 @@
$('#order_article_<%= @order_article.id %>, #group_order_articles_<%= @order_article.id %>').hide();

View file

@ -0,0 +1 @@
$('#order_article_#{@order_article.id}, #group_order_articles_#{@order_article.id}').hide();

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render("edit")) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render("edit"))}');

View file

@ -1 +0,0 @@
$.fancybox('<%= escape_javascript(render("new")) %>');

View file

@ -0,0 +1 @@
$.fancybox('#{escape_javascript(render("new"))}');

View file

@ -1,3 +0,0 @@
$.fancybox.close();
$('#order_article_<%= @order_article.id %>').
html('<%= escape_javascript(render(partial: 'finance/balancing/order_article', locals: {order_article: @order_article})) %>');

View file

@ -0,0 +1,3 @@
$.fancybox.close();
$('#order_article_#{@order_article.id}').
html('#{escape_javascript(render(partial: 'finance/balancing/order_article', locals: {order_article: @order_article}))}');

View file

@ -1 +0,0 @@
$('#ordergroups').html('<%= escape_javascript(render("ordergroups")) %>');

View file

@ -0,0 +1 @@
$('#ordergroups').html('#{escape_javascript(render("ordergroups"))}');

View file

@ -1 +0,0 @@
$('#ordergroups').html('<%= escape_javascript(render("ordergroups")) %>');

View file

@ -0,0 +1 @@
$('#ordergroups').html('#{escape_javascript(render("ordergroups"))}');

View file

@ -1 +0,0 @@
$('#users').html('<%= escape_javascript(render("users")) %>');

View file

@ -0,0 +1 @@
$('#users').html('#{escape_javascript(render("users"))}');

View file

@ -1,4 +1,4 @@
- content_for :head do
- content_for :javascript do
:javascript
$(function() {
#{data_to_js(@ordering_data)}
@ -10,123 +10,107 @@
- title "Bestellen"
.left_column{:style => "width:49em"}
.box_title
%h2=h @order.name
.column_content
%table
%tr{:valign => "top"}
%td{:width => "60%"}
%p
%b Lieferantin:
=h @order.name
%p
%b Ende:
=h format_time(@order.ends)
- if @group_order && @group_order.updated_by
%p
%b Zuletzt bestellt:
=h @group_order.updated_by.nick if @group_order.updated_by
= "(#{format_time(@group_order.updated_on)})"
%p
%b Verfügbares Guthaben:
= number_to_currency(@ordering_data[:available_funds])
%td
- unless @order.note.empty?
%p
%b Notiz:
= simple_format(@order.note)
- unless @order.stockit? || @order.supplier.min_order_quantity.blank?
%p
%b Mindestellmenge:
=h @order.supplier.min_order_quantity
%p
%b Gesamtbestellmenge bisher:
= number_to_currency @order.sum
.well.pull-left
%h2= @order.name
%dl.dl-horizontal
- unless @order.note.blank?
%dt Notiz
%dd= @order.note
%dt Ende
%dd= format_time(@order.ends)
- unless @order.stockit? or @order.supplier.min_order_quantity.blank?
%dt Mindestbestellmenge
%dd= @order.supplier.min_order_quantity
%dt Gesamtbestellmenge bisher:
%dd= number_to_currency @order.sum
%dt Zuletzt bestellt
%dd
= @group_order.updated_by.nick if @group_order.updated_by
(#{format_time(@group_order.updated_on)})
%dt Guthaben
%dd= number_to_currency(@ordering_data[:available_funds])
= render :partial => 'switch_order', :locals => {:current_order => @order}
.well.pull-right
= render 'switch_order', current_order: @order
= form_for @group_order do |f|
= f.hidden_field :lock_version
= f.hidden_field :order_id
= f.hidden_field :updated_by_user_id
= f.hidden_field :ordergroup_id
.single_column{:style => "clear:both;margin-bottom:7em;"}
.box_title
%h2 Artikel
.column_content
%table#order.list
%thead
%tr
%th Name
%th{:style => "width:13px;"}
%th{:style => "width:4.5em;"} Preis
%th{:style => "width:4.5em;"} Einheit
- unless @order.stockit?
%th{:style => "width:70px;"} Fehlende Einheiten
%th#col_required Menge
%th#col_tolerance Toleranz
- else
%th(style="width:20px") Verfügbar
%th#col_required Menge
%th{:style => "width:15px;"} Summe
%tbody
- @order.articles_grouped_by_category.each do |category, order_articles|
%tr{:style => "background-color:#EFEFEF"}
%td{:style => "text-align:left"}
%b= h category
%td{:colspan => "9"}
- order_articles.each do |order_article|
%tr{:class => "#{cycle('even', 'odd', :name => 'articles')} order-article", :valign => "top"}
%td.name= order_article.article.name
%td= h order_article.article.origin
%td= number_to_currency(@ordering_data[:order_articles][order_article.id][:price])
%td= order_article.article.unit
%td
- if @order.stockit?
= @ordering_data[:order_articles][order_article.id][:quantity_available]
- else
%span{:id => "missing_units_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:missing_units]
%table.table.table-hover
%thead
%tr
%th Name
%th{style: "width:13px;"}
%th{style: "width:4.5em;"} Preis
%th{style: "width:4.5em;"} Einheit
- unless @order.stockit?
%th{style: "width:70px;"} Fehlende Einheiten
%th#col_required Menge
%th#col_tolerance Toleranz
- else
%th(style="width:20px") Verfügbar
%th#col_required Menge
%th{style: "width:15px;"} Summe
%tbody
- @order.articles_grouped_by_category.each do |category, order_articles|
%tr.article-category
%td
= category
%i.icon-tag
%td{colspan: "9"}
- order_articles.each do |order_article|
%tr{class: "#{cycle('even', 'odd', name: 'articles')} order-article", valign: "top"}
%td.name= order_article.article.name
%td= h order_article.article.origin
%td= number_to_currency(@ordering_data[:order_articles][order_article.id][:price])
%td= order_article.article.unit
%td
- if @order.stockit?
= @ordering_data[:order_articles][order_article.id][:quantity_available]
- else
%span{id: "missing_units_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:missing_units]
%td.quantity
%input{:id => "q_#{order_article.id}", :name => "group_order[group_order_articles_attributes][#{order_article.id}][quantity]", :size => "2", :type => "hidden", :value => @ordering_data[:order_articles][order_article.id][:quantity]}/
%span.used{:id => "q_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_quantity]
+
%span.unused{:id => "q_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] - @ordering_data[:order_articles][order_article.id][:used_quantity]
%input{:type => 'button', :value => '+', 'data-increase_quantity' => order_article.id}
%input{:type => 'button', :value => '-', 'data-decrease_quantity' => order_article.id}
%td.quantity
%input{id: "q_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][quantity]", size: "2", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:quantity]}/
%span.used{id: "q_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_quantity]
+
%span.unused{id: "q_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] - @ordering_data[:order_articles][order_article.id][:used_quantity]
%input{type: 'button', value: '+', 'data-increase_quantity' => order_article.id}
%input{type: 'button', value: '-', 'data-decrease_quantity' => order_article.id}
%td.tolerance{:style => ('display:none' if @order.stockit?)}
%input{:id => "t_#{order_article.id}", :name => "group_order[group_order_articles_attributes][#{order_article.id}][tolerance]", :size => "2", :type => "hidden", :value => @ordering_data[:order_articles][order_article.id][:tolerance]}/
- if (@ordering_data[:order_articles][order_article.id][:unit] > 1)
%span.used{:id => "t_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_tolerance]
+
%span.unused{:id => "t_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] - @ordering_data[:order_articles][order_article.id][:used_tolerance]
%input{:type => 'button', :value => '+', 'data-increase_tolerance' => order_article.id}
%input{:type => 'button', :value => '-', 'data-decrease_tolerance' => order_article.id}
%td.tolerance{style: ('display:none' if @order.stockit?)}
%input{id: "t_#{order_article.id}", name: "group_order[group_order_articles_attributes][#{order_article.id}][tolerance]", size: "2", type: "hidden", value: @ordering_data[:order_articles][order_article.id][:tolerance]}/
- if (@ordering_data[:order_articles][order_article.id][:unit] > 1)
%span.used{id: "t_used_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:used_tolerance]
+
%span.unused{id: "t_unused_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] - @ordering_data[:order_articles][order_article.id][:used_tolerance]
%input{type: 'button', value: '+', 'data-increase_tolerance' => order_article.id}
%input{type: 'button', value: '-', 'data-decrease_tolerance' => order_article.id}
%td{:id => "td_price_#{order_article.id}", :style => "text-align:right; padding-right:10px; width:4em"}
%span{:id => "price_#{order_article.id}_display"}= number_to_currency(@ordering_data[:order_articles][order_article.id][:total_price], :unit => "")
.article-info
%h3= order_article.article.name
.right
Volle Gebinde:
%span{:id => "units_#{order_article.id}"}= order_article.units_to_order
%br/
Gesamt-Einheiten:
%span{:id => "q_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] + @ordering_data[:order_articles][order_article.id][:others_quantity]
%br/
Gesamt-Toleranz:
%span{:id => "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance]
%br/
.left
Hersteller: #{order_article.article.manufacturer}
%br/
Gebinde: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit}
%br/
Notiz: #{order_article.article.note}
%br/
%td{id: "td_price_#{order_article.id}", style: "text-align:right; padding-right:10px; width:4em"}
%span{id: "price_#{order_article.id}_display"}= number_to_currency(@ordering_data[:order_articles][order_article.id][:total_price], unit: "")
.article-info
.article-name= order_article.article.name
.pull-right
Volle Gebinde:
%span{id: "units_#{order_article.id}"}= order_article.units_to_order
%br/
Gesamt-Einheiten:
%span{id: "q_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:quantity] + @ordering_data[:order_articles][order_article.id][:others_quantity]
%br/
Gesamt-Toleranz:
%span{id: "t_total_#{order_article.id}"}= @ordering_data[:order_articles][order_article.id][:tolerance] + @ordering_data[:order_articles][order_article.id][:others_tolerance]
%br/
.pull-left
Hersteller: #{order_article.article.manufacturer}
%br/
Gebinde: #{@order.stockit? ? order_article.article.quantity_available : @ordering_data[:order_articles][order_article.id][:unit]} * #{h order_article.article.unit}
%br/
Notiz: #{order_article.article.note}
%br/
#order-footer
#info-box
#total-sum
@ -146,7 +130,7 @@
%span#new_balance= @ordergroup.account_balance - @group_order.price
#order-button
= submit_tag( "Bestellung speichern", :id => 'submit_button' )
= submit_tag( "Bestellung speichern", id: 'submit_button', class: 'btn btn-primary' )
oder #{link_to "abbrechen", group_orders_path}
%input#total_balance{:name => "total_balance", :type => "hidden", :value => @ordergroup.account_balance - @group_order.price}/
%input{:name => "version", :type => "hidden", :value => @version}/
%input#total_balance{name: "total_balance", type: "hidden", value: @ordergroup.account_balance - @group_order.price}/
%input{name: "version", type: "hidden", value: @version}/

View file

@ -1,6 +1,4 @@
- if pagination
= pagination_links_remote @closed_orders, :per_page => 10, :update => 'closed_orders'
%table.list
%table.table.table-striped
%thead
%tr
%th Lieferantin
@ -13,5 +11,6 @@
%tr{:class=> cycle('even', 'odd', :name => 'orders'), :style => order_class}
%td= group_order.present? ? link_to(order.name, group_order_path(group_order)) : order.name
%td= format_time(order.ends)
%td{:class => "currency"}= group_order ? number_to_currency(group_order.price) : "--"
%td.numeric= group_order ? number_to_currency(group_order.price) : "--"
- if pagination
= pagination_links_remote @closed_orders

View file

@ -1,12 +1,9 @@
- orders = Order.open.reject{ |order| order == current_order }
- unless orders.empty?
.right_column{:style => "width:22em"}
.box_title
%h2 Laufende Bestellungen
.column_content
%table
- for order in orders
%tr
%td
= link_to_ordering(order, 'data-confirm_switch_order' => true)
%td= "noch #{time_ago_in_words(order.ends)}" if order.ends
%h2 Laufende Bestellungen
%ul.unstyled
- orders.each do |order|
%li
= link_to_ordering(order, 'data-confirm_switch_order' => true)
- if order.ends
noch #{time_ago_in_words(order.ends)}

View file

@ -3,15 +3,12 @@
Siehe hier alle
= link_to "laufenden Bestellungen.", group_orders_path
.single_column{:style => "width:50em"}
.box_title
.row-fluid
.span6
%h2 beendet/nicht abgerechnet
.column_content
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
.single_column{:style => "width:50em"}
.box_title
.span6
%h2 abgerechnet
.column_content
#closed_orders
= render :partial => "orders", :locals => {:orders => @closed_orders, :pagination => true}

View file

@ -1 +0,0 @@
$('#closed_orders').html('<%= escape_javascript(render("orders", orders: @closed_orders, pagination: true)) %>');

View file

@ -0,0 +1 @@
$('#closed_orders').html('#{escape_javascript(render("orders", orders: @closed_orders, pagination: true))}');

View file

@ -1,43 +1,39 @@
- title "Bestellüberblick"
// Ordergroups Account Balance
.left_column{:style => "width:26%"}
.box_title
%h2=h @ordergroup.name
.column_content
%table
- content_for :sidebar do
.well.well-small
// Ordergroups Account Balance
%h2 Guthaben
%table.table.table-striped
%tr
%td Kontostand:
%td{:class => "currency", :style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
%td.numeric{:style => "width:5em"}= number_to_currency(@ordergroup.account_balance)
%tr
%td= "- laufende Bestellungen:"
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_open_orders)
%td - laufende Bestellungen:
%td.numeric= number_to_currency(@ordergroup.value_of_open_orders)
%tr
%td= "- nicht abgerechnete Bestellungen:"
%td{:class => "currency"}= number_to_currency(@ordergroup.value_of_finished_orders)
%td.numeric= number_to_currency(@ordergroup.value_of_finished_orders)
%tr
%th verfügbares Guthaben:
%th{:class => "currency"}= number_to_currency(@ordergroup.get_available_funds)
%th.numeric= number_to_currency(@ordergroup.get_available_funds)
.right_column{:style => "width:70%"}
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
= render :partial => "shared/open_orders", :locals => {:ordergroup => @ordergroup}
// finished orders
- unless Order.finished.empty?
.box_title
%h2 Nicht abgerechnete Bestellungen
.column_content
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
- if @ordergroup.value_of_finished_orders > 0
%p
Gesamtsumme:
%b= number_to_currency(@ordergroup.value_of_finished_orders)
// finished orders
- unless Order.finished.empty?
%section
%h2 Nicht abgerechnete Bestellungen
= render :partial => "orders", :locals => {:orders => Order.finished_not_closed, :pagination => false}
- if @ordergroup.value_of_finished_orders > 0
%p
Gesamtsumme:
%b= number_to_currency(@ordergroup.value_of_finished_orders)
// closed orders
- unless Order.closed.empty?
.box_title
%h2 Abgerechnete Bestellungen
.column_content
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5), :pagination => false}
%br/
= link_to "mehr...", archive_group_orders_path
// closed orders
- unless Order.closed.empty?
%section
%h2 Abgerechnete Bestellungen
= render :partial => "orders", :locals => {:orders => Order.closed.all(:limit => 5), :pagination => false}
%br/
= link_to "mehr...", archive_group_orders_path

View file

@ -1,4 +1,4 @@
- content_for :head do
- content_for :javascript do
:javascript
$(function() {
$('tr.ignored').hide();
@ -6,55 +6,42 @@
- title "Dein Bestellergebnis für #{@order.name}"
// Order summary
.left_column{:style => "width:45em"}
.box_title
%h2 Zusammenfassung
.column_content
%table
%tr{:valign => "top"}
%td{:style => "width:50%"}
%p
Lieferantin:
%b=h @order.name
- unless @order.note.blank?
%p
Notiz:
=h @order.note
%p
Ende:
%b=h format_time(@order.ends)
%p
Bestellsumme:
- if @group_order
%b=h number_to_currency(@group_order.price)
- else
%b Du hast nicht bestellt.
- if @order.closed?
%p
= "Abgerechnet von #{@order.updated_by.nick}"
= link_to "Kommentare lesen/schreiben", "#comments"
= render :partial => "switch_order", :locals => {:current_order => @order}
.well
// Order summary
%dl.dl-horizontal
%dt Lieferantin
%dd= @order.name
%dt Notiz
%dd= @order.note
%dt Ende
%dd= format_time(@order.ends)
%dt Bestellsumme
%dd
- if @group_order
= number_to_currency(@group_order.price)
- else
Du hast nicht bestellt.
- if @order.closed?
%p Abgerechnet von #{@order.updated_by.nick}
= link_to "Kommentare lesen/schreiben", "#comments"
// Article box
.single_column{:style => "clear:both; width:70em;"}
.box_title
%h2 Artikelübersicht
%section
%h2 Artikelübersicht
.column_content#result
- if @group_order
%p(style="float:right")= link_to "Zeige/Verstecke nicht bestellte Artikel", '#', 'data-toggle-this' => 'tr.ignored'
%p= link_to("Bestellung ändern", edit_group_order_path(@group_order, :order_id => @order.id)) if @order.open?
%table.list
%p.pull-right= link_to "Zeige/Verstecke nicht bestellte Artikel", '#', 'data-toggle-this' => 'tr.ignored'
%p= link_to("Bestellung anpassen", edit_group_order_path(@group_order, order_id: @order.id), class: 'btn btn-primary') if @order.open?
%table.table.table-hover
%thead
%tr
%th{:style => "width:40%"} Name
%th{style: "width:40%"} Name
%th Gebinde
%th Einzelpreis
%th
%abbr{:title => "Menge + Toleranz"} Bestellt
%abbr{title: "Menge + Toleranz"} Bestellt
%th
%abbr{:title => "Unter Berücksichtigung der derzeitigen Bestellungen aller Gruppen"}
%abbr{title: "Unter Berücksichtigung der derzeitigen Bestellungen aller Gruppen"}
- if @order.open?
Zu
Erhalten
@ -62,9 +49,11 @@
%tbody
- total = 0 #set counter for order-sum
- for category_name, order_articles in @order.articles_grouped_by_category
%tr{:style => "background-color:#EFEFEF"}
%td{:style => "text-align:left;"}=h category_name
%td{:colspan => "9"}
%tr.article-category
%td
= category_name
%i.icon-tag
%td{colspan: "9"}
- for oa in order_articles
- # get the order-results for the ordergroup
- goa = oa.group_order_articles.find_by_group_order_id(@group_order.id)
@ -73,11 +62,11 @@
- result = goa.result
- sub_total = goa.total_price
- total += sub_total
%tr{:class => cycle('even', 'odd', :name => 'articles') + " " + order_article_class_name(quantity, tolerance, result)}
%td{:style => "width:40%"}
%tr{class: cycle('even', 'odd', name: 'articles') + " " + order_article_class_name(quantity, tolerance, result)}
%td{style: "width:40%"}
=h oa.article.name
- unless oa.article.note.blank?
= image_tag("lamp_grey.png", {:alt => "Notiz anzeigen", :size => "15x16", :border => "0", :onmouseover => "$('note_#{oa.id}').show();", :onmouseout => "$('note_#{oa.id}').hide();"})
= image_tag("lamp_grey.png", {alt: "Notiz anzeigen", size: "15x16", border: "0", onmouseover: "$('note_#{oa.id}').show();", onmouseout: "$('note_#{oa.id}').hide();"})
%td= "#{oa.price.unit_quantity} x #{oa.article.unit}"
%td= number_to_currency(oa.price.fc_price)
%td
@ -86,26 +75,24 @@
%td= result > 0 ? result : "0"
%td= number_to_currency(sub_total)
- unless oa.article.note.blank?
%tr{:id => "note_#{oa.id}", :class => "note even", :style => "display:none"}
%td{:colspan => "6"}=h oa.article.note
%tr{:class => cycle('even', 'odd', :name => 'articles')}
%th{:colspan => "5"} Summe
%tr{id: "note_#{oa.id}", class: "note even", style: "display:none"}
%td{colspan: "6"}=h oa.article.note
%tr{class: cycle('even', 'odd', name: 'articles')}
%th{colspan: "5"} Summe
%th= number_to_currency(total)
%br/
= link_to_top
- else
- if @order.open?
Du hast noch nicht bestellt.
= link_to "Das ist Deine Chance!", :action => "order", :id => @order
= link_to "Das ist Deine Chance!", action: "order", id: @order
- else
Die Bestellung is leider schon zu Ende. Beim nächsten mal früher aufstehen...
// Comments box
.single_column{:style => "width:70em;"}
.box_title
%h2 Kommentare
.column_content
#comments
= render :partial => 'shared/comments', :locals => { :comments => @order.comments }
#new_comment= render :partial => 'order_comments/form', :locals => { :order_comment => @order.comments.build(:user => current_user)}
= link_to_top
%section
%h2 Kommentare
#comments
= render 'shared/comments', comments: @order.comments
#new_comment= render 'order_comments/form', order_comment: @order.comments.build(user: current_user)
= link_to_top

View file

@ -1,47 +0,0 @@
<h1>Meine Bestellgruppe</h1>
<div class="left_column">
<div class="box_title"><h2><%=h @ordergroup.name %></h2></div>
<div class="column_content">
<p>
<b>Beschreibung:</b> <%=h @ordergroup.description %>
</p>
<p>
<b>Verfügbares Guthaben:</b> <%= number_to_currency(@ordergroup.get_available_funds()) %>
</p>
<h2>Personen</h2>
<ul style="list-style-type:decimal;">
<% for membership in @ordergroup.memberships -%>
<li><%= membership.user.nick -%></li>
<% end -%>
</ul>
<%= link_to('Person einladen', new_invite_path(:id => @ordergroup), :remote => true) %>
</div>
</div>
<div class="right_column">
<div class="box_title">
<h2>Kontoauszug</h2>
</div>
<div class="column_content">
<%= form_tag my_ordergroup_url, :method => :get, :style => 'display:inline;', :id => 'transactions_search',
:remote => true do %>
<%= label_tag "financial_transaction_note", "Filter für Notizen:" %>
<%= text_field_tag("query", params['query'], :size => 10 ) %>
<% end %>
<div id="transactions">
<%= render :partial => "/finance/transactions/list" %>
</div>
</div>
</div>
<div id="edit_box" style="display:none"></div>
<% content_for :head do %>
<script type="text/javascript">
$(function() {
$('#query').observe_field(1, function() {
$('#transactions_search').submit();
});
})
</script>
<% end %>

View file

@ -0,0 +1,35 @@
%h1 Meine Bestellgruppe
.left_column
.box_title
%h2= h @ordergroup.name
.column_content
%p
%b Beschreibung:
= h @ordergroup.description
%p
%b Verfügbares Guthaben:
= number_to_currency(@ordergroup.get_available_funds())
%h2 Personen
%ul{:style => "list-style-type:decimal;"}
- for membership in @ordergroup.memberships
%li= membership.user.nick
= link_to('Person einladen', new_invite_path(:id => @ordergroup), :remote => true)
.right_column
.box_title
%h2 Kontoauszug
.column_content
= form_tag my_ordergroup_url, :method => :get, :style => 'display:inline;', :id => 'transactions_search', |
:remote => true do |
= label_tag "financial_transaction_note", "Filter für Notizen:"
= text_field_tag("query", params['query'], :size => 10 )
#transactions
= render :partial => "/finance/transactions/list"
#edit_box{:style => "display:none"}
- content_for :head do
:javascript
$(function() {
$('#query').observe_field(1, function() {
$('#transactions_search').submit();
});
})

View file

@ -1 +0,0 @@
$('#transactions').html('<%= escape_javascript(render("finance/transactions/list")) %>');

View file

@ -0,0 +1 @@
$('#transactions').html('#{escape_javascript(render("finance/transactions/list"))}');

View file

@ -0,0 +1,12 @@
#modalForm.modal(tabindex="-1" role="dialog")
= simple_form_for @invite, remote: true do |form|
.modal-header
= button_tag "x", class: 'close', data: {dismiss: 'modal'}
%h3 Person in die Gruppe #{@invite.group.name} einladen
.modal-body
= form.hidden_field :user_id
= form.hidden_field :group_id
= form.input :email
.modal-footer
= button_tag "Schließen", class: 'btn', data: {dismiss: 'modal'}
= form.submit class: 'btn btn-primary'

View file

@ -0,0 +1 @@
$('#modalForm').modal('hide');

View file

@ -0,0 +1,2 @@
$('#modalContainer').html('#{escape_javascript(render('modal_form'))}');
$('#modalForm').modal();

View file

@ -15,9 +15,9 @@
.container-fluid
.row-fluid
- if content_for?(:sidebar)
.span2
.span3
= yield(:sidebar)
.span10
.span9
= bootstrap_flash
- if show_title?
.page-header
@ -33,3 +33,4 @@
%footer
%p
Foodsoft, open source software to manage a non-profit food coop.
#modalContainer

View file

@ -1,6 +0,0 @@
<%= yield %>
--
FoodSoft: <%= root_url %>
Foodcoop-Homepage: <%= FoodsoftConfig[:homepage] %>
Hilfe/Help: <%= FoodsoftConfig[:help_url] %>

View file

@ -0,0 +1,5 @@
= yield
\--
FoodSoft: #{root_url}
Foodcoop-Homepage: #{FoodsoftConfig[:homepage]}
Hilfe/Help: #{FoodsoftConfig[:help_url]}

View file

@ -1,3 +0,0 @@
<%= @user.nick %> schrieb am <%= I18n.l Time.now, :format => :short %>:
<%= @feedback %>

View file

@ -0,0 +1,4 @@
= @user.nick
schrieb am #{I18n.l Time.now, :format => :short}:
\#{@feedback}

View file

@ -1,7 +0,0 @@
<%= @message.body %>
======================================================================
Antworten: <%= new_message_url('message[reply_to]' => @message.id) %>
Nachricht online einsehen: <%= message_url(@message) %>
Nachrichten-Einstellungen: <%= my_profile_url %>

View file

@ -0,0 +1,6 @@
= @message.body
\======================================================================
Antworten: #{new_message_url('message[reply_to]' => @message.id)}
Nachricht online einsehen: #{message_url(@message)}
Nachrichten-Einstellungen: #{my_profile_url}

View file

@ -1,17 +0,0 @@
Hallo!
<%= @invite.user.first_name %> <%= @invite.user.last_name %> (<%= @invite.user.email %>) hat dich in die Gruppe "<%= @invite.group.name %>" eingeladen.
Um die Einladung anzunehmen und der Foodcoop beizutreten, gehe zu: <%= @link %>
Dieser Link kann nur einmal aufgerufen werden und ist nur bis <%= I18n.l @invite.expires_at %> gültig.
Grüße sendet die Foodsoft!
=======
Hi!
<%= @invite.user.first_name %> <%= @invite.user.last_name %> (<%= @invite.user.email %>) has invited you to join the group "<%= @invite.group.name %>".
To accept the invitation and to join the foodcoop please follow this link: <%= @link %>
This link works only once and expires on <%= I18n.l @invite.expires_at, locale: :en %>.
Greetings, your FoodSoft Team!

View file

@ -0,0 +1,17 @@
Hallo!
\#{@invite.user.first_name} #{@invite.user.last_name} (#{@invite.user.email}) hat dich in die Gruppe "#{@invite.group.name}" eingeladen.
Um die Einladung anzunehmen und der Foodcoop beizutreten, gehe zu: #{@link}
Dieser Link kann nur einmal aufgerufen werden und ist nur bis #{I18n.l @invite.expires_at} gültig.
Grüße sendet die Foodsoft!
\=======
Hi!
\#{@invite.user.first_name} #{@invite.user.last_name} (#{@invite.user.email}) has invited you to join the group "#{@invite.group.name}".
To accept the invitation and to join the foodcoop please follow this link: #{@link}
This link works only once and expires on #{I18n.l @invite.expires_at, locale: :en}.
Greetings, your FoodSoft Team!

View file

@ -1,9 +0,0 @@
Liebe <%= @group.name %>,
euer Kontostand ist durch eine Buchung am <%= @transaction.created_on.strftime('%d.%m.%Y um %H:%M') %> ins Minus gerutscht: <%= @group.account_balance %>
Es wurden <%= @transaction.amount %> für "<%= @transaction.note %>" abgebucht, die Buchung wurde von <%= @transaction.user.nick %> erstellt.
Bitte zahlt so bald wie möglich wieder Geld ein, um das Gruppenkonto auszugleichen.
Viele Grüße von <%= FoodsoftConfig[:name] %>

Some files were not shown because too many files have changed in this diff Show more