#page-wrapper
  .row
    .col-lg-12
      h1.page-header New Admin User
  .row
    .col-lg-12
      p#notice = notice
        = link_to 'Edit', edit_admin_user_path(@admin_user)
        ' |
        = link_to 'Back', admin_users_path

Add basic user show view

#page-wrapper
  .row
    .col-lg-12
      h1.page-header Admin User
      p#notice = notice
  .row
    .col-lg-12
      .panel.panel-default
          .panel-heading
            ' User Details
          .panel-body
            p
              strong Name:
              = @admin_user.name
            p
  .row
    .col-lg-12
      .panel.panel-default
        .panel-body
          = link_to 'Edit', edit_admin_user_path(@admin_user), class: "btn btn-primary"
          '
          = link_to 'Back', admin_users_path, class: "btn btn-warning"


- contribution = @notification.contribution
- user = @notification.contribution.user
- bank_account = user.bank_account

|Olá, #{contribution.user.name}!
br
br
| Infelizmente o projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} que você apoiou não atingiu a meta estabelecida e não foi financiado no #{CatarseSettings[:company_name]}.
br
br
| Como o seu apoio foi efetuado através de boleto, iremos realizar o reembolso diretamente na conta bancária:
br
br
| Banco: #{bank_account.try(:name)}
br
| Agência: #{bank_account.try(:agency)}
br
| Conta: #{bank_account.try(:account)} - #{bank_account.try(:account_digit)}
br
| Nome do titular: #{bank_account.try(:user_name)}
br
| CPF: #{bank_account.try(:user_document)}
br
br
| Assim que o reembolso for feito, você receberá um e-mail de confirmação da operação.
br
br
| Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to CatarseSettings[:email_contact]}
| e nos informe a chave de identificação do seu apoio, que é: #{contribution.payment_id}
br
br
|Um abraço,
br
| #{CatarseSettings[:company_name]}

Update `confirmed contribution for unsuccessful project - slip payment`

- contribution = @notification.contribution
- user = @notification.contribution.user
- bank_account = user.bank_account

|Olá, #{contribution.user.name}!
br
br
| Infelizmente o projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} que você apoiou não atingiu a meta estabelecida e não foi financiado no #{CatarseSettings[:company_name]}.
br
br
| Como o seu apoio foi efetuado através de boleto, precisamos que nos envie o e-mail de sua conta Moip e/ou PayPal (a mesma que utilizou para fazer a doação) para que possamos fazer o reembolso.
br
br
| Assim que o reembolso for feito, você receberá um e-mail de confirmação da operação.
br
br
| Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to CatarseSettings[:email_contact]}
| e nos informe a chave de identificação do seu apoio, que é: #{contribution.payment_id}
br
br
|Um abraço,
br
| #{CatarseSettings[:company_name]}


- issue = issue_to_section_connection.issue

div [data-issue_to_section_connection-id = "#{ issue_to_section_connection.id }"
  id = "issue_#{ issue.id }"]
  h5
    = issue.title

    - if issue.github_issue_number.present?
      |
      small.blue = issue.github_issue_number
    small.pull-right
      = link_to edit_project_issue_url(issue.project, issue), :remote => true do
        i.fa.fa-pencil
  p
    - if issue.github_issue_html_url.present?
      = link_to issue.github_issue_html_url do
        i.fa.fa-github
    - if issue.github_issue_comments_count.present?
      |
      i.fa.fa-comments
      |
      = issue.github_issue_comments_count

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

    - if issue.bitbucket_issue_comment_count.present?
      |
      i.fa.fa-comments
      |
      = issue.bitbucket_issue_comment_count

  - if issue.tags.present?
    p
      - issue.tags.each do |tag|
        span.label.label-default style = "#{ issue_tag_color(issue, tag) }" = tag
        br

Truncate issue title in a column if it very large

- issue = issue_to_section_connection.issue

div [data-issue_to_section_connection-id = "#{ issue_to_section_connection.id }"
  id = "issue_#{ issue.id }"]
  h5.truncate
    = issue.title

    - if issue.github_issue_number.present?
      |
      small.blue = issue.github_issue_number
    small.pull-right
      = link_to edit_project_issue_url(issue.project, issue), :remote => true do
        i.fa.fa-pencil.fa-lg
  p
    - if issue.github_issue_html_url.present?
      = link_to issue.github_issue_html_url do
        i.fa.fa-github
    - if issue.github_issue_comments_count.present?
      |
      i.fa.fa-comments
      |
      = issue.github_issue_comments_count

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

    - if issue.bitbucket_issue_comment_count.present?
      |
      i.fa.fa-comments
      |
      = issue.bitbucket_issue_comment_count

  - if issue.tags.present?
    p
      - issue.tags.each do |tag|
        span.label.label-default style = "#{ issue_tag_color(issue, tag) }" = tag
        br


= simple_form_for resource, url: (resource.persisted? ? tag_path(resource) : tags_path) do |f|
  = f.input :name
  = f.button :submit, disable_with: I18n.t('words.sending')

Add visible field to tag form

= simple_form_for resource, url: (resource.persisted? ? tag_path(resource) : tags_path) do |f|
  = f.input :name
  = f.input :visible
  = f.button :submit, disable_with: I18n.t('words.sending')


nav.actions
  ul
    li = link_to icon('plus', 'New Conference'), new_conference_path, class: 'btn btn-small' if can? :create, Conference.new

h1.header
  / = icon('group')
  span Conferences

table.table.table-striped.table-bordered.table-condensed.conferences
  tr
    th = sortable 'name', 'Conference'
    th = sortable 'location', 'Location'
    th = sortable 'starts_on', 'Date'
    th Attendees
    th Tickets left

  - conferences.each do |conference|
    tr
      td = link_to conference.name, conference
      td = conference.location
      td = format_conference_date(conference.starts_on, conference.ends_on)
      td = conference.attendees.any? ? links_to_attendances(conference).join(', ').html_safe : '-'
      td = conference.tickets_left

p = link_to "View as Calendar", calendar_path

Split conferences into two tables for each round

nav.actions
  ul
    li = link_to icon('plus', 'New Conference'), new_conference_path, class: 'btn btn-small' if can? :create, Conference.new

h1.header
  / = icon('group')
  span Conferences (2nd round)

table.table.table-striped.table-bordered.table-condensed.conferences
  tr
    th = sortable 'name', 'Conference'
    th = sortable 'location', 'Location'
    th = sortable 'starts_on', 'Date'
    th Attendees
    th Tickets left

  - Conference.where(round: 2).each do |conference|
    tr
      td = link_to conference.name, conference
      td = conference.location
      td = format_conference_date(conference.starts_on, conference.ends_on)
      td = conference.attendees.any? ? links_to_attendances(conference).join(', ').html_safe : '-'
      td = conference.tickets_left

p = link_to "View as Calendar", calendar_path
p = link_to "Show/Hide First Round Conferences", "#", onclick: "$('.first-conferences').toggle()"

.first-conferences style='display:none;'
  h1.header
    / = icon('group')
    span Conferences (1st round)
  table.table.table-striped.table-bordered.table-condensed.conferences
    tr
      th = sortable 'name', 'Conference'
      th = sortable 'location', 'Location'
      th = sortable 'starts_on', 'Date'
      th Attendees
      th Tickets left

    - Conference.where(round: 1).each do |conference|
      tr
        td = link_to conference.name, conference
        td = conference.location
        td = format_conference_date(conference.starts_on, conference.ends_on)
        td = conference.attendees.any? ? links_to_attendances(conference).join(', ').html_safe : '-'
        td = conference.tickets_left


<!DOCTYPE html>
html
  head
    title
      = Setting.title
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    .navbar.navbar-default.navbar-static-top
      .navbar-collapse.navbar-responsive-collapse
        ul.nav.navbar-nav
          - if current_user
            li = link_to "Journal"      , journals_path
            li = link_to "Topics"       , topics_path
            li = link_to "Feeds"        , feeds_path
            li = link_to "Categories"   , categories_path
            li = link_to "Subscriptions", subscriptions_path
            li = link_to "Keywords"     , keywords_path
            li = link_to "Tags"         , tags_path
            li = link_to "Entries"      , entries_path
            li = link_to "Tracks"       , tracks_path
            li = link_to "Albums"       , albums_path
            li = link_to "Playlists"    , playlists_path
            - if current_user.admin?
              li = link_to "Application", oauth_applications_path
              li = link_to "Profiles"   , users_path
            li = link_to "Edit Profile", edit_user_path(current_user.id)
            li = link_to "Logout", :logout, method: :post
          - else
            li = link_to "Register", new_user_path
            li = link_to "Login", :login

    .container
      = flash_messages
      = yield

Add link to StreamCollections on navbar

<!DOCTYPE html>
html
  head
    title
      = Setting.title
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    .navbar.navbar-default.navbar-static-top
      .navbar-collapse.navbar-responsive-collapse
        ul.nav.navbar-nav
          - if current_user
            li = link_to "Walls"        , walls_path
            li = link_to "Journals"     , journals_path
            li = link_to "Topics"       , topics_path
            li = link_to "Feeds"        , feeds_path
            li = link_to "Keywords"     , keywords_path
            li = link_to "Tags"         , tags_path
            li = link_to "Entries"      , entries_path
            li = link_to "Tracks"       , tracks_path
            li = link_to "Albums"       , albums_path
            li = link_to "Playlists"    , playlists_path
            - if current_user.admin?
              li = link_to "Application", oauth_applications_path
              li = link_to "Profiles"   , users_path
            li = link_to "Edit Profile", edit_user_path(current_user.id)
            li = link_to "Logout", :logout, method: :post
          - else
            li = link_to "Register", new_user_path
            li = link_to "Login", :login

    .container
      = flash_messages
      = yield


.col-sm-6.col-sm-offset-3
  .well
    h2 Can't go no further
    br
    = form_tag '/login' do
      .form-group
        = label_tag 'Email'
        = text_field_tag :email, '', class: 'form-control'
      .form-group
        = label_tag 'Password'
        = password_field_tag :password, '', class: 'form-control'
      .form-group
        = submit_tag 'Save', class: 'btn btn-primary'

Save was nicer though :)

.col-sm-6.col-sm-offset-3
  .well
    h2 Can't go no further
    br
    = form_tag '/login' do
      .form-group
        = label_tag 'Email'
        = text_field_tag :email, '', class: 'form-control'
      .form-group
        = label_tag 'Password'
        = password_field_tag :password, '', class: 'form-control'
      .form-group
        = submit_tag 'Sign in', class: 'btn btn-primary'
        = link_to 'Cancel', root_url, class: 'btn btn-default pull-right'


h1 Pitch a show to RUDE

h3.m-y-1 Submissions for September and October are now open!

iframe src="https://docs.google.com/forms/d/e/1FAIpQLSdNp9INc5PT7kLUvUKEya2tGhAxpxpTRgn8v9NLuHAlxaZuWg/viewform?embedded=true" width="100%" height="2500px;" frameborder="0" marginheight="0" marginwidth="0">Loading...

