rubycentral/cfp-app

View on GitHub
app/views/staff/events/guidelines.html.haml

Summary

Maintainability
Test Coverage
.row
  .col-md-12
    .page-header
      %h1= "CFP Guidelines"
      %hr
        .row
          .col-md-6.guidelines-preview
            - if event.guidelines
              = markdown(event.guidelines)
            - else
              %em= "No Guidelines"

          .col-md-3
            - if current_user.organizer?
              %button.btn.btn-primary.btn-lg.edit-guidelines-btn Edit Guidelines

        .row
          .col-md-12
            = form_for event, url: event_staff_update_guidelines_path(event), html: {role: 'form'} do |f|

              %fieldset
                .form-group.guidelines-form.col-md-6
                  = f.text_area :guidelines, class: 'form-control', id: 'text-box', placeholder: 'Description of CFP', rows: 20
                  %p.help-block Markdown compatible

                .form-group.guidelines-form.col-md-3
                  %button.btn.btn-success.btn-lg.save-guidelines-btn{:type => "submit"} Save Guidelines
                  = link_to "Cancel", event_staff_guidelines_path, class: 'btn btn-danger btn-lg cancel-guidelines-btn'