h3 Impressum
p
  | Angaben gemäß § 5 TMG:
  br
p
  | Silke Tracht
  br
  | Steinmühle Lemgo
  br
  | Entruper Weg 88
  br
  | 32657 Lemgo
  br
  br

h4 Kontakt:
p
  | Telefon: 05281 - 13889
  br
  | E-Mail: silke@steinmuehle-lemgo.de
  br
  br

h5 Quellenangaben für die verwendeten Bilder und Grafiken:
p
  a href="https://commons.wikimedia.org/wiki/File:Klangschale_mit_Klöppel.jpg"  https://commons.wikimedia.org/wiki/File:Klangschale_mit_Klöppel.jpg

Remove citation info from impressum.

h3 Impressum
p
  | Angaben gemäß § 5 TMG:
  br
p
  | Silke Tracht
  br
  | Steinmühle Lemgo
  br
  | Entruper Weg 88
  br
  | 32657 Lemgo
  br
  br

h4 Kontakt:
p
  | Telefon: 05281 - 13889
  br
  | E-Mail: silke@steinmuehle-lemgo.de
  br
  br

/h5 Quellenangaben für die verwendeten Bilder und Grafiken:
/p
  /a href="https://commons.wikimedia.org/wiki/File:Klangschale_mit_Klöppel.jpg"  https://commons.wikimedia.org/wiki/File:Klangschale_mit_Klöppel.jpg


nav.navbar.navbar-default.navbar-static-top.main-navbar
  .container-fluid
    .navbar-header
      = link_to "moi", admin_root_path, class: "navbar-brand"

    .collapse.navbar-collapse
      ul.nav.navbar-nav
        = nav_item "dashboard", admin_root_path
        - if can? :manage, User
          = nav_item "users", admin_users_path
        - if can? :read, Neuron
          = nav_item "neurons", admin_neurons_path

      ul.nav.navbar-nav.navbar-right
        li.dropdown
          = link_to "#", data: {toggle: "dropdown"} do
            = current_user
            span.caret
          ul.dropdown-menu role="menu"
            li
              = link_to "Cerrar sesión", destroy_user_session_path, method: :delete

Fix error if user don't have name

nav.navbar.navbar-default.navbar-static-top.main-navbar
  .container-fluid
    .navbar-header
      = link_to "moi", admin_root_path, class: "navbar-brand"

    .collapse.navbar-collapse
      ul.nav.navbar-nav
        = nav_item "dashboard", admin_root_path
        - if can? :manage, User
          = nav_item "users", admin_users_path
        - if can? :read, Neuron
          = nav_item "neurons", admin_neurons_path

      ul.nav.navbar-nav.navbar-right
        li.dropdown
          = link_to "#", data: {toggle: "dropdown"} do
            = current_user.to_s
            span.caret
          ul.dropdown-menu role="menu"
            li
              = link_to "Cerrar sesión", destroy_user_session_path, method: :delete


= simple_form_for [current_course, @video] do |f|
  = f.error_notification
  = f.input :title
  = f.input :description, as: :text
  = f.input :url, placeholder: t('.url_placeholder')
  = f.input :start_at
  = f.input :published

  = f.button :submit

Declare column type for video forms

= simple_form_for [current_course, @video] do |f|
  = f.error_notification
  = f.input :title
  = f.input :description, as: :text
  = f.input :url, placeholder: t('.url_placeholder')
  = f.input :start_at, as: :bootstrap_date_time
  = f.input :published, as: :boolean

  = f.button :submit


.form-group
  = form_for @form_answer, url: update_financials_admin_form_answer_path(@form_answer) do |f|
    .table-overflow-container
      table.table.table-striped#financial-table
        colgroup
          col width="300"

        thead
          tr
            th

            - financial_pointer.years_list.each do |year|
              th = year
        tbody
          = render "admin/form_answers/financial_summary/years_row", f: f, financial_pointer: financial_pointer

          - financial_pointer.data.each_with_index do |row, index|
            - next if row[:financial_year_changed_dates]

            - if row[:uk_sales]
              = render "admin/form_answers/financial_summary/uk_sales_row", f: f, row: row
            - else
              = render "admin/form_answers/financial_summary/row", f: f, row: row

    = link_to "#", class: "form-edit-link pull-right"
      span.glyphicon.glyphicon-pencil
      ' edit
    = button_tag "Save", class: "btn btn-primary form-save-button pull-right"
    .clear

= render "admin/form_answers/financial_summary/benchmarks", financial_pointer: financial_pointer

COPY admin edit link capitalisation

.form-group
  = form_for @form_answer, url: update_financials_admin_form_answer_path(@form_answer) do |f|
    .table-overflow-container
      table.table.table-striped#financial-table
        colgroup
          col width="300"

        thead
          tr
            th

            - financial_pointer.years_list.each do |year|
              th = year
        tbody
          = render "admin/form_answers/financial_summary/years_row", f: f, financial_pointer: financial_pointer

          - financial_pointer.data.each_with_index do |row, index|
            - next if row[:financial_year_changed_dates]

            - if row[:uk_sales]
              = render "admin/form_answers/financial_summary/uk_sales_row", f: f, row: row
            - else
              = render "admin/form_answers/financial_summary/row", f: f, row: row

    = link_to "#", class: "form-edit-link pull-right"
      span.glyphicon.glyphicon-pencil
      ' Edit
    = button_tag "Save", class: "btn btn-primary form-save-button pull-right"
    .clear

= render "admin/form_answers/financial_summary/benchmarks", financial_pointer: financial_pointer


- provide(:title, @player[:name])

.row
  = render 'layouts/switches'
  .col-md-4
    h2 = link_to @player[:name], "http://steamcommunity.com/profiles/#{params[:player_id]}"
    p
      | #{image_tag 'gold.png', size: '16', alt: 'gold medal'} #{@player[:medals][0]}
      | #{image_tag 'silver.png', size: '16', alt: 'silver medal'} #{@player[:medals][1]}
      | #{image_tag 'bronze.png', size: '16', alt: 'bronze medal'} #{@player[:medals][2]}
    ul.list-inline
      li Average rank: #{@player[:average]}
      li Total Records: #{@player[:scores].length}
- if @player[:scores].length != 0
  table.table.table-striped.table-hover.table-condensed.sortable
    thead
      tr
        th Map
        th Rank
        th Time
        th Date
    tbody
      - @player[:scores].each do |score|
        tr
          td = link_to score[:map], map_path(score[:map], mode_params(score[:mode]))
          td = score[:rank]
          td = time_string(score[:time])
          td = score[:date]

Check if player exists on player page.

- provide(:title, @player[:name])

- if @player[:name]
  .row
    = render 'layouts/switches'
    .col-md-4
      h2 = link_to @player[:name], "http://steamcommunity.com/profiles/#{params[:player_id]}"
      p
        | #{image_tag 'gold.png', size: '16', alt: 'gold medal'} #{@player[:medals][0]}
        | #{image_tag 'silver.png', size: '16', alt: 'silver medal'} #{@player[:medals][1]}
        | #{image_tag 'bronze.png', size: '16', alt: 'bronze medal'} #{@player[:medals][2]}
      ul.list-inline
        li Average rank: #{@player[:average]}
        li Total Records: #{@player[:scores].length}
  - if @player[:scores].length != 0
    table.table.table-striped.table-hover.table-condensed.sortable
      thead
        tr
          th Map
          th Rank
          th Time
          th Date
      tbody
        - @player[:scores].each do |score|
          tr
            td = link_to score[:map], map_path(score[:map], mode_params(score[:mode]))
            td = score[:rank]
            td = time_string(score[:time])
            td = score[:date]
- else
  p That player doesn't exist.


#signin.container
  .row
    .well.col-lg-8.col-lg-offset-2.col-xs-12
      h1
        | {{ :: 'nav.login' | translate }}
      form(name='signinForm' role="form" ng-submit="login()" novalidate)
        .form-group
          label(for="email")
            | {{ :: 'account.email' | translate }}
          input.form-control(name="email" ng-model="user.email" type="email" autofocus)

        .form-group
          label(for="password")
            | {{ :: 'account.password' | translate }}
          input.form-control(name="password" ng-model="user.password" type="password")

        .pull-right
          button.btn.btn-primary.btn-lg(type='submit' ng-disabled="signingIn")
            span(ng-hide="signingIn")
              | {{ :: 'nav.login' | translate }}
            span(ng-show="signingIn")
              | {{ :: 'loading' | translate }}...

      nav
        a(ng-href="/#!/forgot-password")
          | {{ :: 'account.forgot_password' | translate }}?
        a(ng-href="/#!/sign-up")
          | {{ :: 'account.create_account' | translate }}

Remove extra periods in loading button

#signin.container
  .row
    .well.col-lg-8.col-lg-offset-2.col-xs-12
      h1
        | {{ :: 'nav.login' | translate }}
      form(name='signinForm' role="form" ng-submit="login()" novalidate)
        .form-group
          label(for="email")
            | {{ :: 'account.email' | translate }}
          input.form-control(name="email" ng-model="user.email" type="email" autofocus)

        .form-group
          label(for="password")
            | {{ :: 'account.password' | translate }}
          input.form-control(name="password" ng-model="user.password" type="password")

        .pull-right
          button.btn.btn-primary.btn-lg(type='submit' ng-disabled="signingIn")
            span(ng-hide="signingIn")
              | {{ :: 'nav.login' | translate }}
            span(ng-show="signingIn")
              | {{ :: 'loading' | translate }}

      nav
        a(ng-href="/#!/forgot-password")
          | {{ :: 'account.forgot_password' | translate }}?
        a(ng-href="/#!/sign-up")
          | {{ :: 'account.create_account' | translate }}


- image_url = nil
- if defined?(image)
  - image_url = image.source.url if defined?(image) && image.present?
- elsif (asset.class.has_images? || asset.class.has_image?) && asset.first_image_source_url.present?
  - image_url = asset.first_image_source_url

- if image_url
  = image_tag image_url, class: 'ui avatar image'
- else
  i class="#{asset.class.icon_class || 'folder'} large icon"

Fix issue where images weren't being displayed as icons

- image_url = nil
- if defined?(image) && image.present?
  - image_url = image.source.url if defined?(image) && image.present?
- elsif (asset.class.has_images? || asset.class.has_image?) && asset.first_image_source_url.present?
  - image_url = asset.first_image_source_url

- if image_url
  = image_tag image_url, class: 'ui avatar image'
- else
  i class="#{asset.class.icon_class || 'folder'} large icon"


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

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

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

hr

Fix arch value for filtering

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

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

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

hr