Change specific dates to submissions are rolling

h1 Pitch a show to RUDE

h3.m-y-1 Submissions are rolling!

iframe src="https://docs.google.com/forms/d/e/1FAIpQLSdNp9INc5PT7kLUvUKEya2tGhAxpxpTRgn8v9NLuHAlxaZuWg/viewform?embedded=true" width="100%" height="2500px;" frameborder="0" marginheight="0" marginwidth="0">Loading...


- path = [:renalware, presenter.q]
table#patients.mdm-patients.columns
  thead
    tr
      th.col-width-large= sort_link(path, :family_name, t(".name"))
      th.col-width-nhs-no= sort_link(path, :nhs_number, t(".hosp_no"))
      th.col-width-reference-no= t(".hosp_no")
      th.col-width-tiny= t(".sex")
      th.col-width-tiny= t(".age")
      th.col-width-medium= t(".modality")
      - %i(hgb ure cre).each do |code|
        th.col-width-tiny= sort_link(path, code, t(".#{code}"))
        th.col-width-date= sort_link(path, :"#{code}_date", t(".#{code}_date"))
      th.col-width-tiny= sort_link(path, :egfr, t(".egfr"))
      th.col-width-date= t(".esrf")
      th.col-width-small

  tbody
    = render partial: "patient",
             collection: presenter.patients,
             locals: { view_proc: presenter.view_proc, q: presenter.q }

Correct MDM patients list heading

- path = [:renalware, presenter.q]
table#patients.mdm-patients.columns
  thead
    tr
      th.col-width-large= sort_link(path, :family_name, t(".name"))
      th.col-width-nhs-no= sort_link(path, :nhs_number, t(".nhs_no"))
      th.col-width-reference-no= t(".hosp_no")
      th.col-width-tiny= t(".sex")
      th.col-width-tiny= t(".age")
      th.col-width-medium= t(".modality")
      - %i(hgb ure cre).each do |code|
        th.col-width-tiny= sort_link(path, code, t(".#{code}"))
        th.col-width-date= sort_link(path, :"#{code}_date", t(".#{code}_date"))
      th.col-width-tiny= sort_link(path, :egfr, t(".egfr"))
      th.col-width-date= t(".esrf")
      th.col-width-small

  tbody
    = render partial: "patient",
             collection: presenter.patients,
             locals: { view_proc: presenter.view_proc, q: presenter.q }


header class="con-darkgrey"
  .container.clearfix
    .navbar
      .navbar-inner
        a.btn.btn-navbar data-toggle="collapse" data-target=".nav-collapse"
          span.icon-bar
          span.icon-bar
          span.icon-bar

        a.brand href=root_path Quill

        .nav-collapse.collapse
          ul.nav
            li= link_to 'Our Story', story_path
            li= link_to 'On Learning', learning_path
            li= link_to 'About Us', about_path
            li= link_to 'News', 'http://egrammarblog.blogspot.com/'
            li= link_to 'Forum', 'http://empirical-discourse.herokuapp.com/'

            - if signed_in?
              li#m-sign-in= link_to 'Profile', profile_path
              li#m-create-account= link_to 'Sign out', session_path, method: :delete
            - else
              li#m-sign-in= link_to 'Sign In', new_session_path
              li#m-create-account= link_to 'Create Account', new_account_path

Change the links, add pages

header class="con-darkgrey"
  .container.clearfix
    .navbar
      .navbar-inner
        a.btn.btn-navbar data-toggle="collapse" data-target=".nav-collapse"
          span.icon-bar
          span.icon-bar
          span.icon-bar

        a.brand href=root_path Quill

        .nav-collapse.collapse
          ul.nav
            li= link_to 'Mission', mission_path
            li= link_to 'News', 'http://egrammarblog.blogspot.com/'
            li= link_to 'Develop', develop_path
            li= link_to 'About Us', about_path
            li= link_to 'Forum', 'http://empirical-discourse.herokuapp.com/'

            - if signed_in?
              li#m-sign-in= link_to 'Profile', profile_path
              li#m-create-account= link_to 'Sign out', session_path, method: :delete
            - else
              li#m-sign-in= link_to 'Sign In', new_session_path
              li#m-create-account= link_to 'Create Account', new_account_path


.question-body
  p.question-context
    ' Sustainable development is any activity which ensures a better quality of life for everyone, now and for generations to come.
  p.question-context
    ' This can be in any of the four dimensions:
  ul.question-context
    li environmental
    li social
    li economic
    li leadership.
  p.question-context
    ' Your achievements should be in either:
  ul.question-context
    li invention, design, production, performance, marketing, distribution or after sales support of goods/services
    li management of resources or people, or of relationships with other organisations (or their representatives)
  - collection = @eligibility.class.sustainable_development.options
  - collection.reject! { |opts| opts.last == 'skip' } if controller_name == 'form_award_eligibilities'
  = f.input :sustainable_development, as: :radio_buttons, item_wrapper_class: 'selectable', label_html: { class: 'visuallyhidden' }, collection: collection
span.clear

COPY Sus dev eligibility `leadership` -> `leadership and management`

.question-body
  p.question-context
    ' Sustainable development is any activity which ensures a better quality of life for everyone, now and for generations to come.
  p.question-context
    ' This can be in any of the four dimensions:
  ul.question-context
    li environmental
    li social
    li economic
    li leadership and management
  p.question-context
    ' Your achievements should be in either:
  ul.question-context
    li invention, design, production, performance, marketing, distribution or after sales support of goods/services
    li management of resources or people, or of relationships with other organisations (or their representatives)
  - collection = @eligibility.class.sustainable_development.options
  - collection.reject! { |opts| opts.last == 'skip' } if controller_name == 'form_award_eligibilities'
  = f.input :sustainable_development, as: :radio_buttons, item_wrapper_class: 'selectable', label_html: { class: 'visuallyhidden' }, collection: collection
span.clear


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
      / = awesome_social_share
      - if setting.show_social?
        h3 Follow me
        ul.inline-list
          li = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?

          - unless @socials_share.nil?
            - @socials_follow.each do |social_follow|
              li
                = link_to retina_image_tag(social_follow, :ikon, :small), social_follow.link, target: :_blank

        - unless @socials_share.nil?
          h4 Share me
          = social_share_buttons

Add condition to hide social network if optional_module is disabled

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? && @social_module.enabled?
        h3 Follow me
        ul.inline-list
          li = link_to fa_icon('rss 2x'), posts_rss_path(format: :atom), target: :blank if @rss_module.enabled?

          - unless @socials_share.nil?
            - @socials_follow.each do |social_follow|
              li
                = link_to retina_image_tag(social_follow, :ikon, :small), social_follow.link, target: :_blank

        - unless @socials_share.nil?
          h4 Share me
          = social_share_buttons


doctype html

head
  meta name="viewport" content="width=device-width, initial-scale=1.0"
  link rel="stylesheet" type="text/css" href=asset_path("application.css")
  script src=asset_path("application.js")

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand
        - if current_user
          a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
        - else
          a href='https://tent.is' Tent.is

      ul.nav
        - if current_user
          li
            a href==current_user.entity Posts
          li
            a href=full_path('/followers') Followers
          li
            a href=full_path('/followings') Following
          li.active
            a href=full_path('/admin') Account
        - else
          li
            a href='https://tent.is/blog' Blog

      ul.nav.pull-right
        - if current_user
          li
            a href=full_path('/signout') Signout
        - else
          li
            a href='https://tent.is/login' Login
          li
            a href='https://tent.is/signup' Signup

  .container
    == yield

Update nav: add view profile link

doctype html

