doctype html
html lang="en"
  head
    meta charset="utf-8" /
    meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /

    title = [content_for?(:title) ?  yield(:title) : nil, site_name].join ' - '
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    link rel="icon" type="image/x-icon" href=image_url("favicon.png")
    = csrf_meta_tag
  body
    == render "navbar"

    .container
      .row.row-offcanvas.row-offcanvas-right
        .main.col-12.col-md-9
          - flash.each do |type, message|
            .alert class=bootstrap_class_for(type) role="alert"
              = message

          == yield
        #sidebar.col-6.col-md-3.sidebar-offcanvas
          == render "sidebar"

    footer.footer
      .container
        ul
          li
            a href="https://github.com/csexton/corporate-tool"
              = image_tag 'logo.png', class: 'logo', style: "max-height: 20px;"
          li
            a href=root_path
              | Home
          li
            a href=pages_path
              | List Pages
          li
            a href=gists_path
              | List Gists

Adjust the sidebar responsive view

doctype html
html lang="en"
  head
    meta charset="utf-8" /
    meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" /

    title = [content_for?(:title) ?  yield(:title) : nil, site_name].join ' - '
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    link rel="icon" type="image/x-icon" href=image_url("favicon.png")
    = csrf_meta_tag
  body
    == render "navbar"

    .container
      .row.row-offcanvas.row-offcanvas-right
        .main.col-12.col-md-9
          - flash.each do |type, message|
            .alert class=bootstrap_class_for(type) role="alert"
              = message

          == yield
        #sidebar.col-12.col-lg-3.sidebar-offcanvas
          == render "sidebar"

    footer.footer
      .container
        ul
          li
            a href="https://github.com/csexton/corporate-tool"
              = image_tag 'logo.png', class: 'logo', style: "max-height: 20px;"
          li
            a href=root_path
              | Home
          li
            a href=pages_path
              | List Pages
          li
            a href=gists_path
              | List Gists


doctype html
html
  head
    title Cocoatree
    meta name="keywords" content="cocoapods"
    meta name="author" content="Jens Bissinger"
    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = javascript_include_tag "boot", "data-turbolinks-track" => true
    = csrf_meta_tags
    body
      = yield

Make layout responsive on small screen devices.

doctype html
html
  head
    title Cocoatree
    meta name="keywords" content="cocoapods"
    meta name="author" content="Jens Bissinger"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = javascript_include_tag "boot", "data-turbolinks-track" => true
    = csrf_meta_tags
    body
      = yield


doctype html
html
    head
        title Discounty
        == stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
        == javascript_include_tag 'application', 'data-turbolinks-track' => true
        == csrf_meta_tags

    body

        == yield

Make use of title gem

doctype html
html
    head
        title
            = title
        == stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
        == javascript_include_tag 'application', 'data-turbolinks-track' => true
        == csrf_meta_tags

    body

        == yield


- scale_to ||= run.duration_ms(timing)
- overlap ||= false
.timeline style="margin-top: .75em;" class=(overlap ? 'absolute' : '')
  - run.collapsed_segments(timing).each_with_index do |segment, index|
    .pure-u.inspect id="#{run.id36}-inspect-#{index}" style="width: #{segment.duration_ms(timing).to_f / scale_to * 100}%; visibility: hidden;"
      .bar
        p
      div class="#{"mx-2" if segment.first? || segment.last?} #{"second-half" if segment.second_half?(timing)}"
        div = segment.name
        .text-light-50 #{format_ms(segment.duration_ms(timing))} duration
        .text-light-50 #{format_ms(segment.end_ms(timing))} finished
        - if segment.gold?(timing) || run.has_skipped_splits?(timing) || !run.has_golds?(timing) || segment.duration_ms(timing) == segment.shortest_duration_ms(timing)
          .text-gold Best!
        - else
          .text-success
            | #{format_ms_casual(segment.duration_ms(timing) - segment.shortest_duration_ms(timing), 1)} potential save

Fix showing "Best!" too much

- scale_to ||= run.duration_ms(timing)
- overlap ||= false
.timeline style="margin-top: .75em;" class=(overlap ? 'absolute' : '')
  - run.collapsed_segments(timing).each_with_index do |segment, index|
    .pure-u.inspect id="#{run.id36}-inspect-#{index}" style="width: #{segment.duration_ms(timing).to_f / scale_to * 100}%; visibility: hidden;"
      .bar
        p
      div class="#{"mx-2" if segment.first? || segment.last?} #{"second-half" if segment.second_half?(timing)}"
        div = segment.name
        .text-light-50 #{format_ms(segment.duration_ms(timing))} duration
        .text-light-50 #{format_ms(segment.end_ms(timing))} finished
        - if segment.gold?(timing)
          .text-gold Best!
        - else
          - unless run.has_skipped_splits?(timing) || !run.has_golds?(timing) || segment.duration_ms(timing) == segment.shortest_duration_ms(timing)
            .text-success
              | #{format_ms_casual(segment.duration_ms(timing) - segment.shortest_duration_ms(timing), 1)} potential save


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

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

Add fields for project form

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' }

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


doctype html
html
  head
    title
      == content_for?(:title) ? yield(:title) : "Fabble"
    == content_for?(:stylesheet) ? yield(:stylesheet) : stylesheet_link_tag("dashboard", media: "all", "data-turbolinks-track" => true)
    == content_for?(:javascript) ? yield(:javascript) : javascript_include_tag("application", "data-turbolinks-track" => true)
    == content_for?(:ogp) ? yield(:ogp) : nil
    == csrf_meta_tags
  body
    == render "components/analytics"
    == render "layouts/header"
    == content_for?(:content) ? yield(:content) : yield
    == render "layouts/footer"
    == content_for?(:bottom) ? yield(:bottom) : nil
    - if Rails.env.development?
      hr
        == form_tag "/su" do
          == select_tag "user_id", options_from_collection_for_select(User.all, :id, :name)
          == submit_tag "su"
          == submit_tag "reset"

Add support for google tracking code

doctype html
html
  head
    title
      == content_for?(:title) ? yield(:title) : "Fabble"
    == content_for?(:stylesheet) ? yield(:stylesheet) : stylesheet_link_tag("dashboard", media: "all", "data-turbolinks-track" => true)
    == content_for?(:javascript) ? yield(:javascript) : javascript_include_tag("application", "data-turbolinks-track" => true)
    == content_for?(:ogp) ? yield(:ogp) : nil
    == csrf_meta_tags
  body
    == render "components/analytics"
    == render "layouts/header"
    == content_for?(:content) ? yield(:content) : yield
    == render "layouts/footer"
    == content_for?(:bottom) ? yield(:bottom) : nil
    - if ENV['GA_TRACKING_ID']
      script{async src=("https://www.googletagmanager.com/gtag/js?id=#{ ENV['GA_TRACKING_ID'] }")}
      javascript:
        window.dataLayer = window.dataLayer || [];
        function gtag() {
          dataLayer.push(arguments);
        }
        gtag('js', new Date());
        gtag('config', "#{ ENV['GA_TRACKING_ID'] }");

    - if Rails.env.development?
      hr
        == form_tag "/su" do
          == select_tag "user_id", options_from_collection_for_select(User.all, :id, :name)
          == submit_tag "su"
          == submit_tag "reset"


nav.navbar.navbar-inverse
  .container
    .navbar-header
      button.navbar-toggle.collapsed aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"  Kiwi Learn
    #navbar.collapse.navbar-collapse
      ul.nav.navbar-nav
        - if current_page?
          li class="current_page_item"
            a href='/' id='home'  Home
        - else
          li
            a href='/' id='home'  Home
        - if current_page?('search')
          li class='current_page_item'
            a href='/search' id='search'  Search
        - else
          li
            a href='/search' id='search'  Search
        - if current_page?('courses')
          li class='current_page_item'
            a href='/courses' id='courses'  Courses
        - else
          li
            a href='/courses' id='courses'  Courses

Add statistic view page in menu

nav.navbar.navbar-inverse
  .container
    .navbar-header
      button.navbar-toggle.collapsed aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"  Kiwi Learn
    #navbar.collapse.navbar-collapse
      ul.nav.navbar-nav
        - if current_page?
          li class="current_page_item"
            a href='/' id='home'  Home
        - else
          li
            a href='/' id='home'  Home
        - if current_page?('search')
          li class='current_page_item'
            a href='/search' id='search'  Search
        - else
          li
            a href='/search' id='search'  Search
        - if current_page?('courses')
          li class='current_page_item'
            a href='/courses' id='courses'  Courses
        - else
          li
            a href='/courses' id='courses'  Courses
        - if current_page?('statistics')
          li class='current_page_item'
            a href='/statistics' id='courses'  Statistics
        - else
          li
            a href='/statistics' id='courses'  Statistics


= wrap_layout :layout do
	section
		article
			h1 == link_to current_page.data.title, current_page.url
			h2.post-meta by #{data.owner.name} on DATE HERE
			== yield

Add date to article layout.

= wrap_layout :layout do
	section
		article
			h1 == link_to current_page.data.title, current_page.url
			h2.post-meta by #{data.owner.name} on #{current_page.data.date.strftime('%B %-d, %Y')}
			== yield


article
  header
    h2 Details
    - unless problem.archived?
      = link_to t("btn.edit"), edit_patient_problem_path(patient, problem), class: :button

  dl.dl-horizontal
    dt Description:
    dd= problem.description
    dt Recorded On:
    dd= l(problem.updated_at)

Add SNOMED_ID and updator to problem/edit page

article
  header
    h2 Details
    - unless problem.archived?
      = link_to t("btn.edit"), edit_patient_problem_path(patient, problem), class: :button

  dl.dl-horizontal
    dt Description:
    dd= problem.description
    dt SNOMED code:
    dd= problem.snomed_id
    dt Recorded On:
    dd= l(problem.updated_at)
    dt Last updated by:
    dd= problem.updated_by


