From 72ef31c0ecf3de147b9b9f52a7f3217d4d93bd06 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Wed, 24 Feb 2016 21:48:32 +0100 Subject: [PATCH] Make unassigned tasks more prominent in the dashboard Show all unassigned task in the dashboard to make it more interesting for members to pick tasks. Some members do not (want to) click on the task list very often it is not clear if there are new tasks if we show the number of unassigned tasks only. --- app/views/home/index.html.haml | 13 +++++++------ .../_list.haml => shared/_task_list.haml} | 0 app/views/tasks/index.haml | 4 ++-- app/views/tasks/user.html.haml | 5 ++--- app/views/tasks/workgroup.haml | 4 +--- config/locales/de.yml | 19 +++++++++---------- config/locales/en.yml | 19 +++++++++---------- config/locales/fr.yml | 19 +++++++++---------- config/locales/nl.yml | 19 +++++++++---------- 9 files changed, 48 insertions(+), 54 deletions(-) rename app/views/{tasks/_list.haml => shared/_task_list.haml} (100%) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index ac39eb04..934574ea 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -6,7 +6,7 @@ -# placeholder deface to add content using erb[silent]:contains() - '' -- unless @unaccepted_tasks.empty? && @next_tasks.empty? && @unassigned_tasks.size == 0 +- unless @unaccepted_tasks.empty? && @next_tasks.empty? %section.row-fluid - unless @next_tasks.empty? .span3.well @@ -20,11 +20,12 @@ %h4= t '.tasks_move.title' = t '.tasks_move.desc' = link_to t('.tasks_move.action'), user_tasks_path - - unless @unassigned_tasks.size == 0 - .span3.well - %h4= t '.tasks_open.title' - = t '.tasks_open.desc', size: @unassigned_tasks.size - = link_to t('.tasks_open.action'), tasks_path + +- if @unassigned_tasks.size > 0 + %section + %h2= t '.tasks_open.title' + = render 'shared/task_list', tasks: @unassigned_tasks + = link_to t('.tasks_open.view_all'), tasks_path - if current_user.ordergroup = render :partial => 'shared/open_orders', :locals => {:ordergroup => current_user.ordergroup} diff --git a/app/views/tasks/_list.haml b/app/views/shared/_task_list.haml similarity index 100% rename from app/views/tasks/_list.haml rename to app/views/shared/_task_list.haml diff --git a/app/views/tasks/index.haml b/app/views/tasks/index.haml index 044dc05c..9976e27c 100644 --- a/app/views/tasks/index.haml +++ b/app/views/tasks/index.haml @@ -4,7 +4,7 @@ - unless @non_group_tasks.empty? %section %h3= t '.title_non_group' - = render 'list', tasks: @non_group_tasks + = render 'shared/task_list', tasks: @non_group_tasks - for group in @groups @@ -14,5 +14,5 @@ %h3 = group.name %small= link_to t('.show_group_tasks'), workgroup_tasks_path(workgroup_id: group) - = render 'list', tasks: tasks + = render 'shared/task_list', tasks: tasks = link_to_top diff --git a/app/views/tasks/user.html.haml b/app/views/tasks/user.html.haml index 095cd1de..734220b4 100644 --- a/app/views/tasks/user.html.haml +++ b/app/views/tasks/user.html.haml @@ -4,14 +4,13 @@ - unless @unaccepted_tasks.empty? %section %h3= t '.title_open' - = render 'list', tasks: @unaccepted_tasks + = render 'shared/task_list', tasks: @unaccepted_tasks %section %h3= t '.title_accepted' - unless @accepted_tasks.empty? - = render 'list', tasks: @accepted_tasks + = render 'shared/task_list', tasks: @accepted_tasks - else = t('.more', tasks_link: link_to(t('.tasks_link'), tasks_path)).html_safe %br/ = link_to_top - diff --git a/app/views/tasks/workgroup.haml b/app/views/tasks/workgroup.haml index b9f81b7f..1d2da321 100644 --- a/app/views/tasks/workgroup.haml +++ b/app/views/tasks/workgroup.haml @@ -3,8 +3,6 @@ %section %h3= t '.title_all' - = render 'list', tasks: @group.open_tasks + = render 'shared/task_list', tasks: @group.open_tasks %br/ = link_to_top - - diff --git a/config/locales/de.yml b/config/locales/de.yml index 207c30ee..1d5160be 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -951,9 +951,8 @@ de: desc: Du bis für Aufgaben verantwortlich. title: Aufgaben übernehmen tasks_open: - action: offene Aufgabe(n) - desc: Es gibt %{size} title: Offene Aufgaben + view_all: Alle Aufgaben anzeigen title: Startseite your_tasks: Deine Aufgaben no_ordergroups: Leider bist Du kein Mitglied einer Bestellgruppe @@ -1452,6 +1451,14 @@ de: title: Laufende Bestellungen total_sum: Gesamtsumme who_ordered: Wer hat bestellt? + task_list: + accept_task: Aufgabe übernehmen + done: Erledigt + done_q: Erledigt? + mark_done: Aufgabe als erledigt markieren + reject_task: Aufgabe ablehnen + who: Wer machts? + who_hint: "(Wie viele werden noch benötigt?)" user_form_fields: contact_address_hint: Die Adresse deiner Bestellgruppe. Wenn du sie aktualisierst, wird sie auch bei den anderen Mitgliedern deiner Bestellgruppe aktualisiert. workgroup_members: @@ -1642,14 +1649,6 @@ de: show_group_tasks: Gruppenaufgaben anzeigen title: Aufgaben title_non_group: Aufgaben für alle! - list: - accept_task: Aufgabe übernehmen - done: Erledigt - done_q: Erledigt? - mark_done: Aufgabe als erledigt markieren - reject_task: Aufgabe ablehnen - who: Wer machts? - who_hint: "(Wie viele werden noch benötigt?)" nav: all_tasks: Alle Aufgaben archive: Erledigte Aufgaben (Archiv) diff --git a/config/locales/en.yml b/config/locales/en.yml index 1af442ee..8cb8ca8d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -964,9 +964,8 @@ en: desc: You are responsible for these tasks. title: Take over tasks tasks_open: - action: open task(s) - desc: There is/are %{size} title: Open tasks + view_all: Show all tasks title: Homepage your_tasks: Your tasks no_ordergroups: You are unfortunately not a member of an ordergroup. @@ -1474,6 +1473,14 @@ en: title: Current orders total_sum: Total sum who_ordered: Who ordered? + task_list: + accept_task: Accept task + done: Done + done_q: Done? + mark_done: Mark task as done + reject_task: Reject task + who: Who is doing it? + who_hint: "(How much are still needed?)" user_form_fields: contact_address_hint: The address of your ordergroup. If you update this, it changes for other members of the ordergroup as well. workgroup_members: @@ -1664,14 +1671,6 @@ en: show_group_tasks: Show group tasks title: Tasks title_non_group: Tasks for all! - list: - accept_task: Accept task - done: Done - done_q: Done? - mark_done: Mark task as done - reject_task: Reject task - who: Who is doing it? - who_hint: "(How much are still needed?)" nav: all_tasks: All tasks archive: Completed tasks (archive) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 76217d4c..6eb89785 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -961,9 +961,8 @@ fr: desc: Tu as du boulot de prévu. title: Accepter des boulot tasks_open: - action: boulot(s) disponible(s) - desc: Il y a %{size} title: Boulots disponibles + view_all: Afficher tous les boulots title: Page d'accueil your_tasks: Voilà le boulot que tu as accepté en ce moment no_ordergroups: Tu ne fais encore partie d'aucune cellule @@ -1460,6 +1459,14 @@ fr: title: Commandes en cours total_sum: Total who_ordered: Qui a commandé? + task_list: + accept_task: Te charger de ce boulot + done: Effectué + done_q: Effectué? + mark_done: Marquer ce boulot comme étant effectué + reject_task: Refuser ce boulot + who: Qui le fait? + who_hint: "(Combien manquent encore?)" user_form_fields: contact_address_hint: workgroup_members: @@ -1658,14 +1665,6 @@ fr: show_group_tasks: Afficher l'agenda de cette équipe title: Agenda title_non_group: Boulots ouverts à tou-te-s - list: - accept_task: Te charger de ce boulot - done: Effectué - done_q: Effectué? - mark_done: Marquer ce boulot comme étant effectué - reject_task: Refuser ce boulot - who: Qui le fait? - who_hint: "(Combien manquent encore?)" nav: all_tasks: L'agenda de la boufcoop archive: Boulots déjà effectués (archives) diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 6ec02970..5ce39c3f 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -952,9 +952,8 @@ nl: desc: Je bent voor de volgende taken verantwoordelijk. title: Taken op je nemen tasks_open: - action: open taken - desc: Er zijn %{size} title: open taken + view_all: Alle taken bekijken title: Hoofdpagina your_tasks: Jouw taken no_ordergroups: Jammergenoeg ben je niet aangesloten bij een huishouden. @@ -1455,6 +1454,14 @@ nl: title: Lopende bestellingen total_sum: Totaalsom who_ordered: Wie heeft besteld? + task_list: + accept_task: Taak accepteren + done: Gedaan + done_q: Gedaan? + mark_done: Taak als gedaan markeren + reject_task: Taak laten vallen + who: Wie doet het? + who_hint: "(Hoeveel zijn er nog nodig?)" user_form_fields: contact_address_hint: Het adres van je huishouden. Als je dit wijzigt, verandert het ook voor de andere leden van je huishouden. workgroup_members: @@ -1645,14 +1652,6 @@ nl: show_group_tasks: Groepstaken tonen title: Taken title_non_group: Taken voor iedereen! - list: - accept_task: Taak accepteren - done: Gedaan - done_q: Gedaan? - mark_done: Taak als gedaan markeren - reject_task: Taak laten vallen - who: Wie doet het? - who_hint: "(Hoeveel zijn er nog nodig?)" nav: all_tasks: Alle taken archive: Gedane taken (archief)