head
  meta name="viewport" content="width=device-width, initial-scale=1.0"
  link rel="stylesheet" type="text/css" href=asset_path("application.css")
  script src=asset_path("application.js")

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand
        - if current_user
          a href==current_user.entity = current_user.entity.sub(%r{\Ahttps?://([^/]+).*?\z}) { |m| $1 }
        - else
          a href='https://tent.is' Tent.is

      ul.nav
        - if current_user
          li
            a href==current_user.entity Posts
          li
            a href==full_path("/entities/#{URI.encode_www_form_component(current_user.entity)}") View Profile
          li
            a href=full_path('/followers') Followers
          li
            a href=full_path('/followings') Following
          li.active
            a href=full_path('/admin') Account
        - else
          li
            a href='https://tent.is/blog' Blog

      ul.nav.pull-right
        - if current_user
          li
            a href=full_path('/signout') Signout
        - else
          li
            a href='https://tent.is/login' Login
          li
            a href='https://tent.is/signup' Signup

  .container
    == yield


table.aki-alerts
  thead
    th.noprint.togglers = table_toggler
    th.col-width-tiny
    th.col-width-large= sort_link(search, :patient_family_name, "Patient")
    th.col-width-reference-no Hosp. No.
    th.col-tiny= sort_link(search, :hospital_centre_code, "Site")
    th.col-width-small.show-for-large-up
        = sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
    th.col-width-tiny Sex
    th.col-width-tiny Age
    th= sort_link(search, :action_name, "Action")
    th.col-width-medium Ward
    th= sort_link(search, :hotlist, "Hotlist")
    th= sort_link(search, :max_aki, "Max AKI")
    th.col-width-date= sort_link(search, :aki_date, "AKI Date")
    th Decided by
    th.col-width-date-time.show-for-large-up Created at
  tbody
    = render alerts

Allow sorting AKI alerts by created_at

table.aki-alerts
  thead
    th.noprint.togglers = table_toggler
    th.col-width-tiny
    th.col-width-large= sort_link(search, :patient_family_name, "Patient")
    th.col-width-reference-no Hosp. No.
    th.col-tiny= sort_link(search, :hospital_centre_code, "Site")
    th.col-width-small.show-for-large-up
        = sort_link([:renalware, search], :patient_current_modality_description_name, "Modality")
    th.col-width-tiny Sex
    th.col-width-tiny Age
    th= sort_link(search, :action_name, "Action")
    th.col-width-medium Ward
    th= sort_link(search, :hotlist, "Hotlist")
    th= sort_link(search, :max_aki, "Max AKI")
    th.col-width-date= sort_link(search, :aki_date, "AKI Date")
    th Decided by
    th.col-width-date-time.show-for-large-up= sort_link(search, :created_at, "Created at")
  tbody
    = render alerts


dl.dl-horizontal
  dt Name
  dd= address.name

  dt Organisation Name
  dd= address.organisation_name

  dt Street 1
  dd= address.street_1

  dt Street 2
  dd= address.street_2

  dt City
  dd= address.city

  dt County
  dd= address.county

  dt Postcode
  dd= address.postcode

  dt Country
  dd= address.country

  dt Telephone
  dd= address.telephone

  dt Email
  dd= address.email

Remove duplicate phone/email display from fieldset


- content_for :page_content do
  #user-settings-content.row
    = simple_form_for(@user, url: { action: :update_password }, html: { method: :put }) do |f|
      .large-8.columns
        h3= t('.change_password')
        p= t('.password_info')
        .row
          .large-6.columns
            = f.input :current_password
          .large-6.columns
            = f.input :password
        p = f.button :submit, t('.save_password'), data: { disable_with: t('words.sending') }

    = simple_form_for @user, html: { method: :put } do |f|
      = hidden_field_tag :settings, true
      .large-8.columns
        h3= t('.communication_preferences')
        = f.input :newsletter
        = f.input :new_project
        p = f.button :submit, t('.update_communication_preferences'), data: { disable_with: t('words.sending') }

- if request.xhr?
  = yield :page_content
- else
  = render template: 'users/edit'

Remove new project email notification from settings

- content_for :page_content do
  #user-settings-content.row
    = simple_form_for(@user, url: { action: :update_password }, html: { method: :put }) do |f|
      .large-8.columns
        h3= t('.change_password')
        p= t('.password_info')
        .row
          .large-6.columns
            = f.input :current_password
          .large-6.columns
            = f.input :password
        p = f.button :submit, t('.save_password'), data: { disable_with: t('words.sending') }

    = simple_form_for @user, html: { method: :put } do |f|
      = hidden_field_tag :settings, true
      .large-8.columns
        h3= t('.communication_preferences')
        = f.input :newsletter
        p = f.button :submit, t('.update_communication_preferences'), data: { disable_with: t('words.sending') }

- if request.xhr?
  = yield :page_content
- else
  = render template: 'users/edit'


.row(ng-app="kassa")
  .col-xs-12
    .row
      nav(ng-controller="NavigationCtrl")
        ul
          li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
            a(ng-href="{{route.href}}") {{route.name}}
          li
            a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()') {{session.currentUser().username}}
          li
            a(href="" ng-click='session.signOut()')= t('navigation.title.sign_out')
    .row(ng-view)

Add placeholder for currently signed in user avatar

.row(ng-app="kassa")
  .col-xs-12
    .row
      nav(ng-controller="NavigationCtrl")
        ul
          li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
            a(ng-href="{{route.href}}") {{route.name}}
          li
            a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()')
              img.img-rounded(gravatar="session.currentUser().email")
              {{session.currentUser().username}}
          li
            a(href="" ng-click='session.signOut()')= t('navigation.title.sign_out')
    .row(ng-view)


doctype html
html
  head
    title Movies app
    meta name="keywords" content="template language"

  body
    h1 Movies list

    #content
      p Here you can see a list of all movies

    == yield

    - if @items.any?
      table#items
        - @items.each do |movie|
          tr
            td.name = movie.name
            td.year = movie.year
            td = link_to 'Edit', edit_movies_path(movie)

    - else
      p No items found. Please add some inventory.
        Thank you!

= link_to 'New Movie', new_movies_path

div id="footer"

Remove layout stuff; adjust paths

h1 Movies list

#content
  p Here you can see a list of all movies

== yield

- if @movies.any?
  table#items
    - @movies.each do |movie|
      tr
        td.name = movie.name
        td.year = movie.year
        td = link_to 'Edit', edit_movie_path(movie)

- else
  p No items found. Please add some inventory.
    Thank you!

= link_to 'New Movie', new_movie_path


.r
  .sg-colour
    p.black
    ul
      li #000000
      li $black
  .sg-colour
    p.grey100
    ul
      li #333333
      li $grey100
  .sg-colour
    p.grey80
    ul
      li #5C5C5C
      li $grey80
  .sg-colour
    p.grey75
    ul
      li #666666
      li $grey75
  .sg-colour
    p.grey60
    ul
      li #858585
      li $grey60
  .sg-colour
    p.grey50
    ul
      li #999999
      li $grey50
  .sg-colour
    p.grey40
    ul
      li #ADADAD
      li $grey40
  .sg-colour
    p.grey30
    ul
      li #C1C1C1
      li $grey30
  .sg-colour
    p.grey20
    ul
      li #D6D6D6
      li $grey20
  .sg-colour
    p.grey15
    ul
      li #E1E1E1
      li $grey15
  .sg-colour
    p.grey10
    ul
      li #EAEAEA
      li $grey10
  .sg-colour
    p.grey05
    ul
      li #F5F5F5
      li $grey05

Update row class on colours section

.row
  .sg-colour
    p.black
    ul
      li #000000
      li $black
  .sg-colour
    p.grey100
    ul
      li #333333
      li $grey100
  .sg-colour
    p.grey80
    ul
      li #5C5C5C
      li $grey80
  .sg-colour
    p.grey75
    ul
      li #666666
      li $grey75
  .sg-colour
    p.grey60
    ul
      li #858585
      li $grey60
  .sg-colour
    p.grey50
    ul
      li #999999
      li $grey50
  .sg-colour
    p.grey40
    ul
      li #ADADAD
      li $grey40
  .sg-colour
    p.grey30
    ul
      li #C1C1C1
      li $grey30
  .sg-colour
    p.grey20
    ul
      li #D6D6D6
      li $grey20
  .sg-colour
    p.grey15
    ul
      li #E1E1E1
      li $grey15
  .sg-colour
    p.grey10
    ul
      li #EAEAEA
      li $grey10
  .sg-colour
    p.grey05
    ul
      li #F5F5F5
      li $grey05


.col-md-9#social-content
  h1.text-center What's happening at RubyConf 2013?
  script id='twine-script' cols='4444' height='8000' tab='All Topics' src="//apps.twinesocial.com/embed?app=9QDQSORM16"

Replace Twine Social with RebelMouse

.col-md-9#social-content
  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"
  /script id='twine-script' cols='4444' height='8000' tab='All Topics' src="//apps.twinesocial.com/embed?app=9QDQSORM16"


nav.actions
  ul.list-inline
    li = link_to icon('plus', 'Submit a Project'), new_project_path, class: 'btn btn-default btn-sm'

h1.header
  = icon('group')
  span Projects

table.table.table-striped.table-bordered.table-condensed
  tr
    th Name
    th Submitted
    th Comments
    th Applications (1st Choice)
    th Applications (2nd Choice)
    th Status

  - @projects.each do |project|
    tr
      td
        = link_to project.name, project
        - if can? :crud, project
          .project-actions
            = link_to [:edit, project] do
              = icon('edit')
            = link_to project, data: { confirm: 'This action cannot be undone. Are you sure?' }, method: :delete do
              = icon('minus-sign')
      td = l project.created_at, format: :short
      td
        - if project.comments.any?
          = link_to project.comments.count, project_path(project, anchor: 'comments'), class: 'label label-default'
      td = project.first_choice_application_drafts.count
      td = project.second_choice_application_drafts.count
      td = project_status project

Add bootstrap label class to counters

nav.actions
  ul.list-inline
    li = link_to icon('plus', 'Submit a Project'), new_project_path, class: 'btn btn-default btn-sm'

h1.header
  = icon('group')
  span Projects

table.table.table-striped.table-bordered.table-condensed
  tr
    th Name
    th Submitted
    th Comments
    th Applications (1st Choice)
    th Applications (2nd Choice)
    th Status

  - @projects.each do |project|
    tr
      td
        = link_to project.name, project
        - if can? :crud, project
          .project-actions
            = link_to [:edit, project] do
              = icon('edit')
            = link_to project, data: { confirm: 'This action cannot be undone. Are you sure?' }, method: :delete do
              = icon('minus-sign')
      td = l project.created_at, format: :short
      td
        - if project.comments.any?
          = link_to project.comments.count, project_path(project, anchor: 'comments'), class: 'label label-default'
      td
        span.label.label-default = project.first_choice_application_drafts.count
      td
        span.label.label-default = project.second_choice_application_drafts.count
      td = project_status project


- show_milliseconds = show_milliseconds.nil? ? false : show_milliseconds
- if time == 0
  | -
- else
  - if time > 0
    span.red
      | +
      = Time.at(time).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time).utc.strftime(".%2N")
  - if time < 0
    span.green
      | -
      = Time.at(time).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time.abs).utc.strftime(".%2N")
  - if time == 0
    span
      = Time.at(time).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time).utc.strftime(".%2N")

Fix green rival comparison times being wildly inaccurate

- show_milliseconds = show_milliseconds.nil? ? false : show_milliseconds
- if time == 0
  | -
- else
  - if time > 0
    span.red
      | +
      = Time.at(time).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time).utc.strftime(".%2N")
  - if time < 0
    span.green
      | -
      = Time.at(time.abs).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time.abs).utc.strftime(".%2N")
  - if time == 0
    span
      = Time.at(time).utc.strftime("%k:%M:%S")
      - if show_milliseconds
        small = Time.at(time).utc.strftime(".%2N")


- if current_user.try(:internal_user?)
  ul.nav.navbar-nav
    li.dropdown
      a.dropdown-toggle data-toggle='dropdown' href='#'
        = t('shared.administration')
        span.caret
      ul.dropdown-menu role='menu'
        - if current_user.admin?
          li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
          li.divider
        - models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, FileTemplate, InternalUser].sort_by { |model| model.model_name.human(count: 2) }
        - models.each do |model|
          - if policy(model).index?
            li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))

Add error template views to navigation

- if current_user.try(:internal_user?)
  ul.nav.navbar-nav
    li.dropdown
      a.dropdown-toggle data-toggle='dropdown' href='#'
        = t('shared.administration')
        span.caret
      ul.dropdown-menu role='menu'
        - if current_user.admin?
          li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
          li.divider
        - models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, FileTemplate,
                ErrorTemplate, ErrorTemplateAttribute, InternalUser].sort_by { |model| model.model_name.human(count: 2) }
        - models.each do |model|
          - if policy(model).index?
            li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))


-if !flash.empty?
  div.content-container.alert-container
    -flash.each do |key, value|
      div class="alert alert-#{key} content-body-alert" role="alert"
        -if key == "success"
          i.fa.fa-check-circle aria-hidden="true"
        -elsif key == "error"
          i.fa.fa-times-circle aria-hidden="true"
        -elsif key == "info"
          i.fa.fa-info-circle aria-hidden="true"
        -elsif key == "warning"
          i.fa.fa-exclamation-triangle aria-hidden="true"
        ==value
        button.close aria-hidden="false" aria-label="Close" data-dismiss="alert" type="button" ×
      hr.hidden

Change devise alert and notice to error and info for proper display

-if !flash.empty?
  div.content-container.alert-container
    -flash.each do |key, value|
      - if key == "alert"
        - key = "error"
      - if key == "notice"
        - key = "info"
      div class="alert alert-#{key} content-body-alert" role="alert"
        -if key == "success"
          i.fa.fa-check-circle aria-hidden="true"
        -elsif key == "error"
          i.fa.fa-times-circle aria-hidden="true"
        -elsif key == "info"
          i.fa.fa-info-circle aria-hidden="true"
        -elsif key == "warning"
          i.fa.fa-exclamation-triangle aria-hidden="true"
        ==value
        button.close aria-hidden="false" aria-label="Close" data-dismiss="alert" type="button" ×
      hr.hidden


- provide(:page_content_class, "multi-page page-account")