.brochure
  span.slide-span.first
    span.number-circle 1
    a ng-href='http://www.popuparchive.org/request-invite' target="_self"
      span.title Request an invite
      img.image src='#{asset_path("account.svg")}' style='padding-bottom: 0px;'
      span.content Pop Up Archive is offering access to a limited group of pioneering users. Like to give it a try? Request an invite.

  span.slide-span
    span.number-circle 2
    a ng-href='/imports/choose'
      span.title Archive your audio
      img.image src='#{asset_path("archive.svg")}'
      span.content You can upload individual files or batch import with a CSV.

  span.slide-span
    span.number-circle 3
    a ng-href='/collections'
      span.title Make it searchable
      img.image src='#{asset_path("search.svg")}' style='padding-bottom: 0px;'
      span.content Tags & transcripts will be automatically generated. You can also customize your own metadata.

  span.slide-span
    span.number-circle 4
    a ng-href='/search'
      span.title Explore
      img.image src='#{asset_path("explore.svg")}'
      span.content You can search & browse your own material or the entire public archive.

Change request an invite back to create an account

.brochure
  span.slide-span.first
    span.number-circle 1
    a ng-href='http://www.popuparchive.org/request-invite' target="_self"
      span.title Create an account
      img.image src='#{asset_path("account.svg")}' style='padding-bottom: 0px;'
      span.content Pop Up Archive is offering access to a limited group of pioneering users. Like to give it a try? Request an invite.

  span.slide-span
    span.number-circle 2
    a ng-href='/imports/choose'
      span.title Archive your audio
      img.image src='#{asset_path("archive.svg")}'
      span.content You can upload individual files or batch import with a CSV.

  span.slide-span
    span.number-circle 3
    a ng-href='/collections'
      span.title Make it searchable
      img.image src='#{asset_path("search.svg")}' style='padding-bottom: 0px;'
      span.content Tags & transcripts will be automatically generated. You can also customize your own metadata.

  span.slide-span
    span.number-circle 4
    a ng-href='/search'
      span.title Explore
      img.image src='#{asset_path("explore.svg")}'
      span.content You can search & browse your own material or the entire public archive.


.grid.c-talk-list
- data.schedule.schedule_items.each do |schedule_item|
    .c-talk id = schedule_item.slug
      .c-talk__timeslot.col-1-4 = schedule_item.timeslot
      .c-talk__detail.col-3-4

        - if schedule_item.talk
          - talk = data.speakers.speaker_list.find { |speaker| speaker.slug == schedule_item.slug }
          h2.c-talk__title = speaker.talk.title
          p.c-talk__abstract = speaker.talk.abstract
          .c-talk__speaker
            img.c-talk__speaker-avatar src=("/images/speaker-avatars/#{speaker.avatar}") alt=(speaker.name)
            h3.c-talk__speaker-details
              a href="/speakers/##{speaker.slug}"
                = speaker.name
        - else
          h2.c-talk__title = schedule_item.title
          p.c-talk__abstract = schedule_item.description

Rename `talk` to `speaker` to clear up logic

.grid.c-talk-list
- data.schedule.schedule_items.each do |schedule_item|
  .c-talk id = schedule_item.slug
    .c-talk__timeslot.col-1-4 = schedule_item.timeslot
    .c-talk__detail.col-3-4

      - speaker = data.speakers.speaker_list.find { |speaker| speaker.slug == schedule_item.slug }
      - if speaker
        h2.c-talk__title = speaker.talk.title
        p.c-talk__abstract = speaker.talk.abstract
        .c-talk__speaker
          img.c-talk__speaker-avatar src=("/images/speaker-avatars/#{speaker.avatar}") alt=(speaker.name)
          h3.c-talk__speaker-details
            a href="/speakers/##{speaker.slug}"
              = speaker.name
      - else
        h2.c-talk__title = schedule_item.title
        p.c-talk__abstract = schedule_item.description


<redoc spec-url='/data/docs/builder-api.json'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js"> </script>

Add return to docs button

<button class="return" style="font-size:16; background-color:#007FAB; height:2.5rem;width:10rem; margin:1rem; border-radius:0.33rem">Return to Docs</button>

<redoc spec-url='/data/docs/builder-api.json'></redoc>


- rows ||= 10
- full ||= false
= simple_form_for post do |f|
  = f.hidden_field :referenced_guid

  = field_set_tag do
    = f.input :body, label: false, input_html: { rows: rows }, autofocus: true

  ul.actions
    li = f.submit
    - if post.persisted?
      li or #{link_to 'delete', post, method: 'delete', data: { confirm: 'Are you sure? There is no Undo.'}}?

  - if post.referenced_guid.present?
    .note This post is a reply to: #{link_to post.referenced_guid, post.referenced_guid.with_http}
    - if post.referenced_post.present?
      = render post.referenced_post, hide_actions: true

Fix styling of "delete post" button.

- rows ||= 10
- full ||= false
= simple_form_for post do |f|
  = f.hidden_field :referenced_guid

  = field_set_tag do
    = f.input :body, label: false, input_html: { rows: rows }, autofocus: true

  ul.actions
    li = f.submit
    - if post.persisted?
      li #{link_to 'Delete Post', post, method: 'delete', data: { confirm: 'Are you sure? There is no Undo.'}}

  - if post.referenced_guid.present?
    .note This post is a reply to: #{link_to post.referenced_guid, post.referenced_guid.with_http}
    - if post.referenced_post.present?
      = render post.referenced_post, hide_actions: true


nav.navbar.navbar-default
  .container
    .navbar-header
      button.navbar-toggle.collapsed aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"  Kiwi Learn
    #navbar.collapse.navbar-collapse
      ul.nav.navbar-nav
        - if current_page?
          li class="current_page_item"
            a href='/' id='home'  Home
        - else
          li
            a href='/' id='home'  Home
        - if current_page?('search')
          li class='current_page_item'
            a href='/search' id='search'  Search
        - else
          li
            a href='/search' id='search'  Search
        - if current_page?('courses')
          li class='current_page_item'
            a href='/courses' id='courses'  Courses
        - else
          li
            a href='/courses' id='courses'  Courses
        - if current_page?('statistics')
          li class='current_page_item'
            a href='/statistics' id='courses'  Statistics
        - else
          li
            a href='/statistics' id='courses'  Statistics

Add go to Kiwi Harvest in menu

nav.navbar.navbar-default
  .container
    .navbar-header
      button.navbar-toggle.collapsed aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"  Kiwi Learn
    #navbar.collapse.navbar-collapse
      ul.nav.navbar-nav
        - if current_page?
          li class="current_page_item"
            a href='/' id='home'  Home
        - else
          li
            a href='/' id='home'  Home
        - if current_page?('search')
          li class='current_page_item'
            a href='/search' id='search'  Search
        - else
          li
            a href='/search' id='search'  Search
        - if current_page?('courses')
          li class='current_page_item'
            a href='/courses' id='courses'  Courses
        - else
          li
            a href='/courses' id='courses'  Courses
        - if current_page?('statistics')
          li class='current_page_item'
            a href='/statistics' id='courses'  Statistics
        - else
          li
            a href='/statistics' id='courses'  Statistics
      ul.nav.navbar-nav.navbar-right
        li
          a href='https://kiwi-harvester.herokuapp.com/' Kiwi Harvest


doctype
html
  head
    meta charset="utf-8"
    title Finch
    link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"
    meta http-equiv="refresh" content="30"
  body
    .container
      header class="jumbotron subhead" id="overview"
        .container
          h1 Finch
      table.table.table-bordered
        tr
          th Name
          th State
          th Last success
        - pings.group_by(&:group).each do |group|
          tr
            th colspan=3
              = group.first
          - group.last.each do |ping|
            tr class="#{class_for_status(ping.state)}"
              td= ping.name
              td= ping.state
              td= ping.last_success

Add missing format to doctype declaration

doctype html
html
  head
    meta charset="utf-8"
    title Finch
    link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"
    meta http-equiv="refresh" content="30"
  body
    .container
      header class="jumbotron subhead" id="overview"
        .container
          h1 Finch
      table.table.table-bordered
        tr
          th Name
          th State
          th Last success
        - pings.group_by(&:group).each do |group|
          tr
            th colspan=3
              = group.first
          - group.last.each do |ping|
            tr class="#{class_for_status(ping.state)}"
              td= ping.name
              td= ping.state
              td= ping.last_success


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

- content_for :page_content do
  .user-payments-content.row
    .large-12.columns
      h3 Payments here

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

Add payment engines to users page

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

- content_for :page_content do
  .user-payments-content.row
    .large-12.columns
      h3 Payments here
      - PaymentEngines.engines.each do |engine|
        - if engine[:account_path].present?
          div[id="#{engine[:name]}-account" class="account-method" data-path=engine[:account_path].call]

- if request.xhr?
  = initjs_tag app_name: 'Neighborly', partial: true
  = yield :page_content
- else
  = render template: 'users/edit'


h1(ng-bind-html="page.title")
div(ng-bind-html="page.body")

Use markdown formatted content in page/show


- capture
  h6 =(title || (attr :name).capitalize)
  = html_tag_if !blocks?, :p
    =content
- if admonition_aside?
  aside.admonitionblock id=id class=[(attr :name), role] role=admonition_aria
    - yield_capture
- else
  section.admonitionblock id=id class=[(attr :name), role] role=admonition_aria
    - yield_capture

Use "caption" instead of "name" as fallback for admonition title

- capture
  h6 =(title || caption)
  = html_tag_if !blocks?, :p
    =content
- if admonition_aside?
  aside.admonitionblock id=id class=[(attr :name), role] role=admonition_aria
    - yield_capture
- else
  section.admonitionblock id=id class=[(attr :name), role] role=admonition_aria
    - yield_capture


- hide_reply_references ||= false
= div_for post do
  .post-time.light
    = link_to image_tag(post.user.external_image_url), post.user.url, class: 'avatar'
    = link_to l(post.published_at, format: :time), post.url, title: post.url

  .post-body
    - if post.referenced_post.present? && !hide_reply_references
      .post-quote
        == post.referenced_post.body_html

    == post.body_html

  ul.post-meta
    - if can?(:create, Post)
      li = link_to 'reply', new_post_path(referenced_guid: post.guid)

    - if can?(:edit, post)
      li = link_to 'edit', [:edit, post]

    - if post.domain != current_site.domain
      li = link_to post.guid, post.url

    - if post.referenced_guid.present? && !hide_reply_references
      li In reply to: #{link_to post.referenced_guid, post.referenced_guid.with_http}

Include "in reply to" in post body.

