- content_for :title, 'Sign in'

doctype html
html.bg-black
  head
    title #{yield(:title)} « Kuroko 2
    meta charset='UTF-8'
    meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'
    = stylesheet_link_tag 'kuroko2/application'
    = javascript_include_tag 'kuroko2/application'
  body.bg-black
    #login-box.form-box
      .header Sign In
      .body
        p.lead Please sign in with Google account.
        .text-center
          a.btn.btn-social.btn-google-plus href=auth_path("google_oauth2", state: params[:return_to])
            i.fa.fa-google-plus
            span Sign in with Google
      .footer

Use POST request for Google OAuth2

- content_for :title, 'Sign in'

doctype html
html.bg-black
  head
    title #{yield(:title)} « Kuroko 2
    meta charset='UTF-8'
    meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'
    = stylesheet_link_tag 'kuroko2/application'
    = javascript_include_tag 'kuroko2/application'
  body.bg-black
    #login-box.form-box
      .header Sign In
      .body
        p.lead Please sign in with Google account.
        .text-center
          = button_to auth_path("google_oauth2", state: params[:return_to]), class: 'btn btn-social btn-google-plus' do
            i.fa.fa-google-plus
            span Sign in with Google
      .footer


#files data-entries=FileTree.new(files).to_js_tree

hr

= render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: t('exercises.editor.create_file'))
= render('editor_button', classes: 'btn-block btn-warning btn-sm', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'fa fa-times', id: 'destroy-file', label: t('exercises.editor.destroy_file'))
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download'))
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-bullhorn', id: 'request-for-comments', label: t('exercises.editor.requestComments'))

= render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file'))

Remove RequestForComment button from sidebar

#files data-entries=FileTree.new(files).to_js_tree

hr

= render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-cause' => 'file'}, icon: 'fa fa-plus', id: 'create-file', label: t('exercises.editor.create_file'))
= render('editor_button', classes: 'btn-block btn-warning btn-sm', data: {:'data-cause' => 'file', :'data-message-confirm' => t('shared.confirm_destroy')}, icon: 'fa fa-times', id: 'destroy-file', label: t('exercises.editor.destroy_file'))
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download'))

= render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file'))


doctype html
html
  head
    title= "#{"#{yield(:title)} | " if content_for?(:title)}Meta Surf Forecast"
    = csrf_meta_tags
    = action_cable_meta_tag
    meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'
    meta property='og:description' content='Pulls data from Surfline, MagicSeaweed & Spitcast APIs to display an aggregated surf forecast.'
    meta property='og:image' content= image_url('wave.jpg')

    = stylesheet_link_tag 'application', media: 'all'
    = javascript_pack_tag 'application'
    - if ENV['GOOGLE_ANALYTICS_ID']
      javascript:
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

        ga('create', '#{ENV['GOOGLE_ANALYTICS_ID']}', 'auto');
        ga('send', 'pageview');

  body
    = render partial: 'shared/github_corner' if Rails.env.production?
    == yield

Move github corner code to the bottom of the page

doctype html
html
  head
    title= "#{"#{yield(:title)} | " if content_for?(:title)}Meta Surf Forecast"
    = csrf_meta_tags
    = action_cable_meta_tag
    meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'
    meta property='og:description' content='Pulls data from Surfline, MagicSeaweed & Spitcast APIs to display an aggregated surf forecast.'
    meta property='og:image' content= image_url('wave.jpg')

    = stylesheet_link_tag 'application', media: 'all'
    = javascript_pack_tag 'application'
    - if ENV['GOOGLE_ANALYTICS_ID']
      javascript:
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

        ga('create', '#{ENV['GOOGLE_ANALYTICS_ID']}', 'auto');
        ga('send', 'pageview');

  body
    == yield
    = render partial: 'shared/github_corner' if Rails.env.production?


.home
  .header-spacer.hidden-xs
  .row
    .col-md-12.text-center
      h1 WaniKani to Anki exporter

  .row
    .col-md-12
      img src="images/wanikanitoanki_logo.png" class="center-block img-responsive"

  .row
    .col-md-12.text-center
      h4 Export your WaniKani reviews to Anki decks!

  .row
    .col-md-12.text-center
      p Enter your #{link_to("WaniKani API key", "https://www.wanikani.com/account", target: "blank")} to get started.

    - if flash[:error]
      .row
        .col-md-6.col-md-offset-3.alert.alert-danger.text-center= flash[:error]

    = form_tag '/login', role: "form" do
      .row
        .col-md-4.col-md-offset-4.form-group
          = text_field_tag :wanikani_api_key, placeholder: "WaniKani API Key", class: "form-control"
      .row.text-center
        .col-md-12
          = submit_tag "Let's Go!", class: "btn btn-default"
      .row.text-center
        .col-md-12
        p
          small
            em
              | (We will never save your API key anywhere!)

Fix link to API key and specify version 1

.home
  .header-spacer.hidden-xs
  .row
    .col-md-12.text-center
      h1 WaniKani to Anki exporter

  .row
    .col-md-12
      img src="images/wanikanitoanki_logo.png" class="center-block img-responsive"

  .row
    .col-md-12.text-center
      h4 Export your WaniKani reviews to Anki decks!

  .row
    .col-md-12.text-center
      p Enter your #{link_to("WaniKani API Version 1 key", "https://www.wanikani.com/settings/account", target: "blank")} to get started.

    - if flash[:error]
      .row
        .col-md-6.col-md-offset-3.alert.alert-danger.text-center= flash[:error]

    = form_tag '/login', role: "form" do
      .row
        .col-md-4.col-md-offset-4.form-group
          = text_field_tag :wanikani_api_key, placeholder: "WaniKani API Key", class: "form-control"
      .row.text-center
        .col-md-12
          = submit_tag "Let's Go!", class: "btn btn-default"
      .row.text-center
        .col-md-12
        p
          small
            em
              | (We will never save your API key anywhere!)


script.progress-tpl type='text/html'
  .progress-tpl.progress.progress-striped.active
    .progress-bar role="progressbar" style="width: 0%"
.container
  .row
    h1.col-12
      span = "#{@pods.count} Pods"
      span.glyphicon.glyphicon-leaf
      span Cocoatree
      '
      span
        a href='#reload' Reload
    .progress-container
  .row.categories
  .row.tags
  #list_navigator.row
  #list_placeholder.row
  .row
    #footer.col-12 Copyright © 2013 Jens Bissinger

Add (dynamic) current year to copyright.

script.progress-tpl type='text/html'
  .progress-tpl.progress.progress-striped.active
    .progress-bar role="progressbar" style="width: 0%"
.container
  .row
    h1.col-12
      span = "#{@pods.count} Pods"
      span.glyphicon.glyphicon-leaf
      span Cocoatree
      '
      span
        a href='#reload' Reload
    .progress-container
  .row.categories
  .row.tags
  #list_navigator.row
  #list_placeholder.row
  .row
    #footer.col-12 Copyright © 2013 - #{Time.now.year} Jens Bissinger


= form_for(@user) do |f|
  div.field
    = f.label :first_name
    = f.text_field :first_name
  div.field
    = f.label :last_name
    = f.text_field :last_name
  div.field
    = f.label :ssn
    = f.text_field :ssn
  div.field
    = f.label :dob
    = f.text_field :dob
  div.actions
    = f.submit

Make DOB a date field

= form_for(@user) do |f|
  div.field
    = f.label :first_name
    = f.text_field :first_name
  div.field
    = f.label :last_name
    = f.text_field :last_name
  div.field
    = f.label :ssn
    = f.text_field :ssn
  div.field
    = f.label :dob
    = f.date_field :dob
  div.actions
    = f.submit


h1.header
  = icon('user')
  span Community

/ = render partial: 'users/roles'

/ - if admin?
/   p.organizers = link_to 'Users organizers info →'.html_safe, users_info_path

= render 'users/interests'

table.users.table.table-striped.table-bordered.table-condensed.table-hover
  thead
    tr
      th
      th = sortable :name
      th = sortable :interested_in
      th = sortable :country
      th = sortable :location, User.human_attribute_name(:location)
      - if signed_in?
        th Email
      / th = sortable :github
      / th = sortable :irc
      / th = sortable :team
      / th Time now
      / th Conferences

  tbody
    - @users.each do |user|
      tr
        td.image
          - if user.avatar_url.present?
            img src="#{user.avatar_url}&s=40"
        td = link_to user.name_or_handle, user
        td = user.interested_in.map { |key| User::INTERESTS[key].presence }.compact.join(', ')
        td = user.country
        td = user.location
        - if signed_in?
          td = mail_to user.email unless user.hide_email?
        / td = link_to user.github_handle, "http://github.com/#{user.github_handle}"
        / td = user.irc_handle.present? ? user.irc_handle : '-'
        / td = link_to_user_roles(user)
        / td = user.location
        / td = time_for_user(user)
        / td = links_to_conferences(user.conferences).join(', ').html_safe

Change the Users overview back

h1.header
  = icon('user')
  span Community

= render partial: 'users/roles'

- if admin?
  p.organizers = link_to 'Users organizers info →'.html_safe, users_info_path

table.users.table.table-striped.table-bordered.table-condensed.table-hover
  thead
    tr
      th
      th = sortable :name
      / th = sortable :interested_in
      - if signed_in?
        th Email
      th = sortable :github
      th = sortable :team
      th = sortable :country
      th = sortable :location, User.human_attribute_name(:location)
      th Time now
      th Conferences

  tbody
    - @users.each do |user|
      tr
        td.image
          - if user.avatar_url.present?
            img src="#{user.avatar_url}&s=40"
        td = link_to user.name_or_handle, user
        / td = user.interested_in.map { |key| User::INTERESTS[key].presence }.compact.join(', ')
        - if signed_in?
          td = mail_to user.email unless user.hide_email?
        td = link_to user.github_handle, "http://github.com/#{user.github_handle}"
        td = link_to_user_roles(user)
        td = user.country
        td = user.location
        td = time_for_user(user)
        td = links_to_conferences(user.conferences).join(', ').html_safe


