-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Changed design of the event detail page for non-mobile screens * minor code changes regarding image on event detail page * moved event date into partial * Moved date range rendering into partial * Fix spacing * Fix wrong test having un-localized date * Add test to verify that date_range.to_s is working for single days * Make test more independent of factory * Optimize layout for sm devices * Display custom fields on large event page
- Loading branch information
Showing
11 changed files
with
77 additions
and
11 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.
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> | ||
|
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
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
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