- hide_reply_references ||= false
= div_for post do
  .post-time.light
    = link_to image_tag(post.user.external_image_url), post.user.url, class: 'avatar'
    = link_to l(post.published_at, format: :time), post.url, title: post.url

  .post-body
    - unless hide_reply_references
      - if post.referenced_guid.present?
        p.light In reply to: #{link_to post.referenced_guid, post.referenced_guid.with_http}

        - if post.referenced_post.present?
          .post-quote
            == post.referenced_post.body_html

    == post.body_html

  ul.post-meta
    - if can?(:create, Post)
      li = link_to 'reply', new_post_path(referenced_guid: post.guid)

    - if can?(:edit, post)
      li = link_to 'edit', [:edit, post]

    - if post.domain != current_site.domain
      li = link_to post.guid, post.url


= render 'projets/projet_proposition_acceptee'

Fix proposition acceptée : l'opérateur ne doit pas avoir les CTA du demandeur

article.block.recap-projet
  h3.is-open Projet retenu par le demandeur
  .content-block
    .invoice
      = render 'projets/projet_invoice'


header
  .row
    .small-12.medium-12.large-12.columns
      h2 =t('processed_applications.detail.title')

=build_section 'Personal details', @overview, %w[full_name date_of_birth ni_number status number_of_children total_monthly_income]
=build_section 'Application details', @overview, %w[fee jurisdiction date_received form_name emergency_reason reference]
=build_section 'Processing details', @processed, %w[processed_on processed_by]
=build_section 'Result', @result, %w[savings income]

=render(partial: 'shared/remission_type', locals: { source: @result })

Update view to match summary

header
  .row
    .small-12.medium-12.large-12.columns
      h2 =t('processed_applications.detail.title')

=build_section 'Personal details', @overview, %w[full_name date_of_birth ni_number status number_of_children total_monthly_income]
=build_section 'Application details', @overview, %w[fee jurisdiction date_received form_name case_number deceased_name date_of_death date_fee_paid emergency_reason reference]
=build_section 'Processing details', @processed, %w[processed_on processed_by]
=build_section 'Result', @overview, @overview.savings_investment_params

=render(partial: 'shared/remission_type', locals: { source: @result })