.row
  .large-12.columns
    h1 Registered workflows

    table.workflows data-workflows=@workflows.to_json
      thead
        th ID
        th Name
        th Progress
        th Status
        th Started at
        th Finished at
        th Action

      tbody
        tr
          td.text-center colspan=4 Loading…
    h1 Registered machines

    table.machines
      thead
        th PID
        th Host
        th Remaining Jobs
        th Status
      tbody

Rename "Remaining jobs" to enqueued jobs, because that's what sidekiq reports.

.row
  .large-12.columns
    h1 Registered workflows

    table.workflows data-workflows=@workflows.to_json
      thead
        th ID
        th Name
        th Progress
        th Status
        th Started at
        th Finished at
        th Action

      tbody
        tr
          td.text-center colspan=4 Loading…
    h1 Registered machines

    table.machines
      thead
        th PID
        th Host
        th Enqueued jobs
        th Status
      tbody


= page_header(t('.heading'))

= form_tag generate_report_timesheet_entries_path do
  .form-group
    label
      = t('.organisation')
      = select :report, :organisation_id, Organisation.order('name').map {|o| [ o.name, o.id ] }, {selected: params[:report] ? params[:report][:organisation_id] : nil}, class: 'form-control'
  .form-group
    label
      = t('.start_date')
      = date_select :report, :start, start_year: Date.today.year - 15, end_year: Date.today.year
  .form-group
    label
      = t('.end_date')
      = date_select :report, :end, start_year: Date.today.year - 15, end_year: Date.today.year
  .form-group
    = submit_tag t('.generate_report'), class: 'btn btn-primary'

- if @timesheet_entries
  p= "Total invoiced: #{number_to_currency(@timesheet_entries.select{|e|e.chargeable}.map{|e| e.invoice_value }.reduce(:+), unit: '£')}"
  = render 'timesheet_entries/table'

Include hours and per hour in report

= page_header(t('.heading'))

= form_tag generate_report_timesheet_entries_path do
  .form-group
    label
      = t('.organisation')
      = select :report, :organisation_id, Organisation.order('name').map {|o| [ o.name, o.id ] }, {selected: params[:report] ? params[:report][:organisation_id] : nil}, class: 'form-control'
  .form-group
    label
      = t('.start_date')
      = date_select :report, :start, start_year: Date.today.year - 15, end_year: Date.today.year
  .form-group
    label
      = t('.end_date')
      = date_select :report, :end, start_year: Date.today.year - 15, end_year: Date.today.year
  .form-group
    = submit_tag t('.generate_report'), class: 'btn btn-primary'

- if @timesheet_entries
  - total_invoiced = @timesheet_entries.select{|e|e.chargeable}.map{|e| e.invoice_value }.reduce(:+)
  p= "Total invoiced: #{number_to_currency(total_invoiced, unit: '£')}"
  - hours = (@timesheet_entries.map{|e| e.minutes}.reduce(:+)/60.0).round(2)
  - per_hour = (total_invoiced / hours)
  p= "Total hours: #{hours} (#{number_to_currency(per_hour, unit: '£')} per hour)"
  = render 'timesheet_entries/table'


/ I had to use this ugly code because the locale params is lost between the controller and the view.
- I18n.with_locale(@locale.to_sym) do
  - @error = StringBox.find_by(key: "error_#{@status_code}")

  .error-container.row
    .small-12.columns
      h1.error-title = @error..try(:title)
      .error-content == @error.try(:content)

      p.error-link == I18n.t('link.error_404', page: link_to(I18n.t('link.homepage'), root_path))

Fix typo in error partial

/ I had to use this ugly code because the locale params is lost between the controller and the view.
- I18n.with_locale(@locale.to_sym) do
  - @error = StringBox.find_by(key: "error_#{@status_code}")

  .error-container.row
    .small-12.columns
      h1.error-title = @error.try(:title)
      .error-content == @error.try(:content)

      p.error-link == I18n.t('link.error_404', page: link_to(I18n.t('link.homepage'), root_path))


h1(ng-bind="pageTitle")

ng-include(src="'products/list.html'"
  infinite-scroll='loadNextPage()'
  infinite-scroll-immediate-check='false'
  infinite-scroll-disabled='loadingComplete || fetching')

/nav
/  ul.pagination.pagination-lg(ng-if="products.length > 0")
/    li.previous(ng-class="{disabled: currentPage == 1}")
/      a(ng-click='loadPreviousPage()')
/        | {{:: 'nav.previous' | translate }}
/
/    li.page(ng-repeat='page in pageList' ng-class="{active: page==currentPage}")
/      a(ng-bind='page' ng-click='loadPage(page)')
/
/    li.next(ng-class="{disabled: loadingComplete}")
/      a(ng-click='loadNextPage()')
/        | {{:: 'nav.next' | translate }}

Update products/index to use when-scrolled directive

h1(ng-bind="pageTitle")

ng-include(src="'products/list.html'" when-scrolled='loadNextPage()')

/nav
/  ul.pagination.pagination-lg(ng-if="products.length > 0")
/    li.previous(ng-class="{disabled: currentPage == 1}")
/      a(ng-click='loadPreviousPage()')
/        | {{:: 'nav.previous' | translate }}
/
/    li.page(ng-repeat='page in pageList' ng-class="{active: page==currentPage}")
/      a(ng-bind='page' ng-click='loadPage(page)')
/
/    li.next(ng-class="{disabled: loadingComplete}")
/      a(ng-click='loadNextPage()')
/        | {{:: 'nav.next' | translate }}


h1 予約確認・注文確認

h1= link_to "予約する", new_order_order_item_path(@order)

table(border=1)
  tr
    td.name(align="center") = "-"
    - Lunchbox.all.each do |lunchbox|
      td.name = lunchbox.name + "(#{lunchbox.price.to_s}円)"
    td.name = "-"

    - @order.order_items.each do |item|
      tr
        td.name = link_to item.customer_name, edit_order_order_item_path(@order,item)
        - Lunchbox.all.each do |lunchbox|
          - if lunchbox.id == item.lunchbox_id
            td.name(align="center") = "✓"
          - else
            td.name = ""
        td.name = link_to "予約取り消し", order_order_item_path(@order, item), method: :delete, data: {confirm: 'この注文を取り消しますか？'}

Update double quotation to single for readability

h1 予約確認・注文確認

h1= link_to "予約する", new_order_order_item_path(@order)

table(border=1)
  tr
    td.name(align="center") = "-"
    - Lunchbox.all.each do |lunchbox|
      td.name = lunchbox.name + "(#{lunchbox.price.to_s}円)"
    td.name = "-"

    - @order.order_items.each do |item|
      tr
        td.name = link_to item.customer_name, edit_order_order_item_path(@order,item)
        - Lunchbox.all.each do |lunchbox|
          - if lunchbox.id == item.lunchbox_id
            td.name(align="center") = "✓"
          - else
            td.name = ""
        td.name = link_to '予約取り消し', order_order_item_path(@order, item), method: :delete, data: {confirm: 'この注文を取り消しますか？'}


= simple_form_for contact,
    url: patient_letters_contacts_path(patient),
    html: { autocomplete: "off" },
    wrapper: "horizontal_form" do |f|

  .row.errors-container
    .large-12.columns
      ul.error-messages

  .row
    .large-12.columns
      = render "/renalware/letters/contacts/form",
               f: f,
               contact_descriptions: contact_descriptions

  .row
    .large-12.columns
      br
      = f.submit t(".save"), class: "button"
      '  or
      = link_to t(".cancel"),
               "#",
               "aria-label" => "Close",
               class: "reveal-modal-close"
.row
  .large-12.columns
    .g-center
      = link_to "Person not found in directory",
                "#",
                class: "button secondary",
                data: { behaviour: "toggle-section" }

Remove disable-with on contact form

= simple_form_for contact,
    url: patient_letters_contacts_path(patient),
    html: { autocomplete: "off" },
    wrapper: "horizontal_form" do |f|

  .row.errors-container
    .large-12.columns
      ul.error-messages

  .row
    .large-12.columns
      = render "/renalware/letters/contacts/form",
               f: f,
               contact_descriptions: contact_descriptions

  .row
    .large-12.columns
      br
      = f.submit t(".save"), class: "button", data: { disable_with: false }
      '  or
      = link_to t(".cancel"),
               "#",
               "aria-label" => "Close",
               class: "reveal-modal-close"
.row
  .large-12.columns
    .g-center
      = link_to "Person not found in directory",
                "#",
                class: "button secondary",
                data: { behaviour: "toggle-section" }


.article-container.article-container-wider.step-article.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 1)
  article.group role="article"
    .inner
      - if step.context
        == step.context
      = render partial: "qae_form/question", collection: step.questions, locals: { answers: answers, attachments: attachments }
      - if step.submit
        = render partial: "qae_form/step_submit", object: step.submit, as: 'submit'
      = render partial: "qae_form/form_footer", object: step, as: 'step'

Fix step bug showing wrong page

.article-container.article-container-wider.step-article.js-step-condition data-step="step-#{step.title.parameterize}" class=('step-current' if step.index == 0)
  article.group role="article"
    .inner
      - if step.context
        == step.context
      = render partial: "qae_form/question", collection: step.questions, locals: { answers: answers, attachments: attachments }
      - if step.submit
        = render partial: "qae_form/step_submit", object: step.submit, as: 'submit'
      = render partial: "qae_form/form_footer", object: step, as: 'step'


/ This template is used only for toc::[] macro; for document and preamble TOC
/ see document.html, preamble.html and _toc.html.
- if document.attr? :toc
  - toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'))
  nav id=toc_id class=(attr :role, (document.attr 'toc-class', 'toc')) role='doc-toc'
    h level=(section_level + 2) id=("#{toc_id}-title" if toc_id)
      =(title || (document.attr 'toc-title'))
    / Renders outline.html.
    = converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels)

Fix undefined method error in toc template when toc::[] in preamble

/ This template is used only for toc::[] macro; for document and preamble TOC
/ see document.html, preamble.html and _toc.html.
- if document.attr? :toc
  - toc_id = id || ('toc' if document.embedded? || !document.attr?('toc-placement'))
  nav id=toc_id class=(attr :role, (document.attr 'toc-class', 'toc')) role='doc-toc'
    h level=(level + 2) id=("#{toc_id}-title" if toc_id)
      =(title || (document.attr 'toc-title'))
    / Renders outline.html.
    = converter.convert document, 'outline', :toclevels=>((attr :levels).to_i if attr? :levels)


meta name="twitter:card"         content="summary"

- if meta.title
  meta name="twitter:title"        content=meta.title

- if meta.description
  meta name="twitter:description"  content=meta.description

