openSUSE/osem

View on GitHub
app/views/conferences/_call_for_papers.haml

Summary

Maintainability
Test Coverage
- cache([conference_id, call, event_types, tracks, '#splash#callforpapers'],
  expires_in: 1.hour) do
  .col-md-4.col-sm-4.text-center
    %h2
      Call for Papers
    %p.lead
      We are now accepting proposals for sessions!
    %p
      - if event_types.any?
        You can submit proposals for
        %span.notranslate
          = event_types.map(&:pluralize).to_sentence + '.'
      - if tracks.any?
        Proposals should fit in one of the
        %span.notranslate
          = pluralize(tracks.length, 'track') + ':'
          = tracks.to_sentence + '.'
      The submission period is open
      %em.notranslate
        = date_string(call.start_date, call.end_date) + '.'
      %b
        You have
        = pluralize(call.remaining_days, 'day')
        left!
    %p.cta-button
      = link_to "Submit your proposal now",
        new_conference_program_proposal_path(conference_id),
        class: 'btn btn-success btn-lg text-center'