header.page-header.group.page-header-over-sidebar
  div
    h1
      ' Account details

.steps-progress-container
  .steps-progress-content
    header.page-header.group
      div
        h2
          ' Organisation Details

    .article-container.sic-code
      article.group role="article"
        .inner
          p If you're nominating an individual for the Enterprise Promotion award, this section is optional.

          br

          = simple_form_for current_user, url: update_company_details_account_path, builder: SimpleForm::AccountFormBuilder, html: { class: "qae-form", id: "account-form" } do |f|
            = render "form_company_details", f: f

            footer
              nav.pagination.no-border role="navigation" aria-label="Pagination"
                ul.group
                  li.previous.previous-alternate
                    = link_to correspondent_details_account_path, rel: "prev", title: "Navigate to previous part" do
                      span class="pagination-label"
                        ' Back

                  li.submit
                    = f.submit "Save and continue", class: "button"

  = render "steps_progress_bar"

Remove unwanted text from company details page.

- provide(:page_content_class, "multi-page page-account")

header.page-header.group.page-header-over-sidebar
  div
    h1
      ' Account details

.steps-progress-container
  .steps-progress-content
    header.page-header.group
      div
        h2
          ' Organisation Details

    .article-container.sic-code
      article.group role="article"
        .inner
          = simple_form_for current_user, url: update_company_details_account_path, builder: SimpleForm::AccountFormBuilder, html: { class: "qae-form", id: "account-form" } do |f|
            = render "form_company_details", f: f

            footer
              nav.pagination.no-border role="navigation" aria-label="Pagination"
                ul.group
                  li.previous.previous-alternate
                    = link_to correspondent_details_account_path, rel: "prev", title: "Navigate to previous part" do
                      span class="pagination-label"
                        ' Back

                  li.submit
                    = f.submit "Save and continue", class: "button"

  = render "steps_progress_bar"


#disqus_thread

javascript:
  /!* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
  var disqus_shortname = '#{config.disqus_id}';
  var disqus_developer = #{production? ? 0 : 1};
  var disqus_identifier = '#{disqus_identifier}';

  /!* * * DON'T EDIT BELOW THIS LINE * * */
  disqus = function() {
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  }

  disqus();

noscript
  | Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a

Use developer login config option to determine if Disqus is used in developer mode

#disqus_thread

javascript:
  /!* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
  var disqus_shortname = '#{config.disqus_id}';
  var disqus_developer = #{Schnitzelpress.config.developer_login? ? 0 : 1};
  var disqus_identifier = '#{disqus_identifier}';

  /!* * * DON'T EDIT BELOW THIS LINE * * */
  disqus = function() {
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  }

  disqus();

noscript
  | Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a


doctype html
html
  head
    title Rubyist Connect
    = favicon_link_tag 'favicon.ico'
    = favicon_link_tag 'touch-icon-iphone.png', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-ipad.png', :sizes => '76x76', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-iphone-retina.png', :sizes => '120x120', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-ipad-retina.png', :sizes => '152x152', :rel => 'apple-touch-icon', :type => 'image/png'
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body.toppage
    = yield
    = render 'layouts/flash_messages'

Add viewport setting to toppage

doctype html
html
  head
    meta name="viewport" content="width=device-width"
    title Rubyist Connect
    = favicon_link_tag 'favicon.ico'
    = favicon_link_tag 'touch-icon-iphone.png', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-ipad.png', :sizes => '76x76', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-iphone-retina.png', :sizes => '120x120', :rel => 'apple-touch-icon', :type => 'image/png'
    = favicon_link_tag 'touch-icon-ipad-retina.png', :sizes => '152x152', :rel => 'apple-touch-icon', :type => 'image/png'
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body.toppage
    = yield
    = render 'layouts/flash_messages'


= component_tag_for hover_group do
  .outer
    = hover_group.decorate.background

    - inner_content = capture do
      = 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

      = render partial: 'components/hover_item/modal',
        collection: hover_group.items, as: :hover_item

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

Fix hover group - Render item passing the object instead the key

= component_tag_for hover_group do
  .outer
    = hover_group.decorate.background

    - inner_content = capture do
      = 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

      .clearfix

      = render partial: 'components/hover_item/modal',
        collection: hover_group.items, as: :hover_item

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


== t('mailers.user_mailer.send_thank_you_note.body',
        receiver_displayname: @receiver_displayname,
        link_to_comment: link_to(@rfc_link, @rfc_link),
        author: @author.displayname,
        thank_you_note: @thank_you_note )

Fix sending a "Thank you note" mail

== t('mailers.user_mailer.send_thank_you_note.body',
        receiver_displayname: @receiver_displayname,
        link_to_comment: link_to(@rfc_link, @rfc_link),
        author: @author,
        thank_you_note: @thank_you_note )


p Aloha #{@customer.first_name},

p
  | Nous avons rentré des articles qui correspondent à vos critères de recherche.
  br
  strong
    = link_to "Modifier mes critères de recherche", \
              "https://www.petitkiwi.be/pages/alertes", \
              target: '_blank'

- @collections.each do |collection|
  h2
    => collection.last[:title]
    - if !collection.last[:parents].nil?
      br
      small(style="color: #666; font-weight: 300")
        = collection.last[:parents].reverse.join(' → ')
    br
    small
      | 🆕
      = link_to "#{collection.last[:count]} articles déposés", \
              "https://www.petitkiwi.be/collections/#{collection.last[:handle]}"

p
  | Bonne journée,

p
  | L'équipe de Petit Kiwi
  br
  = link_to "https://www.petitkiwi.be", "https://www.petitkiwi.be"

Update alert email sent to customers

p Aloha #{@customer.first_name},

p
  | Nous avons rentré des articles qui correspondent à vos critères de recherche.
  br
  strong
    = link_to 'Modifier mes critères de recherche', \
              'https://www.petitkiwi.be/pages/mon-alerte-email', \
              target: '_blank'

- @collections.each do |collection|
  h2
    = link_to collection.last[:title], "https://www.petitkiwi.be/collections/#{collection.last[:handle]}"
    - if !collection.last[:parents].nil?
      br
      small(style="color: #666; font-weight: 300")
        = collection.last[:parents].reverse.join(' → ')

p
  | Bonne journée,

p
  | L'équipe de Petit Kiwi
  br
  = link_to 'www.petitkiwi.be', 'https://www.petitkiwi.be'


.row
  .span12
    p.data-updated-at.pull-right
      | Dados atualizados em <b>#{'31/12/2013'}</b>.
.row
  .span4.value-box.authorized-budget
    h4
      | Orçamento Autorizado
      br
      small[ng-cloak]
        | (referente à {{year}} · em R$)
    .large-number[title="{{autorizado | currency:'R$ '}}"
      ng-bind="autorizado | roundedCurrency"]
    p.percentual
      | 100%
  .span4.value-box.payments
    h4
      | Pagamentos
      br
      small
        | (Pago + RP Pago · em R$)
    .large-number[title="{{pagamentos | currency:'R$ '}}"
      ng-bind="pagamentos | roundedCurrency"]
    p.percentual
      | {{percentualExecutado | percentual}}
  .span4.value-box.not-executed
    h4
      | Não Executado
      br
      small
        | (Autorizado − Pagamentos · em R$)
    .large-number[title="{{naoExecutado | currency:'R$ '}}"
      ng-bind="naoExecutado | roundedCurrency"]
    p.percentual
      | {{percentualNaoExecutado | percentual}}

Remove repetições de "em R$" no monitor.

.row
  .span12
    p.data-updated-at.pull-right
      | Dados atualizados em <b>#{'31/12/2013'}</b>. Valores em Reais.
.row
  .span4.value-box.authorized-budget
    h4
      | Orçamento Autorizado
      br
      small[ng-cloak]
        | (referente à {{year}})
    .large-number[title="{{autorizado | currency:'R$ '}}"
      ng-bind="autorizado | roundedCurrency"]
    p.percentual
      | 100%
  .span4.value-box.payments
    h4
      | Pagamentos
      br
      small
        | (Pago + RP Pago)
    .large-number[title="{{pagamentos | currency:'R$ '}}"
      ng-bind="pagamentos | roundedCurrency"]
    p.percentual
      | {{percentualExecutado | percentual}}
  .span4.value-box.not-executed
    h4
      | Não Executado
      br
      small
        | (Autorizado − Pagamentos)
    .large-number[title="{{naoExecutado | currency:'R$ '}}"
      ng-bind="naoExecutado | roundedCurrency"]
    p.percentual
      | {{percentualNaoExecutado | percentual}}


- if current_user.try(:internal_user?)
  ul.nav.navbar-nav
    li.dropdown
      a.dropdown-toggle data-toggle='dropdown' href='#'
        = t('shared.administration')
        span.caret
      ul.dropdown-menu role='menu'
        - if current_user.admin?
          li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
          li.divider
        - models = [ExecutionEnvironment, Exercise, Consumer, ExternalUser, FileType, InternalUser, Submission, Team].sort_by { |model| model.model_name.human(count: 2) }
        - models.each do |model|
          - if policy(model).index?
            li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))

Add CodeHarbor links to administation navigation

- if current_user.try(:internal_user?)
  ul.nav.navbar-nav
    li.dropdown
      a.dropdown-toggle data-toggle='dropdown' href='#'
        = t('shared.administration')
        span.caret
      ul.dropdown-menu role='menu'
        - if current_user.admin?
          li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
          li.divider
        - models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, InternalUser, Submission, Team].sort_by { |model| model.model_name.human(count: 2) }
        - models.each do |model|
          - if policy(model).index?
            li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))


= player page.asciicast, page.playback_options
p.powered
  ' Powered by
  a href=root_url target="_top" asciinema

javascript:

  var player = document.getElementById('player');

  player.addEventListener('attached', function() {
    var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
    if (typeof target != "undefined" && window !== window.parent) {
      var w = player.getElementsByClassName('asciinema-player')[0].offsetWidth;
      var h = Math.max(document.body.scrollHeight, document.body.offsetHeight);
      target.postMessage(['asciicast:size', { width: w, height: h }], '*');
    }

    function onMessage(e) {
      if (e.data == 'asciicast:play' || e.data[0] == 'asciicast:play') {
        player.play();
      }

      // reveal.js support

      if (e.data == 'slide:start') {
        player.play();
      } else if (e.data == 'slide:stop') {
        player.pause();
      }
    }

    window.addEventListener("message", onMessage, false);
  });

Update text in embed iframe

= player page.asciicast, page.playback_options
p.powered
  ' Recorded with
  a href=root_url target="_top" asciinema

javascript:

  var player = document.getElementById('player');

  player.addEventListener('attached', function() {
    var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
    if (typeof target != "undefined" && window !== window.parent) {
      var w = player.getElementsByClassName('asciinema-player')[0].offsetWidth;
      var h = Math.max(document.body.scrollHeight, document.body.offsetHeight);
      target.postMessage(['asciicast:size', { width: w, height: h }], '*');
    }

    function onMessage(e) {
      if (e.data == 'asciicast:play' || e.data[0] == 'asciicast:play') {
        player.play();
      }

      // reveal.js support

      if (e.data == 'slide:start') {
        player.play();
      } else if (e.data == 'slide:stop') {
        player.pause();
      }
    }

    window.addEventListener("message", onMessage, false);
  });


