Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
radscheit committed Jan 27, 2017
1 parent 4ce6789 commit a51bfac
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
13 changes: 8 additions & 5 deletions app/views/events/_participants_modal.html.erb
Expand Up @@ -10,10 +10,10 @@
<div class="form-group">
<%= label_tag(:order_by, t('.order_by')) %>
<%= select_tag(:order_by, options_for_select([
[t('.email'),'email'],
[t('.date_of_birth'),'birth_date'],
[t('.first_name'),'first_name'],
[t('.last_name'),'last_name']
[t('.email'),'email'],
[t('.date_of_birth'),'birth_date'],
[t('.first_name'),'first_name'],
[t('.last_name'),'last_name']
]), class:'form-control') %>
</div>
<div class="form-group">
Expand All @@ -23,7 +23,10 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t('.close_modal') %></button>
<%= submit_tag(t('.create_pdf'), class: 'btn btn-default', id:'print_participant_list' ) %>
<%= submit_tag(t('.create_pdf'),
:class => 'btn btn-default',
:id =>'print_participant_list',
:formtag => '_blank') %>
</div>
</div><!-- /.modal-content -->
<% end %>
Expand Down
12 changes: 8 additions & 4 deletions app/views/events/participants.html.erb
Expand Up @@ -106,7 +106,8 @@
<% end %>
</table>

<button class="btn btn-default" type="button" data-toggle="modal" data-target="#print_participant_modal" id="open_print_modal">Teilnehmerliste (PDF)</button>
<button class="btn btn-default" type="button" data-toggle="modal" data-target="#print_participant_modal" id="open_print_modal"><%= t("events.participants.print_participants") %>
</button>
<%= form_tag(event_path(@event) + "/participants/agreement_letters", { method: :post, id: 'downloadLettersForm' }) do %>
<% if can? :print_agreement_letters, Event and @has_agreement_letters %>
Expand All @@ -117,7 +118,9 @@
<% end %>
<% if can? :print_applications_eating_habits, Event %>
<%= link_to t('events.participants.print_habits'),
event_path(@event) + "/print_applications_eating_habits" , :class => 'btn btn-default btn-sm' %>
event_path(@event) + "/print_applications_eating_habits",
:class => 'btn btn-default btn-sm',
:target => '_blank' %>
<% end %>
<% end %>
<br>
Expand All @@ -127,8 +130,9 @@
<% if @event.phase == :execution %>
<%= link_to t('events.badges.print_button_label'),
badges_event_path(@event),
class: 'btn btn-default',
disabled: @participants.empty? %>
:class => 'btn btn-default',
:disabled => @participants.empty?,
:target => '_blank' %>
<% end %>

<script>
Expand Down
1 change: 1 addition & 0 deletions config/locales/de.events.yml
Expand Up @@ -56,6 +56,7 @@ de:
unnecessary: "nicht benötigt"
available: "vorhanden"
unavailable: "nicht vorhanden"
print_participants: "Teilnehmerliste (PDF)"
print_habits: "Essgewohnheiten drucken (PDF)"
print_title: "Essgewohnheiten der Teilnehmer für %{title}"
print_summary:
Expand Down
1 change: 0 additions & 1 deletion lib/pdf_generation/badges_pdf.rb
Expand Up @@ -34,7 +34,6 @@ def initialize(event, participants, name_format, show_color, show_school, logo)
@show_color = show_color || false
@show_school = show_school || false
@logo = logo
puts logo.class

@document = Prawn::Document.new(page_size: 'A4')
calculate_layout
Expand Down

0 comments on commit a51bfac

Please sign in to comment.