- user = friendship.friend
= div_for friendship do
  = div_for user do
    = link_to user.url, class: 'user-image' do
      = image_tag(user.local_image.url) if user.local_image.present?
    .user-name
      = link_to user.display_name, user.url
    .user-info
      = link_to user.domain, user.url
      |  [#{link_to 'unfriend', friendship, method: 'delete', data: { confirm: 'Are you sure?' }}]

Fix thumbnails in friends list

- user = friendship.friend
= div_for friendship do
  = div_for user do
    = link_to user.url, class: 'user-image' do
      = image_tag(user.local_image.thumb('300x300#').url) if user.local_image.present?
    .user-name
      = link_to user.display_name, user.url
    .user-info
      = link_to user.domain, user.url
      |  [#{link_to 'unfriend', friendship, method: 'delete', data: { confirm: 'Are you sure?' }}]


.page-header
  h1 Pop Up Shows

markdown:
  The Pop Up Show is a Specialty Show-like block of time for current ops to experiment with a certain theme. It will air on Thursdays from noon to 1PM for 4 weeks. Every 4 weeks, a new Pop Up Show will be selected by the Program Director. If no suitable Pop Up Show is presented or if there are more than 4 Thursdays in a given month, the hour will be assigned to the Music Directors for broadcast and discussion of new music they have programmed during a given week. Pop Up Shows can be cancelled by the Program Director at any time for any reason, including FCC violations and straying too far from the original theme proposed in the Sunday Special.

  **To be considered for a Pop Up Show, an op needs to air a Sunday Special in the month prior. Ops can sign up for a Sunday Special [here](http://bit.ly/SSSignUp).**

  Sunday Specials will be approved on a first come, first serve basis. The Pop Up Show for a given month will be announced the Monday following the last Sunday Special of each month. Pop Up shows have to maintain the same theme as the Sunday Specials they were originally submitted as.

  **A schedule of approved Sunday Specials and Pop Up Shows can be found [here](http://bit.ly/SSWREK).**

Edit Pop-Up/Sunday Special page description and header.

.page-header
  h1 Sunday Specials/Pop Up Shows

markdown:
    The Pop-Up Show is a Specialty Show-like block of time for current ops to
experiment with a certain theme for a few weeks. It will air on Thursdays from
6 to 7pm for 2-4 weeks. If a previous Sunday Special host shows interest, a
Pop-Up Show will be selected by the Program Director to follow the same theme.
Pop-Up Shows can be cancelled by the Program Director at any time for any
reason, including FCC violations and straying too far from the original theme
proposed in the Sunday Special.

    **To be considered for a Pop-Up Show, an op needs to air a Sunday Special
in the month prior. Ops can sign up for a Sunday Special [here][1].**

    Sunday Specials will be approved on a first come, first serve basis. Pop-Up
shows have to maintain the same theme as the Sunday Specials they were
originally submitted as.

    **A schedule of approved Sunday Specials and Pop-Up Shows can be found
[here][2].**

    Generally, to become a weekly Specialty Show, one must start as a Sunday
Special then as a Pop-Up Show.

[1]: https://goo.gl/forms/Eq3cxu7WObaXX9Ll1
[2]: https://docs.google.com/spreadsheets/d/1oRecX100mUMSjLYW-_tsEjOrO3uxvQTXA2JhmX24ts0/edit?usp=sharing


ul[class=:breadcrumb]
  li = link_to 'Applications', [:mentor, :applications]

p Get insight in certain fields of teams applying to work on your project this summer. You can take notes for yourself and pick your favorite applications; faving will make the application more likely to be accepted and having the team work on your project this summer.

table.applications.table.table-striped.table-bordered.table-condensed.table-hover
  caption Teams applying for your projects this season.
  thead
    tr
      th Application (Team)
      th Project
      th Sign-off
      th Fav
  tbody
    - @applications.each do |application|
      tr
        td = link_to application.team_name, mentor_application_path(id: application.id)
        td
          = link_to application.project_name, project_path(application.project_id)
          - if application.first_choice
            | #{icon('star')}
        td = link_to icon('ok') + " Sign-off", '#', class: 'btn btn-primary'
        td = link_to icon('heart') + " Favorite", '#', class: 'btn btn-success'
p
  i Teams may apply for two projects. Their second choice serves as a fallback if they do not get accepted for the first one
  br
  i The #{icon('star')} indicates when a team chose the project as their first choice.

Add confirm dialogues w/ explanations

ul[class=:breadcrumb]
  li = link_to 'Applications', [:mentor, :applications]

p Get insight in certain fields of teams applying to work on your project this summer. You can take notes for yourself and pick your favorite applications; faving will make the application more likely to be accepted and having the team work on your project this summer.

table.applications.table.table-striped.table-bordered.table-condensed.table-hover
  caption Teams applying for your projects this season.
  thead
    tr
      th Application (Team)
      th Project
      th Sign-off
      th Fav
  tbody
    - @applications.each do |application|
      tr
        td = link_to application.team_name, mentor_application_path(id: application.id)
        td
          = link_to application.project_name, project_path(application.project_id)
          - if application.first_choice
            | #{icon('star')}
        td = link_to icon('ok'), '#', class: 'btn btn-primary', data: { confirm: 'By signing-off this application, you deem this team fit to work on your project and that they meet the requirements. Proceed?' }
        td = link_to icon('heart'), '#', class: 'btn btn-success', data: { confirm: 'By fav\'ing this application, you declare that this would be one of your preferred teams. You can fav more than one application. Proceed?' }
p
  i Teams may apply for two projects. Their second choice serves as a fallback if they do not get accepted for the first one
  br
  i The #{icon('star')} indicates when a team chose the project as their first choice.


!5
html lang="en" xmlns="http://www.w3.org/1999/html"

  head
    title {{ config['TITLE'] }}
    meta http-equiv="x-ua-compatible" content="ie=edge"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    link rel="shortcut icon" href="{{ url_for('static', filename='imgs/favicon.ico') }}" type="image/x-icon"
    link rel="icon" href="{{ url_for('static', filename='imgs/favicon.ico') }}" type="image/x-icon"
    link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Oxygen:400,300,700"

    - assets "libs.css"
      link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}"
    - assets "style"
      link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}"
    - assets "libs.js"
      %script type="text/javascript" src="{{ ASSET_URL }}"

  body
    div#wrapper
      - include '_header.slim'
      main
        - include '_flash.slim'
        @block content
      - include '_footer.slim'
      - assets "init"
        %script type="text/javascript" src="{{ ASSET_URL }}"

Remove init.js from wrapper tag


p
  strong Name:
  span.editable
  = table.name
p
  strong ID:
  = table.id

Fix editing of table name.


.hide-for-small.logo.center= image_tag '/images/sciencegist-logo-medium.png'
.show-for-small.logo.center= image_tag '/images/sciencegist-logo-small.png'

Make logo on blog link to home page

.hide-for-small.logo.center=link_to image_tag('/images/sciencegist-logo-medium.png'), root_url(subdomain: 'www')
.show-for-small.logo.center=link_to image_tag('/images/sciencegist-logo-small.png'), root_url(subdomain: 'www')


- if user_signed_in?
  ul.nav
    li
			a bs-dropdown="userMenu"
				i.icon-user
				= current_user.name
				i.icon-chevron-down
    li
      a
        span#loading-gear.animated.flash ng-show="loading()"
          img.image.icon-spin src='#{asset_path("gear.svg")}' style="color: #333"
  ul.nav ng-controller="AlertCtrl"
    li#alerts-container
      a pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
        span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
- else
  ul.nav
    li = link_to('Sign in', new_user_session_path, { target: '_self', class: 'btn', id: 'navbarbutton' })

Add user icon to Sign In

- if user_signed_in?
  ul.nav
    li
			a bs-dropdown="userMenu"
				i.icon-user
				= current_user.name
				i.icon-chevron-down
    li
      a
        span#loading-gear.animated.flash ng-show="loading()"
          img.image.icon-spin src='#{asset_path("gear.svg")}' style="color: #333"
  ul.nav ng-controller="AlertCtrl"
    li#alerts-container
      a pop-up-alerts-dropdown="alertData.alerts" ng-class="{'with-information':alertData.alerts.length}"
        span.number-circle.ng-cloak ng-show="alertData.alerts.length" {{alertData.alerts.length}}
- else
  ul.nav
    li= link_to( '<i class="icon-user"></i> sign in'.html_safe, new_user_session_path, { target: '_self'})


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

Add navigation link to exercise collections

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


.p-profile-header.p-profile-header--low.d-flex
  .p-profile-header__cover-image style="background: url(#{profile_background_image_url(user.profile, size: '800x520', size_rate: 2)}) center center /cover no-repeat;"
  .p-profile-header__info.align-self-end.py-3
    .container
      .row
        .col.u-flex-grow-0
          = link_to user_path(username: user.username) do
            = ann_image_tag(user.profile, :tombo_avatar, size: "80x80", class: "p-profile-header__avatar rounded-circle")
        .col.pt-2.pl-0
          h1
            = link_to user.profile.name, user_path(username: user.username), class: "font-weight-bold"
          .mt-2
            = link_to "@#{user.username}", user_path(username: user.username)

Make hovered link color white

.p-profile-header.p-profile-header--low.d-flex
  .p-profile-header__cover-image style="background: url(#{profile_background_image_url(user.profile, size: '800x520', size_rate: 2)}) center center /cover no-repeat;"
  .p-profile-header__info.align-self-end.py-3
    .container
      .row
        .col.u-flex-grow-0
          = link_to user_path(username: user.username) do
            = ann_image_tag(user.profile, :tombo_avatar, size: "80x80", class: "p-profile-header__avatar rounded-circle")
        .col.pt-2.pl-0
          h1
            = link_to user.profile.name, user_path(username: user.username), class: "font-weight-bold text-white"
          .mt-2
            = link_to "@#{user.username}", user_path(username: user.username), class: "text-white"


.modal id="rewards_banner_intro_modal" role="dialog" tabindex="-1"
  .modal-dialog
    .modal-header id="instant-donation-modal-selection"
      center id="intro-container"
        = image_tag "icn-donation-jar@1x.png", id: 'icn-donation-jar'
        h2.modal-title = t ".headline"
        p = t ".intro"
        = hidden_field_tag 'preferred_currency', current_publisher.wallet.default_currency
        = hidden_field_tag 'conversion_rate', current_publisher.wallet.rates[current_publisher.wallet.default_currency]
        = link_to(t(".continue"), "#", class: 'btn btn-primary', id: "open-banner-button")
      center
    .modal-header style="display: none;" id="rewards-banner-container"
      = hidden_field_tag 'publisher_id', current_publisher.id

Check default currency for nil and BAT, return USD in either case

.modal id="rewards_banner_intro_modal" role="dialog" tabindex="-1"
  .modal-dialog
    .modal-header id="instant-donation-modal-selection"
      center id="intro-container"
        = image_tag "icn-donation-jar@1x.png", id: 'icn-donation-jar'
        h2.modal-title = t ".headline"
        p = t ".intro"
        = link_to(t(".continue"), "#", class: 'btn btn-primary', id: "open-banner-button")
        - if !current_publisher.wallet.default_currency.nil? && !current_publisher.wallet.default_currency.eql?('BAT')
          = hidden_field_tag 'preferred_currency', current_publisher.wallet.default_currency
          = hidden_field_tag 'conversion_rate', current_publisher.wallet.rates[current_publisher.wallet.default_currency]
        - else
          = hidden_field_tag 'preferred_currency', 'USD'
          = hidden_field_tag 'conversion_rate', current_publisher.wallet.rates['USD']
      center
    .modal-header style="display: none;" id="rewards-banner-container"
      = hidden_field_tag 'publisher_id', current_publisher.id


#page_content
  .container
    .site-partners
      h1 Parceiros
      h2 Conheça nossos principais parceiros

      .site-partners-nav
        - @site_partners.each do |partner|
          .partner
            = image_tag partner.logo.regular.url

      .partners-details
        - @site_partners.each do |partner|
          .partner-details
            h3 = partner.name
            h4
              span Endereço:
              =< partner.address
            h4
              span Contato:
              =< partner.phone
            h4
              span Site:
              =< link_to partner.url
            p
              = partner.bio

      = content_for :custom_javascripts do
        javascript:
          $(document).ready(function(){
            $('.partners-details').slick({
              slidesToShow: 1,
              slidesToScroll: 1,
              arrows: false,
              fade: true,
              asNavFor: '.site-partners-nav'
            });
            $('.site-partners-nav').slick({
                slidesToShow: 5,
                slidesToScroll: 1,
                asNavFor: '.partners-details',
                centerMode: true,
                focusOnSelect: true,
                prevArrow: '<button type="button" class="slick-prev custom-arrow"></button>',
                nextArrow: '<button type="button" class="slick-next custom-arrow"></button>'
            });
          });

Fix the partners link on the partners page

#page_content
  .container
    .site-partners
      h1 Parceiros
      h2 Conheça nossos principais parceiros

      .site-partners-nav
        - @site_partners.each do |partner|
          .partner
            = image_tag partner.logo.regular.url

      .partners-details
        - @site_partners.each do |partner|
          .partner-details
            h3 = partner.name
            h4
              span Endereço:
              =< partner.address
            h4
              span Contato:
              =< partner.phone
            h4
              span Site:
              =< link_to partner.url, partner.url
            p
              = partner.bio

      = content_for :custom_javascripts do
        javascript:
          $(document).ready(function(){
            $('.partners-details').slick({
              slidesToShow: 1,
              slidesToScroll: 1,
              arrows: false,
              fade: true,
              asNavFor: '.site-partners-nav'
            });
            $('.site-partners-nav').slick({
                slidesToShow: 5,
                slidesToScroll: 1,
                asNavFor: '.partners-details',
                centerMode: true,
                focusOnSelect: true,
                prevArrow: '<button type="button" class="slick-prev custom-arrow"></button>',
                nextArrow: '<button type="button" class="slick-next custom-arrow"></button>'
            });
          });


= stylesheet_link_tag 'umakadata/bootstrap-datepicker3.min'
= stylesheet_link_tag 'umakadata/calendar'
= javascript_include_tag 'bootstrap-datepicker.min'

javascript:
  $(function(){
    $('#calendar').datepicker({
      autoclose: true,
      startDate: "#{@start_date}",
      endDate: new Date(),
      format: 'dd-mm-yyyy',
      todayHighlight: true,
    });
  });

.form-inline.calendar-form.pull-right
  .form-group
    label.calendar-title Data for the day of
    input.date-input#calendar[readonly='readonly' name='date' value=@date.strftime('%d-%b-%Y')]
    input.go-button#jump-button[type='button' value='GO']

Change the date format for calendar.

= stylesheet_link_tag 'umakadata/bootstrap-datepicker3.min'
= stylesheet_link_tag 'umakadata/calendar'
= javascript_include_tag 'bootstrap-datepicker.min'

javascript:
  $(function(){
    $('#calendar').datepicker({
      autoclose: true,
      startDate: "#{@start_date}",
      endDate: new Date(),
      format: 'dd-M-yyyy',
      todayHighlight: true,
    });
  });

.form-inline.calendar-form.pull-right
  .form-group
    label.calendar-title Data for the day of
    input.date-input#calendar[readonly='readonly' name='date' value=@date.strftime('%d-%b-%Y')]
    input.go-button#jump-button[type='button' value='GO']


h1 = order_items_title(@order.date)

table.table.table-default
  - @matrix.each do |row|
    tr
      - row.each do |item|
        td.text-right = item

- if @order.closed_at?
  p
    = closed_info(@order)
- else
  = form_tag admin_order_close_path(@order), method: :patch do
    = submit_tag '注文を締め切る', class: 'btn btn-primary btn-lg'

Fix submit path (it has been updated)

h1 = order_items_title(@order.date)

table.table.table-default
  - @matrix.each do |row|
    tr
      - row.each do |item|
        td.text-right = item

- if @order.closed_at?
  p
    = closed_info(@order)
- else
  = form_tag close_admin_order_path(@order), method: :patch do
    = submit_tag '注文を締め切る', class: 'btn btn-primary btn-lg'


.panel.panel-default
  .panel-heading
    h3.panel-title Cluster size
  .panel-body.cluster-size-selector
    .col-md-8
      label for="cloud_cluster_instance_count" Number of instances
      = form.text_field :instance_count, data: @cloud_cluster.slider_data, class: 'h3'
    .col-md-2.text-right.cluster-cpu-count
      label Total vCPUs
      label.h3#cluster-cpu-count = 0
    .col-md-2.text-right.cluster-ram-size
      label Total RAM
      label.h3#cluster-ram-size data-bytes=0 = 0
  .panel-footer
    h4 Tip
    p At least three nodes are required for a reliable cluster.

Change cloud cluster view based on cluster size

.panel.panel-default
  .panel-heading
    h3.panel-title Cluster size
  .panel-body.cluster-size-selector
    .col-md-8
      label for="cloud_cluster_instance_count"
      	| Number of instances
      	- if @cloud_cluster.current_cluster_size > 0
      	  |  to add (current size: #{ pluralize(@cloud_cluster.current_cluster_size, 'node') })
      = form.text_field :instance_count, data: @cloud_cluster.slider_data, class: 'h3'
    .col-md-2.text-right.cluster-cpu-count
      label Total vCPUs
      label.h3#cluster-cpu-count = 0
    .col-md-2.text-right.cluster-ram-size
      label Total RAM
      label.h3#cluster-ram-size data-bytes=0 = 0
  - if @cloud_cluster.min_nodes_required > 0
    .panel-footer
      h4 Tip
      p At least three nodes are required for a reliable cluster.


=render('shared/processed_and_removed/show', state: :processed)

/details
/  summary
/    span.summary.primary Remove application
div
  p You can remove an application if an error was made or proceedings never took place

  = form_for @form, as: :application, url: processed_application_path, method: :put, html: { autocomplete: 'off', class: 'remove-form' } do |f|
    .form-group
      = f.label :removed_reason, t('removed_reason', scope: @form.i18n_scope)
      = f.label :removed_reason, @form.errors[:removed_reason].join(','), class: 'error' if @form.errors[:removed_reason].present?
      = f.text_field :removed_reason, class: 'form-control small-field'

    = f.submit 'Remove application', :class => 'button primary'

Implement frontend for removing application form

=render('shared/processed_and_removed/show', state: :processed)

- details_attributes = @form.errors.empty? ? {} : { open: 'open' }

.panel
  details *details_attributes
    summary
      span.summary.primary Remove application
    div
      p You can remove an application if an error was made or proceedings never took place

      = form_for @form, as: :application, url: processed_application_path, method: :put, html: { autocomplete: 'off', class: 'remove-form' } do |f|
        .form-group
          = f.label :removed_reason, t('removed_reason', scope: @form.i18n_scope)
          = f.label :removed_reason, @form.errors[:removed_reason].join(','), class: 'error' if @form.errors[:removed_reason].present?
          = f.text_field :removed_reason, class: 'form-control small-field'

        = f.submit 'Remove application', :class => 'button alert'


h1 注文情報確認

.order
  .bill_address
    h2
      | Billing address
    = render 'comable/shared/address', address: @order.bill_address

  .ship_address
    h2
      | Shipping address
    = render 'comable/shared/address', address: @order.ship_address

  .details
    h2
      | Order details
    - @order.order_deliveries.first.order_details.each do |order_detail|
      .name
        = order_detail.stock.name
      .price
        = order_detail.price
      .quantity
        = order_detail.quantity

  .total
    h2 お会計
    .item_total_price
      = number_to_currency @order.current_item_total_price
    .shipment_fee
      = number_to_currency @order.current_shipment_fee
    .total_price
      = number_to_currency @order.current_total_price

  = form_for @order, as: :order, url: comable.order_path, method: :post do |f|
    = f.submit

Add the interim condition to avoid the error

h1 注文情報確認

.order
  .bill_address
    h2
      | Billing address
    = render 'comable/shared/address', address: @order.bill_address if @order.bill_address

  .ship_address
    h2
      | Shipping address
    = render 'comable/shared/address', address: @order.ship_address if @order.ship_address

  .details
    h2
      | Order details
    - @order.order_deliveries.first.order_details.each do |order_detail|
      .name
        = order_detail.stock.name
      .price
        = order_detail.price
      .quantity
        = order_detail.quantity

  .total
    h2 お会計
    .item_total_price
      = number_to_currency @order.current_item_total_price
    .shipment_fee
      = number_to_currency @order.current_shipment_fee
    .total_price
      = number_to_currency @order.current_total_price

  = form_for @order, as: :order, url: comable.order_path, method: :post do |f|
    = f.submit


nav.top-bar [data-topbar]
  ul.title-area
    li.name
      h1 = link_to t('app.name'), dashboard_path
    li.toggle-topbar.menu-icon
      a href="#"
        span
  a.item.home

  section.top-bar-section
    // right seciton
    ul.right
      li = link_to logout_path, class: 'item' do
        i.off.icon
        = t '.logout'
    ul.left
      li = link_to ad_campaigns_path, class: 'item' do
        = t '.ad_campaigns'
      - if @current_user.role.admin?
        li = link_to admin_users_path, class: 'item' do
          = t '.users'
        li = link_to admin_target_params_path, class: 'item' do
          = t '.target_params'
      li = link_to ad_sizes_path, class: 'item' do
        = t '.ad_sizes'

Disable Target Params from menu for now

nav.top-bar [data-topbar]
  ul.title-area
    li.name
      h1 = link_to t('app.name'), dashboard_path
    li.toggle-topbar.menu-icon
      a href="#"
        span
  a.item.home

  section.top-bar-section
    // right seciton
    ul.right
      li = link_to logout_path, class: 'item' do
        i.off.icon
        = t '.logout'
    ul.left
      li = link_to ad_campaigns_path, class: 'item' do
        = t '.ad_campaigns'
      - if @current_user.role.admin?
        li = link_to admin_users_path, class: 'item' do
          = t '.users'
        /li = link_to admin_target_params_path, class: 'item' do
        /  = t '.target_params'
      li = link_to ad_sizes_path, class: 'item' do
        = t '.ad_sizes'


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

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

    /[if lt IE 9]
      = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js"
    = javascript_include_tag 'vendor/custom.modernizr'
    = javascript_include_tag :application
    = render 'layouts/analytics'
  body#devise
    = initjs_tag app_name: 'Neighborly'
    = render 'layouts/uservoice'
    = render 'layouts/flash', flash: flash if flash.present? && notice

    .content= yield
    #loading
      #back-overlay
      #front-overlay
        = image_tag 'loading.gif'
  = render 'layouts/analytics'

Add changes on layout for devise layout

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

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

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

  -# CSRF protection
  = csrf_meta_tag

  /[if lt IE 9]
    = javascript_include_tag "http://html5shiv.googlecode.com/svn/trunk/html5.js"
  = javascript_include_tag 'vendor/custom.modernizr'
  = javascript_include_tag :application
  = render 'layouts/analytics'
body#devise
  = initjs_tag app_name: 'Neighborly'
  = yield
  #loading
    #back-overlay
    #front-overlay
      = image_tag 'heart-loading.gif'
  = yield :modals
|</html>


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

  = f.input :name
  = f.input :url
  = f.input :location
  = f.input :twitter
  = f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :ends_on,   order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :tickets
  = f.input :flights
  = f.input :round
  = f.input :accomodation, label: "Accommodation"
  = f.input :lightningtalkslots, label: "Lightning Talk Slots"

  h3 Attendees
  fieldset.attendees
    .header
      label Github Handle
    = f.simple_fields_for :attendances do |s|
      = s.input :github_handle, required: true, label: false
      = s.link_to_remove 'Remove'
    = f.link_to_add 'Add another attendee', :attendances

  .actions
    = f.submit 'Save', class: 'btn btn-success'

Add ranges to number fields

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

  = f.input :name
  = f.input :url
  = f.input :location
  = f.input :twitter
  = f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :ends_on,   order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :round, collection: 1..2
  = f.input :tickets, default: 0, collection: 0..20
  = f.input :flights, default:0, collection: 0..(conference&.tickets || 20)
  = f.input :accomodation, label: "Accommodation", default:0, collection: 0..(conference&.tickets || 20)
  = f.input :lightningtalkslots, label: "Lightning Talk Slots"

  h3 Attendees
  fieldset.attendees
    .header
      label Github Handle
    = f.simple_fields_for :attendances do |s|
      = s.input :github_handle, required: true, label: false
      = s.link_to_remove 'Remove'
    = f.link_to_add 'Add another attendee', :attendances

  .actions
    = f.submit 'Save', class: 'btn btn-success'


h3
  = 'Merged data'
.row
  .col-md-12
    = form_tag Settings.ncbi_blast_api, method: :put, 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

Remove authenticity_token from form for NCBI BLAST

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


.panel.panel-campo
  .panel-body
    .user-profile
      .user-profile-avatar
        img.img-rounded alt="avatar" src=user.gravatar_url(size: 80)
      .user-profile-name
        = user.name
      .user-profile-bio
        = simple_format user.bio

Add edit link in profile

.panel.panel-campo
  .panel-body
    .user-profile
      .user-profile-avatar
        img.img-rounded alt="avatar" src=user.gravatar_url(size: 80)
      .user-profile-name
        = user.name
      .user-profile-bio
        = simple_format user.bio
  - if login? and user == current_user
    .panel-footer.clearfix
      .pull-right
        a.btn.btn-default href=settings_profile_path
          | Edit profile


fieldset.status-history
  legend Status History

  .row
    .large-centered.large-8.columns
      = render 'renalware/transplants/registration_statuses/inline_form'

  .row
    .large-12.columns
      table
        thead
          th
          th Start Date
          th Status
          th By
          th Termination Date
        tbody
          - @registration.statuses.ordered(:desc).each do |status|
            tr
              td
                = link_to "Edit",
                  edit_patient_transplants_registration_status_path(@patient, status)
                = pipe_separator
                = link_to 'Delete',
                  patient_transplants_registration_status_path(@patient, status),
                  method: :delete,
                  data: { confirm: I18n.t("prompts.confirm_delete") }
              td= l status.started_on
              td= status.description
              td= status.updated_by
              td= l status.terminated_on if status.terminated_on

Fix name not being displayed

fieldset.status-history
  legend Status History

  .row
    .large-centered.large-8.columns
      = render 'renalware/transplants/registration_statuses/inline_form'

  .row
    .large-12.columns
      table
        thead
          th
          th Start Date
          th Status
          th By
          th Termination Date
        tbody
          - @registration.statuses.ordered(:desc).each do |status|
            tr
              td
                = link_to "Edit",
                  edit_patient_transplants_registration_status_path(@patient, status)
                = pipe_separator
                = link_to 'Delete',
                  patient_transplants_registration_status_path(@patient, status),
                  method: :delete,
                  data: { confirm: I18n.t("prompts.confirm_delete") }
              td= l status.started_on
              td= status.description
              td= status.updated_by.to_s(:full_name)
              td= l status.terminated_on if status.terminated_on


h1 Listing curves

table
  thead
    tr
      th Question
      th Answer
      th Status
      th
      th
      th

  tbody
    - @curves.each do |curve|
      tr
        td = curve.question
        td = curve.answer
        td = curve.status
        td = link_to 'Show', curve
        td = link_to 'Edit', edit_curve_path(curve)
        td = link_to 'Destroy', curve, data: {:confirm => 'Are you sure?'}, :method => :delete

br

= link_to 'New Curve', new_curve_path

Hide answers from the list view.

h1 Listing curves

table
  thead
    tr
      th Question
      th Status
      th
      th
      th

  tbody
    - @curves.each do |curve|
      tr
        td = curve.question
        td = curve.status
        td = link_to 'Show', curve
        td = link_to 'Edit', edit_curve_path(curve)
        td = link_to 'Destroy', curve, data: {:confirm => 'Are you sure?'}, :method => :delete

br

= link_to 'New Curve', new_curve_path


ul.nav.navbar-nav
  li.dropdown
    a(data-toggle="dropdown")
      | {{ :: 'nav.shop' | translate}}
      |
      span.caret

    ul.dropdown-menu
      li.dropdown-header(ng-repeat-start="taxonomy in taxonomies")
        | {{taxonomy.name}}

      li(ng-repeat="taxon in taxonomy.root.taxons")
        a(ng-href="/#!/t/{{taxon.permalink}}")
          | {{taxon.name}}

      li.divider(ng-repeat-end)

      li
        a(ng-href="/#!/products") {{ :: 'all_products' | translate }}

Fix call to all products for taxons.

ul.nav.navbar-nav
  li.dropdown
    a(data-toggle="dropdown")
      | {{ :: 'nav.shop' | translate}}
      |
      span.caret

    ul.dropdown-menu
      li.dropdown-header(ng-repeat-start="taxonomy in taxonomies")
        | {{taxonomy.name}}

      li(ng-repeat="taxon in taxonomy.root.taxons")
        a(ng-href="/#!/t/{{taxon.permalink}}")
          | {{taxon.name}}

      li.divider(ng-repeat-end)

      li
        a(ng-href="/#!/products") {{ :: 'nav.all_products' | translate }}


p
  ' Dear,
  = @user.full_name
p
  ' You’ve been chosen by
  => @user.full_name
  ' to write a letter of support in aid of the nomination of
  => @user.full_name
  ' for a Queen’s Award for Enterprise Promotion.

p
  ' The Queen’s Award for Enterprise Promotion is a nomination-only award recognising individuals who have played an outstanding role in promoting the growth of enterprise and/or entrepreneurial skills and attitudes in others.

p
  ' If you feel like you are not in a position to write a letter of support, please email the nominator as soon as possible at
  =>  @user.email
  ' so they can contact alternative supporters. You can also email them with any questions regarding the nomination.

p
  strong
    ' As this is an honorary award, all information relating to it should remain confidential - even from the nominee in question.

p
  ' To see guidance information, and support the nomination of
  => @user.full_name
  ' for this award, please
  = link_to "go to the support letter form page.", support_letter_url(access_key: @supporter.access_key), target: "_blank"

p
  ' Thank you,
  br
  ' The Queen’s Awards Office

p
  = link_to "More information on the The Queen’s Award for Enterprise Promotion.", "https://www.gov.uk/queens-awards-for-enterprise", target: "_blank"

Add comments to what the exposed email variables should be

p
  ' Dear,
  / TODO @supporter.full_name
  = @user.full_name
p
  ' You’ve been chosen by
  => @user.full_name
  ' to write a letter of support in aid of the nomination of
  / TODO @nominee.full_name
  => @user.full_name
  ' for a Queen’s Award for Enterprise Promotion.

p
  ' The Queen’s Award for Enterprise Promotion is a nomination-only award recognising individuals who have played an outstanding role in promoting the growth of enterprise and/or entrepreneurial skills and attitudes in others.

p
  ' If you feel like you are not in a position to write a letter of support, please email the nominator as soon as possible at
  =>  @user.email
  ' so they can contact alternative supporters. You can also email them with any questions regarding the nomination.

p
  strong
    ' As this is an honorary award, all information relating to it should remain confidential - even from the nominee in question.

p
  ' To see guidance information, and support the nomination of
  / TODO @nominee.full_name
  => @user.full_name
  ' for this award, please
  = link_to "go to the support letter form page.", support_letter_url(access_key: @supporter.access_key), target: "_blank"

p
  ' Thank you,
  br
  ' The Queen’s Awards Office

p
  = link_to "More information on the The Queen’s Award for Enterprise Promotion.", "https://www.gov.uk/queens-awards-for-enterprise", target: "_blank"


h5 = "#{ user_for_comment(comment) }, #{ format_date(comment.created_at, :short) }"
p = comment.text

Fix escaped span elements for RGSoC orga members

h5 = "#{ user_for_comment(comment) }, #{ format_date(comment.created_at, :short) }".html_safe
p = comment.text


.row
  .col-md-12
    h3 = t('.title')
    table.table-striped.table
      thead
        tr
          th = t('common.name')
          th = t('common.featured')
          th = t('common.active')
          th Actions
          th
      tbody
        - [*@campaign_pages].each do |page|
          tr
            td = link_to page.title, page
            td
              span class=(page.featured? ? 'tick' : 'cross')
            td
              span class=(page.active? ? 'tick' : 'cross')
            td = page.actions.count

            td = link_to t('common.edit'), edit_campaign_page_path(page)

    = link_to t('.new'), new_campaign_page_path, class: 'btn btn-primary btn-sm'

    = render partial: 'search'

Move logic to protecting from nil to controller instead of view as per Omar's suggestion

.row
  .col-md-12
    h3 = t('.title')
    table.table-striped.table
      thead
        tr
          th = t('common.name')
          th = t('common.featured')
          th = t('common.active')
          th Actions
          th
      tbody
        - @campaign_pages.each do |page|
          tr
            td = link_to page.title, page
            td
              span class=(page.featured? ? 'tick' : 'cross')
            td
              span class=(page.active? ? 'tick' : 'cross')
            td = page.actions.count

            td = link_to t('common.edit'), edit_campaign_page_path(page)

    = link_to t('.new'), new_campaign_page_path, class: 'btn btn-primary btn-sm'

    = render partial: 'search'


h1
  = @category.name
  |'s wiki pages
.island
  table.table.project-info
    thead
      th style='width: 40%'
        = t('wiki_page.headers.title')
      th = t('project_info.headers.updated_at')
      th = t('project_info.headers.actions')
    - @category.wiki_pages.each do |page|
      tr
        td = link_to page.title, wiki_page_path( page )
        td = page.updated_at.strftime("%d.%m.%y")
        td = actions_for(page, size: 'xs')

Fix for links in wiki categories

h1
  = @category.name
  |'s wiki pages
.island
  table.table.project-info
    thead
      th style='width: 40%'
        = t('wiki_page.headers.title')
      th = t('project_info.headers.updated_at')
      th = t('project_info.headers.actions')
    - @category.wiki_pages.each do |page|
      tr
        td = link_to page.title, controller: 'wiki_pages', action: 'show', path: page.title
        td = page.updated_at.strftime("%d.%m.%y")
        td = actions_for(page, size: 'xs')


.main-content
  .container
    .row
      .sub-panel.login-panel.col-center.col-xs-12.col-sm-10.col-md-8.col-lg-6
        .col.col-xs-12.col-sm-10.col-md-8.col-lg-10.col-center.text-center
          p= render "icon_security"
          h3= t ".heading"
          h4= t ".subheading"
          p= t ".intro"
        .row
          .col.col-md-6
            = link_to t(".skip"), home_publishers_path, class: "btn btn-link btn-block"
          .col.col-md-6
            = link_to t(".setup"), two_factor_registrations_path, class: "btn btn-primary btn-block"

Clean up styles on signup 2FA prompt

.main-content
  .container
    .sub-panel.col-center.col-xs-12.col-sm-10.col-md-8.col-lg-6
      .row
        .col.col-xs-12.col-sm-10.col-md-9.col-lg-10.col-center.text-center
          p= render "icon_security"
          h3= t ".heading"
          h4= t ".subheading"
          p= t ".intro"
      .row
        .col.col-sm-5.col-sm-offset-1
          = link_to t(".skip"), home_publishers_path, class: "btn btn-link btn-block"
        .col.col-sm-5
          = link_to t(".setup"), two_factor_registrations_path, class: "btn btn-primary btn-block"


.columns
  .one-fifth.column
    nav.menu
      a.menu-item.selected href="#"
        span.octicon.octicon-paintcan
        = gettext "Styles"
    a.btn.btn-primary href="#{style_path(@conn, :new, @current_user.name)}" = gettext "New tweak"
  .four-fifths.column
    = if Enum.count(@styles) == 0 do
      .blankslate
        h3 = gettext "No tweaks for you to see here"
    - else
      = render_many(@styles, AtomStyleTweaks.StyleView, "table_row.html", conn: @conn)

Add guard against not being signed in

.columns
  .one-fifth.column
    nav.menu
      a.menu-item.selected href="#"
        span.octicon.octicon-paintcan
        = gettext "Styles"
    = if @authorized? do
      a.btn.btn-primary href="#{style_path(@conn, :new, @current_user.name)}" = gettext "New tweak"
  .four-fifths.column
    = if Enum.count(@styles) == 0 do
      .blankslate
        h3 = gettext "No tweaks for you to see here"
    - else
      = render_many(@styles, AtomStyleTweaks.StyleView, "table_row.html", conn: @conn)


h2 Charlas

table.table.table-hover.table-stripped
  thead
    tr
      th Título
      th Descripción
      th Ponente

  tbody
    = render @talks

= link_to 'Nueva charla', new_admin_talk_path, class: 'btn btn-default'

Comment out "New talk" button in talks index

h2 Charlas

table.table.table-hover.table-stripped
  thead
    tr
      th Título
      th Descripción
      th Ponente

  tbody
    = render @talks

/= link_to 'Nueva charla', new_admin_talk_path, class: 'btn btn-default'


h2 By year
ul
	- @stats.each do |row|
		li
			a href="/interviews/#{row['year']}" = row['year']
			= " (#{row['count']} interview#{'s' if row['count'] != 1})"

h2 By category

p
	- @categories.each do |category|
		a href="/interviews/#{category.slug}/" rel="#{category.slug}" = category.slug

Check for the stats and categories before displaying anything.

- if @stats
	h2 By year
	ul#years
		- @stats.each do |row|
			li
				a href="/interviews/in/#{row['year']}" = row['year']
				= " (#{row['count']} interview#{'s' if row['count'] != 1})"

- if @categories
	h2 By category
	p
		- @categories.each do |category|
			a href="/interviews/#{category.slug}/" rel="#{category.slug}" = category.slug


.text-right
  = paginate users
table.users.table
  thead
    tr.hide_on_mobile
      th= sort_link @q, :email, 'Email'
      th= sort_link @q, :name, %i(last_name first_name)
      th= sort_link @q, :groups_name, 'Groups'
      th= sort_link @q, :created_at
      th= link_to 'export users', admin_users_path(format: 'csv', params: params)

    tbody
      - users.each do |user|
        tr
          td
            = link_to user.email, edit_admin_user_path(user)
            br/
            p
              em
                = user.roles.map(&:name).join(', ')
          td.name
            = user.name
          td.groups
            em
              = user.groups.map(&:name).join(', ')
          td
            = user.created_date
          td.actions
            = link_to [ :admin, user ], method: :delete, data: { confirm: 'Are you sure?' }, title: "Delete user #{user.name}" do
              = fa_icon(:"times-circle-o")
.text-right
  = paginate users

Add sorting of roles and groups in users list

.text-right
  = paginate users
table.users.table
  thead
    tr.hide_on_mobile
      th= sort_link @q, :email, 'Email'
      th= sort_link @q, :name, %i(last_name first_name)
      th= sort_link @q, :groups_name, 'Groups'
      th= sort_link @q, :created_at
      th= link_to 'export users', admin_users_path(format: 'csv', params: params)

    tbody
      - users.each do |user|
        tr
          td
            = link_to user.email, edit_admin_user_path(user)
            br/
            p
              em
                = user.roles.map(&:name).sort.join(', ')
          td.name
            = user.name
          td.groups
            em
              = user.groups.map(&:name).sort.join(', ')
          td
            = user.created_date
          td.actions
            = link_to [ :admin, user ], method: :delete, data: { confirm: 'Are you sure?' }, title: "Delete user #{user.name}" do
              = fa_icon(:"times-circle-o")
.text-right
  = paginate users


.reply-block.collapse id="#{comment.id}"
  = form_for [course, course.comments.build], url: comments_path, remote: :true do |f|
    = f.hidden_field :course_id, value: course.id
    = f.hidden_field :parent_id, value: comment.id
    = f.text_area :content, class: 'form-control', onkeyup: 'autoheight(this)', placeholder: '我想說...'
    = f.button :submit, class: 'btn btn-block' do
      i.fa.fa-paper-plane
      |   提交

Set unique id for reply form

.reply-block.collapse id="#{comment.id}"
  = form_for [course, course.comments.build], url: comments_path, remote: :true, html: {id: "new_reply_on_#{comment.id}"} do |f|
    = f.hidden_field :course_id, value: course.id
    = f.hidden_field :parent_id, value: comment.id
    = f.text_area :content, class: 'form-control', onkeyup: 'autoheight(this)', placeholder: '我想說...'
    = f.button :submit, class: 'btn btn-block' do
      i.fa.fa-paper-plane
      |   提交


#checkout-complete.container
  .row
    .col-lg-12
      h1
        | {{ :: 'checkout.success' | translate }}

      p
        | {{ :: 'checkout.success_msg' | translate:'{ order_number: order.number }' }}

      pre
        | {{ order.state }}

      section#share
        / TODO: Extract to Sprangular Social
        p Share your order:

        p
          a Facebook

        p
          a Twitter

Remove uneeded stuff from checkout/complete template


.tab-subnavigation-wrapper
  .container
    ul
      li= link_to 'Activities', teachers_progress_reports_activity_sessions_path
      li= link_to 'Common Core Standards', teachers_progress_reports_sections_path
      li= link_to 'Concepts', '#'

Remove unused link from progress reports subnav


- content_for :head do
  = javascript_include_tag(asset_path('vis.min.js', type: :javascript))
  = stylesheet_link_tag(asset_path('vis.min.css', type: :stylesheet))

.group
  .title
    h1 = t('statistics.graphs.rfc_activity')
  .spinner
  .graph#rfc-activity-history
  form
    .form-group
      label for="from-date" = t('.from')
      input type="date" class="form-control" id="from-date" name="from" value=DateTime.new(2016).to_date
    .form-group
      label for="to-date" = t('.to')
      input type="date" class="form-control" id="to-date" name="to" value=DateTime.now.to_date
    .form-group
      label for="interval" = t('.interval')
      select class="form-control" id="interval" name="interval"
        = [:decade, :year, :month, :day, :hour, :minute, :second].each do | key |
          option selected=(key==:year) = key
    button type="submit" class="btn btn-primary" = t('.update')

Use params as default form values

- content_for :head do
  = javascript_include_tag(asset_path('vis.min.js', type: :javascript))
  = stylesheet_link_tag(asset_path('vis.min.css', type: :stylesheet))

.group
  .title
    h1 = t('statistics.graphs.rfc_activity')
  .spinner
  .graph#rfc-activity-history
  form
    .form-group
      label for="from-date" = t('.from')
      input type="date" class="form-control" id="from-date" name="from" value=(params[:from] || DateTime.new(2016).to_date)
    .form-group
      label for="to-date" = t('.to')
      input type="date" class="form-control" id="to-date" name="to" value=(params[:to] || DateTime.now.to_date)
    .form-group
      label for="interval" = t('.interval')
      select class="form-control" id="interval" name="interval"
        = [:year, :quarter, :month, :day, :hour, :minute, :second].each do | key |
          option selected=(key.to_s == params[:interval]) = key
    button type="submit" class="btn btn-primary" = t('.update')


- step_letters = ["A", "B", "C", "D", "E"]

header.page-header.group.page-header-wider
  div
    h1
      = form.title

    .steps-progress-bar
      ol
        li.js-step-condition.step-past
          span
            = link_to form_award_eligibility_url(form_id: @form_answer.id) do
              span.step-number
                ' Eligibility
        - for step in form.steps do
          li.js-step-link.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 1)
            span
              span.step-number
                ' #{step_letters[step.index-1]}.
              = step.short_title.html_safe

    article.download-article
      .form-download
        p
          = link_to "Download your application", user_form_answer_path(current_user, @form_answer, format: :pdf)

    - for step in form.steps do
      h2.step-header.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 1)
        ' Step
        = step.index + 1
        '  of
        = form.steps.length + 1
        ' :
        = step.title

Fix the form nav steps and numbering

- step_letters = ["A", "B", "C", "D", "E"]

header.page-header.group.page-header-wider
  div
    h1
      = form.title

    .steps-progress-bar
      ol
        li.js-step-condition.step-past
          span
            = link_to form_award_eligibility_url(form_id: @form_answer.id) do
              span.step-number
                ' Eligibility
        - for step in form.steps do
          li.js-step-link.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 0)
            span
              span.step-number
                ' #{step_letters[step.index]}.
              = step.short_title.html_safe

    article.download-article
      .form-download
        p
          = link_to "Download your application", user_form_answer_path(current_user, @form_answer, format: :pdf)

    - for step in form.steps do
      h2.step-header.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 0)
        ' Step
        = step.index + 2
        '  of
        = form.steps.length + 1
        ' :
        = step.title