nav.clearfix.l-nav-container aria-label='navigation' itemscope='' itemtype='http://schema.org/SiteNavigationElement'
  ul class="clearfix sub-nav #{even_or_odd_menu_item(@menu_elements_header)}"
    - Menu.online.only_parents.with_page.each do |element|
      li class="l-nav-item #{set_active_class(element.category_name.tableize)}"
        = link_to element.title, element.decorate.menu_link(element.category.name), class: 'l-nav-item-link', itemprop: 'url'

  = link_to 'Menu', '#', id: 'pull', class: 'l-nav-item-link header__icon'

Fix bug with menu items showing up

nav.clearfix.l-nav-container aria-label='navigation' itemscope='' itemtype='http://schema.org/SiteNavigationElement'
  ul class="clearfix sub-nav #{even_or_odd_menu_item(@menu_elements_header)}"
    - @menu_elements_header.each do |element|
      li class="l-nav-item #{set_active_class(element.category_name.tableize)}"
        = link_to element.title, element.decorate.menu_link(element.category.name), class: 'l-nav-item-link', itemprop: 'url'

  = link_to 'Menu', '#', id: 'pull', class: 'l-nav-item-link header__icon'


Add initial version of the edit template

= form_for @form, as: :online_application, url: online_application_path, method: :put, html: { autocomplete: 'off' } do |f|

  header
    h2 Application details

  .row
    .small-12.medium-8.large-5.columns
      .row.collapse.prefix-radius
        h4 Full name
        p= @online_application.last_name

      .form-group
        = f.label :fee
        = f.label :fee, @form.errors[:fee].join(', '), class: 'error' if @form.errors[:fee].present?
        .row.collapse.prefix-radius
          .small-2.medium-2.large-2.columns
            span.prefix
              = f.label :fee, '£', class: 'inline'
          .small-10.medium-10.large-10.columns
            = f.text_field :fee, { value: "#{@form.fee.to_f.floor if @form.fee}", class: 'form-control small-field' }

      .form-group
        .row.collapse
          .columns.small-12
            = f.label :jurisdiction_id
            = f.label :jurisdiction_id, @form.errors[:jurisdiction_id].join(', '), class: 'error' if @form.errors[:jurisdiction_id].present?
            = f.hidden_field :jurisdiction_id, value: nil
            - if @jurisdictions.present?
              .options.radio
                =f.collection_radio_buttons(:jurisdiction_id, @jurisdictions, :id, :display_full, include_hidden: true) do |b|
                  .option
                    = b.label do
                      = b.radio_button(class: 'form-control', data: @form.jurisdiction_id)
                      = b.text
            - else
              = t('error_messages.jurisdictions.none_in_office')

      .form-group
        = f.label :form_name
          =t('form_name', scope: @form.i18n_scope)
        = f.label :form_name, @form.errors[:form_name].join(', '), class: 'error' if @form.errors[:form_name].present?
        = f.text_field :form_name, { class: 'form-control' }

      .form-group
        .options.radio
          .option
            = f.label :emergency
              = f.check_box :emergency, { class: 'show-hide-checkbox', data: { section: 'emergency' } }
              = t('emergency', scope: @form.i18n_scope)

      #emergency-only.start-hidden
        .form-group.panel-indent
          = f.label :emergency_reason
          = f.label :emergency_reason, @form.errors[:emergency_reason].join(', '), class: 'error' if @form.errors[:emergency_reason].present?
          = f.text_area :emergency_reason, { class: 'form-control' }

      = f.submit 'Next', class: 'button primary'

    .large-5.columns
      .guidance
        h4 Emergency cases


= form_for @pv_query, :validate => true, remote: true, html: {class: 'form-horizontal'} do |f|
  = render 'shared/error_messages', object: f.object
  fieldset.row
    .col-xs-12.col-sm-4
      .form-group
        = f.label :postcode_id, 'Postcode', min: '221', max: '9999', class: 'col-xs-3 col-sm-5 control-label'
        = f.number_field :postcode_id, class: 'form-control'
  = f.fields_for :panels do |builder|
    = render 'panel_fields', f: builder
  = link_to 'add panel', '', class: 'btn btn-default add_fields', remote: true
  = f.submit 'view output', class: "btn btn-default btn-primary"

Set postcode field to tabindex 1...

= form_for @pv_query, :validate => true, remote: true, html: {class: 'form-horizontal'} do |f|
  = render 'shared/error_messages', object: f.object
  fieldset.row
    .col-xs-12.col-sm-4
      .form-group
        = f.label :postcode_id, 'Postcode', min: '221', max: '9999', class: 'col-xs-3 col-sm-5 control-label'
        = f.number_field :postcode_id, class: 'form-control', tabindex: '1'
  = f.fields_for :panels do |builder|
    = render 'panel_fields', f: builder
  = link_to 'add panel', '', class: 'btn btn-default add_fields', remote: true
  = f.submit 'view output', class: "btn btn-default btn-primary"


meta name='viewport' content='width=device-width, initial-scale=1.0'
= stylesheet_link_tag 'application', :media => 'all'
= javascript_include_tag 'application'
= styx_initialize
link rel='shortcut icon' href=asset_path('favicon.ico')
= display_meta_tags site: t(:app_name), description: t(:app_description), keywords: 'Leitner, Leitner system, Sebastian Leitner, flashcards, spaced repetition, learning foreign language, foreign language, english, russian, foreign, language, exercises, learn, Лейтнер, система Лейтнера, иностранные языки, английский язык, самоучитель', separator: '–', reverse: false

Return csrf_meta_tags in application layout

meta name='viewport' content='width=device-width, initial-scale=1.0'
= stylesheet_link_tag 'application', :media => 'all'
= javascript_include_tag 'application'
= styx_initialize
link rel='shortcut icon' href=asset_path('favicon.ico')
= display_meta_tags site: t(:app_name), description: t(:app_description), keywords: 'Leitner, Leitner system, Sebastian Leitner, flashcards, spaced repetition, learning foreign language, foreign language, english, russian, foreign, language, exercises, learn, Лейтнер, система Лейтнера, иностранные языки, английский язык, самоучитель', separator: '–', reverse: false
= csrf_meta_tags


- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  div.row
    div.col-lg-2.col-md-3.col-sm-4
      nav role="navigation"
        div.collapse.navbar-collapse#course-navigation-navbar
          ul.nav.nav-pills.nav-stacked
            - controller.sidebar.each do |item|
              li
                = link_to(item[:path]) do
                  = item[:title]
                  span.unread
                    = badge(item[:unread]) if item[:unread]

    div.col-lg-10.col-md-9.col-sm-8
      = yield

Fix sidebar bubble (should not be displayed when unread count is 0)

- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  div.row
    div.col-lg-2.col-md-3.col-sm-4
      nav role="navigation"
        div.collapse.navbar-collapse#course-navigation-navbar
          ul.nav.nav-pills.nav-stacked
            - controller.sidebar.each do |item|
              li
                = link_to(item[:path]) do
                  = item[:title]
                  span.unread
                    = badge(item[:unread]) if item[:unread] && item[:unread] > 0

    div.col-lg-10.col-md-9.col-sm-8
      = yield


- title t('.title')
- breadcrumb :speakers
/ TODO: Set page banner

section.team-area-v2
  .container
    .sec-title.text-center
      .underlay.text-center
        h2 = t('.speakers')
      h1 = t('.speakers')
    - @speakers.in_groups_of(4) do |speakers|
      .row
        - speakers.compact.each do |speaker|
          .col-lg-3.col-md-6.col-sm-6.col-xs-12
            .single-team-member
              .img-holder
                = image_tag speaker.avatar_url(:v1)
                .overlay-style-one
                  .box
                    .content
                      .text
                        p = truncate strip_tags(speaker.description), length: 150

              .text-holder.text-center
                h3 = link_to speaker.name, speaker
                span = speaker.title

Remove hover text on speaker list

- title t('.title')
- breadcrumb :speakers
/ TODO: Set page banner

section.team-area-v2
  .container
    .sec-title.text-center
      .underlay.text-center
        h2 = t('.speakers')
      h1 = t('.speakers')
    - @speakers.in_groups_of(4) do |speakers|
      .row
        - speakers.compact.each do |speaker|
          .col-lg-3.col-md-6.col-sm-6.col-xs-12
            .single-team-member
              .img-holder
                = link_to speaker do
                  = image_tag speaker.avatar_url(:v1)

              .text-holder.text-center
                h3 = link_to speaker.name, speaker
                span = speaker.title


.row
  .col-md-6
    h2 Editar lugar
    = render partial: 'form', locals: { venue: @venue }

  - if render_map_available?(@venue)
    .col-md-6
      h2 Mapa
      = render_map @venue, height: 295 if render_map_available?(@venue)

Remove duplicated conditional for map rendering


.basic-container
  .notebook-info
    span.glyphicon.glyphicon-tag Showing a note from
    = link_to(@note.notebook.name, notebook_path(@note.notebook))
    ' notebook.
  - if @note.live?
    .versions
      | This is a current version of this note.

- if !@note.live?
  .basic-container
    | This is an archived version!
= render @note

Make info headers more readable, add icons

.basic-container
  .notebook-info
    span.glyphicon.glyphicon-file
    '  Showing a note from
    = link_to(@note.notebook.name, notebook_path(@note.notebook))
    '  notebook

.basic-container
  - if !@note.live?
    span.glyphicon.glyphicon-floppy-disk
    '  This is an archived version!
  - else
    span.glyphicon.glyphicon-ok
    '  This is the current version of this note.
= render @note


.row(ng-app="kassa")
  .col-xs-12
    .row
      nav(ng-controller="NavigationCtrl")
        ul
          li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
            a(ng-href="{{route.href}}") {{route.name}}
          li
            a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()') {{session.currentUser().username}}
          li
            a(ng-href="{{routes[0]}}" ng-click='session.signOut()')= t('navigation.title.sign_out')
    .row(ng-view)

Remove fake sign out url

.row(ng-app="kassa")
  .col-xs-12
    .row
      nav(ng-controller="NavigationCtrl")
        ul
          li(ng-repeat="route in routes" ng-class='{active: isCurrent(route)}')
            a(ng-href="{{route.href}}") {{route.name}}
          li
            a(ng-href="/users/{{session.currentUser().id}}" ng-click='session.signOut()') {{session.currentUser().username}}
          li
            a(href="" ng-click='session.signOut()')= t('navigation.title.sign_out')
    .row(ng-view)