.panel.panel-default
  .panel-heading#company-details-heading role="tab"
    h4.panel-title
      a data-toggle="collapse" data-parent="#panel-application-info" href="#section-company-details" aria-expanded="true" aria-controls="section-company-details"
        ' Company Details
        - if resource.company_details_updated_at && resource.company_details_editable
          small
            = "Updated by: #{resource.company_details_editable.decorate.full_name} - #{format_date(resource.company_details_updated_at)}"

  #section-company-details.section-company-details.panel-collapse.collapse role="tabpanel" aria-labelledby="company-details-heading"
    .panel-body.company-details-forms
      = render "admin/form_answers/company_details/company_name_form"
      = render "admin/form_answers/company_details/address_form"
      = render "admin/form_answers/company_details/previous_wins_form"
      = render "admin/form_answers/company_details/sic_form"

        .form-group
          label.form-label User accounts
          ul.list-unstyled.list-actions
            - (resource.account.try(:users) || []).each do |user|
              li
                = link_to "#", class: "ellipsis"
                  span.icon-role A
                  = "#{user.full_name} (#{user.email})"

COPY Company Details -> Nominee Details for QAEP

.panel.panel-default
  .panel-heading#company-details-heading role="tab"
    h4.panel-title
      a data-toggle="collapse" data-parent="#panel-application-info" href="#section-company-details" aria-expanded="true" aria-controls="section-company-details"
        = @form_answer.promotion? ? "Nominee Details" : "Company Details"
        - if resource.company_details_updated_at && resource.company_details_editable
          small
            = "Updated by: #{resource.company_details_editable.decorate.full_name} - #{format_date(resource.company_details_updated_at)}"

  #section-company-details.section-company-details.panel-collapse.collapse role="tabpanel" aria-labelledby="company-details-heading"
    .panel-body.company-details-forms
      = render "admin/form_answers/company_details/company_name_form"
      = render "admin/form_answers/company_details/address_form"
      = render "admin/form_answers/company_details/previous_wins_form"
      = render "admin/form_answers/company_details/sic_form"

        .form-group
          label.form-label User accounts
          ul.list-unstyled.list-actions
            - (resource.account.try(:users) || []).each do |user|
              li
                = link_to "#", class: "ellipsis"
                  span.icon-role A
                  = "#{user.full_name} (#{user.email})"


p.text-center
  = link_to "Save recipe", "/recipes/#{@recipe.id}.pdf", class: "btn btn-default"

h1.page-header= @recipe.title

blockquote
  p= @recipe.description

= @recipe.compiled_instructions.html_safe

br

p.text-center
  = link_to "Edit", edit_recipe_path(@recipe)
  = " | "
  = link_to "Destroy", recipe_path(@recipe), method: :delete, data: { confirm: "Are you sure?" }
  = " | "
  = link_to "Back", root_path

Remove blockquote is no description

p.text-center
  = link_to "Save recipe", "/recipes/#{@recipe.id}.pdf", class: "btn btn-default"

h1.page-header= @recipe.title

- unless @recipe.description.blank?
  blockquote
    p= @recipe.description

= @recipe.compiled_instructions.html_safe

br

p.text-center
  = link_to "Edit", edit_recipe_path(@recipe)
  = " | "
  = link_to "Destroy", recipe_path(@recipe), method: :delete, data: { confirm: "Are you sure?" }
  = " | "
  = link_to "Back", root_path


.progress-container
.navbar-container
#main-view
.footer-container
  .footer-row
    .footer-col
      | Copyright © 2013 - #{Time.now.year} Jens Bissinger
      '  |
      a href="#reload" Reload
      '  |
      a href='https://github.com/dpree/cocoa-tree/issues' Report an Issue

Add add-category link to footer.

.progress-container
.navbar-container
#main-view
.footer-container
  .footer-row
    .footer-col
      | Copyright © 2013 - #{Time.now.year} Jens Bissinger
      '  |
      a href="#reload" Reload
      '  |
      a href='https://github.com/dpree/cocoa-tree/issues' Report an Issue
      '  |
      a href='https://github.com/cocoa-tree/categories/edit/master/cocoa_pods_categories.json' Add a Category


.document
  = simple_form_for note, url: url,
      wrapper: :horizontal_form, remote: true do |f|

    = f.input :description, as: :text, input_html: { cols: 50, rows: 3 }
    = f.input :show_in_letter, as: :inline_radio_buttons

    .row
      .large-offset-3.large-7.columns
        = f.button :submit, "Save", class: :tiny
        span= " or "
        = link_to "cancel", patient_problem_notes_path(problem.patient, problem), remote: true

Remove show_in_letter in the form

.document
  = simple_form_for note, url: url,
      wrapper: :horizontal_form, remote: true do |f|

    = f.input :description, as: :text, input_html: { cols: 50, rows: 3 }

    .row
      .large-offset-3.large-7.columns
        = f.button :submit, "Save", class: :tiny
        span= " or "
        = link_to "cancel", patient_problem_notes_path(problem.patient, problem), remote: true


tr class=(row.keys.first == 'overseas_sales' ? 'exports' : row.keys.first)
  td = t(".#{row.keys.first}")

  - row.values.flatten.each do |field|
    td.value
      span = field[:value]
      = text_field_tag "financial_data[#{field[:name]}]", field[:value], class: 'form-control'

Fix the admin financial show value when editing

tr class=(row.keys.first == 'overseas_sales' ? 'exports' : row.keys.first)
  td = t(".#{row.keys.first}")

  - row.values.flatten.each do |field|
    td.value
      span.form-value = field[:value]
      = text_field_tag "financial_data[#{field[:name]}]", field[:value], class: 'form-control'


.article-related-positioning-container
  header.page-header.group
    div
      h1
        ' Check your eligibility

      = render "eligibility_check/steps_progress_bar"

      h2
        ' Step 3 of 3: Sustainability Development

  .article-container
    article.group role="article"
      .inner
        form
          .current-question#current-question
            = render "eligibility_check/form_sustainability_development"

          footer
            nav.pagination role="navigation" aria-label="Pagination"
              ul.group
                li.previous
                  = link_to eligibility_check_2_path, rel: "prev", title: "Navigate to previous part" do
                    span class="pagination-label"
                      ' Previous
                    span class="pagination-part-title"
                      ' Innovation award eligibility

                li.next
                  = link_to dashboard_path, rel: "next", title: "Navigate to Dashboard" do
                    span class="pagination-label"
                      ' Back
                    span class="pagination-part-title"
                      ' Dashboard

  .related-positioning
    .related-container
      .related#related
        nav.pagination role="navigation" aria-label="Pagination"
          ul.group
            li.next
              = link_to dashboard_path, rel: "next", title: "Navigate to Dashboard" do
                span class="pagination-label"
                  ' Back
                span class="pagination-part-title"
                  ' Dashboard

        .inner.group
          = link_to "Return to top ↑", "#content", class: "return-to-top"

Fix sustainable development eligibility check page

.article-related-positioning-container
  header.page-header.group
    div
      h1
        ' Check your eligibility

      = render "eligibility_check/steps_progress_bar"

      h2
        ' Step 3 of 3: Sustainability Development

  .article-container
    article.group role="article"
      .inner
        form
          .current-question#current-question
            = render "eligibility_check/form_sustainable_development"

          footer
            nav.pagination role="navigation" aria-label="Pagination"
              ul.group
                li.previous
                  = link_to eligibility_check_2_path, rel: "prev", title: "Navigate to previous part" do
                    span class="pagination-label"
                      ' Previous
                    span class="pagination-part-title"
                      ' Innovation award eligibility

                li.next
                  = link_to dashboard_path, rel: "next", title: "Navigate to Dashboard" do
                    span class="pagination-label"
                      ' Back
                    span class="pagination-part-title"
                      ' Dashboard

  .related-positioning
    .related-container
      .related#related
        nav.pagination role="navigation" aria-label="Pagination"
          ul.group
            li.next
              = link_to dashboard_path, rel: "next", title: "Navigate to Dashboard" do
                span class="pagination-label"
                  ' Back
                span class="pagination-part-title"
                  ' Dashboard

        .inner.group
          = link_to "Return to top ↑", "#content", class: "return-to-top"


li class="word weight-#{word.weight}"
  = link_to word.name.strip, "/?q=#{ word.name }"

Add space after word in Search History

li> class="word weight-#{word.weight}"
  = link_to word.name.strip, "/?q=#{ word.name }"


.Panel.cs-Panel--transparent
  .u-defaultThenLargeMargin
  .GridCell.GridCell--alignCenter.GridCell--small
    .GridCell-content
      p.Text.Text--blog.u-smallMargin
        ' We know that the world need more super-heroes, more good developers.
        ' We want to help train Batman and Superman; and we know we can do it.
      p.Text.Text--blog
        ' Stay tuned!

      .u-defaultThenLargeMargin

      .ContentFormatter.ContentFormatter--center
        = link_to 'Visit creators school website', 'https://creatorsschool.com', class: 'ButtonPrimary ButtonPrimary--fullWidth'
      .u-smallMargin
      .ContentFormatter.ContentFormatter--center
        = link_to 'Visit creators school facebook', 'https://facebook.com/creatorsschool', class: 'ButtonPrimary ButtonPrimary--fullWidth'

Use HTTP link to the CS website

.Panel.cs-Panel--transparent
  .u-defaultThenLargeMargin
  .GridCell.GridCell--alignCenter.GridCell--small
    .GridCell-content
      p.Text.Text--blog.u-smallMargin
        ' We know that the world need more super-heroes, more good developers.
        ' We want to help train Batman and Superman; and we know we can do it.
      p.Text.Text--blog
        ' Stay tuned!

      .u-defaultThenLargeMargin

      .ContentFormatter.ContentFormatter--center
        = link_to 'Visit creators school website', 'http://creatorsschool.com', class: 'ButtonPrimary ButtonPrimary--fullWidth'
      .u-smallMargin
      .ContentFormatter.ContentFormatter--center
        = link_to 'Visit creators school facebook', 'https://facebook.com/creatorsschool', class: 'ButtonPrimary ButtonPrimary--fullWidth'


= partial '/shared/analytics'
= javascript_include_tag 'requirements'
= javascript_include_tag 'application'

/[if lt IE 9]
  = javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/nwmatcher/1.3.6/nwmatcher.min.js'
  = javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js'

Add defer tag to javascript imports

= partial '/shared/analytics'
= javascript_include_tag 'requirements', defer: true
= javascript_include_tag 'application', defer: true

/[if lt IE 9]
  = javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/nwmatcher/1.3.6/nwmatcher.min.js'
  = javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js'


p
  ' Your application for the
  = award.decorate.award_type
  '  Award was unsuccessful.

br

h3 Feedback
p
  ' Please
  = link_to "download and read the feedback document", "#", class: "todo-placeholder"
  '  so you can better understand our decision. We hope it will help you to improve your future applications.

Add feedback url for mailing

p
  ' Your application for the
  = award.decorate.award_type
  '  Award was unsuccessful.

br