- if @project.foundation_widget?
  - box_width = "225px"
  - box_height = "543px"
- else
  - box_width = "240px"
  - box_height = "425px"
- video_width = "384px"
- video_height = "425px"
#project_box_embed
  iframe frameborder='0' height=box_height width=box_width src=embed_project_path(@project)
  form.html= text_area_tag 'project_box_embed_html', '', readonly: true
#project_video_embed
  iframe frameborder='0' height=video_height width=video_width src=video_embed_project_path(@project)
  form.html= text_area_tag 'project_video_embed_html', '', readonly: true
.clearfix

Migrate to foundation the embed panel page

a.close-reveal-modal ×
br/
- if @project.foundation_widget?
  - box_width = '225px'
  - box_height = '543px'
- else
  - box_width = '250px'
  - box_height = '270px'
- video_width = '364px'
- video_height = '330px'

.embed-panel-page.row.collapse
  .large-4.columns
    iframe frameborder='0' height=box_height width=box_width src=embed_project_path(@project)
    form.html= text_area_tag 'project-box-embed-html', '', readonly: true

  .large-6.columns
    iframe frameborder='0' height=video_height width=video_width src=video_embed_project_path(@project)
    form.html= text_area_tag 'project-video-embed-html', '', readonly: true


doctype 5
html(lang="en")
  head
    meta(charset="utf-8")
    meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
    / meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no")
    title = content_for?(:title) ? "#{yield(:title)} | <%= human_name %>" : "<%= human_name %>"
    = csrf_meta_tags
    = stylesheet_link_tag "application", media: "all"
    /! Le HTML5 shim, for IE6-8 support of HTML elements
    /![if lt IE 9]
      = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
    = javascript_include_tag "application"
    = favicon_link_tag

  body class=content_for(:body)
    nav.navbar.navbar-inverse.navbar-fixed-top
      .container-fluid
        .navbar-header
          = link_to "<%= human_name %>", root_path, class: 'navbar-brand'
        ul.nav.navbar-nav.navbar-right
          = render 'layouts/shared/you'

    #main
      #content.without-sidebar.without-sidemenu
        = yield

      = bootstrap_flash