- award_applications = FormAnswerDecorator.decorate_collection(award_applications)
- unsuccessful = unsuccessful_collection(award_applications)
- if unsuccessful.present?
  .container-split
    .content-left
      h2 Unsuccessful
    .content-right.content-offset-36
      p
        ' Your
        - if unsuccessful.length == 1
          ' application was
        - else
          ' applications were
        ' unsuccessful.
    .clear
  - unsuccessful.each do |award|
    .container-split.award-list
      .content-left
        h3
          = award.application_name
          small
            = award.award_type
            '  Award
      .content-right.content-offset-24
        / Nominators don't get any options after submision
        - if award.promotion?
          p Unfortunately your nomination was unsuccessful.
        - else
          h4 Feedback
          - if award.feedback.try(:approved?)
            p
              ' Please
              = link_to "download and read the feedback document", users_form_answer_feedback_path(award.feedback, format: :pdf)
              '  so you can better understand our decision. We hope it will help you to improve your future applications.
          - else
            p You will be notified when your feedback is ready.
      .clear
  br
  br

Fix post submission feedback link to use award id

- award_applications = FormAnswerDecorator.decorate_collection(award_applications)
- unsuccessful = unsuccessful_collection(award_applications)
- if unsuccessful.present?
  .container-split
    .content-left
      h2 Unsuccessful
    .content-right.content-offset-36
      p
        ' Your
        - if unsuccessful.length == 1
          ' application was
        - else
          ' applications were
        ' unsuccessful.
    .clear
  - unsuccessful.each do |award|
    .container-split.award-list
      .content-left
        h3
          = award.application_name
          small
            = award.award_type
            '  Award
      .content-right.content-offset-24
        / Nominators don't get any options after submision
        - if award.promotion?
          p Unfortunately your nomination was unsuccessful.
        - else
          h4 Feedback
          - if award.feedback.try(:approved?)
            p
              ' Please
              = link_to "download and read the feedback document", users_form_answer_feedback_path(award, format: :pdf)
              '  so you can better understand our decision. We hope it will help you to improve your future applications.
          - else
            p You will be notified when your feedback is ready.
      .clear
  br
  br


.row
  .small-12.columns
    == partial :_dashboard
  .small-20.columns
    == partial :_profile
.marginT10
.row
  .small-32.columns
    label Username or email
  .small-32.columns
    input#username-disabled type="text" disabled="" placeholder="vasilakisfil"
  .small-32.columns
    label Password
  .small-32.columns
    input type="password"
.row
  .small-12.columns
    == partial :_trends
    .marginT10
    == partial :_twitter_links
  .small-20.columns
    == partial :_tweets

Remove unwanted input tags in main page

.row
  .small-12.columns
    == partial :_dashboard
  .small-20.columns
    == partial :_profile
.marginT10
.row
  .small-12.columns
    == partial :_trends
    .marginT10
    == partial :_twitter_links
  .small-20.columns
    == partial :_tweets


= simple_form_for @project, html: { class: 'project-form w-form' } do |form|
  .w-section.section
    .w-container
      .w-row
        .w-col.w-col-10.w-col-push-1
          .u-marginbottom-60.u-text-center
            .w-inline-block.card.fontsize-small.u-radius
              span.fa.fa-fw.fa-lightbulb-o
              | Veja exemplos de
              a.alt-link href="http://crowdfunding.catarse.me/videomakers?ref=ctrse_dashboard_video" target="_blank"  vídeos de sucesso no Catarse!
          .w-form
              = @project.display_errors(:video)
              .w-row.u-marginbottom-30.card.card-terciary.medium
                .w-col.w-col-6
                  label.field-label.fontweight-semibold = t(".#{@project.mode}.video_url").html_safe
                  label.field-label.fontsize-smallest.fontcolor-secondary = t(".#{@project.mode}.video_url_subtitle").html_safe
                  - if @project.draft?
                    label.field-label.fontsize-smallest.fontcolor-secondary.fontweight-bold = t(".#{@project.mode}.video_url_hint")
                .w-col.w-col-6
                  = form.input :video_url, as: :string,
                    label: '',
                    hint: false,
                    input_html: { class: 'positive medium', required: false },
                    validation_text: false
  .w-section.save-draft-btn-section
    .w-container
      .w-row
        .w-col.w-col-4.w-col-push-4
          = hidden_field_tag 'anchor', 'video'
          = form.hidden_field :project_id, value: @project.id
          = form.button :submit, t('.submit'),  class:'btn btn-medium', id: 'project-save'

Move dashboard video to mithril component

- parameters = { project_id: @project.id, user_id: @project.user_id, rails_errors: @project.errors.to_json }.to_json

.w-row
  .w-col.w-col-10.w-col-push-1
#project-edit-video data-mithril='projectEditVideo' data-parameters=parameters


nav.actions
  ul
    li = link_to icon('plus', 'New Conference'), new_conference_path, class: 'btn btn-small' if can? :create, Conference.new

h1.header
  / = icon('group')
  span Conferences

table.table.table-striped.table-bordered.table-condensed.conferences
  tr
    th = sortable 'name', 'Conference'
    th = sortable 'location', 'Location'
    th = sortable 'starts_on', 'Date'
    th Attendees
    th Tickets left

  - conferences.each do |conference|
    tr
      td = link_to conference.name, conference
      td = conference.location
      td = format_conference_date(conference.starts_on, conference.ends_on)
      td = conference.attendees.any? ? links_to_attendances(conference).join(', ').html_safe : '-'
      td = conference.tickets_left

Add link to 'View as Calendar' in Conferences page

nav.actions
  ul
    li = link_to icon('plus', 'New Conference'), new_conference_path, class: 'btn btn-small' if can? :create, Conference.new

h1.header
  / = icon('group')
  span Conferences

table.table.table-striped.table-bordered.table-condensed.conferences
  tr
    th = sortable 'name', 'Conference'
    th = sortable 'location', 'Location'
    th = sortable 'starts_on', 'Date'
    th Attendees
    th Tickets left

  - conferences.each do |conference|
    tr
      td = link_to conference.name, conference
      td = conference.location
      td = format_conference_date(conference.starts_on, conference.ends_on)
      td = conference.attendees.any? ? links_to_attendances(conference).join(', ').html_safe : '-'
      td = conference.tickets_left

p = link_to "View as Calendar", calendar_index_path


table
  thead
    tr
      td
      td Medication
      td Route
  tbody
    - medications.each do |medication|
      tr
        td
          = link_to "Edit", edit_patient_medication_path(patient, medication), remote: true
          = pipe_separator
          = link_to "Terminate", patient_medication_path(patient, medication), method: :delete,
              remote: true, data: { confirm: "Are you sure?" }
        td= medication.drug.name
        td= medication.medication_route.name == 'Route: Other (Please specify in notes)' ? medication.medication_route.full_name : medication.medication_route.name

.right
  = link_to "Add Medication", new_patient_medication_path(patient, treatable), remote: true, class: %i(button tiny)

Add additional attributes to medications list

table
  thead
    tr
      td
      td Medication
      td Drug Type
      td Dose
      td Frequency
      td Route
      td Provider
      td Prescribed on
  tbody
    - medications.each do |medication|
      tr
        td
          = link_to "Edit", edit_patient_medication_path(patient, medication), remote: true
          = pipe_separator
          = link_to "Terminate", patient_medication_path(patient, medication), method: :delete,
              remote: true, data: { confirm: "Are you sure?" }
        td= medication.drug.name
        td= medication.drug.drug_types.map(&:name).join(", ")
        td= medication.dose
        td= medication.frequency
        td= medication.medication_route.name == 'Route: Other (Please specify in notes)' ? medication.medication_route.full_name : medication.medication_route.name
        td= I18n.t("enums.provider.#{medication.provider}")
        td= medication.start_date

.right
  = link_to "Add Medication", new_patient_medication_path(patient, treatable), remote: true, class: %i(button tiny)


- if ["new", "create"].include?(params[:action])
  h3 作品 / エピソード登録の基準
  p
    | OVAなどを登録するとき、作品として登録するかエピソードとして登録するか判断に迷うときがあります。
    | Annictでは以下のような基準で判断しています。

  h4
    b 1. TVシリーズ円盤の特典OVA
  p TVシリーズの作品にエピソードとして登録します。

  h4
    b 2. 単体で発売されるOVA, OAD
  p
    | 話数がTVシリーズ準拠の場合は、TVシリーズの作品にエピソードとして登録します。
    | 話数がTVシリーズ準拠でない場合は、別作品として登録します。

  h4
    b 3. 映画
  p
    | 話数がTVシリーズ準拠でも別作品として登録します。
    | 3部作のような場合は、3つの作品として登録します。(1部ごとにリリース時期やスタッフが違ったりするため)

  - if user_signed_in? && current_user.committer?
    p 判断に迷ったときは直接登録せず、Annict Forumで他の編集者さんや管理者までご相談ください。m(__)m

  hr

Update text about how to add works

- if ["new", "create"].include?(params[:action])
  h3 作品 / エピソード登録の基準
  p
    | OVAなどを登録するとき、作品として登録するかエピソードとして登録するか判断に迷うときがあります。
    | Annictでは以下のような基準で判断しています。

  h4
    b 1. OVA (OAD)
  p
    | TVシリーズが過去存在しない単発のOVAは作品として登録します。
    | また、TVシリーズと関連するOVAの場合も、メディアがTVとOVAとで異なるため、別作品として登録します。

  h4
    b 2. 映画
  p
    | OVAと同様にメディアが異なるため、話数がTVシリーズ準拠でも別作品として登録します。
    | 3部作のような場合は、3つの作品として登録します。(1部ごとにリリース時期やスタッフが違ったりするため)

  - if user_signed_in? && current_user.committer?
    p 判断に迷ったときは直接登録せず、Annict Forumで他の編集者さんや管理者までご相談ください。m(__)m

  hr


= f.simple_fields_for attribute, f.object.public_send(attribute) do |fd|
  .blood-pressure class=('with-errors' if fd.object.errors.any?)
    .row
      .small-5.medium-4.large-3.columns
        = fd.label :age, f.object.class.human_attribute_name(attribute), class: "right inline"
      .small-2.medium-1.columns
        = fd.input :systolic, as: :integer,
            placeholder: "syst",
            error: false,
            label: false, wrapper: "vertical_form"
      .small-2.medium-1.columns.end
        = fd.input :diastolic, as: :integer,
            placeholder: "dias",
            error: false,
            label: false, wrapper: "vertical_form"

    - if fd.object.errors.any?
      .row
        .error.small-offset-5.medium-offset-4.large-offset-3.small-3.columns
          = fd.error(:systolic) || fd.error(:diastolic)

Remove number-only browser filtering on blood pressures

= f.simple_fields_for attribute, f.object.public_send(attribute) do |fd|
  .blood-pressure class=('with-errors' if fd.object.errors.any?)
    .row
      .small-5.medium-4.large-3.columns
        = fd.label :age, f.object.class.human_attribute_name(attribute), class: "right inline"
      .small-2.medium-1.columns
        = fd.input :systolic,
            placeholder: "syst",
            error: false,
            label: false, wrapper: "vertical_form"
      .small-2.medium-1.columns.end
        = fd.input :diastolic,
            placeholder: "dias",
            error: false,
            label: false, wrapper: "vertical_form"

    - if fd.object.errors.any?
      .row
        .error.small-offset-5.medium-offset-4.large-offset-3.small-3.columns
          = fd.error(:systolic) || fd.error(:diastolic)