/meta name="twitter:creator"     content="@aviasales"
/meta name="twitter:image:src"   content=asset_url(sharing[:image])
/meta name="twitter:domain"      content="www.aviasales.ru"
/<meta name="twitter:card" content="summary">
/<meta name="twitter:site" content="@publisher_handle">
/<meta name="twitter:title" content="Page Title">
/<meta name="twitter:description" content="Page description less than 200 characters">
/<meta name="twitter:creator" content="@author_handle">
/<-- Twitter Summary card images must be at least 120x120px -->
/<meta name="twitter:image" content="http://www.example.com/image.jpg">
/meta name="twitter:site"        content="@aviasales"

Add twitter image and url meta tags

- if meta.title
  meta name="twitter:title"        content=meta.title

- if meta.description
  / Page description less than 200 characters
  meta name="twitter:description"  content=meta.description

- if meta.page_url
  meta property="twitter:url" content=meta.page_url.html_safe

- if meta.image
  /<-- Twitter Summary card images must be at least 120x120px -->
  meta name="twitter:image" content=meta.image
  meta name="twitter:card" content="summary_large_image"
- else
  meta name="twitter:card" content="summary"

/meta name="twitter:domain"      content="www.aviasales.ru"
/<meta name="twitter:site" content="@publisher_handle">
/<meta name="twitter:creator" content="@author_handle">


h1
  = @post.title

p
  em
    | Updated
    '
    = time_tag(@post.updated_at)

== @post.content

Fix missing image on PDF

h1
  = @post.title

p
  em
    | Updated
    '
    = time_tag(@post.updated_at)

- if @post.image
  p= image_tag @post.image_url(:panorama, expires_in: 1.day), class: 'img-fluid'

== @post.content


.intro-header
  .container
    .row
      .col-lg-12
        .intro-message
          h1 I want to learn
          hr.intro-divider
      .col-lg-6.col-md-offset-3
        .input-group
          input.form-control type="text"
            span.input-group-btn
              button.btn.btn-default type="button"  Go!

Add glyphicon to search bar

.intro-header
  .container
    .row
      .col-lg-12
        .intro-message
          h1 I want to learn:
          hr.intro-divider
      .col-lg-6.col-md-offset-3
        .input-group.input-group-lg
          span.input-group-addon
            i.glyphicon.glyphicon-search
          input.form-control type="text"
            span.input-group-btn
              button.btn.btn-default type="button"  Go!


h1 = @room.name

h2 = t('.users')
- @room.users.each do |user|
  = user.name

.clear

h2 = t('.questions_and_answers')

- @room.room_questions.each do |room_question|
  article
    h3 = room_question.question.text
    p
      strong Answers:
      = room_question.question.answers.pluck(:value).join(', ')

    - room_question.suggested_answers.each do |suggested_answer|
      p
        strong #{suggested_answer.user.name}:
        = suggested_answer.value

    - if room_question.winner_id?
      p
        strong Winner:
        = room_question.winner.name

= form_for [ @room.last_room_question, SuggestedAnswer.new ] do |f|
  = f.text_area :value
  = f.submit

Make usernames in user list links

h1 = @room.name

h2 = t('.users')
- @room.users.each do |user|
  = link_to user.name, user, class: 'js-user-link'

.clear

h2 = t('.questions_and_answers')

- @room.room_questions.each do |room_question|
  article
    h3 = room_question.question.text
    p
      strong Answers:
      = room_question.question.answers.pluck(:value).join(', ')

    - room_question.suggested_answers.each do |suggested_answer|
      p
        strong #{suggested_answer.user.name}:
        = suggested_answer.value

    - if room_question.winner_id?
      p
        strong Winner:
        = room_question.winner.name

= form_for [ @room.last_room_question, SuggestedAnswer.new ] do |f|
  = f.text_area :value
  = f.submit


- cache [:follows, @user] do
  - if @user.follows.present?
    h4 Recent PBs By People You Follow
    .row
      .col-md-6
        .list-group
          - Run.includes(:game, :category, :user).where( \
            user: current_user.follows \
          ).where.not( \
            games: {name: [nil, ""]} \
          ).order('runs.created_at DESC').limit(10).each do |run|
            a.list-group-item href=( \
              current_user.runs?(run.category) ? compare_path(current_user.pb_for(run.category), run) : run_path(run) \
            )
              .media style='margin: .5em 0;'
                .pull-left href=user_path(run.user)
                  img src=run.user.avatar height=64 width=64
                .media-body
                  .pull-right = pretty_timestamp(run.created_at)
                  div
                    = run.user
                    - if run.user.silver_patron?
                      .gold-split title='Patron'
                  div = "#{run.game} #{run.category}"
                  div
                    = pretty_duration(run.time)
                    - if current_user.runs?(run.category)
                      = " ("
                      = pretty_difference(current_user.pb_for(run.category).time, run.time)
                      = ")"

Fix follows on frontpage showing 00:00

- cache [:follows, @user] do
  - if @user.follows.present?
    h4 Recent PBs By People You Follow
    .row
      .col-md-6
        .list-group
          - Run.includes(:game, :category, :user).where( \
            user: current_user.follows \
          ).where.not( \
            games: {name: [nil, ""]} \
          ).order('runs.created_at DESC').limit(10).each do |run|
            a.list-group-item href=( \
              current_user.runs?(run.category) ? compare_path(current_user.pb_for(run.category), run) : run_path(run) \
            )
              .media style='margin: .5em 0;'
                .pull-left href=user_path(run.user)
                  img src=run.user.avatar height=64 width=64
                .media-body
                  .pull-right = pretty_timestamp(run.created_at)
                  div
                    = run.user
                    - if run.user.silver_patron?
                      .gold-split title='Patron'
                  div = "#{run.game} #{run.category}"
                  div
                    = format_milliseconds(run.duration_ms(Run::REAL))
                    - if current_user.runs?(run.category)
                      = " ("
                      = pretty_difference(current_user.pb_for(run.category).duration_ms(Run::REAL), run.duration_ms(Run::REAL))
                      = ")"


== setting.microdata_meta(map) if show_metadata

a.header-title-link.logo-container href='/'
  h1.header-title.logo style="background-image: url(#{setting.logo.url(:thumb)})"
    = setting.title
    small.header-subtitle = setting.subtitle

Update absolute or relative path for image or link in logo partial

== setting.microdata_meta(map) if show_metadata

- logo_link = setting.logo.url(:thumb)
- suffix = 'path'
- html_tag_tag = defined?(html_tag) ? html_tag : :h1
- if defined?(absolute) && absolute
  - logo_link = asset_url(logo_link)
  - suffix = 'url'

a.header-title-link.logo-container href="#{send("root_#{suffix}")}"
  = content_tag(html_tag_tag, nil, class: 'header-title logo', style: "background-image: url(#{logo_link})") do
    = setting.title
    small.header-subtitle = setting.subtitle


#index_map.row.reversed
  - canteens = Canteen.all
  - if current_user.internal?
    section.index-map
      - cache [ canteens ] do
        = map canteens.to_a, hash: true
  - else
    .span4
      = render partial: 'common/favorites', locals: { user: current_user }

    .span8
      section
        .index-map
          / form.search
          /   input#query
          - cache [ canteens ] do
            = map canteens.to_a, hash: true

Fix map shadow problem by adding an additional div container.

#index_map.row.reversed
  - canteens = Canteen.all
  - if current_user.internal?
    section.index-map
      div
        - cache [ canteens ] do
          = map canteens.to_a, hash: true
  - else
    .span4
      = render partial: 'common/favorites', locals: { user: current_user }

    .span8
      section
        .index-map
          / form.search
          /   input#query
          - cache [ canteens ] do
            = map canteens.to_a, hash: true


.abbr-comment data-comment-id=(abbr_comment.id)
  .tex2jax
    - if abbr_comment.paper_title.length > 75
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        = sanitize(abbr_comment.paper_title[0..72])
        | ...
    - else
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        = abbr_comment.paper_title
  span.username
    a href="/#{abbr_comment.user_username}"
      = abbr_comment.user_fullname
  =< timeago(abbr_comment.created_at)
  blockquote.tex2jax style="margin-top: 5px;"
    = strip_tags(abbr_comment.content[0..299])
    - if abbr_comment.content.length > 300
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        |  ...(continued)
  - if signed_in? && current_user.can_moderate?
    .moderate
      | #{status_warning} hide from recent comments

Add simple_format to recent comments

.abbr-comment data-comment-id=(abbr_comment.id)
  .tex2jax
    - if abbr_comment.paper_title.length > 75
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        = sanitize(abbr_comment.paper_title[0..72])
        | ...
    - else
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        = abbr_comment.paper_title
  span.username
    a href="/#{abbr_comment.user_username}"
      = abbr_comment.user_fullname
  =< timeago(abbr_comment.created_at)
  blockquote.tex2jax style="margin-top: 5px;"
    = simple_format(strip_tags(abbr_comment.content[0..299]))
    - if abbr_comment.content.length > 300
      a href="/arxiv/#{abbr_comment.paper_uid}##{abbr_comment.id}"
        |  ...(continued)
  - if signed_in? && current_user.can_moderate?
    .moderate
      | #{status_warning} hide from recent comments


= semantic_form_for component,
  as:     :component,
  url:    admin_component_path(component),
  remote: true,
  html:   {id: dom_id(component, 'form'), data: {type: :json, autosave: true}} do |f|

  = f.inputs do
    = f.input :h1
    = f.input :text, as: :default_wysiwyg, height: :small
    = f.input :key, as: :hidden

  - icon_image = component.icon_image || component.images.build(kind: 'icon')
  = render 'components/_shared/images_inputs', f: f, images: [icon_image]

Add background image field to HoverItem form

= semantic_form_for component,
  as:     :component,
  url:    admin_component_path(component),
  remote: true,
  html:   {id: dom_id(component, 'form'), data: {type: :json, autosave: true}} do |f|

  = f.inputs do
    = f.input :h1
    = f.input :text, as: :default_wysiwyg, height: :small
    = f.input :key, as: :hidden

  - icon_image       = component.icon_image || component.images.build(kind: 'icon')
  - background_image = component.background_image || component.images.build(kind: 'background')
  = render 'components/_shared/images_inputs', f: f, images: [icon_image, background_image]


