Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into 87_US_2.10_Role_Management_Page
- Loading branch information
Showing
63 changed files
with
227 additions
and
22 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#Disclaimer | ||
|
||
All pictures in this directory were downloaded from Pixabay.com in January 2017under CC0 Public Domain License. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<p> | ||
<% if date_range.start_date == date_range.end_date %> | ||
<strong><%= l date_range.start_date %></strong> | ||
<% else %> | ||
<strong><%= l date_range.start_date %></strong> | ||
<%= t 'date_range.pronouns.to' %> | ||
<strong><%= l date_range.end_date %></strong> | ||
<% end %> | ||
</p> | ||
|
25 changes: 25 additions & 0 deletions
25
app/views/events/_custom_application_fields_input.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div class="form-group"> | ||
<%= form.label :custom_application_fields, :class => 'control-label col-lg-2' %> | ||
<div class="col-lg-10" id="custom-application-fields"> | ||
<% def custom_application_field_template(value = nil) | ||
'<div class="input-group m-b-1">' + | ||
(text_field_tag :"event[custom_application_fields][]", value, :class => 'form-control', placeholder: I18n.t('.events.form.label_of_custom_field')) + | ||
'<span class="input-group-btn">' + | ||
'<a class="btn btn-default" onclick="removeCustomApplicationField(event.target)">' + | ||
'<span class="glyphicon glyphicon-remove"></span>' + | ||
'</a>' + | ||
'</span>' + | ||
'</div>' | ||
end %> | ||
<%= @event.custom_application_fields | ||
.map { |f| custom_application_field_template f } | ||
.reduce(:+) | ||
.html_safe unless @event.custom_application_fields.blank? %> | ||
<%= link_to I18n.t('.events.form.add_field'), 'javascript:addCustomApplicationField()', id: 'add-custom-application-fields', class: 'btn btn-default btn-xs' %> | ||
<p class="help-block"><%= I18n.t '.events.form.custom_application_fields_cant_be_changed_later' %></p> | ||
</div> | ||
<script>var CUSTOM_APPLICATION_FIELD_TEMPLATE = '<%= custom_application_field_template.gsub("\n", "").html_safe %>';</script> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="event-date text-center"> | ||
<span class="event-day"><%= l event.start_date, format: "%d" %></span> | ||
<span class="event-month"><%= l event.start_date, format: "%b" %></span> | ||
<% if event.start_date.year != Time.now.year %> | ||
<span class="event-year"><%= event.start_date.year %></span> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<%- model_class = Event -%> | ||
<div> | ||
<div class="pull-right"> | ||
<%= link_to t("helpers.links.apply"), new_application_letter_path(:event_id => @event.id), class: "btn btn-success btn-sm" %> | ||
<%= link_to t('.edit', :default => t('helpers.links.edit')), edit_event_path(@event), | ||
:class => 'btn btn-default btn-sm' if can? :edit, @event %> | ||
</div> | ||
<h1><%= @event.name %></h1> | ||
</div> | ||
<%= image_tag "event-detail.png", class: "img-rounded img-responsive center-block m-t-1 m-b-1" %> | ||
<div class="row"> | ||
<div class="col-md-1 col-md-offset-1 text-center col-sm-2"> | ||
<%= render "event_date_large", event: @event %> | ||
<div class="m-t-1"> | ||
<%= render @event.date_ranges %> | ||
</div> | ||
</div> | ||
<div class="col-md-7 col-sm-10"> | ||
<%= markdown @event.description %> | ||
</div> | ||
<div class="col-md-2 col-sm-offset-2"> | ||
<dl> | ||
<dt><strong><%= model_class.human_attribute_name(:knowledge_level) %>:</strong></dt> | ||
<dd><%= @event.knowledge_level %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:max_participants) %>:</strong></dt> | ||
<dd><%= @event.max_participants %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:organizer) %>:</strong></dt> | ||
<dd><%= @event.organizer %></dd> | ||
<dt><strong><%= model_class.human_attribute_name(:application_deadline) %>:</strong></dt> | ||
<dd> <%= I18n.l(@event.application_deadline) + ' ' + I18n.t('midnight') %></dd> | ||
<% if can? :manage, Event %> | ||
<dt><strong><%= model_class.human_attribute_name(:custom_application_fields) %>:</strong></dt> | ||
<dd> | ||
<ul> | ||
<% @event.custom_application_fields.each do |field| %> | ||
<li><%= field %></li> | ||
<% end %> | ||
</ul> | ||
</dd> | ||
<% end %> | ||
</dl> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
db/migrate/20170113083747_add_custom_application_fields_to_event.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddCustomApplicationFieldsToEvent < ActiveRecord::Migration | ||
def change | ||
add_column :events, :custom_application_fields, :text | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.