h3 Feedback
p
  ' Please
  = link_to "download and read the feedback document", users_form_answer_feedback_path(award.feedback, format: :pdf), class: "todo-placeholder"
  '  so you can better understand our decision. We hope it will help you to improve your future applications.


- if current_user.try(:admin?) or current_user.try(:teacher?)
  .container
    ul.breadcrumb
      - if model = Kernel.const_get(controller_path.classify) rescue nil
        - object = model.find_by(id: params[:id])
        - if model.try(:nested_resource?)
          li.breadcrumb-item = model.model_name.human(count: 2)
          - if object
            li.breadcrumb-item = object
        - else
          li.breadcrumb-item = link_to_if(policy(model).show?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
          - if object
            li.breadcrumb-item = link_to_if(policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
        li.breadcrumb-item.active
          - if I18n.translation_present?("shared.#{params[:action]}")
            = t("shared.#{params[:action]}")
          - else
            = t("#{controller_name}.index.#{params[:action]}")
      - else
        li.breadcrumb-item.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")

Use index? to validate permissions of classes instead of show? for obj.

- if current_user.try(:admin?) or current_user.try(:teacher?)
  .container
    ul.breadcrumb
      - if model = Kernel.const_get(controller_path.classify) rescue nil
        - object = model.find_by(id: params[:id])
        - if model.try(:nested_resource?)
          li.breadcrumb-item = model.model_name.human(count: 2)
          - if object
            li.breadcrumb-item = object
        - else
          li.breadcrumb-item = link_to_if(policy(model).index?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
          - if object
            li.breadcrumb-item = link_to_if(policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
        li.breadcrumb-item.active
          - if I18n.translation_present?("shared.#{params[:action]}")
            = t("shared.#{params[:action]}")
          - else
            = t("#{controller_name}.index.#{params[:action]}")
      - else
        li.breadcrumb-item.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")


.columns
  .five-fifths.column
    markdown:
      # About Atom Tweaks

      Atom Tweaks is a database of simple tweaks for the [Atom text editor](https://atom.io). These
      are simple changes to one's environment that don't merit a full
      [Atom package](https://atom.io/packages). Atom is very customizable because you can add these
      small snippets that can radically change your editing environment. In the past, finding and
      integrating these little chunks of code was a time-consuming and error-prone process. Atom
      Tweaks seeks to solve all of that!

      -----

      Atom and the Atom logo are registered trademarks of GitHub, Inc.

Include whitespace to see if Slime parser works better this way


/ shared/_child

/ Variables
/ Timestamp
- timestamp = repo.github_updated_at && repo.github_updated_at.utc

/ Single Repo in Overview
.repo
  / Owner and Name
  = link_to repo do
    span.name = repo.name
    |  by
    span.owner = repo.owner

  / Stars
  span.stars
    i.icon-star
    |
    = repo.stars

  / Url, Activity & Toggle Children
  div
    / Url
    span.homepage_url = link_to repo.homepage_url, repo.homepage_url
    link rel="dns-prefetch" href="#{ repo.homepage_url }"

    / Activity
    span.activity class=activity_color(timestamp)
      i.icon-leaf
      |
      abbr.timeago title=timestamp.iso8601 = timestamp.to_s(:long)

  / Description
  .description  = repo.description

  / Stats
  span.knight_score = repo.knight_score
  span.updated_at   = timestamp.iso8601

Adjust child partial to reflect repo partial, still duplication

/ shared/_child

/ Single Repo in Overview
.repo
  / Owner and Name
  = link_to repo do
    span.n = repo.name
    '  by
    span.o = repo.owner

  / Stars
  = stars_mixin(repo.stars)

  / Url, Activity & Toggle Children
  div
    / Url
    span.hp = link_to repo.homepage_url, repo.homepage_url
    link rel="dns-prefetch" href="#{ repo.homepage_url }"

    / Activity
    span.ac class=activity_color(repo.github_updated_at)
      i.icon-leaf
      '
      abbr.timeago title=repo.smart_timestamp = repo.github_updated_at.to_s(:long)

  / Description
  .description  = repo.description


- cache :search_yt do
  .modal-header
    h3.modal-title.modal-youtube id="myModalLabel" = bt("add_youtube", Mokio::Youtube)
  .modal-body
    = render :partial => 'search_yt_body'
    - if @error
      = bt('no_movie_found', Mokio::Youtube)
  #only-close-footer.modal-footer
    button.btn.btn-default type="button" data-dismiss="modal" = bt("close")

Fix problem with cache in Movie Gallery


h1
  | GuestUsers#new
p
  | Find me in app/views/guest_users/new.html.erb
= form_for(@guest_user, url: {action: 'create'}) do |f|
  .field
    = f.label :name
    br
    = f.text_field :name
  .field
    = f.label :email
    br
    = f.text_field :email
  .actions
    = f.submit

Add displays flash error messages

h1
  | GuestUsers#new
p
  | Find me in app/views/guest_users/new.html.erb

- flash.each do |name, msg|
  = content_tag :div, msg, class: name

= form_for(@guest_user, url: {action: 'create'}) do |f|
  .field
    = f.label :name
    br
    = f.text_field :name
  .field
    = f.label :email
    br
    = f.text_field :email
  .actions
    = f.submit


.if-js-hide
  span.question-context.question-debug
    p
      | Warning:
      br
      | NON-JS version system use redirect to special section.
      br
      | You need to save your form before you click on "#{add_message}" or "Remove" in this list.
      br
      | Otherwise, filled answers on this step of application will be lost.

COPY non-JS warning for adding fields

.if-js-hide
  .application-notice.help-notice
    p Since you've disabled Javascript, you need to save your answers before you click on the "#{add_message}" or "Remove" buttons. To do this click "Save and continue" below, then press "Back" to return to this page.


- if @comment_module.enabled?
  section.row
    .small-12.medium-9.medium-centered.columns

      article.post-article
        == @commentable.decorate.microdata_meta

        header
          h3
            = link_to @commentable.decorate.title, send("#{@commentable.class.name.underscore.singularize}_path", @commentable)
            small<: em
              = "(#{@commentable.decorate.created_at})"

        div == @commentable.decorate.content

      - if @commentable.allow_comments?
        .comments-container
          .comments
            = nested_messages @comment.ancestors.arrange(order: :created_at)

          = render 'comments/form'

.row
  .small-12.medium-9.medium-centered.columns
    = link_to I18n.t('link.back_to_article', article: @commentable.title), send("#{@commentable.class.name.underscore.singularize}_path", @commentable)

Update back to link position on reply template

- if @comment_module.enabled?
  section.row
    .small-12.medium-8.medium-centered.columns

      article.post-article
        == @commentable.decorate.microdata_meta

        header
          h3
            = link_to @commentable.decorate.title, send("#{@commentable.class.name.underscore.singularize}_path", @commentable)
            small<: em
              = "(#{@commentable.decorate.created_at})"

        div == @commentable.decorate.content

      p.text-right
        = link_to I18n.t('link.back_to_article', article: @commentable.title), send("#{@commentable.class.name.underscore.singularize}_path", @commentable)

  section.row
    .small-12.medium-9.medium-centered.columns
      - if @commentable.allow_comments?
        .comments-container
          .comments
            = nested_messages @comment.ancestors.arrange(order: :created_at)

          = render 'comments/form'


- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.col-xs-12.user
          = display_user_image(current_user)
          = link_to_user(current_user)
        - if current_course_user.present? && !current_course_user.staff?
          = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
          = sidebar_items(controller.sidebar_items(type: :normal))

          - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
            h5 = t('.administration')
            = sidebar_items(admin_sidebar_items)

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

Save one SQL query when we already have the `current_course_user` is already registered.

- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.col-xs-12.user
          = display_user_image(current_user)
          = link_to_user(current_course_user || current_user)
        - if current_course_user.present? && !current_course_user.staff?
          = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
          = sidebar_items(controller.sidebar_items(type: :normal))

          - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
            h5 = t('.administration')
            = sidebar_items(admin_sidebar_items)

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


.container-fluid
  .filter
    form path="" method="GET"
      select name="application"
        option value="" Any
        - @platform.applications.each do |application|
          option value="#{application.id}" selected=("selected" if params[:application] == application.id) = application.name
      input type="submit"
.container-fluid
  ul.traces
    - @traces.each do |trace|
      li
        span.application= link_to trace.application.title, trace.self_path
        span= link_to trace.title, trace.self_path
        span.start= link_to l(trace.start, format: :index), trace.self_path
        span.duration= link_to trace.duration_text, trace.self_path

Use application title in filter dropdown

.container-fluid
  .filter
    form path="" method="GET"
      select name="application"
        option value="" Any
        - @platform.applications.each do |application|
          option value="#{application.id}" selected=("selected" if params[:application] == application.id) = application.title
      input type="submit"
.container-fluid
  ul.traces
    - @traces.each do |trace|
      li
        span.application= link_to trace.application.title, trace.self_path
        span= link_to trace.title, trace.self_path
        span.start= link_to l(trace.start, format: :index), trace.self_path
        span.duration= link_to trace.duration_text, trace.self_path


p#notice = notice

p
  strong Name:
  = @idea.name
p
  strong Description:
  = @idea.description
p
  strong Picture:
  br
  = image_tag(@idea.picture_url, width: 600) if @idea.picture.present?

h3
  Comments
  /- @comments.to_a.each do |comment|
  - @comments.each do |comment|
    div
      strong
        = comment.user_name
      br
      p
        = comment.body
      p
        = link_to 'Delete', comment_path(comment), method: :delete, data: { confirm: 'Are you sure?' }

= render 'comments/form'

= link_to 'Edit', edit_idea_path(@idea)
'|
= link_to 'Back', ideas_path

Update idea details page design

p#notice = notice

.row
  .col-md-9
    = image_tag(@idea.picture_url, width: '100%') if @idea.picture.present?
  .col-md-3
    p
      strong Name:
      = @idea.name
    p
      strong Description:
      = @idea.description

    h3
      Comments
      /- @comments.to_a.each do |comment|
      - @comments.each do |comment|
        div
          strong
            = comment.user_name
          br
          p
            = comment.body
          p
            = link_to 'Delete', comment_path(comment), method: :delete, data: { confirm: 'Are you sure?' }

    = render 'comments/form'

    = link_to 'Edit', edit_idea_path(@idea)
    '|
    = link_to 'Back', ideas_path


.navbar.navbar-fixed-top
  .navbar-inner
    .container
      a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.brand href=root_url ATLRUG
      .container.nav-collapse
        ul.nav
          li= link_to "Meetup", "http://meetup.com/atlantaruby/"
          li= link_to "Sponsors", page_path("sponsors")
          li= link_to "@atlrug", "http://twitter.com/atlrug"
        ul.nav.pull-right
          - if signed_in?
            li.dropdown
              = link_to " ".html_safe,
                        "#", :class => 'dropdown-toggle', :'data-toggle' => 'dropdown'
              ul.dropdown-menu
                li= link_to "Log out", log_out_path, :method => :delete
          - else
            li= link_to "".html_safe, login_path

Change logged in icon to a star


.tagline.text-light-italic
  h2.text-light-normal ALM Reports

  p ALM Reports allows you to view article-level metrics for any set of Public Library of Science (PLOS) articles as well as summarize and visualize the data results.
  p
    a> href="/" Home
    span.text-light-normal> |
    a> href="/about" About
    span.text-light-normal> |
    a href="/samples" Samples

Update default tagline, change name and hide PLOS specific samples.

.tagline.text-light-italic
  h2.text-light-normal Parascope

  p Parascope allows you to view article-level metrics for any set of articles published since 2011 as well as summarize and visualize the data results.
  p
    a> href="/" Home
    span.text-light-normal> |
    a> href="/about" About


- content_for :additional_meta do
  meta name="twitter:card" content="photo"
  meta name="twitter:image" content=@content.file.url
img src=@content.file.url

Use full path for twitter cards URL

- content_for :additional_meta do
  meta name="twitter:card" content="photo"
  meta name="twitter:image" content="#{root_url}#{@content.file.url}"
img src=@content.file.url


= form_for @instance, url: {action: "create"}, html: {class: 'form-horizontal', role: 'form', id: 'new-instance-form' } do |f|
  == render 'devise/shared/error_messages'
  .form-group
    = f.label :hostname, class: "col-sm-2 control-label"
    .col-sm-6
      = f.text_field :name, class: "form-control", autofocus: true
  .form-group
      = f.label :plan, class: "col-sm-2 control-label"
      .col-sm-6
        - for plan in @plans
          .radio
            label
              = radio_button_tag 'plan', plan.amount, checked = (plan.id == @plan.id)
              strong = plan.name
              = ": " + plan.metadata['Memory'] + " Memory, "
              = plan.metadata['Processor'] + " Processor, "
              = plan.metadata['Storage'] + " Storage and "
              = plan.metadata['Bandwidth'] + " Bandwidth"
  .form-group
      = f.label :region, class: "col-sm-2 control-label"
      .col-sm-6
        - for region in @regions
          .radio
            label
              = radio_button_tag 'region', region.slug, checked = (region.slug == @region)
              strong = region.name
  .form-group
    .col-sm-offset-2.col-sm-10
      button#checkout.btn.btn-primary type="submit"  New Instance

Change button, its route, jQuery & JS in separate file

= form_for @instance, url: new_charge_path, method: "GET", html: {class: 'form-horizontal', role: 'form', id: 'new-instance-form' } do |f|
  == render 'devise/shared/error_messages'
  .form-group
    = f.label :hostname, class: "col-sm-2 control-label"
    .col-sm-6
      = f.text_field :name, class: "form-control", autofocus: true
  .form-group
      = f.label :plan, class: "col-sm-2 control-label"
      .col-sm-6
        - for plan in @plans
          .radio
            label
              = radio_button_tag 'plan', plan.amount, checked = (plan.id == @plan.id)
              strong = plan.name
              = ": " + plan.metadata['Memory'] + " Memory, "
              = plan.metadata['Processor'] + " Processor, "
              = plan.metadata['Storage'] + " Storage and "
              = plan.metadata['Bandwidth'] + " Bandwidth"
  .form-group
      = f.label :region, class: "col-sm-2 control-label"
      .col-sm-6
        - for region in @regions
          .radio
            label
              = radio_button_tag 'region', region.slug, checked = (region.slug == @region)
              strong = region.name
  .form-group
    .col-sm-offset-2.col-sm-10
      / button#checkout.btn.btn-primary type="submit"  New Instance
      = button_to 'Pay now', new_charge_path, class: 'btn btn-lg btn-success', id:'checkout', type: 'submit'


- share_card = share_card(@page)
- meta twitter: twitter_meta(@page, share_card)
- meta og: facebook_meta(@page, share_card)

- meta optimization_tags: @page.meta_tags
- meta liquid_layout: @page.liquid_layout.title
= @rendered
= render 'pages/personalization', data: @data
= render 'pages/campaigner_overlay', page: @page

javascript:
  $(document).ready(function() {
    #{@page.javascript.try(:html_safe)}
  });

Make the layout name lowercase

- share_card = share_card(@page)
- meta twitter: twitter_meta(@page, share_card)
- meta og: facebook_meta(@page, share_card)

- meta optimization_tags: @page.meta_tags
- meta liquid_layout: @page.liquid_layout.title.downcase
= @rendered
= render 'pages/personalization', data: @data
= render 'pages/campaigner_overlay', page: @page

javascript:
  $(document).ready(function() {
    #{@page.javascript.try(:html_safe)}
  });


doctype 5
html lang=(attr :lang, 'en' unless attr? :nolang)
  head
    meta charset=(attr :encoding, 'UTF-8')
    /[if IE]
      meta http-equiv="X-UA-Compatible" content="IE=edge"
    meta name='viewport' content='width=device-width, initial-scale=1.0'
    meta name='generator' content="Asciidoctor #{attr 'asciidoctor-version'}"
    = html_meta_if 'application-name', (attr 'app-name')
    = html_meta_if 'author', (attr :authors)
    = html_meta_if 'copyright', (attr :copyright)
    = html_meta_if 'description', (attr :description)
    = html_meta_if 'keywords', (attr :keywords)
    title=((doctitle sanitize: true) || (attr 'untitled-label'))
    = styles_and_scripts
    - unless (docinfo_content = docinfo).empty?
      =docinfo_content
  body [
      id=id
      class=[(attr :doctype),
             ("#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}" if (attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto')),
             (attr :docrole) || (attr :role)]
      style=style_value(max_width: (attr 'max-width')) ]
    - unless noheader
      header
        include _header.html
    #content =content
    - unless !footnotes? || (attr? :nofootnotes)
      include _footnotes.html
    - unless nofooter
      footer
        include _footer.html

Remove conditional comment for IE

doctype 5
html lang=(attr :lang, 'en' unless attr? :nolang)
  head
    meta charset=(attr :encoding, 'UTF-8')
    meta http-equiv="X-UA-Compatible" content="IE=edge"
    meta name='viewport' content='width=device-width, initial-scale=1.0'
    meta name='generator' content="Asciidoctor #{attr 'asciidoctor-version'}"
    = html_meta_if 'application-name', (attr 'app-name')
    = html_meta_if 'author', (attr :authors)
    = html_meta_if 'copyright', (attr :copyright)
    = html_meta_if 'description', (attr :description)
    = html_meta_if 'keywords', (attr :keywords)
    title=((doctitle sanitize: true) || (attr 'untitled-label'))
    = styles_and_scripts
    - unless (docinfo_content = docinfo).empty?
      =docinfo_content
  body [
      id=id
      class=[(attr :doctype),
             ("#{attr 'toc-class'} toc-#{attr 'toc-position', 'left'}" if (attr? 'toc-class') && (attr? :toc) && (attr? 'toc-placement', 'auto')),
             (attr :docrole) || (attr :role)]
      style=style_value(max_width: (attr 'max-width')) ]
    - unless noheader
      header
        include _header.html
    #content =content
    - unless !footnotes? || (attr? :nofootnotes)
      include _footnotes.html
    - unless nofooter
      footer
        include _footer.html


= render layout: "layout", locals: { title: "Demographics" } do
  #patient-demographics
    = render partial: "renalware/patients/show/patient_demographics", locals: { patient: @patient }

    .row
      .large-4.columns
        = render partial: "renalware/patients/show/contact_details", locals: { patient: @patient }

      .large-4.columns
        = field_set_tag "Current Address" do
          = render @patient.current_address if @patient.current_address

      .large-4.columns
        = render partial: "renalware/patients/show/organisation_practice", locals: { patient: @patient }

    .row
      .large-4.columns
        = render partial: "renalware/patients/show/referral", locals: { patient: @patient }

      .large-4.columns
        = render partial: "renalware/patients/show/person", locals: { title: "Next of Kin", person: @patient.document.next_of_kin }

      .large-4.columns
        = render partial: "renalware/patients/show/person", locals: { title: "Pharmacist", person: @patient.document.pharmacist }
    .row

      .large-12.columns
        = render partial: "renalware/patients/show/person", locals: { title: "District Nurse", person: @patient.document.district_nurse }

Set 4-column display for additional demogr data sets

= render layout: "layout", locals: { title: "Demographics" } do
  #patient-demographics
    = render partial: "renalware/patients/show/patient_demographics", locals: { patient: @patient }

    .row
      .large-4.columns
        = render partial: "renalware/patients/show/contact_details", locals: { patient: @patient }

      .large-4.columns
        = field_set_tag "Current Address" do
          = render @patient.current_address if @patient.current_address

      .large-4.columns
        = render partial: "renalware/patients/show/organisation_practice", locals: { patient: @patient }

    .row
      .large-3.columns
        = render partial: "renalware/patients/show/referral", locals: { patient: @patient }

      .large-3.columns
        = render partial: "renalware/patients/show/person", locals: { title: "Next of Kin", person: @patient.document.next_of_kin }

      .large-3.columns
        = render partial: "renalware/patients/show/person", locals: { title: "Pharmacist", person: @patient.document.pharmacist }

      .large-3.columns
        = render partial: "renalware/patients/show/person", locals: { title: "District Nurse", person: @patient.document.district_nurse }


- content_for(:title)
  | Bourbon - Documentation for Version #{version}
- content_for(:description)
  | Official documentation and technical reference for Bourbon #{version}, a
    lightweight Sass tool set.
- content_for(:preferred_path, "docs/#{version}")

div.p-grid-container
  h1 Documentation

  nav role="navigation"
    ol
      - versions.reverse_each do |version|
        li
          = link_to version, "/docs/#{version}/"
      li
        = link_to "4.2.7", "/docs/4.2.7/"

  nav.c-docs-nav role="navigation"
    ol
      - version.doc_items.each do |item|
        li
          = link_to "##{item.context.name}" do
            code
              = item.context.name

  section.c-docs-list
    - version.doc_items.each do |item|
      article.c-doc-item id="#{item.context.name}"
        = partial "doc_item_header",
                  locals: { item: item, version: version }
        - if item.parameter.present?
          = partial "doc_item_arguments", locals: { item: item }
        - if item.property.present?
          = partial "doc_item_properties", locals: { item: item }
        - if item.example.present?
          = partial "doc_item_example", locals: { item: item }

Make doc item links HTML safe

- content_for(:title)
  | Bourbon - Documentation for Version #{version}
- content_for(:description)
  | Official documentation and technical reference for Bourbon #{version}, a
    lightweight Sass tool set.
- content_for(:preferred_path, "docs/#{version}")

div.p-grid-container
  h1 Documentation

  nav role="navigation"
    ol
      - versions.reverse_each do |version|
        li
          = link_to version, "/docs/#{version}/"
      li
        = link_to "4.2.7", "/docs/4.2.7/"

  nav.c-docs-nav role="navigation"
    ol
      - version.doc_items.each do |item|
        li
          = link_to "##{item.context.name.parameterize}" do
            code
              = item.context.name

  section.c-docs-list
    - version.doc_items.each do |item|
      article.c-doc-item id="#{item.context.name.parameterize}"
        = partial "doc_item_header",
                  locals: { item: item, version: version }
        - if item.parameter.present?
          = partial "doc_item_arguments", locals: { item: item }
        - if item.property.present?
          = partial "doc_item_properties", locals: { item: item }
        - if item.example.present?
          = partial "doc_item_example", locals: { item: item }


= simple_form_for @contact_form, validate: true, remote: true, authenticity_token: true do |f|
  .row
    .small-12.medium-6.columns
        = f.input :name, required: true, label: false, placeholder: "* #{I18n.t('contact.placeholder.name')}"
        = f.input :email, as: :email, required: true, label: false, placeholder: "* #{I18n.t('contact.placeholder.email')}"
        = f.input :nickname, input_html: { class: 'hide', style: 'display: none' }, label: false
        = f.input :message, as: :text, required: true, input_html: { class: 'autosize contact-form' }, placeholder: "* #{I18n.t('contact.placeholder.message')}", label: false
        = f.input :send_copy, as: :boolean, required: false

        = button_tag class: 'submit-btn text-right tiny right' do
          - fa_icon('paper-plane')

    - if @qrcode_module.enabled? && setting.show_qrcode?
      .small-12.medium-6.columns.hide-for-small
        = image_tag "http://chart.apis.google.com/chart?chs=350x350&cht=qr&chl=#{u vcard}", alt: 'QrCode'

Check send_copy attribute by default

= simple_form_for @contact_form, validate: true, remote: true, authenticity_token: true do |f|
  .row
    .small-12.medium-6.columns
        = f.input :name, required: true, label: false, placeholder: "* #{I18n.t('contact.placeholder.name')}"
        = f.input :email, as: :email, required: true, label: false, placeholder: "* #{I18n.t('contact.placeholder.email')}"
        = f.input :nickname, input_html: { class: 'hide', style: 'display: none' }, label: false
        = f.input :message, as: :text, required: true, input_html: { class: 'autosize contact-form' }, placeholder: "* #{I18n.t('contact.placeholder.message')}", label: false
        = f.input :send_copy, as: :boolean, required: false, input_html: { checked: true }

        = button_tag class: 'submit-btn text-right tiny right' do
          - fa_icon('paper-plane')

    - if @qrcode_module.enabled? && setting.show_qrcode?
      .small-12.medium-6.columns.hide-for-small
        = image_tag "http://chart.apis.google.com/chart?chs=350x350&cht=qr&chl=#{u vcard}", alt: 'QrCode'


doctype html

html lang="#{I18n.locale}"
  head
    meta charset="utf-8"
    title
      = content_for?(:title) ? "#{yield(:title)} | Fauna" : 'Fauna'

    meta name="viewport" content="width=device-width, initial-scale=1"

    meta name="theme-color" content="#2196f3"
    meta name="msapplication-navbutton-color" content="#2196f3"

    = render partial: 'layouts/icons'

    = csrf_meta_tags
    = csp_meta_tag

    = stylesheet_link_tag 'application', :media => 'all', 'data-turbolinks-track' => 'reload', :nonce => content_security_policy_nonce, :integrity => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => 'reload', :nonce => content_security_policy_nonce, :integrity => true

    link rel="manifest" href="manifest.json"
  body
    = render partial: 'layouts/navigation'
    = render partial: 'layouts/flash'
    main
      == yield
    = render partial: 'layouts/footer'

Fix missing manifest errors on the non-root pages

doctype html

html lang="#{I18n.locale}"
  head
    meta charset="utf-8"
    title
      = content_for?(:title) ? "#{yield(:title)} | Fauna" : 'Fauna'

    meta name="viewport" content="width=device-width, initial-scale=1"

    meta name="theme-color" content="#2196f3"
    meta name="msapplication-navbutton-color" content="#2196f3"

    = render partial: 'layouts/icons'

    = csrf_meta_tags
    = csp_meta_tag

    = stylesheet_link_tag 'application', :media => 'all', 'data-turbolinks-track' => 'reload', :nonce => content_security_policy_nonce, :integrity => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => 'reload', :nonce => content_security_policy_nonce, :integrity => true

    link rel="manifest" href="/manifest.json"
  body
    = render partial: 'layouts/navigation'
    = render partial: 'layouts/flash'
    main
      == yield
    = render partial: 'layouts/footer'


h3
  = 'Merged data'
.row
  .col-md-12
    = form_tag Settings.ncbi_blast_api, method: :put,
            target: '_blank', enforce_utf8: false, authenticity_token: false do
      = hidden_field_tag 'CMD', 'Web'
      = hidden_field_tag 'PAGE_TYPE', 'BlastSearch'
      = hidden_field_tag 'LINK_LOC', 'blasthome'
      = text_area_tag 'QUERY', @content, class: 'content-area', id: 'content'
      br
      br
      = submit_tag 'Open BLAST', class: 'btn btn-primary'
hr
= link_to 'Back', fasta_data_path

Change method 'PUT' to 'POST' for NCBI BLAST

h3
  = 'Merged data'
.row
  .col-md-12
    = form_tag Settings.ncbi_blast_api, method: :post,
            target: '_blank', enforce_utf8: false, authenticity_token: false do
      = hidden_field_tag 'CMD', 'Web'
      = hidden_field_tag 'PAGE_TYPE', 'BlastSearch'
      = hidden_field_tag 'LINK_LOC', 'blasthome'
      = text_area_tag 'QUERY', @content, class: 'content-area', id: 'content'
      br
      br
      = submit_tag 'Open BLAST', class: 'btn btn-primary'
hr
= link_to 'Back', fasta_data_path


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

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

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

Make the top bar sticky

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

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

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


- public_test_cases = test_cases.select(&:public_test?)
- private_test_cases = test_cases.select(&:private_test?)
- evaluation_test_cases = test_cases.select(&:evaluation_test?)

h2 = t('.test_cases')

table.table.table-striped.table-hover
  thead
    tr
      th = t('.identifier')
      th = t('.expression')
      th = t('.expected')
      th = t('.hint')
  tbody
    tr
      th colspan=4
        = t('.public')
    - public_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td = test_case.expected
        td = test_case.hint
  tbody
    tr
      th colspan=4
        = t('.private')
    - private_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td = test_case.expected
        td = test_case.hint
        td
  tbody
    tr
      th colspan=4
        = t('.evaluation')
    - evaluation_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td = test_case.expected
        td = test_case.hint
        td

Apply expected div to test case question form.

- public_test_cases = test_cases.select(&:public_test?)
- private_test_cases = test_cases.select(&:private_test?)
- evaluation_test_cases = test_cases.select(&:evaluation_test?)

h2 = t('.test_cases')

table.table.table-striped.table-hover
  thead
    tr
      th = t('.identifier')
      th = t('.expression')
      th = t('.expected')
      th = t('.hint')
  tbody
    tr
      th colspan=4
        = t('.public')
    - public_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td
          div.expected = test_case.expected
        td = test_case.hint
  tbody
    tr
      th colspan=4
        = t('.private')
    - private_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td
          div.expected = test_case.expected
        td = test_case.hint
        td
  tbody
    tr
      th colspan=4
        = t('.evaluation')
    - evaluation_test_cases.each do |test_case|
      = content_tag_for(:tr, test_case) do
        th = test_case.identifier
        td = test_case.expression
        td
          div.expected = test_case.expected
        td = test_case.hint
        td


h2
  ' Team #{user.email}
  = link_to 'Leave combat', leave_combat_combat_user_path(combat_id: @combat.id, id: user.id), class: 'btn btn-small btn-danger', method: :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }
ul.unstyled.inline
  - user.units.each do |unit|
    li
      .btn-group
        a.btn.dropdown-toggle data-toggle="dropdown" href="#"
          =' unit.name
          span.caret
        ul.dropdown-menu
          - unit.skills.each do |skill|
            li.dropdown-submenu
              a(href="#")=skill
              ul.dropdown-menu
                - @combat.units.each do |target|
                  li
                    = link_to target.name, use_skill_combat_unit_path(combat_id: combat.id, id: unit.id, skill: skill, target: target), method: :post

Mark and disable dead units.

h2
  ' Team #{user.email}
  = link_to 'Leave combat', leave_combat_combat_user_path(combat_id: @combat.id, id: user.id), class: 'btn btn-small btn-danger', method: :delete, :data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) }
ul.unstyled.inline
  - user.units.each do |unit|
    li
      .btn-group
        - if unit.dead?
          .btn.disabled
            =' unit.name
            | ☠
        - else
          a.btn.dropdown-toggle data-toggle="dropdown" href="#"
            =' unit.name
            span.caret
          ul.dropdown-menu
            - unit.skills.each do |skill|
              li.dropdown-submenu
                a(href="#")=skill
                ul.dropdown-menu
                  - @combat.units.each do |target|
                    - if target.dead?
                      li.disabled
                        a #{target.name} ☠
                    - else
                      li
                        = link_to target.name, use_skill_combat_unit_path(combat_id: combat.id, id: unit.id, skill: skill, target: target), method: :post


= render collection: Post.published.order(created_at: :desc), partial: 'preview', as: :post

= render 'author'

Sort home page posts by publication date

= render collection: Post.published.order(published_at: :desc), partial: 'preview', as: :post

= render 'author'


= content_tag_for(:tr, achievement,
                  class: draft_class(achievement) + \
                         achievement_status_class(achievement, current_course_user)) do

  td
    - if can?(:display_badge, achievement)
      = display_achievement_badge(achievement)
    - else
      = display_locked_achievement_badge

  th
    = link_to format_inline_text(achievement.title),
              course_achievement_path(current_course, achievement)
    - if achievement.draft?
      small title=achievement
        =< fa_icon 'eye-slash'.freeze

  td
    div.description
      = format_html(achievement.description)

  - if include_requirements
    td = achievement.specific_conditions.map(&:title).to_sentence

  td
    div.btn-group
      - if can?(:award, achievement)
        = link_to course_achievement_course_users_path(current_course, achievement),
                  class: ['btn', 'btn-info'], title: t('.award_button') do
          = fa_icon 'trophy'.freeze
      - else
        = content_tag(:span, class:['btn', 'btn-info'], title: t('.disabled_award_button'),
                             disabled: true) do
          = fa_icon 'trophy'.freeze
      = edit_button([current_course, achievement]) if can?(:edit, achievement)
      = delete_button([current_course, achievement]) if can?(:delete, achievement)

Modify achievement to list conditions in an unordered list

= content_tag_for(:tr, achievement,
                  class: draft_class(achievement) + \
                         achievement_status_class(achievement, current_course_user)) do

  td
    - if can?(:display_badge, achievement)
      = display_achievement_badge(achievement)
    - else
      = display_locked_achievement_badge

  th
    = link_to format_inline_text(achievement.title),
              course_achievement_path(current_course, achievement)
    - if achievement.draft?
      small title=achievement
        =< fa_icon 'eye-slash'.freeze

  td
    div.description
      = format_html(achievement.description)

  - if include_requirements
    td
      ul
        - achievement.specific_conditions.each do |condition|
          li = condition.title

  td
    div.btn-group
      - if can?(:award, achievement)
        = link_to course_achievement_course_users_path(current_course, achievement),
                  class: ['btn', 'btn-info'], title: t('.award_button') do
          = fa_icon 'trophy'.freeze
      - else
        = content_tag(:span, class:['btn', 'btn-info'], title: t('.disabled_award_button'),
                             disabled: true) do
          = fa_icon 'trophy'.freeze
      = edit_button([current_course, achievement]) if can?(:edit, achievement)
      = delete_button([current_course, achievement]) if can?(:delete, achievement)


ul.letter-list.inline
  li= inline_value("BP", clinical_observations.bp)
  li= inline_value("Weight", clinical_observations.weight, "kg")
  li= inline_value("Height", clinical_observations.height, "m")
  li= inline_value("BMI", clinical_observations.bmi)
  li= inline_value("Urine Blood", clinical_observations.urine_blood)
  li= inline_value("Urine Protein", clinical_observations.urine_protein)

Fix value display for urine observations

ul.letter-list.inline
  li= inline_value("BP", clinical_observations.bp)
  li= inline_value("Weight", clinical_observations.weight, "kg")
  li= inline_value("Height", clinical_observations.height, "m")
  li= inline_value("BMI", clinical_observations.bmi)
  li= inline_value("Urine Blood", clinical_observations.urine_blood.try!(:text))
  li= inline_value("Urine Protein", clinical_observations.urine_protein.try!(:text))


h3
  = 'Merged data'
.row
  .col-md-12
    = form_tag Settings.ncbi_blast_api, method: :get, target: '_blank', enforce_utf8: false do
      = hidden_field_tag 'CMD', 'Web'
      = hidden_field_tag 'PAGE_TYPE', 'BlastSearch'
      = hidden_field_tag 'LINK_LOC', 'blasthome'
      = text_area_tag 'QUERY', @content, class: 'content-area', id: 'content', readonly: true
      br
      br
      = submit_tag 'Open BLAST', class: 'btn btn-primary'
hr
= link_to 'Back', fasta_data_path

Change merged data to be editable

h3
  = 'Merged data'
.row
  .col-md-12
    = form_tag Settings.ncbi_blast_api, method: :get, target: '_blank', enforce_utf8: false do
      = hidden_field_tag 'CMD', 'Web'
      = hidden_field_tag 'PAGE_TYPE', 'BlastSearch'
      = hidden_field_tag 'LINK_LOC', 'blasthome'
      = text_area_tag 'QUERY', @content, class: 'content-area', id: 'content'
      br
      br
      = submit_tag 'Open BLAST', class: 'btn btn-primary'
hr
= link_to 'Back', fasta_data_path


- content_for(:title)
  | Bourbon - Documentation for Version #{version}
- content_for(:description)
  | Official documentation and technical reference for Bourbon #{version}, a
    lightweight Sass tool set.
- content_for(:preferred_path, "docs/#{version}")

div.p-grid-container
  nav role="navigation"
    ol
      - versions.reverse_each do |version|
        li
          = link_to version, "/docs/#{version}/"
      li
        = link_to "4.2.7", "/docs/4.2.7/"

  nav.c-docs-nav role="navigation"
    ol
      - version.doc_items.each do |item|
        li
          = link_to "##{item.context.name}" do
            code
              = item.context.name

  section.c-docs-list
    - version.doc_items.each do |item|
      article.c-doc-item id="#{item.context.name}"
        = partial "partials/doc_item_header",
                  locals: { item: item, version: version }
        - if item.parameter.present?
          = partial "partials/doc_item_arguments", locals: { item: item }
        - if item.example.present?
          = partial "partials/doc_item_example", locals: { item: item }

Add title to documentation page

- content_for(:title)
  | Bourbon - Documentation for Version #{version}
- content_for(:description)
  | Official documentation and technical reference for Bourbon #{version}, a
    lightweight Sass tool set.
- content_for(:preferred_path, "docs/#{version}")

div.p-grid-container
  h1 Documentation

  nav role="navigation"
    ol
      - versions.reverse_each do |version|
        li
          = link_to version, "/docs/#{version}/"
      li
        = link_to "4.2.7", "/docs/4.2.7/"

  nav.c-docs-nav role="navigation"
    ol
      - version.doc_items.each do |item|
        li
          = link_to "##{item.context.name}" do
            code
              = item.context.name

  section.c-docs-list
    - version.doc_items.each do |item|
      article.c-doc-item id="#{item.context.name}"
        = partial "partials/doc_item_header",
                  locals: { item: item, version: version }
        - if item.parameter.present?
          = partial "partials/doc_item_arguments", locals: { item: item }
        - if item.example.present?
          = partial "partials/doc_item_example", locals: { item: item }


= cache [index_view, post] do
  .post
    h1= link_to post.title, main_app.post_path(*post.url_params)
    .well.well-sm.post-well class=(index_view ? "hidden-xs" : "")
      .header
        .pull-right.col-md-6
          .image #{image_tag post.gravatar_url, class: 'img-circle pull-right' }
          .author #{link_to post.author_name, main_app.posts_by_author_path(post.author.to_param)}
          .email
            #{post.author_email}
            #{post.formatted_published_date}
        .clearfix
      .body #{(index_view ? post.short_description : post.html_body)}
      .bottom
        - if index_view
          .links
            center
              = link_to 'Read More...', main_app.post_path(*post.url_params)
        - else
          .social-links.row= render 'crowdblog/posts/social', post: post

Add a separator to post titles on phone view

= cache [index_view, post] do
  .post
    h1= link_to post.title, main_app.post_path(*post.url_params)
    .well.well-sm.post-well class=(index_view ? "hidden-xs" : "")
      .header
        .pull-right.col-md-6
          .image #{image_tag post.gravatar_url, class: 'img-circle pull-right' }
          .author #{link_to post.author_name, main_app.posts_by_author_path(post.author.to_param)}
          .email
            #{post.author_email}
            #{post.formatted_published_date}
        .clearfix
      .body #{(index_view ? post.short_description : post.html_body)}
      .bottom
        - if index_view
          .links
            center
              = link_to 'Read More...', main_app.post_path(*post.url_params)
        - else
          .social-links.row= render 'crowdblog/posts/social', post: post
  hr.visible-xs


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 = sortable 'name'
    th = sortable 'created_at', 'Submitted'
    th = sortable 'aasm_state', 'Status'

  - @projects.each do |project|
    tr
      td = link_to project.name, project
      td = l project.created_at

Add link to edit project if submitter is logged in

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 = sortable 'name'
    th = sortable 'created_at', 'Submitted'
    th = sortable 'aasm_state', 'Status'

  - @projects.each do |project|
    tr
      td
        = link_to project.name, project
        - if current_user == project.submitter
          = link_to [:edit, project], class: 'edit-project' do
            = icon('edit')
      td = l project.created_at


= tabs do
  = nav_to(t('.students'), course_users_students_path(current_course))
  = nav_to(t('.staff'), course_users_staff_path(current_course))
  = nav_to(course_enrol_requests_path(current_course)) do
    = t('.requests')
    - requests_count = current_course.enrol_requests.count
    =< badge(requests_count) if requests_count > 0
  = nav_to(t('.invite'), invite_course_users_path(current_course), class: 'dropdown')
  = nav_to(course_user_invitations_path(current_course)) do
    = t('.invitations')
    - invitations_count = current_course.invitations.unconfirmed.count
    =< badge(invitations_count) if invitations_count > 0
  - if current_course.show_personalized_timeline_features?
    = nav_to(t('.personal_times'), personal_times_course_users_path(current_course))

Hide course_users tabs based on abilities

= tabs do
  - if can?(:manage, CourseUser.new(course: current_course))
    = nav_to(t('.students'), course_users_students_path(current_course))
    = nav_to(t('.staff'), course_users_staff_path(current_course))
  - if can?(:manage, Course::EnrolRequest.new(course: current_course))
    = nav_to(course_enrol_requests_path(current_course)) do
      = t('.requests')
      - requests_count = current_course.enrol_requests.count
      =< badge(requests_count) if requests_count > 0
  = nav_to(t('.invite'), invite_course_users_path(current_course), class: 'dropdown')
  = nav_to(course_user_invitations_path(current_course)) do
    = t('.invitations')
    - invitations_count = current_course.invitations.unconfirmed.count
    =< badge(invitations_count) if invitations_count > 0
  - if current_course.show_personalized_timeline_features? && can?(:manage_personal_times, current_course)
    = nav_to(t('.personal_times'), personal_times_course_users_path(current_course))


javascript:
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-5421030-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

Remove harcoded analytics account id.

- if Configuration['google_analytics_id'].present?
  javascript:
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '#{Configuration['google_analytics_id']}']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();


#product-details.container(ng-class="{'sold-out': !product.isAvailable() }")
  .row
    .col-sm-6.col-xs-12
      section.gallery
        ng-include(src="'products/gallery.html'")

    .col-sm-6.col-xs-12
      section.details
        h1(ng-bind="product.name")

        p.desc(ng-bind="product.description")

      section.options(ng-show='product.hasVariants')
        variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}")

      section.add.row
        .col-sm-4
          quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()')
        .col-sm-8
          p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()")
            span.fa.fa-exclamation-triangle
            |  This item is sold out

          add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()"
                             product="product"
                             variant="selected.variant"
                             quantity="selected.quantity"
                             class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}")

      section.in-cart.row(ng-show='hasVariant()')
        .col-md-12
          p Item was added to your cart

          checkout-button(user='user')

      ng-include(src="'products/properties.html'")

Remove "item was added" message from PDP, popover now handles this feedback

#product-details.container(ng-class="{'sold-out': !product.isAvailable() }")
  .row
    .col-sm-6.col-xs-12
      section.gallery
        ng-include(src="'products/gallery.html'")

    .col-sm-6.col-xs-12
      section.details
        h1(ng-bind="product.name")

        p.desc(ng-bind="product.description")

      section.options(ng-show='product.hasVariants')
        variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}")

      section.add.row
        .col-sm-4
          quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()')
        .col-sm-8
          p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()")
            span.fa.fa-exclamation-triangle
            |  This item is sold out

          add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()"
                             product="product"
                             variant="selected.variant"
                             quantity="selected.quantity"
                             class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}")

      section.in-cart.row(ng-show='hasVariant()')
        .col-md-12
          checkout-button(user='user')

      ng-include(src="'products/properties.html'")