doctype html
html
  head
    title Halloped
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    meta(http-equiv='Content-Type' content='text/html; charset=UTF-8')
  body(data-env=Rails.env)
    #wrapper
      div#header
        #header-content
          .logo
          a.headline(href=index_path)
            | Halloped.fi
          / Visible when user has logged in
          .language-sel
            - languages.reject{|l| l == I18n.locale}.each do |locale|
              a(href='#' hreflang=locale) = t("languages.to_#{locale}") + ' • '
          .login-info(href='#' style="#{'display:none;' if @user.nil?}")
            .login-name
              span.label
                = t :logged_in_as
                | :
              br
              span.name = @user.full_name
            a.login-btn.unimplemented(href='#')
          / Visible when user has not been logged in, hidden by default in CSS
          .login-request.unimplemented(href='#')
            .login-name
              span.label
                = t :login_with_haka
                | :
              br
              a.link(href='#') Linkki Hakaan
            a.login-btn(href='#')
      div#navi
        #navi-content
          = yield(:navigation)
      div#content
        div#page-content
          = yield

        = yield(:sidebar)
        .clear

    div#footer
      p Copyright 2012 Halloped.fi

  div#modal-wrap

Change index_path to root_path to make the layout to work in admin login screen

doctype html
html
  head
    title Halloped
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    meta(http-equiv='Content-Type' content='text/html; charset=UTF-8')
  body(data-env=Rails.env)
    #wrapper
      div#header
        #header-content
          .logo
          a.headline(href=root_path)
            | Halloped.fi
          / Visible when user has logged in
          .language-sel
            - languages.reject{|l| l == I18n.locale}.each do |locale|
              a(href='#' hreflang=locale) = t("languages.to_#{locale}") + ' • '
          .login-info(href='#' style="#{'display:none;' if @user.nil?}")
            .login-name
              span.label
                = t :logged_in_as
                | :
              br
              span.name = @user.full_name
            a.login-btn.unimplemented(href='#')
          / Visible when user has not been logged in, hidden by default in CSS
          .login-request.unimplemented(href='#')
            .login-name
              span.label
                = t :login_with_haka
                | :
              br
              a.link(href='#') Linkki Hakaan
            a.login-btn(href='#')
      div#navi
        #navi-content
          = yield(:navigation)
      div#content
        div#page-content
          = yield

        = yield(:sidebar)
        .clear

    div#footer
      p Copyright 2012 Halloped.fi

  div#modal-wrap


- content_for(:title) { t 'views.users.whos_in_the_lab' }

section.container
  header.row
    .col-sm-12
      h2
        = t 'views.users.whos_in_the_lab'
        .pull-right
          span.small
            => t 'views.users.people_at_about_html', count: @users.count
            time< datetime="#{Time.now.iso8601}" = Time.now.to_formatted_s(:time)
  .present_users
    - if @users.any?
      .row
        = render partial: 'present_user', collection: @users
    - else
      .row
        .no_users
          = icon 'frown-o'
          h5 = t 'views.users.everybodys_gone'
  h3 = t 'views.dashboard.sensor_readings'
  .row
    - @sensor_ids.each do |id|
      .col-sm-4
        div data-label-type="Temperature" data-thingspeak-channel-id="#{id}" = t 'views.dashboard.loading'

Fix shit from previous branch

- content_for(:title) { t 'views.users.whos_in_the_lab' }

section.container
  header.row
    .col-sm-12
      h2
        = t 'views.users.whos_in_the_lab'
        .pull-right
          span.small
            => t 'views.users.people_at_about_html', count: @users.count
            time< datetime="#{Time.now.iso8601}" = Time.now.to_formatted_s(:time)
  .present_users
    - if @users.any?
      .row
        = render partial: '/users/present_user', collection: @users
    - else
      .row
        .no_users
          = icon 'frown-o'
          h5 = t 'views.users.everybodys_gone'
  h3 = t 'views.dashboard.sensor_readings'
  .row
    - @sensor_ids.each do |id|
      .col-sm-4
        div data-label-type="Temperature" data-thingspeak-channel-id="#{id}" = t 'views.dashboard.loading'


= content_tag_for(:tr, instance)
  th
    a
      = link_to format_inline_text(instance.name), \
                admin_instance_admin_url(host: instance.host, port: nil)

  td = instance.host

  td = instance.user_count

  td = instance.course_count

  td
    = edit_button([:admin, instance]) if can?(:edit, instance)
    = delete_button([:admin, instance]) if can?(:destroy, instance)

Add links to courses and users in instance management

= content_tag_for(:tr, instance)
  th
    a
      = link_to format_inline_text(instance.name), \
                admin_instance_admin_url(host: instance.host, port: nil)

  td = instance.host

  td = link_to instance.user_count, admin_instance_users_url(host: instance.host)

  td = link_to instance.course_count, admin_instance_courses_url(host: instance.host)

  td
    = edit_button([:admin, instance]) if can?(:edit, instance)
    = delete_button([:admin, instance]) if can?(:destroy, instance)


#join-beta-modal.not-authorized-modal.reveal-modal.small.fixed.neighborly-design
  a.close-reveal-modal ×
  header
    h4 Beta Users only
  p This function is currently limited to our beta users. You can get access sooner by sharing Neighbor.ly with your friends.
  - share_text = "Earn tax-exempt income by investing in your favorite places with @Neighborly. Reserve your spot today at #{root_url(ref: current_user.referral_code)}"
  - facebook_params = "s=100&p[title]=Neighbor.ly&p[summary]=#{URI::encode(share_text)}&p[url]=#{root_url(ref: current_user.referral_code)}"
  = link_to 'Share', "http://www.facebook.com/sharer.php?#{facebook_params}", class: 'button with-icon facebook', target: :blank
  = link_to 'Tweet', "https://twitter.com/intent/tweet?text=#{URI::encode(share_text)}", class: 'button with-icon twitter', target: :blank
  p
    | Or, copy & paste your personal referral link:
    span = link_to root_url(ref: current_user.referral_code), root_url(ref: current_user.referral_code)

Add link to my spot on beta only modal

#join-beta-modal.not-authorized-modal.reveal-modal.small.fixed.neighborly-design
  a.close-reveal-modal ×
  header
    h4 Beta Users only
  p
    | This function is currently limited to our beta users.
    br
    | #{link_to 'Check your spot or enter your invite code', user_my_spot_path(current_user)}.
  p
    | You can get access sooner by sharing Neighbor.ly with your friends.
  - share_text = "Earn tax-exempt income by investing in your favorite places with @Neighborly. Reserve your spot today at #{root_url(ref: current_user.referral_code)}"
  - facebook_params = "s=100&p[title]=Neighbor.ly&p[summary]=#{URI::encode(share_text)}&p[url]=#{root_url(ref: current_user.referral_code)}"
  = link_to 'Share', "http://www.facebook.com/sharer.php?#{facebook_params}", class: 'button with-icon facebook', target: :blank
  = link_to 'Tweet', "https://twitter.com/intent/tweet?text=#{URI::encode(share_text)}", class: 'button with-icon twitter', target: :blank
  p
    | Or, copy & paste your personal referral link:
    span = link_to root_url(ref: current_user.referral_code), root_url(ref: current_user.referral_code)


- @title = "Authorize #{@client["name"]}"

#login.dialog
  form.panel-body method="post" action="/oauth/authorize"
    input type="hidden" name=Rack::Csrf.field value=Rack::Csrf.token(env)
    fieldset
      .field
        div style="margin-bottom: 29px;" Authorize third-party application:
        div style="margin-left: 54px; margin-bottom: 12px;"
          label for="email" style="color: white; font-size: 16px; font-weight: bold;" #{@client["name"]}
          p style="font-size: 13px; margin-top: 4px;" #{@client["description"]}
        p style="font-size: 13px; line-height: 1.4em;" <strong>#{@client["name"]}</strong> is requesting read and write access to your apps, your account, your other authorizations, your config vars, your payment histories, and your soul.
    fieldset.submit
      p
        a href=Identity::Config.dashboard_url Deny Access
      input.submit type="submit" name="authorize" value="Allow Access"

Add quotes around client name

- @title = "Authorize '#{@client["name"]}'"

#login.dialog
  form.panel-body method="post" action="/oauth/authorize"
    input type="hidden" name=Rack::Csrf.field value=Rack::Csrf.token(env)
    fieldset
      .field
        div style="margin-bottom: 29px;" Authorize third-party application:
        div style="margin-left: 54px; margin-bottom: 12px;"
          label for="email" style="color: white; font-size: 16px; font-weight: bold;" #{@client["name"]}
          p style="font-size: 13px; margin-top: 4px;" #{@client["description"]}
        p style="font-size: 13px; line-height: 1.4em;" <strong>#{@client["name"]}</strong> is requesting read and write access to your apps, your account, your other authorizations, your config vars, your payment histories, and your soul.
    fieldset.submit
      p
        a href=Identity::Config.dashboard_url Deny Access
      input.submit type="submit" name="authorize" value="Allow Access"


/ Copyright 2014 Square Inc.
/
/    Licensed under the Apache License, Version 2.0 (the "License");
/    you may not use this file except in compliance with the License.
/    You may obtain a copy of the License at
/
/        http://www.apache.org/licenses/LICENSE-2.0
/
/    Unless required by applicable law or agreed to in writing, software
/    distributed under the License is distributed on an "AS IS" BASIS,
/    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/    See the License for the specific language governing permissions and
/    limitations under the License.

- content_for :shuttle_title do
  = "Locale Association #{@locale_association.id}"
- content_for :file_name do
  = 'views/locale_associations/edit'
- content_for :class do
  = controller_name
- content_for :id do
  = [controller_name, action_name].join('-')
- content_for :footer do
  true