= f.hidden_field :lang,
                 value: params[:locale]
= f.input :comment,
          as: :text,
          input_html: { class: 'autosize', style: 'height: 120px' }
= f.input :nickname,
          label: false,
          input_html: { class: 'hide-for-small-up' }

.submit-and-loader
  = image_tag(Figaro.env.loader_spinner_img, class: 'submit-loader')
  = button_tag(class: 'submit-btn text-right tiny') do
    - fa_icon('paper-plane')

Fix bug with parent_id not set in comment form

= f.hidden_field :lang,
                 value: params[:locale]
= f.input :comment,
          as: :text,
          input_html: { class: 'autosize', style: 'height: 120px' }
= f.input :nickname,
          label: false,
          input_html: { class: 'hide-for-small-up' }

- if params[:action] == 'reply'
  = f.hidden_field :parent_id,
                   label: false,
                   input_html: { class: 'hide-for-small-up' }

.submit-and-loader
  = image_tag(Figaro.env.loader_spinner_img, class: 'submit-loader')
  = button_tag(class: 'submit-btn text-right tiny') do
    - fa_icon('paper-plane')


= cache [:admin, post] do
  = content_tag_for :tr, post, :"data-post-id" => post.id, :"data-state" => post.state, :"data-ready-for-review" => post.ready_for_review do
    td= post.title
    td= post.author_email
    td.span2.published-at = post.published_at.try(:to_s, :crowdblog_short)
    td.span1
      - if current_user.is_publisher?
        = link_to 'Publish', '#', :class => "btn btn-small publish-btn btn-danger #{(post.published? ? 'draft' : 'publish')}"
    td.span1
      .btn-group.states
        button.btn.btn-small.draft Drafted
        button.btn.btn-small.finish Finished
        - if !current_user.is_publisher?
          button.btn.btn-small.disabled.publish-status
        - if current_user.is_publisher?
          button.btn.btn-small.review Reviewed
    td.span1
      = link_to 'Delete', crowdblog.admin_post_path(post), :method => :delete, :confirm => 'Are you sure?', :class => "btn btn-small"
    td.span1
      = link_to 'Edit', crowdblog.edit_admin_post_path(post), :class => "btn btn-small"

Fix deprecation message regarding data: { confirm: 'message' }

= cache [:admin, post] do
  = content_tag_for :tr, post, :"data-post-id" => post.id, :"data-state" => post.state, :"data-ready-for-review" => post.ready_for_review do
    td= post.title
    td= post.author_email
    td.span2.published-at = post.published_at.try(:to_s, :crowdblog_short)
    td.span1
      - if current_user.is_publisher?
        = link_to 'Publish', '#', :class => "btn btn-small publish-btn btn-danger #{(post.published? ? 'draft' : 'publish')}"
    td.span1
      .btn-group.states
        button.btn.btn-small.draft Drafted
        button.btn.btn-small.finish Finished
        - if !current_user.is_publisher?
          button.btn.btn-small.disabled.publish-status
        - if current_user.is_publisher?
          button.btn.btn-small.review Reviewed
    td.span1
      = link_to 'Delete', crowdblog.admin_post_path(post), :method => :delete, :data => { :confirm => 'Are you sure?' }, :class => "btn btn-small"
    td.span1
      = link_to 'Edit', crowdblog.edit_admin_post_path(post), :class => "btn btn-small"


- if flash[:alert].present?
  .alert-box.alert.animated.shake
    .large-12.large-centered.columns
      h4 = t('words.fix-erros-below')
      p = flash[:alert]
- elsif resource.errors.present?
  .alert-box.alert.animated.shake
    .large-12.large-centered.columns
      h4 = t('words.fix-erros-below')
      - resource.errors.messages.each do |message|
        - if message[0] == :reset_password_token
          p Please click on the password reset link from the most resent email.
        - else
          p = message[1].to_sentence

Add friendly message when devise token is invalid

- if flash[:alert].present?
  .alert-box.alert.animated.shake
    .large-12.large-centered.columns
      h4 = t('words.fix-erros-below')
      p = flash[:alert]
- elsif resource.errors.present?
  .alert-box.alert.animated.shake
    .large-12.large-centered.columns
      h4 = t('words.fix-erros-below')
      - resource.errors.messages.each do |message|
        - if message[0] == :reset_password_token
          p Please click on the password reset link from the most resent email.
        - elsif message[0] == :confirmation_token
          p Your token is invalid! Try sending the confirmation instructions again.
        - else
          p = message[1].to_sentence


h1 main page
h3= page.title

Add minor update for main page

h1 main page
h3= page.title

ul
  - Caffeine::Page.where.not(parent: nil).each do |page|
    li= link_to page.title, page_path(page)


== render partial: "shared/repository_header", locals: { repository: @job.repository, header_info: "Job #{@job.number}" }

ul
  li
    ' Repo:
    = link_to(@job.repository.slug, repository_path(@job.repository.url_info))
  li
    ' Build
    = link_to(@job.build.number, repository_build_path(@job.build.url_info))
  li
    ' Status:
    span.label class="label-#{@job.row_class}"
      = @job.state
  li
    ' Branch:
    = @job.commit.branch
  li
    ' Language:
    = @job.language
  li
    ' Compare on
    = link_to("GitHub", @job.commit.compare_url)
  li
    | Message:
    pre = @job.commit.message

h2 Config

pre = @job.config

h2 Log

- if @job.log
  pre = @job.log.clean_body
- else
  p Log could not be found.

Add a link to jump to bottom of log

== render partial: "shared/repository_header", locals: { repository: @job.repository, header_info: "Job #{@job.number}" }

ul
  li
    ' Repo:
    = link_to(@job.repository.slug, repository_path(@job.repository.url_info))
  li
    ' Build
    = link_to(@job.build.number, repository_build_path(@job.build.url_info))
  li
    ' Status:
    span.label class="label-#{@job.row_class}"
      = @job.state
  li
    ' Branch:
    = @job.commit.branch
  li
    ' Language:
    = @job.language
  li
    ' Compare on
    = link_to("GitHub", @job.commit.compare_url)
  li
    | Message:
    pre = @job.commit.message

h2 Config

pre = @job.config

h2 Log

- if @job.log
  = link_to("Go to bottom of log", "#log-bottom")
  pre = @job.log.clean_body
  div#log-bottom
- else
  p Log could not be found.


= field_set_tag "Referral" do
  dl
    dt Referring Physician Name:
    dd= patient.document.referral.referring_physician_name

  dl
    dt Referral Date:
    dd= patient.document.referral.referral_date

  dl
    dt Referral Type:
    dd= patient.document.referral.referral_type

  dl
    dt Referral Notes:
    dd= patient.document.referral.referral_notes

Tweak "Referral" field set label

= field_set_tag "Referral Info" do
  dl
    dt Referring Physician Name:
    dd= patient.document.referral.referring_physician_name

  dl
    dt Referral Date:
    dd= patient.document.referral.referral_date

  dl
    dt Referral Type:
    dd= patient.document.referral.referral_type

  dl
    dt Referral Notes:
    dd= patient.document.referral.referral_notes


doctype html
html[lang="en"]
  head
    meta[charset="utf-8"]
    meta[name="viewport" content="width=device-width, initial-scale=1.0"]
    title
      = content_for?(:title) ? yield(:title) : "Fee remission staff app"
    = stylesheet_link_tag    "application"
    = javascript_include_tag "vendor/modernizr"
    = javascript_include_tag "application"
    = yield(:javascript) if content_for?(:javascript)
    = csrf_meta_tags
  body
    .contain-to-grid
      nav.top-bar(data-topbar)
        ul.title-area
          li.name
            h1 =link_to 'Help with fees', root_url
          li.toggle-topbar.menu-icon
            a href="#"
              span
        section.top-bar-section
          -if !current_page?(new_user_session_path)
            ul.right
                li
                  - if user_signed_in?
                    .inline
                      = "Welcome #{current_user.name}"
                      = link_to "Sign out", destroy_user_session_path, :method => :delete
                  - else
                    = link_to 'Sign in', new_user_session_path
    =render 'layouts/toolbar'
    .row
      .large-12.columns
        - flash.each do |key, value|
          .alert-box class="#{key}" data-alert=''
            |#{value}
            = link_to '×'.html_safe, '#', class: 'close'
    .row
      .large-12.columns
        = yield

Hide menu on sign-in page

doctype html
html[lang="en"]
  head
    meta[charset="utf-8"]
    meta[name="viewport" content="width=device-width, initial-scale=1.0"]
    title
      = content_for?(:title) ? yield(:title) : "Fee remission staff app"
    = stylesheet_link_tag    "application"
    = javascript_include_tag "vendor/modernizr"
    = javascript_include_tag "application"
    = yield(:javascript) if content_for?(:javascript)
    = csrf_meta_tags
  body
    .contain-to-grid
      nav.top-bar(data-topbar)
        ul.title-area
          li.name
            h1 =link_to 'Help with fees', root_url
          -if !current_page?(new_user_session_path)
            li.toggle-topbar.menu-icon
              a href="#"
                span
        -if !current_page?(new_user_session_path)
          section.top-bar-section
            ul.right
                li
                  - if user_signed_in?
                    .inline
                      = "Welcome #{current_user.name}"
                      = link_to "Sign out", destroy_user_session_path, :method => :delete
                  - else
                    = link_to 'Sign in', new_user_session_path
    =render 'layouts/toolbar'
    .row
      .large-12.columns
        - flash.each do |key, value|
          .alert-box class="#{key}" data-alert=''
            |#{value}
            = link_to '×'.html_safe, '#', class: 'close'
    .row
      .large-12.columns
        = yield


h1 受取確認

table.table.table-hover
  thead
    tr
      th.col-xs-1.text-center = '-'
      - Lunchbox.all.each do |lunchbox|
        th = "#{lunchbox.name} (#{lunchbox.price}円)"
      th.text-center = '-'

  tbody
    - @order.order_items.each do |item|
      tr class=('info' if item.received_at?)
        th = item.customer_name
        - Lunchbox.all.each do |lunchbox|
          td
            - if lunchbox.id == item.lunchbox_id
              .text-center = '✓'
        td
          - if item.received_at?
            | 受け取り済み
          - else
            = link_to '受け取る', receive_order_order_item_path(@order, item), method: :patch, class: 'btn btn-primary'

nav
  ul.nav.nav-pills.nav-stacked
    li = link_to '注文日選択画面へもどる', orders_path

Remove "み" not to breaking line

h1 受取確認

