Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer able to unsign from cafe shifts after 12 am the day before #1156

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions app/views/cafe_workers/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
<%= f.input :group %>
<%= f.button :submit %>
<% if cafe_shift.cafe_worker.persisted? %>
<%= link_to(t('.destroy'),
cafe_shift_cafe_worker_path(cafe_shift, cafe_shift.cafe_worker),
method: :delete, class: 'btn danger pull-right') %>
<!-- if the cafe-shift is close to closing (12:00 the day before), don't allow the user to unsign from the shift -->
<% if (cafe_shift.start - 1.day).change(hour: 12) < Time.now %>
<%= t('.cant_unsign') %>
<%= t('.contact_head_of_cafe') %>
<% else %>
<%= link_to(t('.destroy'),
cafe_shift_cafe_worker_path(cafe_shift, cafe_shift.cafe_worker),
method: :delete, class: 'btn danger pull-right') %>
<% end %>
<% end %>
<% end %>
1 change: 1 addition & 0 deletions app/views/proposals/form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<div class="col-md-offset-1 col-md-10 col-sm-12">
<%= simple_format(t('.i_am_proposal_machine')) %>
<%= simple_format(t('.do_not_forget_to_copy')) %>
<%= simple_format(t('.do_not_forget_to_send')) %>

<%= form_for(@proposal, url: proposals_generate_path(format: :pdf),
html: {class: 'proposal-form'}) do |f| %>
Expand Down
4 changes: 3 additions & 1 deletion config/locales/onesky_en/cafe_workers.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
en:
cafe_workers:
form:
destroy: "Resign from shift"
destroy: "Resign from shift"
cant_unsign: "You sadly can't resign from this shift as it is too close to the starting time of this shift (12 am the day before)"
contact_head_of_cafe: "If you really need to resign from this shift, write to the Head of the Cafe at [email protected]"
3 changes: 2 additions & 1 deletion config/locales/onesky_en/proposals.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ en:
create_motion: "Create proposal!"
description: "Motioner skrivs till terminsmöte för att kunna påverka sektionens verksamhet. Här finns en mall för att skapa motioner."
do_not_forget_to_copy: "Do not forget to copy your text every now and then so that it doesn't disappear, were you to reload the page."
do_not_forget_to_find: "Observe that you still have to send your proposal to to the secretary (at [email protected])."
i_am_proposal_machine: "I am a proposal machine. Here, you can easily enter your opinions and I'll make a nice proposal for you."
keywords:
- motion
Expand All @@ -20,4 +21,4 @@ en:
plea_less: "Plea less!"
plea_more: "Plea more!"
pleas: Pleas
title: "Proposal machine"
title: "Proposal machine"
2 changes: 2 additions & 0 deletions config/locales/views/cafe_workers/cafe_workers.sv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ sv:
cafe_workers:
form:
destroy: Hoppa av passet
cant_unsign: Du kan tyvärr inte avregistera dig från det här passet då det är för nära starttiden av det (kl. 12 dagen innan).
contact_head_of_cafe: Om du verkligen behöver avanmäla dig, skriv då till Cafémästaren på [email protected]
1 change: 1 addition & 0 deletions config/locales/views/proposals/proposals.sv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sv:
create_motion: Skapa motion!
description: Motioner skrivs till terminsmöte för att kunna påverka sektionens verksamhet. Här finns en mall för att skapa motioner.
do_not_forget_to_copy: Glöm inte att kopiera din text då och då så att den inte försvinner om du skulle råka ladda om sidan.
do_not_forget_to_send: Observera att du fortfarande måste skicka in din motion till sekreteraren (på [email protected]).
i_am_proposal_machine: Jag är en motionsmaskin. Här kan du enkelt fylla i dina åsikter så gör jag en fin motion åt dig.
keywords:
- motion
Expand Down