- if resource.mailing_users.count > 0
  p
    = link_to "Envoyer le mail uniquement aux #{resource.mailing_users.count} personne(s) cochée(s) lors de la création du mail",
              send_mailing_message_path(resource.id, token: resource.token, option: 'checked'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message'
  p == resource.mailing_users.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il semblerait que vous n'ayez pas sélectionné d'utilisateurs à qui envoyer le mail

- mu = MailingUser.all
- if mu.count > 0
  p
    = link_to 'Forcer l\'envoie du mail à TOUS les clients (répondus / non répondus / archivés / non archivés)',
              send_mailing_message_path(resource.id, token: resource.token, option: 'all'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message button-secondary'
  p == mu.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il n'y a aucun utilisateur enregistré sur le site. Ajoutez-en un avant de pouvoir envoyer un email par cette option.

Fix wrong word to reprensent mailing users

- if resource.mailing_users.count > 0
  p
    = link_to "Envoyer le mail uniquement aux #{resource.mailing_users.count} personne(s) cochée(s) lors de la création du mail",
              send_mailing_message_path(resource.id, token: resource.token, option: 'checked'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message'
  p == resource.mailing_users.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il semblerait que vous n'ayez pas sélectionné d'utilisateurs à qui envoyer le mail

- mu = MailingUser.all
- if mu.count > 0
  p
    = link_to 'Forcer l\'envoie du mail à TOUS les utilisateurs (répondus / non répondus / archivés / non archivés)',
              send_mailing_message_path(resource.id, token: resource.token, option: 'all'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message button-secondary'
  p == mu.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il n'y a aucun utilisateur enregistré sur le site. Ajoutez-en un avant de pouvoir envoyer un email par cette option.


li.list-group-item
  = link_to project_url(project) do
    = project.name

    |

    span.badge = project.issues.size

  - if project.github_url.present?
    |
    = link_to project.github_url do
      i.fa.fa-github

  - if project.bitbucket_full_name.present?
    |
    = link_to "#{ Settings.bitbucket_base_url }/#{ project.bitbucket_full_name }" do
      i.fa.fa-bitbucket

  .pull-right
    = link_to (t '.project_users'), project_users_url(project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.project_issues'), project_issues_url(project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.edit'), edit_user_project_url(current_user, project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.destroy'), user_project_url(current_user, project),
      :class => 'btn btn-default btn-xs btn-danger',
      :method => 'delete', :data => { :confirm => 'Вы уверены?' }

Add gitlab icon and url for lists of gitlab projects

li.list-group-item
  = link_to project_url(project) do
    = project.name

    |

    span.badge = project.issues.size

  - if project.github_url.present?
    |
    = link_to project.github_url do
      i.fa.fa-github

  - if project.bitbucket_full_name.present?
    |
    = link_to "#{ Settings.bitbucket_base_url }/#{ project.bitbucket_full_name }" do
      i.fa.fa-bitbucket

  - if project.gitlab_full_name.present?
    |
    = link_to "#{ Settings.gitlab_base_url }/#{ project.gitlab_full_name }" do
      i.fa.fa-gitlab

  .pull-right
    = link_to (t '.project_users'), project_users_url(project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.project_issues'), project_issues_url(project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.edit'), edit_user_project_url(current_user, project), :class => 'btn btn-default btn-xs'

    |

    = link_to (t '.destroy'), user_project_url(current_user, project),
      :class => 'btn btn-default btn-xs btn-danger',
      :method => 'delete', :data => { :confirm => 'Вы уверены?' }


h1= 'Tokyo Tech Coder'

div.home-recent-acs
  - if partial_exists? 'message'
    div.top-message
      = render partial: 'message'
  div
    h2 Recent ACs at POJ
    = render partial: 'poj/submissions', locals: { submissions: @poj_submissions, usermap: @poj_usermap }
    p= link_to 'View more', poj_recent_path, class: 'link-button'

  div
    h2 Recent ACs at AOJ
    = render partial: 'aoj/submissions', locals: { submissions: @aoj_submissions, usermap: @aoj_usermap }
    p= link_to 'View more', aoj_recent_path, class: 'link-button'

div.home-users
  h2 Users
  = render partial: 'users/list'

footer.clear
  p
    |何か問題点や要望があれば #{link_to_twitter 'eagletmt'} や eagletmt@じーめーる へ。

Add links to GitHub repository

h1= 'Tokyo Tech Coder'

div.home-recent-acs
  - if partial_exists? 'message'
    div.top-message
      = render partial: 'message'
  div
    h2 Recent ACs at POJ
    = render partial: 'poj/submissions', locals: { submissions: @poj_submissions, usermap: @poj_usermap }
    p= link_to 'View more', poj_recent_path, class: 'link-button'

  div
    h2 Recent ACs at AOJ
    = render partial: 'aoj/submissions', locals: { submissions: @aoj_submissions, usermap: @aoj_usermap }
    p= link_to 'View more', aoj_recent_path, class: 'link-button'

div.home-users
  h2 Users
  = render partial: 'users/list'

- repository_url = 'https://github.com/eagletmt/ttcoder'
- issues_url = repository_url + '/issues'
footer.clear
  p
    |何か問題点や要望があれば #{link_to_twitter 'eagletmt'} や #{link_to 'eagletmt/ttcoder', issues_url} や eagletmt@じーめーる へ。
    br
    |#{simple_link_to repository_url}


footer.footer-container#footer
  .row.footer
    .small-12.large-4.columns
      |
      == setting.newsletter(newsletter_user) if @newsletter_module.enabled?

    .small-12.large-4.columns.credentials
      == setting.credentials

    .small-12.large-4.columns.socials
      - if setting.show_social
        = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?
        = awesome_social_share

Use ? after boolean property

footer.footer-container#footer
  .row.footer
    .small-12.large-4.columns
      |
      == setting.newsletter(newsletter_user) if @newsletter_module.enabled?

    .small-12.large-4.columns.credentials
      == setting.credentials

    .small-12.large-4.columns.socials
      - if setting.show_social?
        = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?
        = awesome_social_share


.navbar.navbar-fixed-top
  .navbar-inner
    .container
      a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.brand href=root_url ATLRUG
      .container.nav-collapse
        ul.nav
          li= link_to "Meetup", "http://meetup.com/atlantaruby/"
          li= link_to "Sponsors", page_path("sponsors")
          li= link_to "@atlrug", "http://twitter.com/atlrug"

Add lock icon for log in link

.navbar.navbar-fixed-top
  .navbar-inner
    .container
      a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.brand href=root_url ATLRUG
      .container.nav-collapse
        ul.nav
          li= link_to "Meetup", "http://meetup.com/atlantaruby/"
          li= link_to "Sponsors", page_path("sponsors")
          li= link_to "@atlrug", "http://twitter.com/atlrug"
        ul.nav.pull-right
          li= link_to content_tag(:i,"", :class => 'icon-lock icon-white'),
                      login_path


h1 Stories
.right
  a.button.small*(current_user ? {'href' => new_story_url} : { 'href' => '#', 'data-reveal-id' => 'register-login' })
    | New Story
- @stories.each do |story|
  .large-12.columns.story-list-item
    h4 = link_to story.title, story_path(story)
    br
    == story.fragments.first.content
    ul
      li
        | Creator: #{link_to story.creator.username, user_path(story.creator)}
      li = "Contributors: #{story.authors.count}"
      li = "Created on: #{story.created_at.to_date}"
      li = "Last updated: #{story.updated_at.to_date}"
  - if story != @stories.last
    hr

.large-12.columns
  br
  = paginate @stories

== render 'shared/register_or_login'

Use story listing partial when displaying story list

h1 Stories
.right
  a.button.small*(current_user ? {'href' => new_story_url} : { 'href' => '#', 'data-reveal-id' => 'register-login' })
    | New Story
== render partial: 'shared/story_list_item', locals: { stories: @stories }

.large-12.columns
  br
  = paginate @stories

== render 'shared/register_or_login'


= f.input :form_id, as: :hidden if options[:embedded]

= f.fields_for :questions do |question_form|
  .row
    .col-md-5
      = question_form.input :value
    .col-md-2.col-xs-5
      = question_form.input :language, collection: %w{de en}
    .col-md-3.col-xs-5
      = question_form.input :question_type, collection: Formgen::Question.t_types, value_method: lambda { |obj| Formgen::Question.index_of_type obj }
    .col-md-1.col-xs-1
      = question_form.input :mandatory
    .col-md-1.col-xs-1
      = question_form.link_to_remove fa_icon('minus-square'), class: 'pull-right'

.row
  .col-md-12
    = f.link_to_add fa_icon('plus-square'), :questions, class: 'pull-right'

Change links to buttons in form editor

= f.input :form_id, as: :hidden if options[:embedded]

= f.fields_for :questions do |question_form|
  .row.form-group
    .col-md-5
      = question_form.input :value
    .col-md-2.col-xs-5
      = question_form.input :language, collection: %w{de en}
    .col-md-3.col-xs-5
      = question_form.input :question_type, collection: Formgen::Question.t_types, value_method: lambda { |obj| Formgen::Question.index_of_type obj }
    .col-md-1.col-xs-1
      = question_form.input :mandatory
    .col-md-1.col-xs-1
      = question_form.link_to_remove fa_icon('minus'), class: 'pull-right btn btn-sm btn-default'

.row.form-group
  .col-md-12
    = f.link_to_add fa_icon('plus'), :questions, class: 'pull-right btn btn-sm btn-default'


p Not finding what you are looking for? Use this form to request a build

form action="/build" method="post"
  table
    tr
      th Language
      th OS
      th Release
      th Arch
      th Version
    tr
      td
        select name="repo"
          option value="travis-erlang-builder" selected="true" Erlang
          option value="perl-builder" Perl
          option value="php-src-builder" PHP
          option value="cpython-builder" Python
          option value="travis-rubies" Ruby
      td
        select name="os"
          option value=""
          option value="freebsd" FreeBSD
          option value="osx" macOS
          option value="linux" selected="true" Linux (Ubuntu)
      td
        select name="dist"
          option value="" selected="true"
          option value="bionic" Ubuntu Bionic (18.04)
          option value="xenial" Ubuntu Xenial (16.04)
          option value="12.0" FreeBSD 12.0
      td
        select name="arch"
          option value="" selected="true"
          option value="arm64" ARM
          option value="ppc64le" POWER (little endian)
      td
        input type="text" name="version" value="" maxlength="32" required="required"

  button type="submit" name="build-request-submit" Submit

hr

Add AMD64 option for arch

p Not finding what you are looking for? Use this form to request a build

form action="/build" method="post"
  table
    tr
      th Language
      th OS
      th Release
      th Arch
      th Version
    tr
      td
        select name="repo"
          option value="travis-erlang-builder" selected="true" Erlang
          option value="perl-builder" Perl
          option value="php-src-builder" PHP
          option value="cpython-builder" Python
          option value="travis-rubies" Ruby
      td
        select name="os"
          option value=""
          option value="freebsd" FreeBSD
          option value="osx" macOS
          option value="linux" selected="true" Linux (Ubuntu)
      td
        select name="dist"
          option value="" selected="true"
          option value="bionic" Ubuntu Bionic (18.04)
          option value="xenial" Ubuntu Xenial (16.04)
          option value="12.0" FreeBSD 12.0
      td
        select name="arch"
          option value="(all)"
          option value="amd64" x86_64 (a.k.a. AMD64) selected="true"
          option value="arm64" ARM
          option value="ppc64le" POWER (little endian)
      td
        input type="text" name="version" value="" maxlength="32" required="required"

  button type="submit" name="build-request-submit" Submit

hr


#accordion
  - channel_groups.each do |cg|
    .card
      .card-header
        = link_to cg.name, "#collapse#{cg.id}", data: { toggle: "collapse", parent: "#accordion" }
      .collapse id="collapse#{cg.id}"
        .card-block.p-3
          - cg.channels.published.each do |c|
            .row.mb-2
              .col
                = c.name
              .col.text-right
                c-channel-receive-button :channel-id="#{c.id}" :init-is-receiving="#{current_user.receiving?(c)}"

- content_for :js_templates do
  = render "application/js_templates/channel_receive_button"

Order by sort_number in channel list page

#accordion
  - channel_groups.each do |cg|
    .card
      .card-header
        = link_to cg.name, "#collapse#{cg.id}", data: { toggle: "collapse", parent: "#accordion" }
      .collapse id="collapse#{cg.id}"
        .card-block.p-3
          - cg.channels.published.order(:sort_number, :id).each do |c|
            .row.mb-2
              .col
                = c.name
              .col.text-right
                c-channel-receive-button :channel-id="#{c.id}" :init-is-receiving="#{current_user.receiving?(c)}"

- content_for :js_templates do
  = render "application/js_templates/channel_receive_button"


= form_for(@post) do |f|

  - if @post.errors.any?
    #error_explanation
      h2
        => pluralize(@post.errors.count, 'errors')
        | prohibited this post from being saved:
      ul
        - @post.errors.full_messages.each do |error|
          li= error

  .field
    = f.label :title
    br/
    = f.text_field :title

  .field
    = f.label :content
    br/
    = f.text_area :content

  .field
    = f.collection_check_boxes :tag_ids, Tag.all, :id, :name
    = f.fields_for :tags, @post.tags.build do |tag_fields|
      = tag_fields.text_field :name

  .actions
    = f.submit

Add labels to the post form for the tags

= form_for(@post) do |f|

  - if @post.errors.any?
    #error_explanation
      h2
        => pluralize(@post.errors.count, 'errors')
        | prohibited this post from being saved:
      ul
        - @post.errors.full_messages.each do |error|
          li= error

  .field
    = f.label :title
    br/
    = f.text_field :title

  .field
    = f.label :content
    br/
    = f.text_area :content

  .field
    = f.label "Tags"
    = f.collection_check_boxes :tag_ids, Tag.all, :id, :name
    br
    = f.fields_for :tags, @post.tags.build do |tag_fields|
      => tag_fields.label "New Tag"
      = tag_fields.text_field :name

  .actions
    = f.submit


= form_for @garage do |f|
  - if @garage.errors.any?
    #error_explanation
      h2 = "#{pluralize(@garage.errors.count, "error")} prohibited this garage from being saved:"
      ul
        - @garage.errors.full_messages.each do |message|
          li = message

  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :owner
    = f.text_field :owner
  .field
    = f.label :address
    = f.text_field :address
  .field
    = f.label :zip
    = f.text_field :zip
  .field
    = f.label :city
    = f.text_field :city
  .field
    = f.label :email
    = f.text_field :email
  .field
    = f.label :phone
    = f.text_field :phone
  .field
    = f.label :mobile
    = f.text_field :mobile
  .field
    = f.label :fax
    = f.text_field :fax
  .field
    = f.label :latitude
    = f.number_field :latitude
  .field
    = f.label :longitude
    = f.number_field :longitude
  .field
    = f.label :tax_id
    = f.text_field :tax_id
  .field
    = f.label :website
    = f.text_field :website
  .field
    = f.label :logo
    = f.text_field :logo
  .actions = f.submit 'Save'

Change Garage form view introduce simple form.

= simple_form_for(@garage, html: {class: 'form-horizontal' }) do |f|
  - if @garage.errors.any?
    #error_explanation
      h2 = "#{pluralize(@garage.errors.count, "error")} prohibited this garage from being saved:"
      ul
        - @garage.errors.full_messages.each do |message|
          li = message

  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :owner
    = f.text_field :owner
  .field
    = f.label :address
    = f.text_field :address
  .field
    = f.label :zip
    = f.text_field :zip
  .field
    = f.label :city
    = f.text_field :city
  .field
    = f.label :email
    = f.text_field :email
  .field
    = f.label :phone
    = f.text_field :phone
  .field
    = f.label :mobile
    = f.text_field :mobile
  .field
    = f.label :fax
    = f.text_field :fax
  .field
    = f.label :latitude
    = f.number_field :latitude
  .field
    = f.label :longitude
    = f.number_field :longitude
  .field
    = f.label :tax_id
    = f.text_field :tax_id
  .field
    = f.label :website
    = f.text_field :website
  .field
    = f.label :logo
    = f.text_field :logo
  .actions = f.submit 'Save'


- if award_applications && award_applications.any?
  table.applications-table
    colgroup
      col width="300"
      col width="200"
      col width="200"
    tbody
      /tr
        td colspan="3"
          h3
            = award_applications.first.award_type_full_name
            '  Award
      - award_applications.each do |award|
        tr
          td
            h4
              = award.decorate.application_name
              br
              small
                = award.award_type_full_name
                '  Award
          td
            p
              - if award.submitted?
                ' Submitted
              - else
                = award.decorate.fill_progress_in_percents
                '  completed
          td.pull-right
            - if award.submitted?
              = link_to edit_form_path(award.id)
                ' Edit
                - if award.award_type == "promotion"
                  ' nomination
                - else
                  ' application
            - else
              = link_to edit_form_path(award.id)
                ' Continue
                - if award.award_type == "promotion"
                  ' nomination
                - else
                  ' application

Comment out the application percentage complete on the applicant dashboard

- if award_applications && award_applications.any?
  table.applications-table
    colgroup
      col width="300"
      col width="200"
      col width="200"
    tbody
      /tr
        td colspan="3"
          h3
            = award_applications.first.award_type_full_name
            '  Award
      - award_applications.each do |award|
        tr
          td
            h4
              = award.decorate.application_name
              br
              small
                = award.award_type_full_name
                '  Award
          td
            p
              - if award.submitted?
                ' Submitted
              - else
                ' In progress
                / TODO fix progress percentage
                / = award.decorate.fill_progress_in_percents
                / '  completed
          td.pull-right
            - if award.submitted?
              = link_to edit_form_path(award.id)
                ' Edit
                - if award.award_type == "promotion"
                  ' nomination
                - else
                  ' application
            - else
              = link_to edit_form_path(award.id)
                ' Continue
                - if award.award_type == "promotion"
                  ' nomination
                - else
                  ' application


= render "renalware/patients/header"

.row
  table
    thead
      tr
        th
        th Name
        th NHS No.
        th KCH No.
        th Sex
        th Date of Birth
        th Date of Death
        th.column-6-width Age

    tbody
      - @patients.each do |patient|
        tr
          td
            = link_to "Demographics", patient_path(patient), title: "Demographics"
            = pipe_separator
            = link_to "Edit death details", edit_patient_death_path(patient.id), title: "Edit death details"
          td= patient.to_s(:full_name)
          td= patient.nhs_number
          td= patient.local_patient_id
          td= I18n.t("enums.gender.#{patient.sex}")
          td= patient.birth_date
          td= patient.death_date
          td= patient.age

Correct call to patient sex in index template

= render "renalware/patients/header"

.row
  table
    thead
      tr
        th
        th Name
        th NHS No.
        th KCH No.
        th Sex
        th Date of Birth
        th Date of Death
        th.column-6-width Age

    tbody
      - @patients.each do |patient|
        tr
          td
            = link_to "Demographics", patient_path(patient), title: "Demographics"
            = pipe_separator
            = link_to "Edit death details", edit_patient_death_path(patient.id), title: "Edit death details"
          td= patient.to_s(:full_name)
          td= patient.nhs_number
          td= patient.local_patient_id
          td= patient.sex
          td= patient.birth_date
          td= patient.death_date
          td= patient.age


- title @speaker.name
- # TODO: Add banner config
- breadcrumb :speaker, @speaker

section.single-speaker-area
  .container
    .row
      .col-md-12
        .top-content
          .row
            .col-md-4
              .img-holder = image_tag @speaker.avatar_url(:v1_large)
            .col-md-8
              .text-holder
                .title
                  h2 = @speaker.name
                  span = @speaker.title
                .text
                  = sanitize @speaker.description
    .row
      .col-md-12
        .bottom-content
            .title-two
              h2 = t('.sessions_by', speaker: @speaker.name)
              span.border
            ul.schedule.mar-btm60
              - @speaker.agendas.each do |agenda|
                li.schedule-single
                  .inner-content
                    .left.pull-left
                      .time
                        span.flaticon-clock
                        h2 TBA
                      .title
                        h3 = agenda.subject
                        p = truncate strip_tags(agenda.description), length: 150

Adjust agenda disply on speaker page

- title @speaker.name
- # TODO: Add banner config
- breadcrumb :speaker, @speaker

section.single-speaker-area
  .container
    .row
      .col-md-12
        .top-content
          .row
            .col-md-4
              .img-holder = image_tag @speaker.avatar_url(:v1_large)
            .col-md-8
              .text-holder
                .title
                  h2 = @speaker.name
                  span = @speaker.title
                .text
                  = sanitize @speaker.description
    .row
      .col-md-12
        .bottom-content
            .title-two
              h2 = t('.sessions_by', speaker: @speaker.name)
              span.border
            ul.schedule.mar-btm60
              - @speaker.agendas.each do |agenda|
                li.schedule-single
                  .inner-content
                    .left.pull-left
                      .time
                        span.fa.fa-clock-o[style="display: inline;"]
                        h2 TBA
                      .title
                        h3 = agenda.subject
                        = sanitize agenda.description


td.index-action-cell.hidden-print
  = button_link navigation_glyph(:show), subject, title: 'Anzeigen'
  - if policy(subject).edit?
    = button_link navigation_glyph(:edit), edit_polymorphic_path(subject), title: 'Bearbeiten'
  - if policy(subject.class).destroy? && controller_name != 'clients'
    = button_link navigation_glyph(:delete), subject, nil,
        confirm_deleting(subject, 'btn btn-default').merge(title: 'Löschen')
  - if subject.class == Volunteer && policy(Volunteer).terminate? && !subject.resigned?
    = button_link navigation_glyph(:terminate), terminate_volunteer_path(subject),
        method: :put, title: 'Beenden'

Hide show and terminate buttons for /volunteers

td.index-action-cell.hidden-print
  - if subject.class != Volunteer
    = button_link navigation_glyph(:show), subject, title: 'Anzeigen'
  - if policy(subject).edit?
    = button_link navigation_glyph(:edit), edit_polymorphic_path(subject), title: 'Bearbeiten'
  - if policy(subject.class).destroy? && controller_name != 'clients'
    = button_link navigation_glyph(:delete), subject, nil,
        confirm_deleting(subject, 'btn btn-default').merge(title: 'Löschen')


.sticky
  nav.top-bar(data-topbar role="navigation")
    ul.title-area
      li.name.has-dropdown.active
        h1
          = link_to "RW2.0", patients_path, title: "Home"

    - if user_signed_in?
      section.top-bar-section
        = render partial: 'renalware/navigation/patient_search'

        ul.right.large-2.columns
          li.divider
          = render partial: 'renalware/navigation/patients_admin'
          - if current_user_is_admin?
            li.divider
            = render partial: 'renalware/navigation/renalware_admin'
          li.divider
          = render partial: 'renalware/navigation/user_admin'
          li.divider
          = render partial: 'renalware/navigation/sign_out'
          li.divider
          = render partial: 'renalware/navigation/help_items'

Replace single quotes with double quotes.

.sticky
  nav.top-bar(data-topbar role="navigation")
    ul.title-area
      li.name.has-dropdown.active
        h1
          = link_to "RW2.0", patients_path, title: "Home"

    - if user_signed_in?
      section.top-bar-section
        = render partial: "renalware/navigation/patient_search"

        ul.right.large-2.columns
          li.divider
          = render partial: "renalware/navigation/patients_admin"
          - if current_user_is_admin?
            li.divider
            = render partial: "renalware/navigation/renalware_admin"
          li.divider
          = render partial: "renalware/navigation/user_admin"
          li.divider
          = render partial: "renalware/navigation/sign_out"
          li.divider
          = render partial: "renalware/navigation/help_items"


- content_for :title, "Editing: #{@user.display_name}"

- content_for :meta_tags do
  -# Meta tags for facebook social graph
  meta property="og:title" content=@user.name
  meta property="og:url" content=="#{Configuration[:base_url]}#{user_path(@user)}"
  meta property="og:image" content==@user.display_image
  meta property="og:site_name" content=::Configuration[:company_name]
  meta property="og:description" content=@user.bio
  meta property="fb:admins" content="#{fb_admins}"

.user-edit-page
  .row.page-main-content
    section.large-12.columns.main
      nav.tabs[data-target-container=".user-edit-page section.content"]
        = tab_link_to t('.tabs.edit'), edit_user_path(@user)
        - if @user.projects.any?
          = tab_link_to t('.tabs.my_campaigns'), user_projects_path(@user)
        - if @user.contributions.any?
          = tab_link_to t('.tabs.ive_contributed'), user_contributions_path(@user)
        = tab_link_to t('.tabs.credits'), credits_user_path(@user)
        = tab_link_to t('.tabs.payments'), payments_user_path(@user)
        = tab_link_to t('.tabs.settings'), settings_user_path(@user)

      section.content
        - if content_for? :page_content
          = yield :page_content
        - else
          = render template: 'users/profile', locals: { partial: true }

Remove payments tab from users

- content_for :title, "Editing: #{@user.display_name}"

- content_for :meta_tags do
  -# Meta tags for facebook social graph
  meta property="og:title" content=@user.name
  meta property="og:url" content=="#{Configuration[:base_url]}#{user_path(@user)}"
  meta property="og:image" content==@user.display_image
  meta property="og:site_name" content=::Configuration[:company_name]
  meta property="og:description" content=@user.bio
  meta property="fb:admins" content="#{fb_admins}"

.user-edit-page
  .row.page-main-content
    section.large-12.columns.main
      nav.tabs[data-target-container=".user-edit-page section.content"]
        = tab_link_to t('.tabs.edit'), edit_user_path(@user)
        - if @user.projects.any?
          = tab_link_to t('.tabs.my_campaigns'), user_projects_path(@user)
        - if @user.contributions.any?
          = tab_link_to t('.tabs.ive_contributed'), user_contributions_path(@user)
        = tab_link_to t('.tabs.credits'), credits_user_path(@user)
        = tab_link_to t('.tabs.settings'), settings_user_path(@user)

      section.content
        - if content_for? :page_content
          = yield :page_content
        - else
          = render template: 'users/profile', locals: { partial: true }


.row
  .span6
    .control-group.title
      = f.label :title, class: 'control-label'
      .controls
        = f.text_field :title, class: 'input-xlarge span5'
.row
  .control-group.body
    .span12
      = f.label 'post_body', 'Body', class: 'control-label'
    .controls.span5
      = f.text_area :body, class: 'span5', rows: 20
      span.help-inline= link_to 'Markdown syntax', 'http://daringfireball.net/projects/markdown/syntax', target: '_BLANK'

    #post-preview.span7
      .inner

.row.form-box
  .span5
    #uploader
      .inner Drop images...

  .span6
    h4 Categories
    .control-group.title
      = f.fields_for :categories do |c|
        .controls
          - @categories.each do |category|
            = c.label class: 'checkbox'
              = check_box_tag 'post[categories_ids][]', category.id, @post.categories.include?(category)
              = category.name

  .span7#assets
    - f.object.assets.each do |asset|
      .asset= "![image alt](#{asset.attachment_url})"

coffee:
  $ ->
    new Crowdblog.Views.PostFormView

Update Admin Post Form Categories List

.row
  .span6
    .control-group.title
      = f.label :title, class: 'control-label'
      .controls
        = f.text_field :title, class: 'input-xlarge span5'
.row
  .control-group.body
    .span12
      = f.label 'post_body', 'Body', class: 'control-label'
    .controls.span5
      = f.text_area :body, class: 'span5', rows: 20
      span.help-inline= link_to 'Markdown syntax', 'http://daringfireball.net/projects/markdown/syntax', target: '_BLANK'

    #post-preview.span7
      .inner

.row.form-box
  .span5
    #uploader
      .inner Drop images...

  .span6
    h4 Categories
    .control-group.title
      = f.fields_for :categories do |c|
        .controls
          - @categories.each do |category|
            .checkbox
              = label_tag do
                = check_box_tag 'post[categories_ids][]', category.id, @post.categories.include?(category)
                = category.name

  .span7#assets
    - f.object.assets.each do |asset|
      .asset= "![image alt](#{asset.attachment_url})"

coffee:
  $ ->
    new Crowdblog.Views.PostFormView


h4.patient-info
  = "#{@patient.to_s(:full_name)} - KCH: #{@patient.local_patient_id}, Age: #{@patient.age}, #{I18n.t("enums.gender.#{@patient.sex}")}, DoB: #{@patient.birth_date}, #{@patient.current_modality.blank? || @patient.current_modality.new_record? ? "No Modal" : @patient.current_modality.modality_code.name}"

nav.sub-nav-container
  dl.sub-nav role="menu"
    dt
    = render partial: "renalware/patients/patient_sub_nav", locals: { model: @patient }

Make header code a little more readable

h4.patient-info
  = "#{@patient.to_s(:full_name)} - "
  = "KCH: #{@patient.local_patient_id}, "
  = "Age: #{@patient.age}, "
  = "#{I18n.t("enums.gender.#{@patient.sex}")}, "
  = "DoB: #{@patient.birth_date}, "
  = "#{@patient.current_modality.blank? || @patient.current_modality.new_record? ? "No Modal" : @patient.current_modality.modality_code.name}"
nav.sub-nav-container
  dl.sub-nav role="menu"
    dt
    = render partial: "renalware/patients/patient_sub_nav", locals: { model: @patient }


.actions
  .actions__control
    a role="button" data-toggle="collapse" href="#help" aria-expanded="false" aria-controls="help"
      | Help

    = link_to 'Sync starred repos', routes.sync_repos_path

    a href="/auth/logout"
      | Logout

  #help.collapse
    code#help__text
      | You can use filters like:
      br
      | - **author** search by author;
      br
      | - **tag** search by specific tag (can be 1+);
      br
      | - **lang (language)** search by language;
      br
      br
      | Examples (if you starred devise):
      br
      br
      | ```
      br
      | author:plataform lang:ruby tag:rails authentication solution
      br
      | ```

Use better naming for sync button

.actions
  .actions__control
    a role="button" data-toggle="collapse" href="#help" aria-expanded="false" aria-controls="help"
      | Help

    = link_to 'Sync account', routes.sync_repos_path

    a href="/auth/logout"
      | Logout

  #help.collapse
    code#help__text
      | You can use filters like:
      br
      | - **author** search by author;
      br
      | - **tag** search by specific tag (can be 1+);
      br
      | - **lang (language)** search by language;
      br
      br
      | Examples (if you starred devise):
      br
      br
      | ```
      br
      | author:plataform lang:ruby tag:rails authentication solution
      br
      | ```


h1.title.is-1 New students

form
 input type="file" accept=".csv" size="60" Upload your CSV

Update form; check request location

h1.title.is-1 New students

form action="#{section_seats_path}" method="patch"
 input type="file" accept=".csv" size="60" Upload your CSV
 button type="submit" Submit!


= wrap_layout 'base_content' do

	#header
		h1
			= current_page.metadata[:page]['title']
		.details
			span.author#author
				=> current_page.metadata[:page]['firstname']
				= current_page.metadata[:page]['lastname']
			br
			span.email#email
				a href="#{current_page.metadata[:page]['profile']}"
					| @#{current_page.metadata[:page]['nick']}
			br
			span#revdate
				= current_page.date.strftime("%d %B %Y")
	#content
    = yield

	a.previous href="/blog"
		span.fa.fa-arrow-left>
		b = I18n.t('blog.backtoindex')

Use unformatted date for now (fixes build errors)

= wrap_layout 'base_content' do

	#header
		h1
			= current_page.metadata[:page]['title']
		.details
			span.author#author
				=> current_page.metadata[:page]['firstname']
				= current_page.metadata[:page]['lastname']
			br
			span.email#email
				a href="#{current_page.metadata[:page]['profile']}"
					| @#{current_page.metadata[:page]['nick']}
			br
			span#revdate
				= current_page.metadata[:page]['date']
	#content
    = yield

	a.previous href="/blog"
		span.fa.fa-arrow-left>
		b = I18n.t('blog.backtoindex')


- @articles.each do |a|
  article.article
    header.article__header
      time.article__published_on= a.published_on.strftime('%Y-%m-%d (%a)')
      h2.article__title= link_to a.title, "#{a.published_on.strftime('%Y/%m/%d')}/#{a.slug}.html"
      - if a.eye_catching_image_url?
        = image_tag a.eye_catching_image_url, class: "article__header__eye_catching"

    .article__body== CommonMarker.render_html(a.body, :UNSAFE)

= paginate @articles

Fix wrong link in yearly(monthly) page

- @articles.each do |a|
  article.article
    header.article__header
      time.article__published_on= a.published_on.strftime('%Y-%m-%d (%a)')
      h2.article__title= link_to a.title, article_url(a)
      - if a.eye_catching_image_url?
        = image_tag a.eye_catching_image_url, class: "article__header__eye_catching"

    .article__body== CommonMarker.render_html(a.body, :UNSAFE)

= paginate @articles


= render partial: 'nav'

section.admin-invite

  h2 = t('.invite_headline')

  p = t('.invite_members_explaination')

  .invite-link.copy-box
    input id="invite-url" type="copy" readonly="" value=join_circle_url(current_circle)
    button type="submit" data-clipboard-target="input#invite-url"

section.admin-pending-members

  h2 = t('.pending_members_headline')

  - if current_circle.pending_members.empty?
    p = t('.no_pending_members_message')
  - else
    p = t('.pending_members_explanation')
    = render partial: 'pending_members_list', locals: { pending_members: @pending_members }

Fix circle.pending_members, method doesn't exist any more

= render partial: 'nav'

section.admin-invite

  h2 = t('.invite_headline')

  p = t('.invite_members_explaination')

  .invite-link.copy-box
    input id="invite-url" type="copy" readonly="" value=join_circle_url(current_circle)
    button type="submit" data-clipboard-target="input#invite-url"

section.admin-pending-members

  h2 = t('.pending_members_headline')

  - if current_circle.users.pending.empty?
    p = t('.no_pending_members_message')
  - else
    p = t('.pending_members_explanation')
    = render partial: 'pending_members_list', locals: { pending_members: @pending_members }


- if definitions.any?
  table.table.table-hover.sortable
    thead
      tr
        th #
        th.col-md-3 Name
        th.col-md-2 Next Job
        th.col-md-1 Latest Status
        th.col-md-5 data-defaultsort='disabled' Tags / Description
        th.col-md-1 data-defaultsort='disabled'
    tbody
      - for definition in definitions
        tr
          td= definition.id
          td.no-decorate= link_to definition.name, definition
          - if !definition.suspended? && definition.job_schedules.present?
            - next_job_schedule = definition.job_schedules.map(&:next).min
            td data-value=next_job_schedule.to_i = l(next_job_schedule, format: :short)
          - else
            td data-value="9999999999" --
          td= labeled_status(definition.job_instances.take)
          td
            - definition.tags.each do |tag|
              =link_to tag.name, root_path('tag': [tag.name]), class: 'label label-default spacer-right-3'
            = first_line(definition.description)
          td
            = link_to definition, class: 'btn btn-sm btn-default' do
              i class="fa fa-chevron-right"
              |
              span class="small" View Details

- else
  .text-muted.well.well-sm.no-shadow There are no favorite job definitions.

Fix tag links in /user/:id pages

- if definitions.any?
  table.table.table-hover.sortable
    thead
      tr
        th #
        th.col-md-3 Name
        th.col-md-2 Next Job
        th.col-md-1 Latest Status
        th.col-md-5 data-defaultsort='disabled' Tags / Description
        th.col-md-1 data-defaultsort='disabled'
    tbody
      - for definition in definitions
        tr
          td= definition.id
          td.no-decorate= link_to definition.name, definition
          - if !definition.suspended? && definition.job_schedules.present?
            - next_job_schedule = definition.job_schedules.map(&:next).min
            td data-value=next_job_schedule.to_i = l(next_job_schedule, format: :short)
          - else
            td data-value="9999999999" --
          td= labeled_status(definition.job_instances.take)
          td
            - definition.tags.each do |tag|
              =link_to tag.name, { 'tag': [tag.name] }, class: 'label label-default spacer-right-3'
            = first_line(definition.description)
          td
            = link_to definition, class: 'btn btn-sm btn-default' do
              i class="fa fa-chevron-right"
              |
              span class="small" View Details

- else
  .text-muted.well.well-sm.no-shadow There are no favorite job definitions.


h2 Please Sign In

= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: { :class => 'form-horizontal'} ) do |f|
  .control-group
    = f.label :email, nil, class: 'control-label'
    .controls
      = f.email_field :email, autofocus: 'autofocus'
  .control-group
    = f.label :password, nil, class: 'control-label'
    .controls
      = f.email_field :password
  - if devise_mapping.rememberable?
    .control-group
      .controls
        <label class="checkbox">#{f.check_box :remember_me} Remember Me</label>

  .form-actions
    button.btn.btn-primary.btn-large type="submit" Sign In

Fix pass field. Add flash messages to sign-in

h2 Please Sign In

- flash.each do |name, msg|
  div class="span3 offset1 alert alert-#{name == :notice ? 'success' : 'error'}"
    button type="button" class="close" data-dismiss="alert" ×
    = msg

= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: { :class => 'form-horizontal'} ) do |f|
  .control-group
    = f.label :email, nil, class: 'control-label'
    .controls
      = f.email_field :email, autofocus: 'autofocus'
  .control-group
    = f.label :password, nil, class: 'control-label'
    .controls
      = f.password_field :password
  - if devise_mapping.rememberable?
    .control-group
      .controls
        <label class="checkbox">#{f.check_box :remember_me} Remember Me</label>

  .form-actions
    button.btn.btn-primary.btn-large type="submit" Sign In


doctype html
html
  head
    meta name="viewport" content="width=device-width, initial-scale=1"
    title= "#{Rails.application.config.app_name} (#{Rails.application.config.app_version})"
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    link href="//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css" rel="stylesheet"
    = csrf_meta_tags
  body
    = render 'shared/nav'
    .container
      .row
        = render 'shared/flashes'
        = yield

      .row
        #footer.text-muted.small
          ' &copy #{copyright_years(2013)}. Crafted By
          a.text-muted> href="http://www.sevenview.ca"  Sevenview Studios
          ' in Springdale, NL

Update application layout to conform to Bootstrap requirements

doctype html
html
  head
    meta charset="utf-8"
    meta http-equiv="X-UA-Compatible" content="IE=edge"
    meta name="viewport" content="width=device-width, initial-scale=1"
    title= "#{Rails.application.config.app_name} (#{Rails.application.config.app_version})"
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    link href="//maxcdn.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css" rel="stylesheet"

    /! HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
    /[if lt IE 9]
      | <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

    = csrf_meta_tags
  body
    = render 'shared/nav'
    .container
      .row
        = render 'shared/flashes'
        = yield

      .row
        #footer.text-muted.small
          ' &copy #{copyright_years(2013)}. Crafted By
          a.text-muted> href="http://www.sevenview.ca"  Sevenview Studios
          ' in Springdale, NL


-path = []
-if @document_set && @document_set.title.present? && (@work || @article)
  -path.push(link_to @document_set.title, document_set_path(@document_set.owner, @document_set))
-elsif @collection && @collection.title.present? && (@work || @article)
  -path.push(link_to @collection.title, collection_path(@collection.owner, @collection))

-if @work && @work.title.present? && (@page || @article)
  -path.push(link_to @work.title, collection_read_work_path(@collection.owner, @collection, @work))

-if path.present? && @quality_sampling.nil?
  -unless (@collection && @work && @page &&current_page?(collection_oneoff_review_page_path(@collection.owner, @collection, @page))) || (@work && @page && @user && current_page?(collection_user_review_page_path))
    ul.breadcrumbs
      -path.each do |item|
        li ==item

Fix beadcrumbs for broken tests (was 71)

-path = []
-if @document_set && @document_set.title.present? && (@work || @article)
  -path.push(link_to @document_set.title, document_set_path(@document_set.owner, @document_set))
-elsif @collection && @collection.title.present? && (@work || @article)
  -path.push(link_to @collection.title, collection_path(@collection.owner, @collection))

-if @work && @work.title.present? && (@page || @article)
  -path.push(link_to @work.title, collection_read_work_path(@collection.owner, @collection, @work))

-if path.present? && @quality_sampling.nil?
  -unless (controller_name == 'transcribe' && @collection && @work && @page && current_page?(collection_oneoff_review_page_path(@collection.owner, @collection, @page))) || (@work && @page && @user && current_page?(collection_user_review_page_path))
    ul.breadcrumbs
      -path.each do |item|
        li ==item


.search-form.filters.filters--flex.max-w-screen-md
    = search_form_for(search, class: "fn-form") do |f|
      = f.label :named_nurse_id_eq, "Named nurse"
      .row
        .columns.small-12.medium-6
          = f.select(:named_nurse_id_eq,
              options_from_collection_for_select(Renalware::User::all,
                                                :id,
                                                :to_s,
                                                search.named_nurse_id_eq),
              { include_blank: "" },
              { class: "searchable_select" } )

        .small-6.large-4.columns.end
          = f.submit t("btn.filter"), class: "button secondary"
          '  or
          = link_to t("btn.reset"), renalware.patients_path

Order users in named nurse filter

.search-form.filters.filters--flex.max-w-screen-md
    = search_form_for(search, class: "fn-form") do |f|
      = f.label :named_nurse_id_eq, "Named nurse"
      .row
        .columns.small-12.medium-6
          = f.select(:named_nurse_id_eq,
              options_from_collection_for_select(Renalware::User.ordered,
                                                :id,
                                                :to_s,
                                                search.named_nurse_id_eq),
              { include_blank: "" },
              { class: "searchable_select" } )

        .small-6.large-4.columns.end
          = f.submit t("btn.filter"), class: "button secondary"
          '  or
          = link_to t("btn.reset"), renalware.patients_path


.actions
  .actions__control
    a role="button" data-toggle="collapse" href="#help" aria-expanded="false" aria-controls="help"
      | Help

    a href="/auth/logout"
      | Logout

  #help.collapse
    code#help__text
      | You can use filters like:
      br
      | - **author** search by author;
      br
      | - **tag** search by specific tag (can be 1+);
      br
      | - **lang (language)** search by language;
      br
      br
      | Examples (if you starred devise):
      br
      br
      | ```
      br
      | author:plataform lang:ruby tag:rails authentication solution
      br
      | ```

Add button for update stars

.actions
  .actions__control
    a role="button" data-toggle="collapse" href="#help" aria-expanded="false" aria-controls="help"
      | Help

    a href="#"
      | Update starred repos

    a href="/auth/logout"
      | Logout

  #help.collapse
    code#help__text
      | You can use filters like:
      br
      | - **author** search by author;
      br
      | - **tag** search by specific tag (can be 1+);
      br
      | - **lang (language)** search by language;
      br
      br
      | Examples (if you starred devise):
      br
      br
      | ```
      br
      | author:plataform lang:ruby tag:rails authentication solution
      br
      | ```


= form_for @changeset, tweak_path(@conn, :update, @name, @tweak.id), [method: "PUT"], fn f ->
  .pb-3
    = text_input(f, :title, class: "form-control input-block input-lg", placeholder: "Title", value: @tweak.title)
  .pb-3
    = textarea(f, :code, class: "form-control input-block tweak-textarea", placeholder: "Enter tweak code", value: @tweak.code)
  .form-actions
    = submit("Update tweak", class: "btn btn-primary")
    a.btn.btn-danger href="#{tweak_path(@conn, :show, @name, @tweak.id)}" = gettext "Cancel"

Add tweak type to edit tweak form

= form_for @changeset, tweak_path(@conn, :update, @name, @tweak.id), [method: "PUT"], fn f ->
  .pb-3
    = text_input(f, :title, class: "form-control input-block input-lg", placeholder: "Title", value: @tweak.title)
  .pb-3
    = select(f, :type, ["Init": "init", "Style": "style"], prompt: "Select tweak type", value: @tweak.type)
  .pb-3
    = textarea(f, :code, class: "form-control input-block tweak-textarea", placeholder: "Enter tweak code", value: @tweak.code)
  .form-actions
    = submit("Update tweak", class: "btn btn-primary")
    a.btn.btn-danger href="#{tweak_path(@conn, :show, @name, @tweak.id)}" = gettext "Cancel"


- flash.each do |name, msg|
  - if flash[name]
    .row class="flash-#{name}"
      .alert-box.info.round data={alert: nil}
        = msg
        a href="#" class='close' ×

Set style for flash messages, green - success notice, red - alert/error, other original light blue.

.flash-message
  - flash.each do |name, msg|
    - if flash[name]
      - if name == "notice"
        .row class=name
          .alert-box.success.round data={alert: nil}
            = msg
            a href="#" class='close' ×
      - elsif name == "error" || "alert"
        .row class=name
          .alert-box.alert.round data={alert: nil}
            = msg
            a href="#" class='close' ×
      - else
        .row class=name
          .alert-box.info.round data={alert: nil}
            = msg
            a href="#" class='close' ×


.row.header
  dl.patient-header
    dt.name.fi-torso
    dd.name= patient
    dt= t(".hospital_code")
    dd= patient.local_patient_id
    dt= t(".nhs_number")
    dd= patient.nhs_number
    dt= t(".age")
    dd= patient.age
    dt= t(".sex")
    dd= patient.sex
    dt= t(".born_on")
    dd= l patient.born_on
    dt= t(".modality")
    dd= modality_description_for(patient.current_modality)

Add y after age in patient banner

.row.header
  dl.patient-header
    dt.name.fi-torso
    dd.name= patient
    dt= t(".hospital_code")
    dd= patient.local_patient_id
    dt= t(".nhs_number")
    dd= patient.nhs_number
    dt= t(".age")
    dd= "#{patient.age} y"
    dt= t(".sex")
    dd= patient.sex
    dt= t(".born_on")
    dd= l patient.born_on
    dt= t(".modality")
    dd= modality_description_for(patient.current_modality)


.row
  .col-md-6.col-md-offset-3
    .panel.panel-campo
      .panel-heading
        h3.panel-title
          = t '.password_reset'
      .panel-body
        = form_for @user, url: password_path, html: { class: 'password-form' } do |f|
          = render 'share/flash_messages'
          = render 'share/form_error_messages', form: f
          .form-group
            = f.label :password, class: 'control-label'
            = f.password_field :password, class: 'form-control'
          .form-group
            = f.label :password_confirmation, class: 'control-label'
            = f.password_field :password_confirmation, class: 'form-control'
          .form-group
            = submit_tag t('.save_changes'), class: 'btn btn-default'

javascript:
  $('form.password-form').validate({
    rules: {
      'user[password]': {
        required: true
      },
      'user[password_confirmation]': {
        equalTo: '#user_password'
      }
    },
    messages: {
      'user[password]': {
        required: '#{@user.errors.generate_message :password, :blank}'
      },
      'user[password_confirmation]': {
        equalTo: '#{@user.errors.generate_message :password_confirmation, :confirmation}'
      }
    }
  });

Fix password reset form missing token bug

.row
  .col-md-6.col-md-offset-3
    .panel.panel-campo
      .panel-heading
        h3.panel-title
          = t '.password_reset'
      .panel-body
        = form_for @user, url: password_path, html: { class: 'password-form' } do |f|
          = render 'share/flash_messages'
          = render 'share/form_error_messages', form: f
          = hidden_field_tag :email, params[:email]
          = hidden_field_tag :token, params[:token]
          .form-group
            = f.label :password, class: 'control-label'
            = f.password_field :password, class: 'form-control'
          .form-group
            = f.label :password_confirmation, class: 'control-label'
            = f.password_field :password_confirmation, class: 'form-control'
          .form-group
            = submit_tag t('.save_changes'), class: 'btn btn-default'

javascript:
  $('form.password-form').validate({
    rules: {
      'user[password]': {
        required: true
      },
      'user[password_confirmation]': {
        equalTo: '#user_password'
      }
    },
    messages: {
      'user[password]': {
        required: '#{@user.errors.generate_message :password, :blank}'
      },
      'user[password_confirmation]': {
        equalTo: '#{@user.errors.generate_message :password_confirmation, :confirmation}'
      }
    }
  });


- cached_templates.each do |path, html|
  script(type="text/ng-template" id=path)= html

Add support for digest paths in script tag

- cached_templates.each do |full_path, html|
  - relative_path = URI(full_path).path.gsub(%r{^/assets/}, '')
  script(type="text/ng-template" id=asset_path(relative_path))= html


- formatted_contents.fetch(level).fetch(kind).each do |content|
  .neuron-content
    div = content.title
    .content-description
      = content.description_spellchecked
    = content.keywords
    = content.source

    - if content.can_be_approved?
      .neuron-moderate-actions
        = content.toggle_approved

    = content.media

    hr

Remove temporal spellcheck in content

- formatted_contents.fetch(level).fetch(kind).each do |content|
  .neuron-content
    div = content.title
    .content-description
      = content.description
    = content.keywords
    = content.source

    - if content.can_be_approved?
      .neuron-moderate-actions
        = content.toggle_approved

    = content.media

    hr


.payment
  h3.title = t('.title')

  section.row.methods
    - PaymentEngine.all.each do |engine|
      .large-6.columns[class="payment-method-option-#{engine.name}"]
        label.payment-method-option
          .left
            = radio_button_tag :payment_method, engine.name, false
            |
            = image_tag("payments/#{engine.name}.png", alt: engine.name.humanize, class: 'payment-method-option-icon')
          .left.description
            h6 = t(".payment-method.#{engine.name}.title")
            small
              strong = t('.payment-method.fees')
              |
              = number_to_currency(engine.fee_calculator(resource.value).fees)

  .container
    .loading
      = image_tag 'logo-icon.png', class: "loader-img"
    - PaymentEngine.engines.each do |engine|
      div[id="#{engine.name}-payment" class="payment-method hide" data-path=engine.payment_path(resource)]

Move payment options to 8 columns

.payment
  h3.title = t('.title')

  .row
    .medium-8.columns
      section.row.methods
        - PaymentEngine.all.each do |engine|
          .large-6.columns[class="payment-method-option-#{engine.name}"]
            label.payment-method-option
              .left
                = radio_button_tag :payment_method, engine.name, false
                |
                = image_tag("payments/#{engine.name}.png", alt: engine.name.humanize, class: 'payment-method-option-icon')
              .left.description
                h6 = t(".payment-method.#{engine.name}.title")
                small
                  strong = t('.payment-method.fees')
                  |
                  = number_to_currency(engine.fee_calculator(resource.value).fees)

  .container
    .loading
      = image_tag 'logo-icon.png', class: "loader-img"
    - PaymentEngine.engines.each do |engine|
      div[id="#{engine.name}-payment" class="payment-method hide" data-path=engine.payment_path(resource)]


h1 = @exercise

= row(label: '.participants', value: @exercise.users.count)
- [:intermediate, :final].each do |scope|
  = row(label: ".#{scope}_submissions") do
    = "#{@exercise.submissions.send(scope).count} (#{t('.users', count: @exercise.submissions.send(scope).distinct.count(:user_id, :user_type))})"
= row(label: '.average_score') do
  p == @exercise.average_score ? t('shared.out_of', maximum_value: @exercise.maximum_score, value: @exercise.average_score.round(2)) : empty
  p = progress_bar(@exercise.average_percentage)

.table-responsive
  table.table
    thead
      tr
        - ['.user', '.score', '.runs', '.worktime'].each do |title|
          th.header = t(title)
    tbody
      - @exercise.users.each do |user|
        tr
          - submissions = @exercise.submissions.where('user_id=?', user.id)
          td = "#{user.name} (#{user.email})"
          td = submissions.maximum('score')
          td = submissions.count('id')
          - seconds = submissions.maximum('created_at') - submissions.minimum('created_at')
          td = "#{distance_of_time_in_words(seconds)} (#{seconds})"

Fix users being shown multiple times

h1 = @exercise

= row(label: '.participants', value: @exercise.users.count)
- [:intermediate, :final].each do |scope|
  = row(label: ".#{scope}_submissions") do
    = "#{@exercise.submissions.send(scope).count} (#{t('.users', count: @exercise.submissions.send(scope).distinct.count(:user_id, :user_type))})"
= row(label: '.average_score') do
  p == @exercise.average_score ? t('shared.out_of', maximum_value: @exercise.maximum_score, value: @exercise.average_score.round(2)) : empty
  p = progress_bar(@exercise.average_percentage)

.table-responsive
  table.table
    thead
      tr
        - ['.user', '.score', '.runs', '.worktime'].each do |title|
          th.header = t(title)
    tbody
      - @exercise.users.distinct().each do |user|
        tr
          - submissions = @exercise.submissions.where('user_id=?', user.id)
          td = "#{user.name} (#{user.email})"
          td = submissions.maximum('score')
          td = submissions.count('id')
          - seconds = submissions.maximum('created_at') - submissions.minimum('created_at')
          td = "#{distance_of_time_in_words(seconds)} (#{seconds})"


.container
  h1 Confirm Sending Mail

  = form_tag(mail_sends_path) do
    .form-group
      = label_tag 'Subject'
      = text_field_tag 'Subject', @subject, class: 'form-control', disabled: true
    .form-group
      = label_tag 'To'
      = text_field_tag 'To', @to, class: 'form-control', disabled: true
    .form-group
      = label_tag 'Body'
      = text_area_tag 'Body', @body, class: 'form-control', rows: 10, disabled: true
    .form-group
      = button_tag 'submit', class: 'btn btn-primary btn-lg'
    .form-group
      = link_to('back', new_mail_send_path, class: 'btn btn-default')

Fix form not sending input data

.container
  h1 Confirm Sending Mail

  = form_tag(mail_sends_path) do
    .form-group
      = label_tag 'Subject'
      = text_field_tag 'Subject', @subject, class: 'form-control', readonly: true
    .form-group
      = label_tag 'To'
      = text_field_tag 'To', @to, class: 'form-control', readonly: true
    .form-group
      = label_tag 'Body'
      = text_area_tag 'Body', @body, class: 'form-control', rows: 10, readonly: true
    .form-group
      = button_tag 'submit', class: 'btn btn-primary btn-lg'
    .form-group
      = link_to('back', new_mail_send_path, class: 'btn btn-default')


header.navbar.navbar-default[role="navigation"]
  .container
    .navbar-header
      button.navbar-toggle[type="button" data-toggle="collapse" data-target=".navbar-ex1-collapse"]
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"
        = image_tag 'new-logo-bars.png'

    .collapse.navbar-collapse.navbar-ex1-collapse
      ul.nav.navbar-nav
        li
          = link_to "Browse", browse_path
        li
          = link_to "Docs", docs_index_path
        li
          = link_to "Blog", 'http://blog.asciinema.org'

      ul.nav.navbar-nav.navbar-right.session-info
        - if current_user
          li.dropdown
            a.dropdown-toggle[href="#" data-toggle="dropdown"]
              = avatar_image_tag(current_user)
              = current_user.nickname
              b.caret
            ul.dropdown-menu
              li
                a href=profile_path(current_user) Profile
              li
                a href=edit_user_path Settings
              li
                a.logout href=logout_path Log out
        - else
          li
            a#log-in href=login_path Sign in

        li
          a.record href="#" Record

Remove the "Record" button from the header


doctype html
html lang="en"
  head
    meta charset="utf-8"
    meta http-equiv="X-UA-Compatible" content="IE=edge"
    / Use title if it's in the page YAML frontmatter
    title= current_page.data.title || ""
    meta name="viewport" content="width=device-width, initial-scale=1"

    link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css"
    = stylesheet_link_tag "main", media: "all"

  body class=page_classes
    nav role="navigation"

    header role="banner"
      h1= current_page.data.title

    .wrap
      main role="main"
        section
          = yield

      aside role="complementary"

    footer role="contentinfo"
      small ©

    /! JavaScript
    script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"
    = javascript_include_tag "main"

Add YouTube IFrame Player API

doctype html
html lang="en"
  head
    meta charset="utf-8"
    meta http-equiv="X-UA-Compatible" content="IE=edge"
    / Use title if it's in the page YAML frontmatter
    title= current_page.data.title || ""
    meta name="viewport" content="width=device-width, initial-scale=1"

    link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css"
    = stylesheet_link_tag "main", media: "all"

  body class=page_classes
    nav role="navigation"

    header role="banner"
      h1= current_page.data.title

    .wrap
      main role="main"
        section
          = yield

      aside role="complementary"

    footer role="contentinfo"
      small ©

    /! JavaScript
    script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"
    / YouTube IFrame Player API
    script var tag = document.createElement('script');tag.src = "https://www.youtube.com/iframe_api";var firstScriptTag = document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
    = javascript_include_tag "main"


---
title: 'Program'
css: 'program'
---

h1 = current_page.data.title

p Ve jestli, ní být já hrozí tomto po souvislá čti předním vrak, bez část i 570 vzkřísí. Jsou nebyl, během dobré z domnívám co u nejblíže. Vy týmem parní mi v nákladů, u snad je názorovým jejich, 057 co řeky provede střeží s zdrojem. Kanadě smrt až ke výzkumu oborů muzeu; 1648 mám loni o s. 2008 mé dá ráda současná vloženy pokusy o radu s 1977 byly. Nevrátí 1977 české jít, dračím komunikují.
p Spolu mým dá čaj jí struktury kdy dařilo bezplatné. Potáhnou tato vím zobrazuje proto zkoumání: zkoumání boky, odkazovaly oblast z zotročí částici. Osloven annan neměly věřila dalším, že rychle padesátiminutový musejí doplňují. Činí plná ovzduší a mj. burčák jí eroze místa. Lze obrátily drsnějšími přímo dá rozcházejí mnoho netopýry disponují přezimují spadalo vajíčka normálně, proces nabíledni slona zlatavého nejste zmínění, ledovec sil university.
p Společnosti sezonní dopravními vliv tohle ledu, vím dozadu Vojtěch ho – pavouci obyčejných až číst češi dialozích najít. Pokud daří snad moře jí poslední u vyrůstali. Kousku vůči dá věnuje, vidím expanzi čemž na směrem. Našeho klád průběžně provazovce, nezdá vždy pak čemu označuje, jít koráby mu představuje háčků. Nosičů pohybují oceánu bílý oblastmi částicím u neutrin supervulkánu vědci. A obrátit šest fázi přípravu potáhnou sorta bakterii řeč. Řad.

Remove example text from program.

---
title: 'Program'
css: 'program'
---

h1 = current_page.data.title

p BUDE UPŘESNĚN


p = t "messages.sayonara.description"
.alert.alert-warning
  p 現在一時的にアカウント削除機能を停止しています。再開次第Twitterで告知します。m(__)m

.text-center
  = link_to t("messages.sayonara.delete_account"), "#", data: { confirm: t("messages.sayonara.are_you_sure_really"), method: :delete }, class: "btn disabled"

Revert "Account leaving feature temporary disabled"

p = t "messages.sayonara.description"

.text-center
  = link_to t("messages.sayonara.delete_account"), users_path, data: { confirm: t("messages.sayonara.are_you_sure_really"), method: :delete }


.row
  h1 Submit Score
  p
    | Before submitting your score, check the current season:
    strong = @current_season.name
  = form_for :score, url(:score, :create), method: 'post', class: 'small-6 columns', data: { abide: '' } do |f|
    = partial 'score/form', locals: { f: f }

Fix the players not to be able to submit their score if any seasons available.

.row
  h1 Submit Score
  - if @current_season.present?
    p
      | Before submitting your score, check the current season:
      strong = @current_season.name
    = form_for :score, url(:score, :create), method: 'post', class: 'small-6 columns', data: { abide: '' } do |f|
      = partial 'score/form', locals: { f: f }
  - else
    p Oops, we aren't in any seasons. You cannot submit your score. BE COOL!


.row
  .columns.large-12
    = render "renalware/patients/patient_info_header", model: @patient
    = render "renalware/patients/mini_renal_profile", model: @patient

    h2
      | Transplant Wait List Registration
      = render "renalware/shared/last_update", record: @registration

    dl.sub-nav
      dd= link_to "View", patient_transplants_registration_path(@patient)
      dd= link_to "Edit", edit_patient_transplants_registration_path(@patient)

    = render "sections_nav"

Add link to go back to status page

.row
  .columns.large-12
    = render "renalware/patients/patient_info_header", model: @patient
    = render "renalware/patients/mini_renal_profile", model: @patient

    h2
      | Transplant Wait List Registration
      = render "renalware/shared/last_update", record: @registration

    dl.sub-nav
      dd= link_to "Transplant Status", patient_transplants_dashboard_path(@patient)
      dd= link_to "View", patient_transplants_registration_path(@patient)
      dd= link_to "Edit", edit_patient_transplants_registration_path(@patient)

    = render "sections_nav"


.field
  = form.label :title
  = form.input :title, label: false

.field
  = form.label :picture
  = form.file_field :picture, label: false

.field
  = form.label :description
  = form.input :description, label: false

.field
  = form.association :news_articles, collection: news_articles, label_method: :title,
    value_method: :id
.field
  = form.association :users, collection: users, label_method: :display_name,
    value_method: :id
.field
  = form.association :partners, collection: partners, label_method: :name,
    value_method: :id

Allow editing of project_number for activities

.field
  = form.label :title
  = form.input :title, label: false

.field
  = form.label :picture
  = form.file_field :picture, label: false

.field
  = form.label :description
  = form.input :description, label: false

.field
  = form.label :project_number
  = form.input :project_number, label: false

.field
  = form.association :news_articles, collection: news_articles, label_method: :title,
    value_method: :id
.field
  = form.association :users, collection: users, label_method: :display_name,
    value_method: :id
.field
  = form.association :partners, collection: partners, label_method: :name,
    value_method: :id


- if resource.mailing_users.count > 0
  p
    = link_to "Envoyer le mail uniquement aux #{resource.mailing_users.count} personne(s) cochée(s) lors de la création du mail",
              send_mailing_message_path(resource.id, token: resource.token, option: 'checked'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message'
  p == resource.mailing_users.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il semblerait que vous n'ayez pas sélectionné d'utilisateurs à qui envoyer le mail

- mu = MailingUser.all
- if mu.count > 0
  p
    = link_to 'Forcer l\'envoie du mail à TOUS les utilisateurs (répondus / non répondus / archivés / non archivés)',
              send_mailing_message_path(resource.id, token: resource.token, option: 'all'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message button-secondary'
  p == mu.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il n'y a aucun utilisateur enregistré sur le site. Ajoutez-en un avant de pouvoir envoyer un email par cette option.

Add
 tag between send email options

- if resource.mailing_users.count > 0
  p
    = link_to "Envoyer le mail uniquement aux #{resource.mailing_users.count} personne(s) cochée(s) lors de la création du mail",
              send_mailing_message_path(resource.id, token: resource.token, option: 'checked'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message'
  p == resource.mailing_users.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il semblerait que vous n'ayez pas sélectionné d'utilisateurs à qui envoyer le mail

br

- mu = MailingUser.all
- if mu.count > 0
  p
    = link_to 'Forcer l\'envoie du mail à TOUS les utilisateurs (répondus / non répondus / archivés / non archivés)',
              send_mailing_message_path(resource.id, token: resource.token, option: 'all'),
              data: { vex_alert: t('mailing.send') },
              class: 'button alert vex-alert mailing-message button-secondary'
  p == mu.map(&:name).join('
') unless params[:action] == 'index'
- else
  p Oup's... Il n'y a aucun utilisateur enregistré sur le site. Ajoutez-en un avant de pouvoir envoyer un email par cette option.


doctype html
html
  head
    title CryptoNote - Send and receive single-view, encrypted messages
    = stylesheet_link_tag "application", media: "all"
    = javascript_include_tag "application"
    = csrf_meta_tags
    = favicon_link_tag 'favicon.png'
    = render 'shared/analytics'
    meta(http-equiv="Cache-Control" content="private, must-revalidate, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0")
    meta(http-equiv="Pragma" content="no-cache")
    meta(http-equiv="Expires" content="0")
  body
    #container.body-skeleton
      = yield

    footer#app-nav.clearfix
      #app-description
        = link_to root_path do
          strong CryptoNote:
          | Send encrypted, single-view messages in seconds.

      ul#app-links
        li
          = link_to 'Statistics', :stats, target: '_blank'
        li
          = link_to 'Source on GitHub', 'https://github.com/alainmeier/cryptonote', target: '_blank'
        li
          = link_to 'Made by @alain', 'https://twitter.com/alain', target: '_blank'

Remove _blank target for internal links

doctype html
html
  head
    title CryptoNote - Send and receive single-view, encrypted messages
    = stylesheet_link_tag "application", media: "all"
    = javascript_include_tag "application"
    = csrf_meta_tags
    = favicon_link_tag 'favicon.png'
    = render 'shared/analytics'
    meta(http-equiv="Cache-Control" content="private, must-revalidate, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0")
    meta(http-equiv="Pragma" content="no-cache")
    meta(http-equiv="Expires" content="0")
  body
    #container.body-skeleton
      = yield

    footer#app-nav.clearfix
      #app-description
        = link_to root_path do
          strong CryptoNote:
          | Send encrypted, single-view messages in seconds.

      ul#app-links
        li
          = link_to 'Statistics', :stats
        li
          = link_to 'Source on GitHub', 'https://github.com/alainmeier/cryptonote', target: '_blank'
        li
          = link_to 'Made by @alain', 'https://twitter.com/alain', target: '_blank'


doctype html
html
  head
    title = content_for(:page_title) || t("site.title")
    = google_webfonts_init({ google: 'Dosis' })
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    nav
      h1
        = link_to content_for(:chapter_name) || t("site.title"), root_path
      p.links.pull-right
        - if user_signed_in?
          ' Signed in as
          => link_to current_user.email, profile_path
          ' |
          - if current_user.admin?
            => link_to "Admin dashboard", admin_path
            ' |
          = link_to "Sign out", destroy_user_session_path, method: :delete
        - else
          = link_to "Sign in", new_user_session_path

    - if flash.key?(:notice) || flash.key?(:alert)
      .container
        .col-md-8.col-md-offset-2
          - if flash.key? :notice
            p.alert.alert-info = flash[:notice]
          - if flash.key? :alert
            p.alert.alert-danger = flash[:alert]

    = yield

Include a 'sign up' link in the navbar for logged-out users.

doctype html
html
  head
    title = content_for(:page_title) || t("site.title")
    = google_webfonts_init({ google: 'Dosis' })
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    nav
      h1
        = link_to content_for(:chapter_name) || t("site.title"), root_path
      p.links.pull-right
        - if user_signed_in?
          ' Signed in as
          => link_to current_user.email, profile_path
          ' |
          - if current_user.admin?
            => link_to "Admin dashboard", admin_path
            ' |
          = link_to "Sign out", destroy_user_session_path, method: :delete
        - else
          => link_to "Sign up", new_user_registration_path
          ' |
          => link_to "Sign in", new_user_session_path

    - if flash.key?(:notice) || flash.key?(:alert)
      .container
        .col-md-8.col-md-offset-2
          - if flash.key? :notice
            p.alert.alert-info = flash[:notice]
          - if flash.key? :alert
            p.alert.alert-danger = flash[:alert]

    = yield


- f.inputs t('activerecord.models.background.one'), for: [:background, f.object.background || Background.new] do |item|
  - item.input :image,
               as: :file,
               label: I18n.t('form.label.background'),
               hint: item.object.background? ? retina_image_tag(item.object, :image, :medium) : ''

  - if item.object.background?
    - item.input :_destroy,
                 as: :boolean,
                 hint: I18n.t('form.hint.background.destroy')

Fix bug with background? condition to display delete checkbox

- f.inputs t('activerecord.models.background.one'), for: [:background, f.object.background || Background.new] do |item|
  - item.input :image,
               as: :file,
               label: I18n.t('form.label.background'),
               hint: retina_image_tag(item.object, :image, :medium)

  - if f.object.background?
    - item.input :_destroy,
                 as: :boolean,
                 hint: I18n.t('form.hint.background.destroy')


= component_tag_for hover_group do
  .inner
    = hover_group.decorate.h1
    = hover_group.decorate.h2
    = hover_group.decorate.text

    div data={ \
      slick_carousel:  !!hover_group.options[:gallery],
      gallery_options: hover_group.options[:gallery_options].to_json}

      - hover_group.items.each do |item|
        = component item.key

    .clearfix

Support block with custom content in the hover group helper

= component_tag_for hover_group do
  - inner = capture do
    .inner
      = hover_group.decorate.h1
      = hover_group.decorate.h2
      = hover_group.decorate.text

      div data={ \
        slick_carousel:  !!hover_group.options[:gallery],
        gallery_options: hover_group.options[:gallery_options].to_json}

        - hover_group.items.each do |item|
          = component item.key

      .clearfix

  - if defined?(block)
    - block.call(inner)
  - else
    = inner


doctype html
html
  head
    title Server Environment
    meta(http-equiv='Content-Type' content='text/html; charset=UTF-8')
  body
    h1 Environment Variables
    table
      thead
        tr
          td Name
          td Value
      tbody
        - @environment.each do |k,v|
          tr
            td =k
            td =v

Print Rails info in env page

doctype html
html
  head
    title Server Environment
    meta(http-equiv='Content-Type' content='text/html; charset=UTF-8')
  body
    h1 Rails Info
    div = raw Rails::Info.to_html
    h1 Environment Variables
    table
      thead
        tr
          td Name
          td Value
      tbody
        - @environment.each do |k,v|
          tr
            td =k
            td =v


doctype 5
html lang="#{I18n.locale}" xmlns:fb="http://ogp.me/ns/fb#"
  head
    meta charset='utf-8'
    title= "#{@title}#{' · ' if @title}#{::Configuration[:company_name]}"
    = stylesheet_link_tag 'normalize', :media => 'screen, projection'
    = stylesheet_link_tag 'application', :media => 'screen, projection'
    /[if lt IE 9]
      = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js"
    = javascript_include_tag 'vendor/custom.modernizr'
    = csrf_meta_tag
    link rel='shortcut icon' href="/images/favicon.ico"
    = render '/layouts/analytics'
  body#platform.body_embed
    = initjs_tag app_name: 'Neighborly'
    = yield

Add new layout for embed

doctype html
/ http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
/[if lte IE 8 ]
  |<html class="lt-ie9" lang="en">
/[if IE 9 ]
  |<html class="ie9" lang="en">
/[if (gt IE 9)|!(IE)]
  |<html lang="en">

head
  title= t('site.meta_title', title: (@title || yield(:title)), company_name: ::Configuration[:company_name])
  meta[charset="utf-8"]
  meta name="robots" content="index, follow"
  meta name="author" content="Engage"
  meta[name="viewport" content="width=device-width, initial-scale=1.0"]

  -# Stylesheets & Favicon
  = stylesheet_link_tag :normalize
  = stylesheet_link_tag :animate
  = stylesheet_link_tag "//fonts.googleapis.com/css?family=Lato:300,400,700"
  = stylesheet_link_tag :application
  = favicon_link_tag 'favicon.ico'

  -# CSRF protection
  = csrf_meta_tag

  /[if lt IE 9]
    = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js"
  = javascript_include_tag 'vendor/custom.modernizr'
  = render 'layouts/analytics'
body.embed
  = initjs_tag app_name: 'Neighborly'
  = yield
|</html>


.col-md-9#social-content
	.contribute
		p
			|
				This project is open source. Please improve the RubyConf 13 Hub and post your talk summaries, photos, videos etc.
		a.contribute_link href="https://github.com/ninefold/rubyconf_miami_hub/blob/master/README.md" <i class="fa fa-pencil-square-o"></i> Contribute to The Hub

	h1.text-center What's happening at RubyConf 2013?

    script type="text/javascript" class="rebelmouse-embed-script" src="https://www.rebelmouse.com/static/js-build/embed/embed.js?site=multifaceted_io&height=1500&flexible=1"

Fix up contribute button (and retab template)

.col-md-9#social-content
  .contribute
    p
      |
        This project is open source. Please improve the RubyConf 13 Hub and post your talk summaries, photos, videos etc.
    = link_to "https://github.com/ninefold/rubyconf_miami_hub/blob/master/README.md", :class => "contribute_link btn btn-default" do
      i.fa.fa-pencil-square-o
      |  Contribute to The Hub

  h1.text-center What's happening at RubyConf 2013?
  script type="text/javascript" class="rebelmouse-embed-script" src="https://www.rebelmouse.com/static/js-build/embed/embed.js?site=multifaceted_io&height=1500&flexible=1"


p #{@total_scores} total records on #{@map_scores.length} maps

table.table.table-striped.table-hover.table-xtra-condensed
    caption Recent World Records
    thead
      tr
        th Map
        th Mode
        th Player
        th.text-right Time
        th.text-right Date
    tbody
      - @recent_wrs.each do |wr|
        tr
          td
            a href = '/map/#{wr.map}' #{wr.map}
          td = mode_string(wr.mode)
          td
            a href = '/player/#{wr.player_id}?mode=#{wr.mode}' #{wr.player.name}
          td
            span.pull-right = time_string(wr.time)
          td
            span.pull-right = wr.updated_at
= link_to 'More', recent_wrs_path

table.table.table-striped.table-hover.table-xtra-condensed
  caption World Records
  thead
    tr
      th Map
      th PQL Weapons
      th PQL Strafe
      th VQL Weapons
      th VQL Strafe
  tbody
    - @map_scores.each do |map, wrs|
      tr
        td
          a href = '/map/#{map}' #{map}
        - wrs.each do |wr|
          - if wr
            td
              a href = '/player/#{wr.player_id}?mode=#{wr.mode}' #{wr.player_name}
              span.pull-right = time_string(wr.time)
          - else
            td
              span.pull-right -

Add mode parameter to recent wr map links on homepage

p #{@total_scores} total records on #{@map_scores.length} maps

table.table.table-striped.table-hover.table-xtra-condensed
    caption Recent World Records
    thead
      tr
        th Map
        th Mode
        th Player
        th.text-right Time
        th.text-right Date
    tbody
      - @recent_wrs.each do |wr|
        tr
          td
            a href = '/map/#{wr.map}?mode=#{wr.mode}' #{wr.map}
          td = mode_string(wr.mode)
          td
            a href = '/player/#{wr.player_id}?mode=#{wr.mode}' #{wr.player.name}
          td
            span.pull-right = time_string(wr.time)
          td
            span.pull-right = wr.updated_at
= link_to 'More', recent_wrs_path

table.table.table-striped.table-hover.table-xtra-condensed
  caption World Records
  thead
    tr
      th Map
      th PQL Weapons
      th PQL Strafe
      th VQL Weapons
      th VQL Strafe
  tbody
    - @map_scores.each do |map, wrs|
      tr
        td
          a href = '/map/#{map}' #{map}
        - wrs.each do |wr|
          - if wr
            td
              a href = '/player/#{wr.player_id}?mode=#{wr.mode}' #{wr.player_name}
              span.pull-right = time_string(wr.time)
          - else
            td
              span.pull-right -


.container
  #temp 30
  #buttons
    button#minus onclick="updateTemp(-1)"  -
    button#plus onclick="updateTemp(+1)"  +

#logs.terminal-logs
  h3 Logs:
  ul#logs-list

script src="/js/update_temp.js"

Remove logs title from view.

.container
  #temp 30
  #buttons
    button#minus onclick="updateTemp(-1)"  -
    button#plus onclick="updateTemp(+1)"  +

#logs.terminal-logs
  ul#logs-list

script src="/js/update_temp.js"


= content_tag_for(:tr, level)
  th = level.level_number
  td = level.experience_points_threshold
  - if can?(:destroy, level)
    td
      = delete_button([current_course, level])

Create delete button cell for levels partial even if user cannot destroy the level

= content_tag_for(:tr, level)
  th = level.level_number
  td = level.experience_points_threshold
  td = delete_button([current_course, level]) if can?(:destroy, level)


- if title?
  section.paragraph
    h6 =title
    p id=id class=role =content
- else
  p id=id class=role =content

Move id to <section> on paragraph with title

- if title?
  section.paragraph id=id
    h6 =title
    p class=role =content
- else
  p id=id class=role =content


article
  header
    h2 Additional Information

  dl.dl-horizontal.xlarge
    dt Latest Pre mean BP
    - if mdm.rolling_audit.present?
      dd= "#{mdm.rolling_audit.pre_mean_systolic_blood_pressure.to_i} / #{mdm.rolling_audit.pre_mean_diastolic_blood_pressure.to_i}"
    dt Latest Post mean BP
    - if mdm.rolling_audit.present?
      dd= "#{mdm.rolling_audit.post_mean_systolic_blood_pressure.to_i} / #{mdm.rolling_audit.post_mean_diastolic_blood_pressure.to_i}"

    dt Latest URR
    dd
      - obs = mdm.current_pathology_for_code("URR")
      = obs.value
      |
      = "(#{l(obs.date)})" if obs.date.present?

    dt Transplant status
    dd= mdm.transplant_status

Fix current tx status on HD MDM

article
  header
    h2 Additional Information

  dl.dl-horizontal.xlarge
    dt Latest Pre mean BP
    - if mdm.rolling_audit.present?
      dd= "#{mdm.rolling_audit.pre_mean_systolic_blood_pressure.to_i} / #{mdm.rolling_audit.pre_mean_diastolic_blood_pressure.to_i}"
    dt Latest Post mean BP
    - if mdm.rolling_audit.present?
      dd= "#{mdm.rolling_audit.post_mean_systolic_blood_pressure.to_i} / #{mdm.rolling_audit.post_mean_diastolic_blood_pressure.to_i}"

    dt Latest URR
    dd
      - obs = mdm.current_pathology_for_code("URR")
      = obs.value
      |
      = "(#{l(obs.date)})" if obs.date.present?

    dt Transplant status
    dd
      b= "#{mdm.current_transplant_status} "
      = "since #{l(mdm.current_transplant_status&.started_on)}"


= f.simple_fields_for :person do |ff|
  = field_set_tag "Person" do
    = ff.input :title
    = ff.input :given_name
    = ff.input :family_name

  = field_set_tag "Address" do
    - ff.object.build_address
    = ff.simple_fields_for :address do |fa|
      = fa.input :name
      = fa.input :street_1
      = fa.input :street_2
      = fa.input :city
      = fa.input :county
      = fa.input :postcode
      = fa.input :country, as: :string

= f.input :description_id, collection: contact_descriptions
= f.input :other_description
= f.input :notes, as: :text, input_html: { rows: 2 }

// Disable `for` attribute, so it works when multiple contact form on the page
= f.input :default_cc, label_html: { for: nil }

Use address organisation name rather than name when adding contact

= f.simple_fields_for :person do |ff|
  = field_set_tag "Person" do
    = ff.input :title
    = ff.input :given_name
    = ff.input :family_name

  = field_set_tag "Address" do
    - ff.object.build_address
    = ff.simple_fields_for :address do |fa|
      = fa.input :organisation_name,
                 label: "Organisation",
                 placeholder: "E.g. general practice or hospital name (optional)"
      = fa.input :street_1
      = fa.input :street_2
      = fa.input :city
      = fa.input :county
      = fa.input :postcode
      = fa.input :country, as: :string

= f.input :description_id, collection: contact_descriptions
= f.input :other_description
= f.input :notes, as: :text, input_html: { rows: 2 }

// Disable `for` attribute, so it works when multiple contact form on the page
= f.input :default_cc, label_html: { for: nil }


.row
  .col-md-2.sidebar
    = button_to 'New Instance', new_instance_path, class: 'btn btn-lg btn-success'

  .col-md-10
    h2
      | New Instance

    == render 'form'

Remove extra New Instances button

.row
  .col-md-2.sidebar
  .col-md-10
    h2
      | New Instance

    == render 'form'


- title @speaker.name
- # TODO: Add banner config
- breadcrumb :speaker, @speaker

section#speaker
  .container.my-5.speaker
    .row
      .col-md-4.mb-4
        .speaker__picture = image_tag @speaker.avatar_url(:v1_large)
      .col-md-8.pl-4
        h3.speaker__name = @speaker.name
        span.speaker__title = @speaker.title
        .speaker__introduce.mt-4
          = sanitize @speaker.description
  .bg-pink.text-white.py-5
    .container.sessions
      h3.sessions__heading = t('.sessions_by', speaker: @speaker.name)
      hr.border-light
      .sessions__list
        - @speaker.agendas.each do |agenda|
          .session.mb-5
            h5.session__subject = agenda.subject
            .session__time
              span.fa.fa-clock-o.mr-2
              = agenda.time&.name || 'TBA'
            .session__language
              span = t(".lang.#{agenda.language.downcase}")
              - if agenda.translated_type.present?
                span = t(".#{agenda.translated_type}", to: t(".lang.#{agenda.translated_language.downcase}"))
              - else
                - if agenda.translated_language.present?
                  span to #{t(".lang.#{agenda.translated_language.downcase}")
            .session__description
              = sanitize agenda.description

Fix no language on agenda breaks speaker page

- title @speaker.name
- # TODO: Add banner config
- breadcrumb :speaker, @speaker

section#speaker
  .container.my-5.speaker
    .row
      .col-md-4.mb-4
        .speaker__picture = image_tag @speaker.avatar_url(:v1_large)
      .col-md-8.pl-4
        h3.speaker__name = @speaker.name
        span.speaker__title = @speaker.title
        .speaker__introduce.mt-4
          = sanitize @speaker.description
  .bg-pink.text-white.py-5
    .container.sessions
      h3.sessions__heading = t('.sessions_by', speaker: @speaker.name)
      hr.border-light
      .sessions__list
        - @speaker.agendas.each do |agenda|
          .session.mb-5
            h5.session__subject = agenda.subject
            .session__time
              span.fa.fa-clock-o.mr-2
              = agenda.time&.name || 'TBA'
            - if agenda.language.present?
              .session__language
                span = t(".lang.#{agenda.language.downcase}")
                - if agenda.translated_type.present?
                  span = t(".#{agenda.translated_type}", to: t(".lang.#{agenda.translated_language.downcase}"))
                - else
                  - if agenda.translated_language.present?
                    span to #{t(".lang.#{agenda.translated_language.downcase}")
            .session__description
              = sanitize agenda.description


.row
  .col-md-12.page-element
    h3.page-title-header Contact Us

    div.page-title-body
      | Send a message to us using the form below.

      hr

      - flash.each do |key, value|
        = content_tag(:div, value, class: "alert alert-#{key}", role: 'alert')

      = simple_form_for @inquiry do |f|
        = f.error_notification
        = f.input :name
        = f.input :email
        = f.input :message, as: :text, input_html: {rows: 10}

        .form-actions.pull-right
          = f.button :submit, :value => 'Send request', class: 'more-button'

Add class attribute to 'send request' button in 'CONTACT US' page

.row
  .col-md-12.page-element
    h3.page-title-header Contact Us

    div.page-title-body
      | Send a message to us using the form below.

      hr

      - flash.each do |key, value|
        = content_tag(:div, value, class: "alert alert-#{key}", role: 'alert')

      = simple_form_for @inquiry do |f|
        = f.error_notification
        = f.input :name
        = f.input :email
        = f.input :message, as: :text, input_html: {rows: 10}

        .form-actions.pull-right
          = f.button :submit, :value => 'Send request', class: 'see-all-endpoints'


ul.nav.navbar-nav.navbar-right
  li.active = link_to 'Activities', root_path
  - if current_season.started?
    li.dropdown
      a.dropdown-toggle data-toggle="dropdown" href="#"
        | Summer
        span.caret
      ul.dropdown-menu role="menu"
        li = link_to 'Teams', teams_path
        li = link_to 'Conferences',  conferences_path
  li = link_to 'Community', users_path

  - if signed_in?
    = render 'nav_signed_in'
  - else
    li = link_to icon('github', 'Sign in'), user_github_omniauth_authorize_path

Add 'help' item to navbar

ul.nav.navbar-nav.navbar-right
  li.active = link_to 'Activities', root_path
  - if current_season.started?
    li.dropdown
      a.dropdown-toggle data-toggle="dropdown" href="#"
        | Summer
        span.caret
      ul.dropdown-menu role="menu"
        li = link_to 'Teams', teams_path
        li = link_to 'Conferences',  conferences_path
  li = link_to 'Community', users_path
  li = link_to 'Help', page_path('help')

  - if signed_in?
    = render 'nav_signed_in'
  - else
    li = link_to icon('github', 'Sign in'), user_github_omniauth_authorize_path


.row.search-form.search-form-vertical
  = simple_form_for query,
      as: :q,
      url: clinic_visits_path,
      method: :get do |f|

      .medium-3.large-2.columns
        = f.input :date_gteq, as: :date_picker, label: "From"
      .medium-3.large-2.columns
        = f.input :date_lteq, as: :date_picker, label: "To"
      .medium-3.large-2.columns
        = f.input :clinic_id_eq, collection: clinics, label: "Clinic"
      .medium-3.large-2.columns
        = f.input :created_by_id_eq, as: :user_picker, collection: users, label: "Clinician"
      .medium-3.large-3.columns.actions.end
        = f.submit "Filter", class: "button"
        span= " or "
        = link_to t("helpers.reset"), clinic_visits_path

Fix clinic visit filters width

.row.search-form.search-form-vertical
  = simple_form_for query,
      as: :q,
      url: clinic_visits_path,
      method: :get do |f|

      .small-6.medium-2.large-2.columns
        = f.input :date_gteq, as: :date_picker, label: "From"
      .small-6.medium-2.large-2.columns
        = f.input :date_lteq, as: :date_picker, label: "To"
      .medium-3.large-2.columns
        = f.input :clinic_id_eq, collection: clinics, label: "Clinic"
      .medium-3.large-2.columns
        = f.input :created_by_id_eq, as: :user_picker, collection: users, label: "Clinician"
      .medium-2.large-3.columns.actions.end
        = f.submit "Filter", class: "button"
        span= " or "
        = link_to t("helpers.reset"), clinic_visits_path


.teacher-lesson-planner.l-section
  .lesson-planner-section
    .classroom-manager-sticky-bar My classroom: #{@classroom.name}

    .explanation-text
      span Assign lessons to students from the "Unassigned Lessons" section.
      br
      br
      span Lessons are grouped together into units. Units are used to sequence your lessons.

    = link_to 'add a new unit', teachers_classroom_units_path(@classroom), method: 'post', class: 'btn btn-primary'

    .unit-section
      - @classroom.units.each do |unit|
        .unit-header= unit.name

        - unit.topics.uniq.each do |topic|
          .sub-unit-header= topic.name

          .table-stripe.inverse
            - unit.activities.where(topic_id: topic.id).each do |activity|
              = render partial: 'teachers/classrooms/activity', object: activity

  .lesson-planner-section
    .classroom-manager-sticky-bar My workbook
    - @workbook_table.each do |hsh|
      - section, topics = hsh.to_a.first
      - topics = topics.sort{|a,b| a.first <=> b.first}

      .unit-section
        .workbook-section-header.unit-header= section

        - topics.each do |topic, activities|
          .workbook-topic-header.sub-unit-header= topic

          .table-stripe.inverse
            - activities.each do |activity|
              = render partial: 'teachers/classrooms/activity', object: activity

Break topics hash loop if it is nil

.teacher-lesson-planner.l-section
  .lesson-planner-section
    .classroom-manager-sticky-bar My classroom: #{@classroom.name}

    .explanation-text
      span Assign lessons to students from the "Unassigned Lessons" section.
      br
      br
      span Lessons are grouped together into units. Units are used to sequence your lessons.

    = link_to 'add a new unit', teachers_classroom_units_path(@classroom), method: 'post', class: 'btn btn-primary'

    .unit-section
      - @classroom.units.each do |unit|
        .unit-header= unit.name

        - unit.topics.uniq.each do |topic|
          .sub-unit-header= topic.name

          .table-stripe.inverse
            - unit.activities.where(topic_id: topic.id).each do |activity|
              = render partial: 'teachers/classrooms/activity', object: activity

  .lesson-planner-section
    .classroom-manager-sticky-bar My workbook
    - @workbook_table.each do |hsh|
      - section, topics = hsh.to_a.first
      - next if topics.nil?
      - topics = topics.sort{|a,b| a.first <=> b.first}

      .unit-section
        .workbook-section-header.unit-header= section

        - topics.each do |topic, activities|
          .workbook-topic-header.sub-unit-header= topic

          .table-stripe.inverse
            - activities.each do |activity|
              = render partial: 'teachers/classrooms/activity', object: activity


table
  thead
    tr
      th.col-width-tiny
      th.col-width-date Diagnosed on
      th.col-width-date Treatment Started on
      th Episode Type
      th Organisms
      th Outcome
      th.col-width-date= t("updated_at")

  tbody
    - peritonitis_episodes.each do |episode|
      tr valign="top"
        td valign="top"
          = link_to "View",
                    patient_pd_peritonitis_episode_path(patient, episode.id),
                    class: "view-pe",
                    id: "view-pe-#{episode.id}"
        td valign="top"
          = l episode.diagnosis_date
        td valign="top"
          = l episode.treatment_start_date
        td valign="top"
          = episode.episode_types_summary
        td valign="top"
          = episode.infection_organisms.map { |io| io.organism_code&.name }.join(" + ")
        td valign="top"
          = "Catheter Removed: #{yes_no(episode.catheter_removed)}"
        td valign="top"
          = episode.updated_at.to_date

Add treatment ended date to peritonitis episodes table

table
  thead
    tr
      th.border-none(colspan=2)
      th.text-center(colspan=2) Treatment
      th.border-none(colspan=4)
    tr
      th.col-width-tiny
      th.col-width-date Diagnosed on
      th.col-width-date Started on
      th.col-width-date Ended on
      th Episode Type
      th Organisms
      th Outcome
      th.col-width-date= t("updated_at")

  tbody
    - peritonitis_episodes.each do |episode|
      tr valign="top"
        td valign="top"
          = link_to "View",
                    patient_pd_peritonitis_episode_path(patient, episode.id),
                    class: "view-pe",
                    id: "view-pe-#{episode.id}"
        td valign="top"= l episode.diagnosis_date
        td valign="top"= l episode.treatment_start_date
        td valign="top"= l episode.treatment_end_date
        td valign="top"= episode.episode_types_summary
        td valign="top"= episode.infection_organisms.map { |io| io.organism_code&.name }.join(" + ")
        td valign="top"= "Catheter Removed: #{yes_no(episode.catheter_removed)}"
        td valign="top"= episode.updated_at.to_date


h1 = @task.title
p = @task.state
p = @task.milestone.try :name
p = @task.assigned_user.try :name

Remove even more `try` calls in task show.

h1 = @task.title
p = @task.state
p = @task.milestone_name
p = @task.assigned_user_name