Removed fancybox. Fixed profile, my ordergroup and tasks.

This commit is contained in:
benni 2012-11-12 09:03:23 +01:00
parent dce79802e0
commit 1d9815731c
37 changed files with 124 additions and 518 deletions

View file

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

View file

@ -3,22 +3,25 @@
- content_for(:sidebar) do
= render :partial => 'start_nav'
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks_number == 0
%section.well
- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks.size == 0
%section.row-fluid
- unless @next_tasks.empty?
%h3 Deine Aufgaben für nächste Woche
%dl.dl-horizontal
- @next_tasks.each do |task|
%dt= l task.due_date, format: "%A, %d. %b"
%dd= link_to task.name, task_path(task)
.span3.well
%h4 Deine Aufgaben
%dl
- @next_tasks.each do |task|
%dt= l task.due_date, format: "%A, %d. %b"
%dd= link_to task.name, task_path(task)
- unless @unaccepted_tasks.empty?
%h3 Aufgaben übernehmen
Du bis für Aufgaben verantwortlich.
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path
- unless @unassigned_tasks_number == 0
%h3 Offene Aufgaben
= "Es gibt #{@unassigned_tasks_number} #{link_to 'offene Aufgabe(n)', :controller => 'tasks'}".html_safe
.span3.well
%h4 Aufgaben übernehmen
Du bis für Aufgaben verantwortlich.
= link_to "Aufgaben übernehmen/ablehnen", user_tasks_path
- unless @unassigned_tasks.size == 0
.span3.well
%h4 Offene Aufgaben
Es gibt #{@unassigned_tasks.size}
= link_to 'offene Aufgabe(n)', tasks_path
- if current_user.ordergroup
= render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup}

View file

@ -1,35 +1,26 @@
%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
-title "Meine Bestellgruppe"
.row-fluid
.span4
%h2= @ordergroup.name
.well
%p
%b Beschreibung:
= @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)
.span8
%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();
});
})
.well.well-small
= form_tag my_ordergroup_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: 'Suchen ...'
#transactions= render "finance/financial_transactions/transactions"

View file

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

View file

@ -1,24 +1,24 @@
- title "Mein Profil"
%p
Hier kannst Du deine Einstellungen ändern, z.b. Deine Telphonnummer oder Dein Passwort.
.left_column{:style => "width: 60%;"}
.box_title
%h2
= h @user.nick
- title "Mein Profil", false
.row-fluid
.span7
%h3
= h @current_user.nick
%small
(Mitglied seit: #{distance_of_time_in_words(Time.now, @user.created_on)})
.column_content
- simple_form_for(@user, :url => { :action => 'update_profile'}) do |f|
(Mitglied seit: #{distance_of_time_in_words(Time.now, @current_user.created_on)})
= simple_form_for(@current_user, :url => { :action => 'update_profile'}) do |f|
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
= submit_tag 'Speichern'
.right_column{:style => "width: 35%;"}
.box_title
.form-actions
= submit_tag 'Speichern', class: 'btn'
.span5
%h2 Du bist Mitglied in folgenden Gruppen
.column_content
- for membership in Membership.find_all_by_user_id(@user.id)
%p
= membership.group.name
= link_to "Neue Mitglieder einladen", new_invite_path(id: membership.group_id)
- if membership.group.type != 'Ordergroup'
= link_to "Mitgliedschaft beenden", cancel_membership_path(membership_id: membership),
confirm: "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", method: :post
%table.table.table-striped
- @current_user.memberships.each do |membership|
%tr
%td= membership.group.name
%td= link_to "Neue Mitglieder einladen", new_invite_path(id: membership.group_id),
remote: true, class: 'btn btn-success btn-small'
- if membership.group.type != 'Ordergroup'
%td= link_to "Mitgliedschaft beenden", cancel_membership_path(membership_id: membership),
confirm: "Bist Du sicher, dass Du Deine Mitgliedschaft beenden willst?", method: :post,
class: 'btn btn-danger btn-small'

View file

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

View file

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

View file

@ -15,6 +15,7 @@
= render "shared/workgroup_members"
= simple_form_for @task do |f|
= f.hidden_field :current_user_id
= f.input :name
= f.input :description, as: :text, input_html: {rows: 10}
= f.input :duration, :as => :select, :collection => 1..3

View file

@ -1,4 +1,4 @@
- title "Aufgabe im Detail"
- title "Aufgabe anzeigen"
- content_for :sidebar do
= render 'nav'
@ -18,10 +18,9 @@
%dd
- if @task.workgroup
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)
%p
- unless @task.done?
= link_to 'Als erledigt markieren', set_done_task_path(@task), method: :post, class: 'btn'
= link_to "Bearbeiten", edit_task_path(@task), class: 'btn'
= link_to "Löschen", task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
class: 'btn btn-danger'
%p
- unless @task.done?
= link_to 'Als erledigt markieren', set_done_task_path(@task), method: :post, class: 'btn'
= link_to "Bearbeiten", edit_task_path(@task), class: 'btn'
= link_to "Löschen", task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
class: 'btn btn-danger'