Enable viewport for devise template

doctype 5
html(lang="en")
  head
    meta(charset="utf-8")
    meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
    meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no")
    title = content_for?(:title) ? "#{yield(:title)} | <%= human_name %>" : "<%= human_name %>"
    = csrf_meta_tags
    = stylesheet_link_tag "application", media: "all"
    /! Le HTML5 shim, for IE6-8 support of HTML elements
    /![if lt IE 9]
      = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"
    = javascript_include_tag "application"
    = favicon_link_tag

  body class=content_for(:body)
    nav.navbar.navbar-inverse.navbar-fixed-top
      .container-fluid
        .navbar-header
          = link_to "<%= human_name %>", root_path, class: 'navbar-brand'
        ul.nav.navbar-nav.navbar-right
          = render 'layouts/shared/you'

    #main
      #content.without-sidebar.without-sidemenu
        = yield

      = bootstrap_flash


doctype html
html
  head
    title Crowd Interactive Tech Blog #{yield :page_title}
    = yield :meta
    - ENV['FB_ADMINS'].split(',').each do |admin|
      meta property="fb:admins" content=admin

    = stylesheet_link_tag "application", :media => "all"
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Arvo"
    = auto_discovery_link_tag :rss, 'http://feeds.feedburner.com/CrowdInteractiveTechBlog'
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'google_analytics'

    coffee:
      $ ->
        hljs.initHighlightingOnLoad()

    = yield :scripts

  body
    = render 'nav_bar'
    .container.bordered
      .row
        .span9
          = yield
        .span3
          .right= render 'right_side_bar'

    = render 'footer'