table.table.table-hover
  thead
    tr
      th.col-xs-1.text-center = '-'
      - Lunchbox.all.each do |lunchbox|
        th = "#{lunchbox.name} (#{lunchbox.price}円)"
      th.text-center = '-'

  tbody
    - @order.order_items.each do |item|
      tr class=('info' if item.received_at?)
        th = item.customer_name
        - Lunchbox.all.each do |lunchbox|
          td
            - if lunchbox.id == item.lunchbox_id
              .text-center = '✓'
        td
          - if item.received_at?
            | 受け取り済
          - else
            = link_to '受け取る', receive_order_order_item_path(@order, item), method: :patch, class: 'btn btn-primary'

nav
  ul.nav.nav-pills.nav-stacked
    li = link_to '注文日選択画面へもどる', orders_path


meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present?
  - if @run.game.to_s.present?
    meta name='twitter:title' content=@run.game
  - if @run.category.to_s.present?
    meta name='twitter:description' content=@run.category
  - if @run.image_url.present?
    meta name='twitter:image:src' content=@run.image_url
- else
  meta name='twitter:title' content='Splits I/O'
  meta name='twitter:title' content='splits sharer extraordinaire'

Use "(no title)" in Twitter tags for gameless runs

meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present?
  - if @run.game.to_s.present?
    meta name='twitter:title' content=@run.game
  - else
    meta name='twitter:title' content='(no title)'
  - if @run.category.to_s.present?
    meta name='twitter:description' content=@run.category
  - if @run.image_url.present?
    meta name='twitter:image:src' content=@run.image_url
- else
  meta name='twitter:title' content='Splits I/O'
  meta name='twitter:title' content='splits sharer extraordinaire'


.main-content
  fieldset.form-panel

  h1= t("guide.header")

  - cache do
    nav.nav-guide
      ul
      - @guide_presenter.file_names.each do |name|
        li = link_to t("guide.#{ name }"), guide_path(anchor: name)

    .guide-content
      - @guide_presenter.each_rendered_file do |name, contents|
        article id="#{name}" = contents

Fix interpolated string padding on show page

.main-content
  fieldset.form-panel

  h1= t("guide.header")

  - cache do
    nav.nav-guide
      ul
      - @guide_presenter.file_names.each do |name|
        li = link_to t("guide.#{name}"), guide_path(anchor: name)

    .guide-content
      - @guide_presenter.each_rendered_file do |name, contents|
        article id="#{name}" = contents


li.list-group-item id = '#{ "story_point_#{ story_point.id }" }'
  .container-fluid
    .row
      .col-md-8
        = story_point.user_github_login

        |

        = image_tag story_point.user_github_avatar_url + '&s=18'

        |

        .label.label-info
          = story_point.story_point_type

        |

        .label.label-info
          = story_point.story_point_size

        |

        .label.label-info
          = story_point.story_point_from

        |

        = link_to_if(story_point.title.present?, story_point.title, story_point.github_html_url) do
          = link_to story_point.github_html_url, story_point.github_html_url

        |

      .col-md-2
        = l story_point.github_closed_at, :format => :long

      .col-md-2
        = link_to 'Редактировать', edit_admin_story_point_url(story_point),
          :class => 'btn btn-success', :remote => true

Add size to images in stoty_points

li.list-group-item id = '#{ "story_point_#{ story_point.id }" }'
  .container-fluid
    .row
      .col-md-8
        = story_point.user_github_login

        |

        = image_tag story_point.user_github_avatar_url + '&s=18', :size => '18'

        |

        .label.label-info
          = story_point.story_point_type

        |

        .label.label-info
          = story_point.story_point_size

        |

        .label.label-info
          = story_point.story_point_from

        |

        = link_to_if(story_point.title.present?, story_point.title, story_point.github_html_url) do
          = link_to story_point.github_html_url, story_point.github_html_url

        |

      .col-md-2
        = l story_point.github_closed_at, :format => :long

      .col-md-2
        = link_to 'Редактировать', edit_admin_story_point_url(story_point),
          :class => 'btn btn-success', :remote => true


#tabs
  nav.preftab
    ul
      - @tabs.each do |tab|
        li[class=tab_class(tab)]
          = link_to tab.label, tab.url
          i class="icon-#{tab.label.downcase}"
          ul
            - tab.subtabs.each do |subtab|
              li[class=subtab_class(subtab.id)]
                = link_to subtab.label, subtab.url
      li[class="#{'active' if params[:controller] == 'shares'}"]
        = link_to t('shares'), shares_path
        i.icon-shares
      li[class="#{'active' if params[:controller] =='apps'}"]
        = link_to t('apps'), apps_path
        i.icon-apps
      - if debug_tab?
        li[class=""]
          = link_to t('debug'), '#'
          i.icon-debug

    = render "#{params[:controller]}/subtabs" unless @no_subtabs

Fix for subtabs showing regardless if the parent tab is selected

#tabs
  nav.preftab
    ul
      - @tabs.each do |tab|
        li[class=tab_class(tab)]
          = link_to tab.label, tab.url
          i class="icon-#{tab.label.downcase}"
          -if params[:controller] == tab.label.downcase
            ul
              - tab.subtabs.each do |subtab|
                li[class=subtab_class(subtab.id)]
                  = link_to subtab.label, subtab.url
      li[class="#{'active' if params[:controller] == 'shares'}"]
        = link_to t('shares'), shares_path
        i.icon-shares
      li[class="#{'active' if params[:controller] =='apps'}"]
        = link_to t('apps'), apps_path
        i.icon-apps
      - if debug_tab?
        li[class=""]
          = link_to t('debug'), '#'
          i.icon-debug

    = render "#{params[:controller]}/subtabs" unless @no_subtabs


- provide(:page_wrapper_class, "page-dashboard")

header.page-header.group
  div
    h1
      ' Applications

- if Settings.after_current_submission_deadline?
  .dashboard-post-submission
    = render "dashboard_post_submission"
- else
  .dashboard-pre-submission
    = render "dashboard_pre_submission"

COPY the award year has ended

- provide(:page_wrapper_class, "page-dashboard")

- if Settings.after_current_submission_deadline?
  article.group role="article"
    .inner
      br
      .application-notice.info-notice
        p
          ' The entry period for the
          = AwardYear.current.year
          '  Awards season has now closed.
          br
          ' Award winners will be announced on 21st April
          = AwardYear.current.year
          ' .

header.page-header.group
  div
    h1
      ' Applications

- if Settings.after_current_submission_deadline?
  .dashboard-post-submission
    = render "dashboard_post_submission"
- else
  .dashboard-pre-submission
    = render "dashboard_pre_submission"


div ng-show="csvImports"
  ul.media-list
    li.media ng-repeat="import in csvImports | sortByImportState" ng-class="{muted:(import.terminal())}"
      a.pull-left ng-href="{{import.link()}}"
        img.media-object src='#{asset_path("minimark.png")}'
      .media-body
        a ng-href="{{import.link()}}"
          h4.media-heading Import: {{import.file}}
        p
          span.label ng-class="{'label-success':(import.state=='imported'), 'label-important':(import.state == 'error'), 'label-info':(import.state == 'analyzed')}" {{import.state.charAt(0).toUpperCase() + import.state.slice(1);}}
          |
          span.badge.badge-inverse ng-show='import.rowCount' {{import.rowCount}} rows
          |
          span.label.label-info Started: {{import.createdAt}}
        p ng-hide="import.terminal() || import.unActionable()"
          a.btn.btn-primary ng-href="/imports/{{import.id}}" {{import.editButtonMessage()}}
          |
          button.btn.btn-link ng-click="import.cancel()" Cancel

Simplify import "Started" date and time format (mo-day-yr 00:00).

div ng-show="csvImports"
  ul.media-list
    li.media ng-repeat="import in csvImports | sortByImportState" ng-class="{muted:(import.terminal())}"
      a.pull-left ng-href="{{import.link()}}"
        img.media-object src='#{asset_path("minimark.png")}'
      .media-body
        a ng-href="{{import.link()}}"
          h4.media-heading Import: {{import.file}}
        p
          span.label ng-class="{'label-success':(import.state=='imported'), 'label-important':(import.state == 'error'), 'label-info':(import.state == 'analyzed')}" {{import.state.charAt(0).toUpperCase() + import.state.slice(1);}}
          |
          span.badge.badge-inverse ng-show='import.rowCount' {{import.rowCount}} rows
          |
          span.label.label-info Started: {{import.createdAt | date:'yyyy-MM-dd hh:mma'}}
        p ng-hide="import.terminal() || import.unActionable()"
          a.btn.btn-primary ng-href="/imports/{{import.id}}" {{import.editButtonMessage()}}
          |
          button.btn.btn-link ng-click="import.cancel()" Cancel


<!DOCTYPE html>
html
  head
    title Spread Beaver
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    .navbar.navbar-default.navbar-static-top
      .navbar-collapse.collapse.navbar-responsive-collapse
        ul.nav.navbar-nav
          - if current_user
            - if current_user.admin?
              li = link_to "Application", oauth_applications_path
            li = link_to "Edit Profile", edit_user_path(current_user.id)
            li = link_to "Logout", :logout, method: :post
          - else
            li = link_to "Register", new_user_path
            li = link_to "Login", :login
    div
      p#notice = flash[:notice]
      p#alert = flash[:alert]
    = yield

Add link to feeds index on navbar

<!DOCTYPE html>
html
  head
    title Spread Beaver
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    .navbar.navbar-default.navbar-static-top
      .navbar-collapse.collapse.navbar-responsive-collapse
        ul.nav.navbar-nav
          - if current_user
            - if current_user.admin?
              li = link_to "Application", oauth_applications_path
            li = link_to "Edit Profile", edit_user_path(current_user.id)
            li = link_to "Logout", :logout, method: :post
          - else
            li = link_to "Register", new_user_path
            li = link_to "Login", :login

          li = link_to "Feeds", feeds_path
    div
      p#notice = flash[:notice]
      p#alert = flash[:alert]
    = yield


doctype html
html
  head
    title My App
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    = stylesheet_link_tag    "application", media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag "application", 'data-turbolinks-track' => true
    = csrf_meta_tags

  body
    = yield

Add newline at end of file, for readability


- content_for :title do
  | Robin's Photos - Google Photos Albums

.admin
  article role="article"
    header
      h1 Google Photos Albums

    section
      - albums.each do |album|
        ul.simple-list
          li
            img src=album["coverPhotoBaseUrl"]
            h3= album["title"]
            = form_for new_album, url: admin_google_photos_albums_path do |f|
              = f.hidden_field :id, value: album["id"]
              ol
                li
                  = check_box_tag :force, "1"
                  = label_tag :force, "Force"
                li= f.submit("Import")

Set fixed height for album photo on import page

- content_for :title do
  | Robin's Photos - Google Photos Albums

.admin
  article role="article"
    header
      h1 Google Photos Albums

    section
      - albums.each do |album|
        ul.simple-list
          li
            img src=album["coverPhotoBaseUrl"] height="380"
            h3= album["title"]
            = form_for new_album, url: admin_google_photos_albums_path do |f|
              = f.hidden_field :id, value: album["id"]
              ol
                li
                  = check_box_tag :force, "1"
                  = label_tag :force, "Force"
                li= f.submit("Import")