osem-fcy/app/views/conferences/index.html.haml
Espartaco Palma e7452a9d31
Use New Install within their own template
It used to be a partial inside #index, but having their own page
yields some extra benefits:

- Performance: Move logic from the view to the controller
  - Theres' no need to go extra steps inside the :index view
- UI: Remove the extra 'Upcoming Conferences' when the system needs
  to start the flow of the creation of the first user
2021-03-06 03:58:32 +01:00

31 lines
1.1 KiB
Text

.container
.row
.col-md-12
.page-header
%h2 Upcoming Conferences
- @current.each do |conference|
= render '/conferences/conference_details', conference: conference
- if @antiquated and @antiquated.any?
.row
.col-md-12
%p.text-right
%button{ type: 'button', class: 'btn btn-link btn-sm', 'data-toggle' => 'collapse', 'data-target' => '#antiquated', 'aria-expanded' => 'true', 'aria-controls' => 'antiquated'}
Older conferences
%span.notranslate
= "(#{@antiquated.count})"
%i.fa.fa-chevron-right
%i.fa.fa-chevron-down{ style: 'display: none' }
#antiquated.collapse
- @antiquated.each do |conference|
= render '/conferences/conference_details', conference: conference
-content_for :script_body do
:javascript
$('#antiquated').on('hidden.bs.collapse', function () {
$( ".fa-chevron-down" ).hide();
$( ".fa-chevron-right" ).show();
})
$('#antiquated').on('shown.bs.collapse', function () {
$( ".fa-chevron-down" ).show();
$( ".fa-chevron-right" ).hide();
})