Add .rss to the end of the RSS autodiscovery tag

doctype html
html
  head
    title Crowd Interactive Tech Blog #{yield :page_title}
    = yield :meta
    - ENV['FB_ADMINS'].split(',').each do |admin|
      meta property="fb:admins" content=admin

    = stylesheet_link_tag "application", :media => "all"
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Arvo"
    = auto_discovery_link_tag :rss, 'http://feeds.feedburner.com/CrowdInteractiveTechBlog.rss'
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'google_analytics'

    coffee:
      $ ->
        hljs.initHighlightingOnLoad()

    = yield :scripts

  body
    = render 'nav_bar'
    .container.bordered
      .row
        .span9
          = yield
        .span3
          .right= render 'right_side_bar'

    = render 'footer'


- content_for :stylesheets do
  /![if IE 6]
    = stylesheet_link_tag "application-ie6", media: "all"
  /![if IE 7]
    = stylesheet_link_tag "application-ie7", media: "all"
  /![if IE 8]
    = stylesheet_link_tag "application-ie8", media: "all"
  = "<!--[if gt IE 8]><!-->#{stylesheet_link_tag("application", media: "all")}<!--<![endif]-->".html_safe

- content_for :javascripts do
  = javascript_include_tag "application"

- content_for :body_classes, "#{config_item(:phase).to_s.downcase} #{config_item(:product_type).to_s.downcase} #{controller.controller_name} #{controller.action_name}"