.header
  h1 Editing Locale Association (#{@locale_association.source_rfc5646_locale} => #{@locale_association.target_rfc5646_locale})
hr.divider

= render 'form'

Add a delete button to locale associations page

/ Copyright 2014 Square Inc.
/
/    Licensed under the Apache License, Version 2.0 (the "License");
/    you may not use this file except in compliance with the License.
/    You may obtain a copy of the License at
/
/        http://www.apache.org/licenses/LICENSE-2.0
/
/    Unless required by applicable law or agreed to in writing, software
/    distributed under the License is distributed on an "AS IS" BASIS,
/    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/    See the License for the specific language governing permissions and
/    limitations under the License.

- content_for :shuttle_title do
  = "Locale Association #{@locale_association.id}"
- content_for :file_name do
  = 'views/locale_associations/edit'
- content_for :class do
  = controller_name
- content_for :id do
  = [controller_name, action_name].join('-')
- content_for :footer do
  true

.header
  h1 Editing Locale Association (#{@locale_association.source_rfc5646_locale} => #{@locale_association.target_rfc5646_locale})
hr.divider

= render 'form'
= button_to 'Delete', @locale_association, class: 'danger pull-right', data: {:confirm => 'Are you sure?'}, :method => :delete


= simple_form_for [parent, @reward], html: { class: 'remote-form' } do |f|
  .pull-right
    a.cancel.button.secondary href="#" = t('words.cancel')
  .clearfix

  - if policy(@reward).permitted_for?(:title, :update)
    = f.input :title

  - if policy(@reward).permitted_for?(:minimum_value, :update)
    = f.input :minimum_value, as: :integer, input_html: {pattern: "^[\\d+.]+"}

  - if policy(@reward).permitted_for?(:days_to_delivery, :update)
    = f.input :days_to_delivery

  - if policy(@reward).permitted_for?(:description, :update)
    = f.input :description

  - if policy(@reward).permitted_for?(:maximum_contributions, :update)
    = f.input :maximum_contributions

  = f.input :soon, as: :boolean

  = f.button :submit, data: { disable_with: t('words.sending') }
  - if @reward.persisted? && policy(@reward).destroy?
    span.or = t('words.or')
    = link_to [parent, @reward], class: 'button alert', method: :delete, confirm: t('words.confirm') do
      i.icon-et-trash.icon-white
      = t('words.delete')

Update rewards form to reflect new attributes

= simple_form_for [parent, @reward], html: { class: 'remote-form' } do |f|
  .pull-right
    a.cancel.button.secondary href="#" = t('words.cancel')
  .clearfix

  - if policy(@reward).permitted_for?(:maximum_contributions, :update)
    = f.input :maximum_contributions

  = f.input :happens_at
  = f.input :principal_amount
  = f.input :interest_rate
  = f.input :yield
  = f.input :price
  = f.input :cusip_number

  = f.button :submit, data: { disable_with: t('words.sending') }
  - if @reward.persisted? && policy(@reward).destroy?
    span.or = t('words.or')
    = link_to [parent, @reward], class: 'button alert', method: :delete, confirm: t('words.confirm') do
      i.icon-et-trash.icon-white
      = t('words.delete')


= button_tag 'Submit for Debug', :type => 'button', :class => 'open-area btn btn-create', :id => "debug-button",  :data => { :related => "#debug-submit-form" }

#debug-submit-form[style="display:none;"]
 fieldset
   legend   Debug Report
   = render 'form'
pre
 = SystemUtils.run "tail -100 #{Rails.root}/log/development.log"

Debug Page for production, typo as development

= button_tag 'Submit for Debug', :type => 'button', :class => 'open-area btn btn-create', :id => "debug-button",  :data => { :related => "#debug-submit-form" }

#debug-submit-form[style="display:none;"]
 fieldset
   legend   Debug Report
   = render 'form'
pre
 = SystemUtils.run "tail -100 #{Rails.root}/log/production.log"


h1.header User info

form.filter action=request.url
  h5 Role
  - (['all'] + Role::ROLES).each do |role|
    label.radio
      = radio_button_tag :role, role == 'all' ? '' : role, params[:role] == role
      = role.capitalize

  h5 Type
  - %w(all sponsored volunteering).each do |kind|
    label.radio
      = radio_button_tag :kind, kind == 'all' ? '' : kind, params[:kind] == kind
      = kind.capitalize

table.table.table-striped.table-bordered.table-condensed.table-hover
  thead
    tr
      th Team
      th Name
      th E-Mail
      th T-Shirt size
      th Banking
      th Address

  tbody
    - users.each do |user|
      tr
        td
          ul
            - links_to_user_teams(user).each do |link|
              li = link
        td = link_to user.name_or_handle, user
        td = user.email
        td = user.tshirt_size
        td = simple_format user.banking_info
        td = simple_format user.postal_address

Fix filter for voluntary teams

h1.header User info

form.filter action=request.url
  h5 Role
  - (['all'] + Role::ROLES).each do |role|
    label.radio
      = radio_button_tag :role, role == 'all' ? '' : role, params[:role] == role
      = role.capitalize

  h5 Type
  - %w(all sponsored voluntary).each do |kind|
    label.radio
      = radio_button_tag :kind, kind == 'all' ? '' : kind, params[:kind] == kind
      = kind.capitalize

table.table.table-striped.table-bordered.table-condensed.table-hover
  thead
    tr
      th Team
      th Name
      th E-Mail
      th T-Shirt size
      th Banking
      th Address

  tbody
    - users.each do |user|
      tr
        td
          ul
            - links_to_user_teams(user).each do |link|
              li = link
        td = link_to user.name_or_handle, user
        td = user.email
        td = user.tshirt_size
        td = simple_format user.banking_info
        td = simple_format user.postal_address


.custom
  - if position_application.custom
    - if position_application.custom.include? 'available'
      .item-block
        p.label
          = t "helsinki.fields.available"
          | :
          p.text = t("helsinki.fields.available_#{position_application.custom['available']}")
    - if position_application.custom.include? 'degree_programme'
      .item-block
        p.label
          = t "helsinki.fields.degree_programme"
          | :
          p.text = position_application.custom['degree_programme']
    - if position_application.custom.include? 'experience_in_student_associations' && !@call.administrational?
      .item-block
        p.label
          = t 'helsinki.fields.experience_in_student_associations'
          | :
        p.text = position_application.custom['experience_in_student_associations']

Fix show page for HYY non administrational calls

.custom
  - if position_application.custom
    - if position_application.custom.include? 'available'
      .item-block
        p.label
          = t "helsinki.fields.available"
          | :
          p.text = t("helsinki.fields.available_#{position_application.custom['available']}")
    - if position_application.custom.include? 'degree_programme'
      .item-block
        p.label
          = t "helsinki.fields.degree_programme"
          | :
          p.text = position_application.custom['degree_programme']
    - if position_application.custom.include?('experience_in_student_associations') && !@call.administrational?
      .item-block
        p.label
          = t 'helsinki.fields.experience_in_student_associations'
          | :
        p.text = position_application.custom['experience_in_student_associations']


- @title = "Two-factor Authentication"

== render :slim, :"_flash", layout: false
#login.dialog
  form.panel-body method="post" action="/login"
    input type="hidden" name=Rack::Csrf.field value=Rack::Csrf.token(env)
    fieldset
      .field
        label for="code" Two-factor authentication code:
        input#code.text type="text" name="code" size="6" autocomplete="off" autofocus="true"
    fieldset.submit
      input.submit type="submit" name="commit" value="Log In"

Add placeholder text to 2fa field

- @title = "Two-factor Authentication"

== render :slim, :"_flash", layout: false
#login.dialog
  form.panel-body method="post" action="/login"
    input type="hidden" name=Rack::Csrf.field value=Rack::Csrf.token(env)
    fieldset
      .field
        label for="code" Two-factor authentication code:
        input#code.text type="text" name="code" size="6" autocomplete="off" autofocus="true" placeholder="two-factor code"
    fieldset.submit
      input.submit type="submit" name="commit" value="Log In"


article.simple-rounded-box.cms
  h2= @user.name

  dl
    dt Email
    dd= @user.email
    dt Signed up with Google?
    dd= @user.signed_up_with_google
    dt Clever Id (if exists)
    dd= @user.clever_id
    dt Token (if exists)
    dd= @user.token
    dt Username
    dd= @user.username
    dt Role
    dd= @user.role
    - if @user.role == 'student'
      dt Belongs to Classes
      dd= @user.classrooms.collect { |c| "#{c.name} - #{c.teacher.name}" }.join('
').html_safe
    dt Classcode
    dd= @user.classcode
    dt School
    dd= @user.school_name
    dt School Location
    dd= "#{@user.school_mail_city}, #{@user.school_mail_state}" if @user.school
    - if @user.teacher?
      dt Premium Status
      dd= @user.subscriptions.last&.account_type
      dt Premium Expires
      dd= @user.subscriptions.last&.expiration
      dt Grades
      dd= @user.classrooms_i_teach.collect {|c| "#{c.name} - #{c.grade}"}.join('
').html_safe
    dt IP Address
    dd= @user.ip_address
    dt Created
    dd= @user.created_at
    dt Last Sign In
    dd= @user.updated_at

Use pointpin to get the location for a user's IP

article.simple-rounded-box.cms
  h2= @user.name

  dl
    dt Email
    dd= @user.email
    dt Signed up with Google?
    dd= @user.signed_up_with_google
    dt Clever Id (if exists)
    dd= @user.clever_id
    dt Token (if exists)
    dd= @user.token
    dt Username
    dd= @user.username
    dt Role
    dd= @user.role
    - if @user.role == 'student'
      dt Belongs to Classes
      dd= @user.classrooms.collect { |c| "#{c.name} - #{c.teacher.name}" }.join('
').html_safe
    dt Classcode
    dd= @user.classcode
    dt School
    dd= @user.school_name
    dt School Location
    dd= "#{@user.school_mail_city}, #{@user.school_mail_state}" if @user.school
    - if @user.teacher?
      dt Premium Status
      dd= @user.subscriptions.last&.account_type
      dt Premium Expires
      dd= @user.subscriptions.last&.expiration
      dt Grades
      dd= @user.classrooms_i_teach.collect {|c| "#{c.name} - #{c.grade}"}.join('
').html_safe
    dt User Location
    dd= "#{Pointpin.locate(@user.ip_address)&.city_name}, #{Pointpin.locate(@user.ip_address)&.region_name}"
    dt IP Address
    dd= @user.ip_address
    dt Created
    dd= @user.created_at
    dt Last Sign In
    dd= @user.updated_at


h1= @journaled.contact.full_name
h1= t_title(:index, Journal)
.table-responsive
      table.table
        thead
          tr
            th= t_attr(:created_at)
            th= t_attr(:category)
            th= t_attr(:text)
            th= t_attr(:author)
            th
        tbody
          - @journaled.journals.each do |record|
            tr
              td= l(record.created_at.to_date)
              td= t("category.#{record.category}")
              td
                - if record.title?
                  strong= record.title
                  br
                = word_wrap(record.body) if record.body
              td= link_to record.user.full_name, record.user.profile
              td= link_to t_action(:edit), url_for([@journaled, record]) + '/edit'
= form_navigation_btn :new
.row
  .col-xs-12= button_link navigation_glyph(:back), @journaled

Remove created_at from journals index

h1= @journaled.contact.full_name
h1= t_title(:index, Journal)
.table-responsive
      table.table
        thead
          tr
            th= t_attr(:category)
            th= t_attr(:text)
            th= t_attr(:author)
            th
        tbody
          - @journaled.journals.each do |record|
            tr
              td= t("category.#{record.category}")
              td
                - if record.title?
                  strong= record.title
                  br
                = word_wrap(record.body) if record.body
              td= link_to record.user.full_name, record.user.profile
              td= link_to t_action(:edit), url_for([@journaled, record]) + '/edit'
= form_navigation_btn :new
.row
  .col-xs-12= button_link navigation_glyph(:back), @journaled


/ TODO: put these in SidebarView
- nav_action_links = @resource.nav_action_links(Phoenix.Controller.action_name(@conn), @conn.assigns[:resource])
- page_paths = @resource.page_paths(@conn.assigns.talon)
- resource_paths = @resource.resource_paths(@conn.assigns.talon)
- alias __MODULE__, as: View

aside.main-sidebar
  section.sidebar style="height: auto;"
    ul.sidebar-menu
      li.header.text-uppercase Pages
      = render_many page_paths, View, "nav_resource_link.html", as: :resource_path
      li.header.text-uppercase Resources
      = render_many resource_paths, View, "nav_resource_link.html", as: :resource_path
      = if List.first nav_action_links do
        li.header.text-uppercase Actions
        = render_many nav_action_links, View, "nav_action_link.html", as: :action_path

Use unless empty check in sidebar

/ TODO: put these in SidebarView
- nav_action_links = @resource.nav_action_links(Phoenix.Controller.action_name(@conn), @conn.assigns[:resource])
- page_paths = @resource.page_paths(@conn.assigns.talon)
- resource_paths = @resource.resource_paths(@conn.assigns.talon)
- alias __MODULE__, as: View

aside.main-sidebar
  section.sidebar style="height: auto;"
    ul.sidebar-menu
      li.header.text-uppercase Pages
      = render_many page_paths, View, "nav_resource_link.html", as: :resource_path
      li.header.text-uppercase Resources
      = render_many resource_paths, View, "nav_resource_link.html", as: :resource_path
      = unless Enum.empty? nav_action_links do
        li.header.text-uppercase Actions
        = render_many nav_action_links, View, "nav_action_link.html", as: :action_path


doctype html
html lang="#{@language}"

  head
    meta charset='utf-8'
    == raw analytical.head_prepend_javascript if Rails.env.production?
    = display_meta_tags title: title, site: @setting.title_and_subtitle, reverse: true
    meta name='google-site-verification' content="#{Figaro.env.google_site_verification}"
    meta name='msvalidate.01' content="#{Figaro.env.bing_site_verification}"
    meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'

    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': true
    = javascript_include_tag 'application', 'data-turbolinks-track': true

    link type='text/plain' rel='author' href='/humans.txt'
    / = favicon_link_tag '/favicon.ico'
    = csrf_meta_tag
    == raw analytical.head_append_javascript if Rails.env.production?

  body
    == raw analytical.body_prepend_javascript if Rails.env.production?
    = include_gon

    #wrapper.wrapper
      = render 'elements/flash'
      = render 'elements/header'

      .l-container
        == yield

    = render 'elements/footer'
    == raw analytical.body_append_javascript if Rails.env.production?

Remove duplicated site title in header meta

doctype html
html lang="#{@language}"

  head
    meta charset='utf-8'
    == raw analytical.head_prepend_javascript if Rails.env.production?
    = display_meta_tags title: titles
    meta name='google-site-verification' content="#{Figaro.env.google_site_verification}"
    meta name='msvalidate.01' content="#{Figaro.env.bing_site_verification}"
    meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'

    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': true
    = javascript_include_tag 'application', 'data-turbolinks-track': true

    link type='text/plain' rel='author' href='/humans.txt'
    / = favicon_link_tag '/favicon.ico'
    = csrf_meta_tag
    == raw analytical.head_append_javascript if Rails.env.production?

  body
    == raw analytical.body_prepend_javascript if Rails.env.production?
    = include_gon

    #wrapper.wrapper
      = render 'elements/flash'
      = render 'elements/header'

      .l-container
        == yield

    = render 'elements/footer'
    == raw analytical.body_append_javascript if Rails.env.production?


doctype
html
  head
    title David Chapman | dchapman.io
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    = favicon_link_tag 'favicon.ico'
    link href="http://fonts.googleapis.com/css?family=Expletus+Sans" rel="stylesheet" type="text/css"
  body
    h1.header
      = link_to(image_tag('ruby_icon.png', class: 'logo') + 'david@dchapman.io', root_path)
    div.page_content
      = yield

Move header inside page content div

doctype
html
  head
    title David Chapman | dchapman.io
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    = favicon_link_tag 'favicon.ico'
    link href="http://fonts.googleapis.com/css?family=Expletus+Sans" rel="stylesheet" type="text/css"
  body
    div.page_content
      h1.header
        = link_to(image_tag('ruby_icon.png', class: 'logo') + 'david@dchapman.io', root_path)
      = yield


- content_for :body_id do
  |  index
= provide(:title, 'Results' )
h2
  | Average annual panel output
p.alert.alert-warning
  | This app is an alpha release and uses dummy data! Enjoy!
- @query_params.each_with_index do |panel, i|
  p
    | Panel
    = i + 1
    | :
  ul
    li
      | bearing:
      = panel.bearing
      sup
        | °
    li
      | tilt:
      = panel.tilt
      sup
        | °
    li
      | area:
      = panel.panel_size
      | m
      sup
        | 2

  | Approximate system size for given panel area:
  = number_to_human(@pv_query.system_watts, units: :W)
p
  | @search_params:
  = @search_params.inspect
p
  | @candidate_systems:
  = @candidate_systems.inspect
p
  | @get_system:
  = @get_system.inspect
p
  | @similar_system:
  = @similar_system.inspect
p
  | @pvo_system:
  = @pvo_system.inspect
p
  | @pvo_system output:
  - # @pvo_system.output_pa
  | kWh
p
  | Empirical output for pv_query:
  = number_to_human(@empirical_output_pa, units: :Wh)
p
  | Output p.a.:
  = number_to_human(@output_pa, units: :Wh)
p
  | Drag to rotate graph, scroll to zoom.
= content_tag :div, id: "output_pa", data: {datapoints: @output_pa_array} do
  p.alert.alert-warning
    | Oops. There should be a pretty graph here.
button#reload_page.btn.btn-primary[type="button" autofocus="true"]
  | Try again

Tidy up results view for release.

- content_for :body_id do
  |  index
= provide(:title, 'Results' )
h2
  | Average annual panel output
p.alert.alert-warning
  | This app is an alpha release and uses dummy data! Enjoy!
- @query_params.each_with_index do |panel, i|
  p
    | Panel
    = i + 1
    | :
  ul
    li
      | bearing:&nbsp
      = panel.bearing
      sup
        | °
    li
      | tilt:&nbsp
      = panel.tilt
      sup
        | °
    li
      | area:&nbsp
      = panel.panel_size
      | m
      sup
        | 2

  | Approximate system size for given panel area:&nbsp
  = number_to_human(@pv_query.system_watts, units: :W)
p
  | Drag to rotate graph, scroll to zoom.
= content_tag :div, id: "output_pa", data: {datapoints: @output_pa_array} do
  p.alert.alert-warning
    | Oops. There should be a pretty graph here.
button#reload_page.btn.btn-primary[type="button" autofocus="true"]
  | Try again


-if @user.can_edit?(@notebook) || @user.admin? || (@notebook.resources && @notebook.resources.count > 0)
  div.externalResources
    span.externalResourcesTitle #{GalleryConfig.external_resources_title}
    -if @user.can_edit?(@notebook) || @user.admin?
      a.glyphicon.glyphicon-plus.tooltips.add-icon href="#" id="add_external_resource" title="Add #{GalleryConfig.external_resources_label}"
        span.sr-only Add New #{GalleryConfig.external_resources_label}
    -notebook.resources.each do |resource|
      li id="resource-#{resource.id}"
        a href="#{resource.href}" target="_blank" ref="external" #{resource.title}
        -if @user.can_edit?(@notebook) || @user.admin?
          a.glyphicon.glyphicon-trash.tooltips.delete-icon href="#" title="Delete #{GalleryConfig.external_resources_label}"
            span.sr-only Delete #{GalleryConfig.external_resources_label} #{resource.title}

Make the '+' icon for external resources ignored by screen readers

-if @user.can_edit?(@notebook) || @user.admin? || (@notebook.resources && @notebook.resources.count > 0)
  div.externalResources
    span.externalResourcesTitle #{GalleryConfig.external_resources_title}
    -if @user.can_edit?(@notebook) || @user.admin?
      a.tooltips.add-icon href="#" id="add_external_resource" title="Add #{GalleryConfig.external_resources_label}"
        span.glyphicon.glyphicon-plus aria-hidden="true"
        span.sr-only Add New #{GalleryConfig.external_resources_label}
    -notebook.resources.each do |resource|
      li id="resource-#{resource.id}"
        a href="#{resource.href}" target="_blank" ref="external" #{resource.title}
        -if @user.can_edit?(@notebook) || @user.admin?
          a.glyphicon.glyphicon-trash.tooltips.delete-icon href="#" title="Delete #{GalleryConfig.external_resources_label}"
            span.sr-only Delete #{GalleryConfig.external_resources_label} #{resource.title}


.d-inline-block.my-3.mx-2
  = mega_octicon(:paintcan)
h3.d-inline-block.my-3 = @style.title
.border.p-2
  = if !is_nil(@current_user) && @current_user.name == @style.user.name do
    .pb-2.clearfix
      a.float-right href="#{style_path(@conn, :edit, @style.user.name, @style.id)}"
        = octicon(:pencil)
  pre
    code = @style.code

Add last updated date to show style template

.d-inline-block.my-3.mx-2
  = mega_octicon(:paintcan)
h3.d-inline-block.my-3 = @style.title
.border.p-2
  .pb-2.clearfix
    = gettext "Last updated on"
    = @style.updated_at
    = if !is_nil(@current_user) && @current_user.name == @style.user.name do
      a.float-right href="#{style_path(@conn, :edit, @style.user.name, @style.id)}"
        = octicon(:pencil)
  pre
    code = @style.code


.logo
  .row
    .small-6.medium-3.columns
      = setting.logo
    .small-6.medium-9.columns
      = setting.title_subtitle

Use decorated method to display logo

.logo
  .row
    .small-6.medium-3.columns
      = setting.logo_deco
    .small-6.medium-9.columns
      = setting.title_subtitle


h1 = @user.displayname

= row(label: 'external_user.name', value: @user.name)
= row(label: 'external_user.email', value: @user.email) if current_user.admin?
= row(label: 'external_user.external_id') do
  code
    = @user.external_id
= row(label: 'external_user.consumer', value: link_to(@user.consumer, @user.consumer))
= row(label: 'external_user.role', value: t("users.roles.#{@user.role}"))

h4.mt-4 = link_to(t('.exercise_statistics'), statistics_external_user_path(@user)) if policy(@user).statistics?

- if current_user.admin?
  h4.mt-4 = t('.tag_statistics')
  #loading
    .spinner
    = t('.loading_tag_statistics')
  #no-elements
    = t('.empty_tag_statistics')
  #tag-grid

Fix link to Consumer if not enough permissions

h1 = @user.displayname

= row(label: 'external_user.name', value: @user.name)
= row(label: 'external_user.email', value: @user.email) if current_user.admin?
= row(label: 'external_user.external_id') do
  code
    = @user.external_id
= row(label: 'external_user.consumer', value: link_to_if(policy(@user.consumer).show?, @user.consumer, @user.consumer))
= row(label: 'external_user.role', value: t("users.roles.#{@user.role}"))

h4.mt-4 = link_to(t('.exercise_statistics'), statistics_external_user_path(@user)) if policy(@user).statistics?

- if current_user.admin?
  h4.mt-4 = t('.tag_statistics')
  #loading
    .spinner
    = t('.loading_tag_statistics')
  #no-elements
    = t('.empty_tag_statistics')
  #tag-grid


- contribution = @notification.contribution
- detail = contribution.details.ordered.first
- company_name = CatarseSettings[:company_name]
|Olá, #{contribution.user.name}!
br
br
|O projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} não atingiu a meta de arrecadação estabelecida no tempo limite de campanha e, segundo as regras do Catarse, o seu apoio no valor de #{number_to_currency detail.value} ao projeto #{contribution.project.name} será devolvido a você.
br
br
|Como o seu apoio foi efetuado através de boleto, para efetuar a devolução do dinheiro precisamos que você preencha seus dados bancários:
br
br
center
  = link_to new_bank_account_url, alt: 'Solicitar Reembolso', target: '__blank' do
    = image_tag "#{CatarseSettings[:base_url]}/assets/catarse_bootstrap/request_refund.png"
br
br
|Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to CatarseSettings[:email_contact]}. Não esqueça de nos informar a chave de identificação do seu apoio, que é: #{detail.payment_id}.
br
br
|Um abraço,
br
| #{company_name}

Replace br tag for p in pending_refund email template

- contribution = @notification.contribution
- detail = contribution.details.ordered.first
- company_name = CatarseSettings[:company_name]
p
  |Olá, #{contribution.user.name}!
p
  |O projeto #{link_to(contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink))} não atingiu a meta de arrecadação estabelecida no tempo limite de campanha e, segundo as regras do Catarse, o seu apoio no valor de #{number_to_currency detail.value} ao projeto #{contribution.project.name} será devolvido a você.
p
  |Como o seu apoio foi efetuado através de boleto, para efetuar a devolução do dinheiro precisamos que você preencha seus dados bancários:
p
  center
    = link_to new_bank_account_url, alt: 'Solicitar Reembolso', target: '__blank' do
      = image_tag "#{CatarseSettings[:base_url]}/assets/catarse_bootstrap/request_refund.png"
p
  |Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to CatarseSettings[:email_contact]}. Não esqueça de nos informar a chave de identificação do seu apoio, que é: #{detail.payment_id}.
p
  |Um abraço,
  br
  | #{company_name}


= semantic_form_for component,
  as:     :component,
  url:    admin_component_path(component),
  remote: true,
  html:   {id: dom_id(component, 'form'), data: {type: :json, autosave: true}} do |f|

  = f.semantic_errors *f.object.errors.keys

  = f.inputs do
    = f.input :h1

    - unless :text.in? f.object.decorate.form_disabled_attrs
      = f.input :text, as: :default_wysiwyg, height: :small

    = f.input :key, as: :hidden

    - if :link_url.in? f.object.decorate.form_additional_editable_attrs
      = f.input :link_url

  = f.input :images, as: :images

Include link_label to HoverItem form

= semantic_form_for component,
  as:     :component,
  url:    admin_component_path(component),
  remote: true,
  html:   {id: dom_id(component, 'form'), data: {type: :json, autosave: true}} do |f|

  = f.semantic_errors *f.object.errors.keys

  = f.inputs do
    = f.input :h1

    - unless :text.in? f.object.decorate.form_disabled_attrs
      = f.input :text, as: :default_wysiwyg, height: :small

    = f.input :key, as: :hidden

    - if :link_url.in? f.object.decorate.form_additional_editable_attrs
      = f.input :link_url
      = f.input :link_label

  = f.input :images, as: :images


#toggle_sidebar_off.btn.btn-large = icon('chevron-left')
#toggle_sidebar_on.btn.btn-large = icon('chevron-right')
h3= t('admin.search.title')
= search_admin_form_for @search, url: collection_path do |f|
  - cache [I18n.locale, 'search_form_inside', resource_class.name, params[:q].hash, current_user.user_role_id] do
    = render 'search_form', f: f
    br
    div
      = f.submit t('admin.search.submit'), class: 'btn btn-success btn-large'
      = f.submit t('admin.search.cancel'), class: 'btn', id: 'search_cancel'

Remove caching in search layout

#toggle_sidebar_off.btn.btn-large = icon('chevron-left')
#toggle_sidebar_on.btn.btn-large = icon('chevron-right')
h3= t('admin.search.title')
= search_admin_form_for @search, url: collection_path do |f|
  = render 'search_form', f: f
  br
  div
    = f.submit t('admin.search.submit'), class: 'btn btn-success btn-large'
    = f.submit t('admin.search.cancel'), class: 'btn', id: 'search_cancel'


#splash
  - if current_user
    h1 Hi, #{current_user}!
  - if session[:user_id] == nil
    h1 = link_to 'Sign in with GitHub', sign_in_path

Print 'current_user.username' instead of just 'current_user'

#splash
  - if current_user
    h1 Hi, #{current_user.username}!
  - if session[:user_id] == nil
    h1 = link_to 'Sign in with GitHub', sign_in_path


= render partial: "shared/flash_messages", flash: flash
- trim = question.trim_link
- if trim
  .dashboard_trim_link id="trim_links_#{trim.id}"
    = link_to('Open trim link', trim_link_path(trim), {title: 'Open trim link', rel: 'external'})
- else
  .trim-links-form id="trim-links-form-#{question.id}"
    button.button.button-choose Choose Trim file
    .tr5-message
      i.fa
      span.message
    .inline.tr5-actions.toggle-content style="overflow:hidden;"
      = form_for TrimLink.new(:pq_id => question.id),
        remote: true,
        authenticity_token: true,
        html: { multipart: true, id: "new_trim_link_form_#{question.id}", class: 'pq-inline-form form-add-trim-link', data: {pqid: question.id }} do |f|
        = f.file_field :file_data, :class=>'pq-inline-form trim-file-chooser', :id=>"file_data-#{question.id}"
        = f.hidden_field(:pq_id , :value => question.id , :id=>"pq_id-trimlink-#{question.id}")
        = f.submit 'Upload', :class=>'button button-upload'
        button.button.button-cancel.button-secondary Cancel

Trim selection should be a secondary file

= render partial: "shared/flash_messages", flash: flash
- trim = question.trim_link
- if trim
  .dashboard_trim_link id="trim_links_#{trim.id}"
    = link_to('Open trim link', trim_link_path(trim), {title: 'Open trim link', rel: 'external'})
- else
  .trim-links-form id="trim-links-form-#{question.id}"
    button.button-secondary.button-choose Choose Trim file
    .tr5-message
      i.fa
      span.message
    .inline.tr5-actions.toggle-content style="overflow:hidden;"
      = form_for TrimLink.new(:pq_id => question.id),
        remote: true,
        authenticity_token: true,
        html: { multipart: true, id: "new_trim_link_form_#{question.id}", class: 'pq-inline-form form-add-trim-link', data: {pqid: question.id }} do |f|
        = f.file_field :file_data, :class=>'pq-inline-form trim-file-chooser', :id=>"file_data-#{question.id}"
        = f.hidden_field(:pq_id , :value => question.id , :id=>"pq_id-trimlink-#{question.id}")
        = f.submit 'Upload', :class=>'button button-upload'
        button.button.button-cancel.button-secondary Cancel


doctype html
html
  head
    meta content='text/html; charset=UTF-8' http-equiv='Content-Type'
  body
    = render partial: 'base_mailer/shared/gov.uk.logo'

    table style="padding-left:60px;"
      tr
        td
          table style="width:550px; color:#fff; padding-bottom:30px;"

            = render partial: 'base_mailer/shared/moj.logo'

            = render partial: 'base_mailer/shared/application_number_light'

          table style="max-width:525px;"
            tr
              td
                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = t('.intro')

                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = link_to t('.complete_application'), returning_user_session_url, target: '_blank'
                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = t('.about_confirmation')

            = render partial: 'base_mailer/shared/footer'

Make claim number legible again

doctype html
html
  head
    meta content='text/html; charset=UTF-8' http-equiv='Content-Type'
  body
    = render partial: 'base_mailer/shared/gov.uk.logo'

    table style="padding-left:60px;"
      tr
        td
          table style="width:550px; padding-bottom:30px;"

            = render partial: 'base_mailer/shared/moj.logo'

            = render partial: 'base_mailer/shared/application_number_light'

          table style="max-width:525px;"
            tr
              td
                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = t('.intro')

                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = link_to t('.complete_application'), returning_user_session_url, target: '_blank'
                p style="font-family:arial; font-size:19px; line-height:26px;"
                  = t('.about_confirmation')

            = render partial: 'base_mailer/shared/footer'


#flash-messages.container
  .message.row(ng-repeat="message in flash.messages")
    .col-lg-8.col-lg-offset-2.col-sm-10.col-sm-offset-1.col-xs-10.col-xs-offset-1.alert(class="alert-{{message.type}}" role="alert")
      .icon.pull-left
        span.glyphicon.glyphicon-ok-circle(ng-show="message.type == 'success'")
        span.glyphicon.glyphicon-remove-circle(ng-show="message.type == 'error'")
        span.glyphicon.glyphicon-info-sign(ng-show="message.type == 'info'")

      .close-button.pull-right
        button.close(data-dismiss="alert") ×

      .text
        p(ng-bind="message.text")

Update close button in flash template

#flash-messages.container
  .message.row(ng-repeat="message in flash.messages")
    .col-lg-8.col-lg-offset-2.col-sm-10.col-sm-offset-1.col-xs-10.col-xs-offset-1.alert(class="alert-{{message.type}}" role="alert")
      button.close(data-dismiss="alert") ×

      .text
        p(ng-bind="message.text")


nav.navbar.navbar-default.navbar-fixed-top.community-nav class=(locals['nav'])
  .container
    .navbar-header
      button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-nav-collapse"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"
        img src="/images/cucumber-mark-white.svg" alt="Cucumber" title="cucumber.io"
    .collapse.navbar-collapse#main-nav-collapse
      ul.nav.navbar-nav
        li
          a class=(nav_class(locals['nav'], 'docs')) href="/docs" Docs
        li
          a class=(nav_class(locals['nav'], 'blog')) href="/blog" Blog
        li
          a class=(nav_class(locals['nav'], 'events')) href="/events" Events
        li
          a class=(nav_class(locals['nav'], 'school')) href="/school" School
        li
          a class=(nav_class(locals['nav'], 'training')) href="/training" Training
        li
          a class=(nav_class(locals['nav'], 'pro')) href="/pro" Cucumber Pro
        li
          a class=(nav_class(locals['nav'], 'support')) href="/support" Support

Call it Videos, not School in nav

nav.navbar.navbar-default.navbar-fixed-top.community-nav class=(locals['nav'])
  .container
    .navbar-header
      button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-nav-collapse"
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand href="/"
        img src="/images/cucumber-mark-white.svg" alt="Cucumber" title="cucumber.io"
    .collapse.navbar-collapse#main-nav-collapse
      ul.nav.navbar-nav
        li
          a class=(nav_class(locals['nav'], 'docs')) href="/docs" Docs
        li
          a class=(nav_class(locals['nav'], 'blog')) href="/blog" Blog
        li
          a class=(nav_class(locals['nav'], 'events')) href="/events" Events
        li
          a class=(nav_class(locals['nav'], 'school')) href="/school" Videos
        li
          a class=(nav_class(locals['nav'], 'training')) href="/training" Training
        li
          a class=(nav_class(locals['nav'], 'pro')) href="/pro" Cucumber Pro
        li
          a class=(nav_class(locals['nav'], 'support')) href="/support" Support


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

    .container
      = flash_messages
      = yield

Add link to "Mixes" on menu bar

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

    .container
      = flash_messages
      = yield


.report
  h1 Report
  .weeks
    - @weeks.each do |week|
      - week.worked_days.each do |worked_day|
        .week-day = "#{worked_day.week_day}: #{worked_day.hours} "
      hr

Add week range to the report page

.report
  h1 Report
  .weeks
    - @weeks.each do |week|
      .date-range = "#{week.range.first} - #{week.range.last}"
      - week.worked_days.each do |worked_day|
        .week-day = "#{worked_day.week_day}: #{worked_day.hours} "
      hr


header
  div.p-grid-container
    h1 Bourbon Is a Lightweight Sass Tool Set

    = config[:latest_version]

    nav role="navigation"
      = link_to "Documentation",
        "/docs/latest/",
        class: "c-button"
    ul
      li
        | File bugs and questions on
          #{link_to "GitHub", "https://github.com/thoughtbot/bourbon"}.
      li
        | Find feature and API changes in the
          #{link_to "change log", "/changelog/"}.
      li
        | Follow us on
          #{link_to "Twitter", "https://twitter.com/bourbonsass"}
          for announcements.

Add project attributes to home page

header
  div.p-grid-container
    h1 Bourbon Is a Lightweight Sass Tool Set

    = config[:latest_version]

    nav role="navigation"
      = link_to "Documentation",
        "/docs/latest/",
        class: "c-button"

    ul
      li Dependency-free: It’s pure Sass.
      li Human-readable: We aim for clarity over brevity.
      li Lightweight: Zero output post-install and has visual opinion.

    ul
      li File bugs and questions on
         #{link_to "GitHub", "https://github.com/thoughtbot/bourbon"}.
      li Find feature and API changes in the
         #{link_to "change log", "/changelog/"}.
      li Follow us on
         #{link_to "Twitter", "https://twitter.com/bourbonsass"}
         for announcements.


.outer
  .wrapper
    h2 Read a letter
    h1 Write a letter

    br

    .explanation
      p
        | Nobody writes letters anymore. Let's try and fix that.
      p
        | Click the link below and you'll see two things:

    #demo
      #left
        | On the left will be a letter written by the last person who used the site.
      #right
        | On the right will be a blank space for you to write your letter

    .explanation
      p
        | Once you click submit, your letter will be saved and shown to the next person, and the cycle will begin again.

    = link_to 'Give it a try', root_path

Add author's note to about page

.outer
  .wrapper
    h2 Read a letter
    h1 Write a letter

    br

    .explanation
      p
        | Nobody writes letters anymore. Let's try and fix that.
      p
        | Click the link below and you'll see two things:

    #demo
      #left
        | On the left will be a letter written by the last person who used the site.
      #right
        | On the right will be a blank space for you to write your letter

    .explanation
      p
        | Once you click submit, your letter will be saved and shown to the next person, and the cycle will begin again.

    = link_to 'Give it a try', root_path

    small
      | Built with pride by #{link_to "Charles Dawson", 'http://cdawson.net'}


.form-actions
  .row
    .column.medium-8.medium-offset-1
      .row
        .column.medium-8.medium-offset-4
          h2
            = t('shared.general_info')

  = simple_form_for @act do |f|
    = render partial: f

    .row.footer-helper

    .row.fixed-row
      .button-collection.-formcollection
        = link_to t('shared.delete'), act_path(@act), data: { confirm: t('shared.confirm_message') }, method: :delete, class: 'button -secondary'
        - if current_user
          = render 'shared/deactivatable_links', location: @act
        = link_to t('shared.edit_relations'), membership_act_path(@act), class: 'button -secondary'
        = f.button :submit, t('shared.update'), class: '-primary'

Remove mebership page link from acts

.form-actions
  .row
    .column.medium-8.medium-offset-1
      .row
        .column.medium-8.medium-offset-4
          h2
            = t('shared.general_info')

  = simple_form_for @act do |f|
    = render partial: f

    .row.footer-helper

    .row.fixed-row
      .button-collection.-formcollection
        = link_to t('shared.delete'), act_path(@act), data: { confirm: t('shared.confirm_message') }, method: :delete, class: 'button -secondary'
        - if current_user
          = render 'shared/deactivatable_links', location: @act
        = f.button :submit, t('shared.update'), class: '-primary'


article
  header
    h2 Summary

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

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

    dt Transplant status
    dd= mdm.transplant_status

Change new HD MDM section title to Additional Information

article
  header
    h2 Additional Information

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

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

    dt Transplant status
    dd= mdm.transplant_status


ruby:
  claimed_pods = params[:successfully_claimed] != nil
  pod_message = claimed_pods ? 'pod'.pluralize(params[:successfully_claimed].size) : nil

- if claimed_pods
  p You have successfully claimed the following #{ pod_message } and are now registered as #{params[:successfully_claimed].size == 1 ? 'its' : 'their'} ‘owner’: #{params[:successfully_claimed].to_sentence}.

  p If you have any co-maintainers, you can now add them as ‘owners’ as well. For information on how to do this see the getting started with Trunk guide.

  p Once we have finished the transition period, you will be able to push new versions of #{params[:successfully_claimed].size == 1 ? 'these pods' : 'this pod'} directly from the command-line. For more details see [TODO].
- else
  p All of your choosen Pods are already claimed.

- unless params[:already_claimed] == ['']
  p The following #{params[:already_claimed].size == 1 ? 'pod has' : 'pods have'} already been claimed: #{params[:already_claimed].to_sentence}. If you disagree with this please  params[:claimer_email], :pods => params[:already_claimed] }.to_query}")}">file a dispute.

Replace another TODO -> guide link.

ruby:
  claimed_pods = params[:successfully_claimed] != nil
  pod_message = claimed_pods ? 'pod'.pluralize(params[:successfully_claimed].size) : nil

- if claimed_pods
  p You have successfully claimed the following #{ pod_message } and are now registered as #{params[:successfully_claimed].size == 1 ? 'its' : 'their'} ‘owner’: #{params[:successfully_claimed].to_sentence}.

  p If you have any co-maintainers, you can now add them as ‘owners’ as well. For information on how to do this see the getting started with Trunk guide.

  p Once we have finished the transition period, you will be able to push new versions of #{params[:successfully_claimed].size == 1 ? 'these pods' : 'this pod'} directly from the command-line. For more details see the getting started with Trunk guide.
- else
  p All of your choosen Pods are already claimed.

- unless params[:already_claimed] == ['']
  p The following #{params[:already_claimed].size == 1 ? 'pod has' : 'pods have'} already been claimed: #{params[:already_claimed].to_sentence}. If you disagree with this please  params[:claimer_email], :pods => params[:already_claimed] }.to_query}")}">file a dispute.


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

Add go to Kiwi Orchard 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
      ul.nav.navbar-nav.navbar-right
        li
          a href='https://kiwi-orchard.herokuapp.com/' Kiwi Orchard


.address
  dl.dl-horizontal
    dt Name
    dd(ng-bind='address.fullName()')

    dt Address
    dd
      | {{address.address1}}
      br(ng-if='address.address2')
      | {{address.address2}}

    dt City
    dd(ng-bind='address.city')

    dt State/Province
    dd(ng-bind='address.state.name')

    dt Country
    dd(ng-bind='address.country.name')

    dt Zip Code
    dd(ng-bind='address.zipcode')

    dt Phone
    dd(ng-bind='address.phone')

Use address.actualStateName() in address/address template

.address
  dl.dl-horizontal
    dt Name
    dd(ng-bind='address.fullName()')

    dt Address
    dd
      | {{address.address1}}
      br(ng-if='address.address2')
      | {{address.address2}}

    dt City
    dd(ng-bind='address.city')

    dt State/Province
    dd(ng-bind='address.actualStateName()')

    dt Country
    dd(ng-bind='address.country.name')

    dt Zip Code
    dd(ng-bind='address.zipcode')

    dt Phone
    dd(ng-bind='address.phone')


= render partial: "groups_header"
- if @groups.count > 0
  .table-responsive
    table.table.table-striped
      thead
        tr
          th Name
          th Gid
          th Group Admin
      tbody
        - @groups.each do |group|
          tr
            td
              = link_to "#{group.name}", group_path(group)
            td
              = "#{group.gid}"
            td
              = group.group_admin.present? ? "#{group.group_admin.user.name}" : "Not present"

Remove assumption that group_admin is a user

= render partial: "groups_header"
- if @groups.count > 0
  .table-responsive
    table.table.table-striped
      thead
        tr
          th Name
          th Gid
          th Group Admin
      tbody
        - @groups.each do |group|
          tr
            td
              = link_to "#{group.name}", group_path(group)
            td
              = "#{group.gid}"
            td
              = group.group_admin.present? ? "#{group.group_admin.user.try(:name)}" : "Not present"