= form_for @pv_query, :validate => true, remote: true, 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"

Update form_for to rails 4.

= 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"


.actions
  = link_to("Edit", edit_project_path(project))
  - if project.github_url
    = ' | '
    = link_to("Github", project.github_url)
  - if project.github_wiki_url
    = ' | '
    = link_to("Wiki", project.github_wiki_url)
.status
  h1= link_to(project.name, project_path(id: project.id))
  .revisions
    - project.latest_revisions(revision_count).each do |revision|
      .revision
        - presenter = RevisionPresenter.new(revision)
        = link_to(presenter.name, revision.github_url, target: "_blank")
        - presenter.builds.each do |build|
          span.build class=build.status
            = link_to_if(build.status_url, build.name, build.status_url, target: "_blank")

        / Show time of a fully successful revision.
        / Useful for optimizing overall commit-to-production time.
        - if presenter.all_builds_successful?
          span.total-time
            = presenter.total_time_in_words
        span.created-at
          = presenter.created_at

Clarify what 'created at' time represents

.actions
  = link_to("Edit", edit_project_path(project))
  - if project.github_url
    = ' | '
    = link_to("Github", project.github_url)
  - if project.github_wiki_url
    = ' | '
    = link_to("Wiki", project.github_wiki_url)
.status
  h1= link_to(project.name, project_path(id: project.id))
  .revisions
    - project.latest_revisions(revision_count).each do |revision|
      .revision
        - presenter = RevisionPresenter.new(revision)
        = link_to(presenter.name, revision.github_url, target: "_blank")
        - presenter.builds.each do |build|
          span.build class=build.status
            = link_to_if(build.status_url, build.name, build.status_url, target: "_blank")

        / Show time of a fully successful revision.
        / Useful for optimizing overall commit-to-production time.
        - if presenter.all_builds_successful?
          span.total-time
            = presenter.total_time_in_words
        span.created-at
          ' Started
          = presenter.created_at