- content_for :after_header do
  /![if lte IE 6]
    javascript:
        document.body.className = document.body.className.replace('js-enabled','');

- content_for :content_override do
  main#wrapper(role="main")
    .container
        = yield

= render template: "layouts/moj_template"

Add Google Analytics tracking codez

- content_for :stylesheets do
  /![if IE 6]
    = stylesheet_link_tag "application-ie6", media: "all"
  /![if IE 7]
    = stylesheet_link_tag "application-ie7", media: "all"
  /![if IE 8]
    = stylesheet_link_tag "application-ie8", media: "all"
  = "<!--[if gt IE 8]><!-->#{stylesheet_link_tag("application", media: "all")}<!--<![endif]-->".html_safe

- content_for :javascripts do
  = javascript_include_tag "application"

  - if ENV.has_key?('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','//www.google-analytics.com/analytics.js','ga');

      ga('create', '#{ENV.fetch("GOOGLE_ANALYTICS_ID")}', 'auto');
      ga('send', 'pageview');
      ga('set', 'anonymizeIP', true);

- content_for :body_classes, "#{config_item(:phase).to_s.downcase} #{config_item(:product_type).to_s.downcase} #{controller.controller_name} #{controller.action_name}"

- content_for :after_header do
  /![if lte IE 6]
    javascript:
        document.body.className = document.body.className.replace('js-enabled','');

- content_for :content_override do
  main#wrapper(role="main")
    .container
        = yield

= render template: "layouts/moj_template"


.w-col.w-col-3
  .u-marginbottom-10.u-marginright-10
    = image_tag user.larger_display_image
  .fontcolor-yellow
    = user.display_name.upcase
  .fontcolor-yellow.fontsize-smallest
    = user.job_title.try(:upcase)
  .u-marginbottom-10.fontsize-smallest
    = user.email
  .fontsize-smallest
    = user.bio

Fix users on the who we are page

.w-col.w-col-3
  .u-marginbottom-10.u-marginright-10
    = image_tag user.larger_display_image
  .fontcolor-yellow
    = user.display_name.mb_chars.upcase.to_s
  .fontcolor-yellow.fontsize-smallest
    = user.job_title.try(:mb_chars).try(:upcase).try(:to_s)
  .u-marginbottom-10.fontsize-smallest
    = user.email
  .fontsize-smallest
    = user.bio


doctype html
html
  head
    title = page_title(@activity.try(:name))
    meta name="description" content= page_description(@activity.try(:description))
    - %w{twitter og}.each do |prefix|
      meta name="#{prefix}:title" content= page_description(@activity.try(:name))
      meta name="#{prefix}:description" content= page_description(@activity.try(:description))
      meta name="#{prefix}:image" content= page_image(@activity.try(:logo))
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body data-action="#{action_name}" data-controller="#{controller_name}"
    = render 'shared/header'
    .container-body
      = flash_message
      .container
        = yield
      - if respond_to?(:console)
        =console
    = render 'shared/footer'

Use same content in title and og:title

doctype html
html
  head
    title = page_title(@activity.try(:name))
    meta name="description" content= page_description(@activity.try(:description))
    - %w{twitter og}.each do |prefix|
      meta name="#{prefix}:title" content= page_title(@activity.try(:name))
      meta name="#{prefix}:description" content= page_description(@activity.try(:description))
      meta name="#{prefix}:image" content= page_image(@activity.try(:logo))
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body data-action="#{action_name}" data-controller="#{controller_name}"
    = render 'shared/header'
    .container-body
      = flash_message
      .container
        = yield
      - if respond_to?(:console)
        =console
    = render 'shared/footer'


h1.heading-xlarge= @heading

.grid-row
  .column-full
    == render partial: 'shared/search_input'

.grid-row
  .column-half
    - @schools.group_by(&:place).each do |place, list|
      h3.heading-medium= place
      ul
        - list.each do |school|
          li
            = link_to school.name, school_url(id: school.record), class: 'school', data: {lat: school.coordinates.try(:last), lon: school.coordinates.try(:first), place: school.place}

  .column-half
    == render partial: 'shared/map', locals: { lat: @lat, lon: @lon }

Sort schools by name in search result view

h1.heading-xlarge= @heading

.grid-row
  .column-full
    == render partial: 'shared/search_input'

.grid-row
  .column-half
    - @schools.group_by(&:place).each do |place, list|
      h3.heading-medium= place
      ul
        - list.sort_by(&:name).each do |school|
          li
            = link_to school.name, school_url(id: school.record), class: 'school', data: {lat: school.coordinates.try(:last), lon: school.coordinates.try(:first), place: school.place}

  .column-half
    == render partial: 'shared/map', locals: { lat: @lat, lon: @lon }


nav.navbar.navbar-default.navbar-static-top role="navigation"
  .container-fluid
    .navbar-header
      button.navbar-toggle data-target=".navbar-collapse" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      = link_to root_path, class: 'navbar-brand' do
        => image_tag "icon-trees.png", size: "30x30", class: "logo logo-fixed"
        = Rails.application.config.app_name
    .navbar-collapse.collapse
      ul.nav.navbar-nav
        - if user_signed_in?
          li = link_to 'Reservation List', reservations_path
          li = link_to 'In Park List', '#'
          li = link_to 'New Reservation', new_reservation_path
      ul.nav.navbar-nav.navbar-right
        - if user_signed_in?
          li = link_to 'Log Out', destroy_user_session_path, method: :delete
        - else
          li = link_to 'Log In', new_user_session_path

Move the New Reservation menu option to an always visible button

nav.navbar.navbar-default.navbar-static-top role="navigation"
  .container-fluid
    .navbar-header
      button.navbar-toggle data-target=".navbar-collapse" data-toggle="collapse" type="button"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      = link_to root_path, class: 'navbar-brand' do
        => image_tag "icon-trees.png", size: "30x30", class: "logo logo-fixed"
        = Rails.application.config.app_name
    .navbar-collapse.collapse
      ul.nav.navbar-nav
        - if user_signed_in?
          li = link_to 'Reservation List', reservations_path
          li = link_to 'In Park List', '#'
      ul.nav.navbar-nav.navbar-right
        - if user_signed_in?
          li = link_to 'Log Out', destroy_user_session_path, method: :delete
        - else
          li = link_to 'Log In', new_user_session_path

/ Show the New Reservation button unless we're on the New Reservation form
- unless current_page?(new_reservation_path)
  .container
    .pull-right
      = link_to new_reservation_path, class: 'btn btn-primary' do
        span.glyphicon.glyphicon-plus>
        | New Reservation


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

COPY add completed to current applications progress

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


= form_for Todo.change_todo_item(@todo_item), todo_item_path(@conn, :complete, @todo_item), fn f ->
    = checkbox f, :state, checked_value: "completed", class: "form-check-input", onchange: "submit()"
span class="todo-item-content"
  span class="todo-item-date label label-default"
  = @todo_item.updated_at
  = link @todo_item.content, to: todo_item_path(@conn, :edit, @todo_item), class: "todo-item-link"

Format date for completed item

= form_for Todo.change_todo_item(@todo_item), todo_item_path(@conn, :complete, @todo_item), fn f ->
    = checkbox f, :state, checked_value: "completed", class: "form-check-input", onchange: "submit()"
span class="todo-item-content"
  small class="todo-item-date text-muted"
    = Timex.format!(@todo_item.updated_at, "%d %b", :strftime)
  = " "
  = link @todo_item.content, to: todo_item_path(@conn, :edit, @todo_item), class: "todo-item-link"


header
  .header-left
    = render partial: 'sidebar/circle_title', locals: { circle: current_circle }

  .header-middle
    - if content_for(:header_middle).nil?
      = render partial: 'sidebar/circle_add_menu', locals: { circle: current_circle }
    - else
      = content_for :header_middle

  .header-right
    .user-inbox

    .user-dropdown-menu.dropdown
      input id='user-menu-selector' type='checkbox' class='menu-selector'
      label for='user-menu-selector'
        .user-avatar
          =render partial: 'user/user_icon', locals: { user: current_user }
        .user-name= current_user.name
        .fi-chevron-bottom:before

      .menu.user-dropdown
        = link_to(t('.settings'), account_path)
        - if current_user.has_multiple_circles?
          - current_user.circles.each do |circle|
            - unless circle.id == current_session_circle_id
              = link_to t('.switch_to_circle', circle_name: circle.name), switch_circle_path(circle)
        /a href=public_circles_path =t('.find-circles')
        - if can?(:manage_site, nil)
          a href=admin_root_path =t('.admin')

        a href=logout_path =t('.sign-out')

Enable find circles in user menu.

header
  .header-left
    = render partial: 'sidebar/circle_title', locals: { circle: current_circle }

  .header-middle
    - if content_for(:header_middle).nil?
      = render partial: 'sidebar/circle_add_menu', locals: { circle: current_circle }
    - else
      = content_for :header_middle

  .header-right
    .user-inbox

    .user-dropdown-menu.dropdown
      input id='user-menu-selector' type='checkbox' class='menu-selector'
      label for='user-menu-selector'
        .user-avatar
          =render partial: 'user/user_icon', locals: { user: current_user }
        .user-name= current_user.name
        .fi-chevron-bottom:before

      .menu.user-dropdown
        = link_to(t('.settings'), account_path)
        - if current_user.has_multiple_circles?
          - current_user.circles.each do |circle|
            - unless circle.id == current_session_circle_id
              = link_to t('.switch_to_circle', circle_name: circle.name), switch_circle_path(circle)
        a href=public_circles_path =t('.find-circles')
        - if can?(:manage_site, nil)
          a href=admin_root_path =t('.admin')

        a href=logout_path =t('.sign-out')


.root
  h1 Alternative Gerrit Frontend
  p Built for content browser. Display evenything about one change in one page.
  - if !@sample_links.empty?
    p Sample Links:
    ul
      - @sample_links.each do |link|
        li = link_to link, link
  = link_to 'Manage HTTP Passwords', passwords_path, class: :button

Revise words displayed at home page

.root
  h1 Alternative Gerrit Frontend
  p Built for easy code and comments browsing. Display evenything related to one change all together, in one page.
  - if !@sample_links.empty?
    p Sample Links:
    ul
      - @sample_links.each do |link|
        li = link_to link, link
  = link_to 'Manage HTTP Passwords', passwords_path, class: :button