h2 Your profile
= link_to 'Update', edit_user_profile_path, class: 'btn btn-small btn-primary pull-right' unless @profile.blank?

- if @profile.blank?
  div.alert.alert-danger
    p
      | Your profile is blank! Please #{link_to('create one', new_user_profile_path)}.
      |  You will be ineligible to receive invitations until it is complete.
= render 'profile' unless @profile.blank?

Improve structure markup and edit link of profile display

h2.pull-left
  | Your profile
  span.h2-links
    |  (#{link_to 'edit', edit_user_profile_path unless @profile.blank?})
- if @profile.blank?
  div.alert.alert-danger
    p
      | Your profile is blank! Please #{link_to('create one', new_user_profile_path)}.
      |  You will be ineligible to receive invitations until it is complete.
.row
= render 'profile' unless @profile.blank?


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

header.page-header.group
  div
    h1
      ' Applications

.dashboard-pre-submission
  = render "dashboard_pre_submission"
.dashboard-post-submission
  = render "dashboard_post_submission"

Put switch view button back

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

header.page-header.group
  div
    h1
      ' Applications

  - if Rails.env.development?
    = link_to "Switch view", "#", class: "button button-add js-switch-dashboard-view-btn"

.dashboard-pre-submission
  = render "dashboard_pre_submission"
.dashboard-post-submission
  = render "dashboard_post_submission"


-if @user
  div
    .breadcrumb
      ul.breadcrumb-list
        li
          a(href=index_path)
            = t :front_page
            span.arrow ›
        li
          a(href=alliances_path)
            = 'Vaaliliitot'
            span.arrow ›
    .tabs-container
      .tabs
        ul.tabs-list
          li.active: a(href='#') = t 'navi.all'
      .tab-content
        .tab
          .open-calls
            = render @alliances
          .button-row
            a.btn.js-modal(href=new_alliance_path)
              = t('alliances.create_alliance')

Create Alliance link shown to only union employees

-if @user
  div
    .breadcrumb
      ul.breadcrumb-list
        li
          a(href=index_path)
            = t :front_page
            span.arrow ›
        li
          a(href=alliances_path)
            = 'Vaaliliitot'
            span.arrow ›
    .tabs-container
      .tabs
        ul.tabs-list
          li.active: a(href='#') = t 'navi.all'
      .tab-content
        .tab
          = render @alliances
          .hr
          .button-row
            - if can_admin_calls?
              a.btn.js-modal(href=new_alliance_path)
                = t('alliances.create_alliance')


nav.page
  ul
    li = link_to 'All Projects', projects_path, class: 'back'

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

  = f.input :name, required: true, wrapper_html: { class: 'col-md-6' }
  = f.input :mentor_name, required: true, wrapper_html: { class: 'col-md-6' }
  = f.input :mentor_github_handle, required: true, wrapper_html: { class: 'col-md-6' }
  = f.input :url, as: :url, wrapper_html: { class: 'col-md-6' }
  = f.input :description, wrapper_html: { class: 'col-md-6' }
  = f.input :issues_and_features, wrapper_html: { class: 'col-md-6' }
  = f.input :beginner_friendly, wrapper_html: { class: 'col-md-6' }

  .actions
    ul.list-inline
      li = f.submit 'Submit', class: 'btn btn-success'
      li = link_to 'Cancel', @user, class: 'btn btn-default btn-sm'

img src="https://media.giphy.com/media/F8oLZ6P5WCAbS/giphy.gif"

Remove placeholder image (We'll miss you)


doctype html

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

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand TentD Admin
      ul.nav
        li class=nav_active_class('/apps')
          a href=full_path('/apps') Apps

        li class=nav_active_class('/followings')
          a href=full_path('/followings') Followings

        li class=nav_active_class('/followers')
          a href=full_path('/followers') Followers

  .container
    == yield

Add link to Github tentd repo

doctype html

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

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand TentD Admin
      ul.nav
        li class=nav_active_class('/profile')
          a href=full_path('/profile') Profile

        li class=nav_active_class('/apps')
          a href=full_path('/apps') Apps

        li class=nav_active_class('/followings')
          a href=full_path('/followings') Followings

        li class=nav_active_class('/followers')
          a href=full_path('/followers') Followers

      ul.nav.pull-right
        li
          a href='https://github.com/tent/tentd' Check for updates on Github

  .container
    == yield


- title "Billing Periods"

.row
  .span9
    table#billing_periods.table.span3
      thead
        tr
          th Begin date
          th End date
      tbody
        - @billing_periods.each do |bp|
          tr data-id="#{bp.id}"
            td= bp.begin_date
            td= bp.end_date
  .span3
    button.btn.btn-primary.btn-large data-toggle="modal" data-target="#bp_form_modal" Create Billing Period

= render 'bp_form_modal', modal_title: "Create Billing Period"

Add button toolbar for billing periods

- title "Billing Periods"

.row
  .span8
    table#billing_periods.table.span3
      thead
        tr
          th Begin date
          th End date
          th
      tbody
        - @billing_periods.each do |bp|
          tr.billing-period data-id="#{bp.id}"
            td= bp.begin_date
            td= bp.end_date
            td.btn-toolbar
              button.btn.edit-billing-period Edit
              = link_to "Delete", billing_period_path(bp), :class => "btn btn-danger destroy-billing-period", method: :delete, confirm: "Are you sure you want to delete this billing period?"
  .span3.offset1
    button.btn.btn-primary.btn-large data-toggle="modal" data-target="#bp_form_modal" Create Billing Period

= render 'bp_form_modal', modal_title: "Create Billing Period"


- if (can? :activate, location) && location.activated?
  = link_to t('shared.deactivate'), "/manage/#{location.model_name.route_key}/#{location.id}/deactivate", method: :patch, class: 'button -secondary'
- if (can? :deactivate, location) && location.deactivated?
  = link_to t('shared.activate'), "/manage/#{location.model_name.route_key}/#{location.id}/activate", method: :patch, class: 'button -secondary'

Change the Activate button styles

- if (can? :activate, location) && location.activated?
  = link_to t('shared.deactivate'), "/manage/#{location.model_name.route_key}/#{location.id}/deactivate", method: :patch, class: 'button -secondary'
- if (can? :deactivate, location) && location.deactivated?
  = link_to t('shared.activate'), "/manage/#{location.model_name.route_key}/#{location.id}/activate", method: :patch, class: 'button -type-a'


h2= @speaker.name

.row
  .col-sm-3.col-md-3
    .thumbnail
      img src=@speaker.profile_photo_url

  .col-sm-3.col-md3
    h3= link_to "https://twitter.com/#{@speaker.twitter}" do
      i.fa.fa-twitter
      = " #{@speaker.twitter}"
    h4= link_to "mailto:#{@speaker.email}" do
      i.fa.fa-envelope-o
      = " #{@speaker.email}"

Increase column width for speaker profile details

h2= @speaker.name

.row
  .col-sm-3.col-md-3
    .thumbnail
      img src=@speaker.profile_photo_url

  .col-sm-4.col-md-4
    h3= link_to "https://twitter.com/#{@speaker.twitter}" do
      i.fa.fa-twitter
      = " #{@speaker.twitter}"
    h4= link_to "mailto:#{@speaker.email}" do
      i.fa.fa-envelope-o
      = " #{@speaker.email}"


= link_to "GOV.UK Content Planner", root_path, :class => 'navbar-brand'
ul.nav
  - if user_signed_in?
    = nav_item "Content Plans", content_plans_path, "content_plans"
    = nav_item "Content", contents_path, "contents"
    = nav_item "Tags", tags_path, "tags"

p class='nav navbar-text pull-right'
  = current_user.name
  |  |
  = link_to "Sign out", gds_sign_out_path

Add in links to Maslow and Transition

= link_to "GOV.UK Content Planner", root_path, :class => 'navbar-brand'
ul.nav
  - if user_signed_in?
    li
      = link_to "User Needs", Plek.current.find('maslow'), target: "_blank"
    li
      = link_to "Transition", Plek.current.find('transition'), target: "_blank"
    = nav_item "Content Plans", content_plans_path, "content_plans"
    = nav_item "Content", contents_path, "contents"
    = nav_item "Tags", tags_path, "tags"

p class='nav navbar-text pull-right'
  = current_user.name
  |  |
  = link_to "Sign out", gds_sign_out_path


= component_tag_for tabs do
  .outer
    = tabs.decorate.background

    - inner_content = capture do
      = tabs.decorate.h1

      /! Nav tabs
      ul.nav.nav-tabs role='tablist'
        - tabs.items.each_with_index do |item, i|
          li[class=('active' if i.zero?)]
            a data-toggle='tab' href="##{dom_id(item)}" role='tab'
              = item.decorate.icon
              = item.h1

      /! Tab panes
      .tab-content
        - tabs.items.each_with_index do |item, i|
          .tab-pane.fade id=dom_id(item) class=('active in' if i.zero?)
            - if item_capture = tabs.options[:custom_items] && tabs.options[:custom_items][item.key]
              = item_capture
            - else
              = component item.key

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

Update Tabs template - Render items passing object instead key

= component_tag_for tabs do
  .outer
    = tabs.decorate.background

    - inner_content = capture do
      = tabs.decorate.h1

      /! Nav tabs
      ul.nav.nav-tabs role='tablist'
        - tabs.items.each_with_index do |item, i|
          li[class=('active' if i.zero?)]
            a data-toggle='tab' href="##{dom_id(item)}" role='tab'
              = item.decorate.icon
              = item.h1

      /! Tab panes
      .tab-content
        - tabs.items.each_with_index do |item, i|
          .tab-pane.fade id=dom_id(item) class=('active in' if i.zero?)
            - if item_capture = tabs.options[:custom_items] && tabs.options[:custom_items][item.key]
              = item_capture
            - else
              = component item

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


footer.application-footer
  hr.section-break
  = link_to "Submit a Repo", new_repo_path, class: 'button footer-action'

  p.credits
    a href="https://www.schneems.com" class="credits-link"
      = image_tag "schneems.svg", class: "credits-logo"
      | Created by Schneems

    a href="https://thoughtbot.com" class="credits-link"
      = image_tag "thoughtbot.svg", class: "credits-logo"
      | Designed by thoughtbot

    a href="https://www.heroku.com" class="credits-link"
      = image_tag "heroku.svg", class: "credits-logo heroku-logo"
      | Powered by Heroku

  p.housekeeping
    = link_to "What is CodeTriage?", what_path
    = link_to "Privacy Policy", privacy_path
    = link_to "Support", support_path
    = link_to "Fork us on GitHub", "https://github.com/codetriage/codetriage"

  p
    | © CodeTriage
    = Time.now.year

Add intentionally blank alt text to logo images

footer.application-footer
  hr.section-break
  = link_to "Submit a Repo", new_repo_path, class: 'button footer-action'

  p.credits
    a href="https://www.schneems.com" class="credits-link"
      = image_tag "schneems.svg", class: "credits-logo", alt: ''
      | Created by Schneems

    a href="https://thoughtbot.com" class="credits-link"
      = image_tag "thoughtbot.svg", class: "credits-logo", alt: ''
      | Designed by thoughtbot

    a href="https://www.heroku.com" class="credits-link"
      = image_tag "heroku.svg", class: "credits-logo heroku-logo", alt: ''
      | Powered by Heroku

  p.housekeeping
    = link_to "What is CodeTriage?", what_path
    = link_to "Privacy Policy", privacy_path
    = link_to "Support", support_path
    = link_to "Fork us on GitHub", "https://github.com/codetriage/codetriage"

  p
    | © CodeTriage
    = Time.now.year


article.panel
  == event.microdata_meta

  header
    h3 = link_to event.title, event_path(event)

    = time_tag event.start_date.to_datetime, l(event.start_date, format: :short)
    span ,
    = time_tag event.end_date.to_datetime, l(event.end_date, format: :short)

    div = simple_format(event.content)

  = render '/videos/index', resource: event

Add condition to display start_date and end_date only if this attributes are not nil

article.panel
  == event.microdata_meta

  header
    h3 = link_to event.title, event_path(event)

    = time_tag event.start_date.to_datetime, l(event.start_date, format: :short) if event.start_date?
    span ,
    = time_tag event.end_date.to_datetime, l(event.end_date, format: :short) if event.end_date?

    div = simple_format(event.content)

  = render '/videos/index', resource: event


table
  th State
  th Title
  th Milestone
  th Assigned user

  - @tasks.each do |task|
    tr
      td = task.state
      td = task.title
      td = task.milestone.try :name
      td = task.assigned_user.try :name

p = link_to 'Create new task', new_project_task_path

Replace `try` invoke with the newly created delegator.

table
  th State
  th Title
  th Milestone
  th Assigned user

  - @tasks.each do |task|
    tr
      td = task.state
      td = task.title
      td = task.milestone.try :name
      td = task.assigned_user_name

p = link_to 'Create new task', new_project_task_path


= semantic_form_for @<%= singular_name %> do |f|
  = f.inputs do
  <%- attributes.each do |attribute| -%>
    = f.input :<%= attribute.name %>
  <%- end -%>

  = f.buttons do
    = f.commit_button

Fix submit button in slim template

= semantic_form_for @<%= singular_name %> do |f|
  = f.inputs do
  <%- attributes.each do |attribute| -%>
    = f.input :<%= attribute.name %>
  <%- end -%>

  = f.actions do
    = f.action :submit, as: :input


- content_for(:head) do
  = wicked_pdf_stylesheet_link_tag "renalware/hd_diary_pdf"

.hd-diary-pdf
  h3= unit&.name
  h2= "HD Diary #{diary}"
  .diary
    .diary__grid
      - diary.each_diurnal_period do |diurnal_period|
        - day_columns_width_pct = (100 - 20) / diary.day_names.count
        table.diary__period*{ "data-period-code" => diurnal_period.code }
          thead
            tr
              th(colspan=8)
                h3= diurnal_period.code.upcase
            tr
              th.col-width-medium(style="width: 20%") Station
              - diary.day_names.each do |day|
                th.col-width-small(style="width: #{day_columns_width_pct}%")= day.capitalize

          tbody
            - diary.each_station do |station, index|
              tr
                th= "#{index}. #{station.name}"

                - diary.each_day(diurnal_period, station) do |slot, _day_of_week|
                  - with_format(:html) do
                    td
                      - if slot.patient.present?
                        = slot.patient.family_name
                        br
                        = slot.patient.given_name

Add page break between periods in HD diary PDF

- content_for(:head) do
  = wicked_pdf_stylesheet_link_tag "renalware/hd_diary_pdf"

.hd-diary-pdf
  h3= unit&.name
  h2= "HD Diary #{diary}"
  .diary
    .diary__grid
      - diary.each_diurnal_period do |diurnal_period|
        - day_columns_width_pct = (100 - 20) / diary.day_names.count
        table.diary__period*{ "data-period-code" => diurnal_period.code }
          thead
            tr
              th(colspan=8)
                h3= diurnal_period.code.upcase
            tr
              th.col-width-medium(style="width: 20%") Station
              - diary.day_names.each do |day|
                th.col-width-small(style="width: #{day_columns_width_pct}%")= day.capitalize

          tbody
            - diary.each_station do |station, index|
              tr
                th= "#{index}. #{station.name}"

                - diary.each_day(diurnal_period, station) do |slot, _day_of_week|
                  - with_format(:html) do
                    td
                      - if slot.patient.present?
                        = slot.patient.family_name
                        br
                        = slot.patient.given_name
        .page-break


li class="activity #{activity.kind}"
  div.row
    div.avatars.hidden-xs.col-sm-4.col-md-3
      - activity.students.each do |student|
        = image_tag(student.avatar_url, class: "avatar") if student.avatar_url

    div.text.col-sm-8.col-md-9
      h4.title
        = link_to(activity.title, status_update_path(activity))
      p.info
        = link_to activity.team.display_name, activity.team
        '  —
        span.published_at = "at #{l activity.published_at, format: :long}".html_safe if activity.published_at
      p
        = render_markdown(activity.content).html_safe

Use `.present?` to check for attribute

li class="activity #{activity.kind}"
  div.row
    div.avatars.hidden-xs.col-sm-4.col-md-3
      - activity.students.each do |student|
        = image_tag(student.avatar_url, class: "avatar") if student.avatar_url.present?

    div.text.col-sm-8.col-md-9
      h4.title
        = link_to(activity.title, status_update_path(activity))
      p.info
        = link_to activity.team.display_name, activity.team
        '  —
        span.published_at = "at #{l activity.published_at, format: :long}".html_safe if activity.published_at
      p
        = render_markdown(activity.content).html_safe


- for interview in @interviews do
	figure
		a href='http://#{interview.slug}.usesthis.com/' title='View an interview with #{interview.name}.'
			img.portrait src='/images/thumbnails/#{interview.slug}.jpg' width='500' height='335

	h2.person
		a href='http://#{interview.slug}.usesthis.com/' title='View an interview with #{interview.name}.'= interview.name
	p.summary= interview.summary
	p.details
		| Posted
		time datetime='#{interview.published_on}'= interview.published_on

Use the portrait, not the thumbnail. Initial categories chunk.

- for interview in @interviews do
	figure
		a href='http://#{interview.slug}.usesthis.com/' title='View an interview with #{interview.name}.'
			img.portrait src='/images/portraits/#{interview.slug}.jpg' width='500' height='335

	h2.person
		a href='http://#{interview.slug}.usesthis.com/' title='View an interview with #{interview.name}.'= interview.name
	p.summary= interview.summary
	p.details
		| Posted
		time datetime='#{interview.published_on}'= interview.published_on
		|  in
		- interview.categories.each do |category|
			a href="/interviews/#{category.slug}/" rel="#{category.slug}" = category.slug