table.table.table-striped
  thead
    tr(ng-if="buys.length")
      th=t('buys.buyer_details')
      th=t('buys.bought_products')
      th
    tr(ng-if="!buys.length")
      td.text-center(colspan="3")
        .row
          .col-xs-12
            p=t('buys.nothing_bought')
  tbody
    tr(ng-repeat="buy in buys|orderBy:'createdAt':true")
      td
        .col-xs-3
          .row
            img.img-thumbnail(gravatar="buy.buyer.email")
        .col-xs-9
          .row
            a(ng-href="/app/users/{{buy.buyer.id}}")
              | {{buy.buyer.username}}
          .row
            small.h6.text-muted
              | {{buy.createdAt|date:'d.M.yyyy HH:mm'}}
      td
        div(ng-repeat="entry in buy.consistsOfProducts")
          small
            | {{entry.amount}} {{entry.product.name}}
      td(ng-controller="BuyToBasketCtrl")
        button.btn.btn-success(ng-click="setToBasket(buy)")
          i.fa.fa-shopping-cart.fa-fw
        button.btn.btn-danger(ng-click="delete(buy)" ng-if="canBeDeleted(buy)")
          i.fa.fa-trash.fa-fw

Fix buy list to display proper cells

table.table.table-striped
  thead
    tr(ng-if="buys.length")
      th.col-xs-6(colspan=2)=t('buys.buyer_details')
      th(colspan=2)=t('buys.bought_products')
    tr(ng-if="!buys.length")
      td.text-center(colspan="3")
        .row
          .col-xs-12
            p=t('buys.nothing_bought')
  tbody
    tr(ng-repeat="buy in buys|orderBy:'createdAt':true")
      td
        img.img-thumbnail(gravatar="buy.buyer.email")
      td
        .row
          a(ng-href="/app/users/{{buy.buyer.id}}")
            | {{buy.buyer.username}}
        .row
          small.h6.text-muted
            | {{buy.createdAt|date:'d.M.yyyy HH:mm'}}
      td
        div(ng-repeat="entry in buy.consistsOfProducts")
          small
            | {{entry.amount}} {{entry.product.name}}
      td(ng-controller="BuyToBasketCtrl")
        button.btn.btn-success(ng-click="setToBasket(buy)")
          i.fa.fa-shopping-cart.fa-fw
        button.btn.btn-danger(ng-click="delete(buy)" ng-if="canBeDeleted(buy)")
          i.fa.fa-trash.fa-fw


- user = photograph.fetch_user
aside id="photographs-creator" class="panel"
  div class="row"
    div class="large-7 columns"
      h4= user.name
      - if user.location.present?
        h5= user.location

      - if user.website_url.present?
        h6= link_to user.website_host, user.website_url, target: "_blank"

    div class="large-5 columns"
      - if user.avatar.present?
        div class="avatar"
          = link_to user_path(user) do
            = image_tag user.avatar.thumb("150x150#").jpg.url

      = link_to t("photographs.creator.profile"), user_path(user), class: "button tiny secondary expand"

      = link_to t("photographs.creator.photos"), user_photographs_path(user), class: "button tiny success expand"

Improve creator profile link button

- user = photograph.fetch_user
aside id="photographs-creator" class="panel"
  div class="row"
    div class="large-7 columns"
      h4= user.name
      - if user.location.present?
        h5= user.location

      - if user.website_url.present?
        h6= link_to user.website_host, user.website_url, target: "_blank"

    div class="large-5 columns"
      - if user.avatar.present?
        div class="avatar"
          = link_to user_path(user) do
            = image_tag user.avatar.thumb("150x150#").jpg.url

      = link_to t("photographs.creator.profile"), user_path(user), class: "button tiny expand"

      = link_to t("photographs.creator.photos"), user_photographs_path(user), class: "button tiny success expand"


- if policy(letter).update?
  = link_to "Edit", edit_patient_letters_letter_path(letter.patient, letter),
      class: "button tiny"
  = pipe_separator
- if policy(letter).mark_as_typed?
  = button_to "Mark as Typed", patient_letters_letter_typed_path(letter.patient, letter),
      form_class: "inline", class: "button tiny", data: { confirm: "Are you sure?" }
= pipe_separator
= link_to 'back to list', patient_letters_letters_path(letter.patient)

Fix formatting of action buttons


script#t-impression-button type="x-template"
  .c-impression-button :class='{ "is-small": size === "small", "is-default": size !== "small" }'
    .btn.u-btn-outline-green.h-100.py-0 @click="openModal" :class='{ "btn-sm": size === "small" }'
      = icon "ellipsis-h", class: "mr-0 u-text-green d-block"

Fix icon color on hover

script#t-impression-button type="x-template"
  .c-impression-button :class='{ "is-small": size === "small", "is-default": size !== "small" }'
    .btn.u-btn-outline-green.h-100.py-0 @click="openModal" :class='{ "btn-sm": size === "small" }'
      = icon "ellipsis-h", class: "mr-0 d-block"


h1 Search results

- if @repositories.empty?
  p No match found.
- else
  .panel.panel-default
    .panel-heading
      h2.panel-title Repositories
    .panel-body
      .table-responsive
        table[class="table table-striped table-hover"]
          thead
            tr
              th Namespace
              th Repository
          tbody
            - @repositories.each do |repository|
              tr
                td= link_to repository.namespace.name, repository.namespace
                td= link_to repository.name, repository

Fix namespace name on the search page

h1 Search results

- if @repositories.empty?
  p No match found.
- else
  .panel.panel-default
    .panel-heading
      h2.panel-title Repositories
    .panel-body
      .table-responsive
        table[class="table table-striped table-hover"]
          thead
            tr
              th Namespace
              th Repository
          tbody
            - @repositories.each do |repository|
              tr
                td= link_to namespace_clean_name(repository.namespace), repository.namespace
                td= link_to repository.name, repository


doctype html

head
  meta name="viewport" content="width=device-width, initial-scale=1.0"
  == csrf_meta_tag(:name => 'csrf-token')
  link rel="stylesheet" type="text/css" href=asset_path("application.css")

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand
        a href=full_path('/') StatusApp

      - if current_user
        ul.nav
          li
            a href=full_path('/followers') Followers
          li
            a href=full_path('/followings') Following

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

  .container#main
    == yield if block_given?

  javascript:
    var StatusApp = {
      api_root: "#{{full_path('/api')}}",
      url_root: "#{{full_path('/')}}",
      authenticated: #{{!!(current_user || guest_user)}},
      guest_authenticated: #{{!!guest_user}},
      current_entity: "#{{current_user.entity}}"
    }

  script src=asset_path("boot.js")

Fix current_entity when no current_user

doctype html

head
  meta name="viewport" content="width=device-width, initial-scale=1.0"
  == csrf_meta_tag(:name => 'csrf-token')
  link rel="stylesheet" type="text/css" href=asset_path("application.css")

body
  .navbar.navbar-static-top
    .navbar-inner
      .brand
        a href=full_path('/') StatusApp

      - if current_user
        ul.nav
          li
            a href=full_path('/followers') Followers
          li
            a href=full_path('/followings') Following

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

  .container#main
    == yield if block_given?

  javascript:
    var StatusApp = {
      api_root: "#{{full_path('/api')}}",
      url_root: "#{{full_path('/')}}",
      authenticated: #{{!!(current_user || guest_user)}},
      guest_authenticated: #{{!!guest_user}},
      current_entity: "#{{current_user ? current_user.entity : nil}}"
    }

  script src=asset_path("boot.js")


= if @current_user do
  a href="#{auth_path(@conn, :delete)}"
    span.octicon.octicon-sign-out
    = gettext "Sign Out"
  a href="#"
    = @current_user.name
    = avatar(@current_user, size: 36)
- else
  a.btn href="#{auth_path(@conn, :index)}"
    = gettext "Sign in with"
    span.octicon.octicon-mark-github

Add easy navigation to self user page

= if @current_user do
  a href="#{auth_path(@conn, :delete)}"
    span.octicon.octicon-sign-out
    = gettext "Sign Out"
  a href="/#{@current_user.name}"
    = @current_user.name
    = avatar(@current_user, size: 36)
- else
  a.btn href="#{auth_path(@conn, :index)}"
    = gettext "Sign in with"
    span.octicon.octicon-mark-github


.header
  .home-menu.pure-menu.pure-menu-horizontal.pure-menu-fixed
    a.pure-menu-heading href="/" ossboard
    ul.pure-menu-list
      li.pure-menu-item class="#{ 'pure-menu-selected' if tasks_active? }"
        = link_to 'Tasks', routes.tasks_path, class: 'pure-menu-link'
      li.pure-menu-item
        = link_to 'How to help', routes.help_path, class: 'pure-menu-link'
      li.pure-menu-item
        = link_to 'About', routes.about_path, class: 'pure-menu-link'
      - if current_user.admin
        li.pure-menu-item
          = link_to_admin
      li.pure-menu-item
        a.pure-menu-link href="https://github.com/davydovanton/ossboard" target="_blank"  Source
      - if current_user.registred?
        li.pure-menu-item.pure-menu-has-children.pure-menu-allow-hover
          a#menuLink1.pure-menu-link href="#" = current_user.name
          ul.navbar-dropdown.pure-menu-children
            li.pure-menu-item
              a.pure-menu-link href="#" Settings
            li.pure-menu-item
              a.pure-menu-link href="/auth/logout" Logout

      - else
        li.pure-menu-item
          a.pure-menu-link href="/auth/github" Sign In

Add profile link to navbar

.header
  .home-menu.pure-menu.pure-menu-horizontal.pure-menu-fixed
    a.pure-menu-heading href="/" ossboard
    ul.pure-menu-list
      li.pure-menu-item class="#{ 'pure-menu-selected' if tasks_active? }"
        = link_to 'Tasks', routes.tasks_path, class: 'pure-menu-link'
      li.pure-menu-item
        = link_to 'How to help', routes.help_path, class: 'pure-menu-link'
      li.pure-menu-item
        = link_to 'About', routes.about_path, class: 'pure-menu-link'
      - if current_user.admin
        li.pure-menu-item
          = link_to_admin
      li.pure-menu-item
        a.pure-menu-link href="https://github.com/davydovanton/ossboard" target="_blank"  Source
      - if current_user.registred?
        li.pure-menu-item.pure-menu-has-children.pure-menu-allow-hover
          a#menuLink1.pure-menu-link href="#" = current_user.name
          ul.navbar-dropdown.pure-menu-children
            li.pure-menu-item
              = link_to 'Profile', routes.user_path(current_user.id), class: 'pure-menu-link'
            li.pure-menu-item
              a.pure-menu-link href="/auth/logout" Logout

      - else
        li.pure-menu-item
          a.pure-menu-link href="/auth/github" Sign In


li.nav-item.dropdown
  a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
    = t("locales.#{I18n.locale}")
    span.caret
  ul.dropdown-menu.p-0.mt-1 role='menu'
    - I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
      li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)), class: 'dropdown-item')

Disable turbolinks when switching the language.

li.nav-item.dropdown
  a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
    = t("locales.#{I18n.locale}")
    span.caret
  ul.dropdown-menu.p-0.mt-1 role='menu'
    - I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
      li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)), 'data-turbolinks' => "false", class: 'dropdown-item')


.collections
  -snippet = truncate(strip_tags(cds.intro_block), length: 300, separator: ' ') || ''
  -owner_link = link_to cds.owner.display_name, user_profile_path(cds.owner) unless cds.owner.nil?
  .collection
    -unless cds.picture.blank?
      .collection_image
        =image_tag(cds.picture_url(:thumb), alt: cds.title)
    .collection_details
      h4.collection_title =link_to cds.title, collection_path(cds.owner, cds) unless cds.owner.nil?
      -if cds.has_untranscribed_pages?
        p
          =link_to "Start Transcribing", collection_transcribe_page_path(cds.owner, cds, cds.next_untranscribed_page.work, cds.next_untranscribed_page), class: 'button'
      -unless snippet.empty?
        p.collection_snippet =snippet
      .collection_summary
        span =="Owned by #{owner_link}"

Use different path for guest "Start Transcribing" button

.collections
  -snippet = truncate(strip_tags(cds.intro_block), length: 300, separator: ' ') || ''
  -owner_link = link_to cds.owner.display_name, user_profile_path(cds.owner) unless cds.owner.nil?
  .collection
    -unless cds.picture.blank?
      .collection_image
        =image_tag(cds.picture_url(:thumb), alt: cds.title)
    .collection_details
      h4.collection_title =link_to cds.title, collection_path(cds.owner, cds) unless cds.owner.nil?
      -if cds.has_untranscribed_pages?
        p
          -if user_signed_in?
            =link_to "Start Transcribing", collection_transcribe_page_path(cds.owner, cds, cds.next_untranscribed_page.work, cds.next_untranscribed_page), class: 'button'
          -else
            =link_to "Start Transcribing", collection_guest_page_path(cds.owner, cds, cds.next_untranscribed_page.work, cds.next_untranscribed_page), class: 'button'
      -unless snippet.empty?
        p.collection_snippet =snippet
      .collection_summary
        span =="Owned by #{owner_link}"


- f.inputs t('activerecord.models.picture.other')
  - f.has_many :pictures, heading: false do |item|
    - item.input :image,
                 as: :file,
                 label: I18n.t('form.label.picture'),
                 hint: retina_image_tag(item.object, :image, :small)
    - item.input :online,
                 as: :boolean,
                 hint: I18n.t('form.hint.media.online')
    - item.input :_destroy,
                 as: :boolean,
                 hint: I18n.t('form.hint.media.destroy')

Use medium version to display image in form

- f.inputs t('activerecord.models.picture.other')
  - f.has_many :pictures, heading: false do |item|
    - item.input :image,
                 as: :file,
                 label: I18n.t('form.label.picture'),
                 hint: retina_image_tag(item.object, :image, :medium)
    - item.input :online,
                 as: :boolean,
                 hint: I18n.t('form.hint.media.online')
    - item.input :_destroy,
                 as: :boolean,
                 hint: I18n.t('form.hint.media.destroy')


= simple_form_for [current_course, @conditional, @assessment_condition] do |f|
  = f.error_notification
  = f.association :assessment, collection: current_course.assessments
  = f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
  = f.button :submit

Sort assessment condition assessment dropdown by date and title

= simple_form_for [current_course, @conditional, @assessment_condition] do |f|
  = f.error_notification
  = f.association :assessment, collection: current_course.assessments.ordered_by_date_and_title
  = f.input :minimum_grade_percentage, placeholder: t('.minimum_grade_placeholder')
  = f.button :submit


article data-cable-post-id=post.id
  header
    h1.display-4
      = post.title

    p.text-muted
      | Updated
      '
      = time_tag(post.updated_at)

  .row
    .col-sm-10
      == post.content

      - if post.clips.present?
        .row.no-gutters
          - post.clips.each do |clip|
            .col-2
              .mb-2.mr-2
                = image_tag clip.image_url(:thumbnail), class: 'img-thumbnail'

      - if post.copyright.present?
        hr
        .small.text-muted
          == post.copyright

    .col-sm-2
      = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do
        = icon('file-pdf-o fa-fw')

      = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do
        = icon('pencil')

      = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do
        = icon('trash')

Fix expiring image on S3

article data-cable-post-id=post.id
  header
    h1.display-4
      = post.title

    p.text-muted
      | Updated
      '
      = time_tag(post.updated_at)

  .row
    .col-sm-10
      == post.content

      - if post.clips.present?
        .row.no-gutters
          - post.clips.each do |clip|
            .col-2
              .mb-2.mr-2
                = image_tag clip.image_url(:thumbnail, expires_in: 1.day), class: 'img-thumbnail'

      - if post.copyright.present?
        hr
        .small.text-muted
          == post.copyright

    .col-sm-2
      = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do
        = icon('file-pdf-o fa-fw')

      = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do
        = icon('pencil')

      = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do
        = icon('trash')


-content_for :page_title, "Sign Up"

section.signon
  h1 Sign Up
  p Please fill in the following information to create a new FromThePage account.
  =form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
    =devise_error_messages!
    .signon_field
      =f.label :login
      =f.text_field :login, autofocus: true
    .signon_field
      =f.label :email, 'Email address'
      =f.email_field :email
    .signon_field
      =f.label :password
      =f.password_field :password, autocomplete: 'off'
    .signon_field
      =f.label :password_confirmation
      =f.password_field :password_confirmation, autocomplete: 'off'
    .signon_field
      =f.label :display_name
      =f.text_field :display_name
    -if RECAPTCHA_ENABLED
      .signon_field
        =recaptcha_tags
    .signon_field
      =f.check_box :activity_email, checked: true
      =f.label :receive_activity_emails
    =f.button 'Create Account', class: 'big'
  hr
  =render 'devise/shared/links'
-unless MIXPANEL_ID.blank?
  javascript:  mixpanel.track("Sign Up");

Fix for keeping owner signup flow with validation errors

-content_for :page_title, "Sign Up"

section.signon
  h1 Sign Up
  p Please fill in the following information to create a new FromThePage account.
  =form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
    =devise_error_messages!
    .signon_field
      =f.label :login
      =f.text_field :login, autofocus: true
    .signon_field
      =f.label :email, 'Email address'
      =f.email_field :email
    .signon_field
      =f.label :password
      =f.password_field :password, autocomplete: 'off'
    .signon_field
      =f.label :password_confirmation
      =f.password_field :password_confirmation, autocomplete: 'off'
    .signon_field
      =f.label :display_name
      =f.text_field :display_name
    .signon_field
      =f.hidden_field :owner
      =f.hidden_field :paid_date
    -if RECAPTCHA_ENABLED
      .signon_field
        =recaptcha_tags
    .signon_field
      =f.check_box :activity_email, checked: true
      =f.label :receive_activity_emails
    =f.button 'Create Account', class: 'big'
  hr
  =render 'devise/shared/links'
-unless MIXPANEL_ID.blank?
  javascript:  mixpanel.track("Sign Up");


= field_set_tag do
  legend #{title}

  = patient.simple_fields_for :document, patient.object.document do |patient_doc|

    = patient_doc.simple_fields_for document_attribute, patient.object.document.send(document_attribute) do |person_doc|
      = person_doc.input :name
      = person_doc.input :telephone

      b #{title} Address:
      = person_doc.simple_fields_for :address, patient.object.document.send(document_attribute).address do |address_doc|
        = render partial: 'renalware/addresses/form', locals: { a: address_doc }

Simplify label to reduce noise

= field_set_tag do
  legend #{title}

  = patient.simple_fields_for :document, patient.object.document do |patient_doc|

    = patient_doc.simple_fields_for document_attribute, patient.object.document.send(document_attribute) do |person_doc|
      = person_doc.input :name
      = person_doc.input :telephone

      b Address:
      = person_doc.simple_fields_for :address, patient.object.document.send(document_attribute).address do |address_doc|
        = render partial: 'renalware/addresses/form', locals: { a: address_doc }


doctype html
html
  head
    title Curva

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

  body
    div class="icon-bar six-up"
      a class="item"
        i class="fi-home"
        label Home

      a class="item"
        i class="fi-puzzle"
        label Curves

      a class="item"
        i class="fi-social-skillshare"
        label Skills

    = yield
    = javascript_include_tag 'application', 'data-turbolinks-track' => true

Update the top menu links.

doctype html
html
  head
    title Curva

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

  body
    div class="icon-bar six-up"
      = link_to root_path, class: "item" do
        i class="fi-home"
        label Home

      = link_to curves_path, class: "item" do
        i class="fi-puzzle"
        label Curves

      = link_to skills_path, class: "item" do
        i class="fi-social-skillshare"
        label Skills

    = yield
    = javascript_include_tag 'application', 'data-turbolinks-track' => true


doctype html
html(lang='fr')
  head
    meta(charset='utf-8')
    meta(content='on' http-equiv='cleartype')
    meta(content='IE=edge,chrome=1' http-equiv='X-UA-Compatible')
    meta(name='viewport' content='initial-scale=1, maximum-scale=1')

    title = site_title(current_page.data.title)

    - unless current_page.data.description.nil?
      meta(name='description' content="#{current_page.data.description }")

    = stylesheet_link_tag 'normalize', 'app'

    /[if lt IE 9]
      script(src='//html5shim.googlecode.com/svn/trunk/html5.js')

    = feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: 'Atom Feed'

  body
    header(role='header')
      .l-container
        h1 = site_name

    nav#menu.menu(role='navigation')
      .l-container
        = link_to "Accueil", '/', class: 'menu-item'

    #page
      main#page-content.l-container(role='main')
        header
          h1 = current_page.data.title

        section
          = yield

    = javascript_include_tag 'app'

Move header for article only and before the article content + add the published date in it.

doctype html
html(lang='fr')
  head
    meta(charset='utf-8')
    meta(content='on' http-equiv='cleartype')
    meta(content='IE=edge,chrome=1' http-equiv='X-UA-Compatible')
    meta(name='viewport' content='initial-scale=1, maximum-scale=1')

    title = site_title(current_page.data.title)

    - unless current_page.data.description.nil?
      meta(name='description' content="#{current_page.data.description }")

    = stylesheet_link_tag 'normalize', 'app'

    /[if lt IE 9]
      script(src='//html5shim.googlecode.com/svn/trunk/html5.js')

    = feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: 'Atom Feed'

  body
    header(role='header')
      .l-container
        h1 = site_name

    nav#menu.menu(role='navigation')
      .l-container
        = link_to "Accueil", '/', class: 'menu-item'

    #page
      main#page-content.l-container(role='main')
        - unless current_article.nil?
          header
            time.article-published-date(pubdate datetime=current_article.date)
              = 'Ecris le ' + current_article.date.strftime('%d/%m/%Y')
            = ', par ' + current_article.data.author

            h1 = current_page.data.title unless current_page.data.title.blank?

        section
          = yield

    = javascript_include_tag 'app'


.section
  section
    header
      h1 Impressum
    .content
      p.description Verantwortlich für den Inhalt und Funktion dieser Seiten zeichnen sich:

      .row.p
        .span4
          address#jgraichen
            .name Jan Graichen
            .address Stahnsdorfer Str. 144a
            .city DE-14482 Potsdam
        .span4
          address#kfabian
            .name Kai Fabian
            .address Frankenhauser Str. 37
            .city DE-12249 Berlin
        .span4
          address#mspringer
            .name Matthias Springer
            .address Stahnsdorfer Str. 144c
            .city DE-14482 Potsdam
      p
        ' sowie
        em Christian Nicolai

= content_for :aside do
  .section
    section
      header
      .content
        = raw "Du hast Kritik oder Anregung für uns? Dann schreib uns einfach ein Nachricht an #{link_to 'info@openmensa.org', 'mailto:info@openmensa.org'}."

Read contact info box on imprint.

.row
  .span8
    .section
      section
        header
          h1 Impressum
        .content
          p.description Verantwortlich für den Inhalt und Funktion dieser Seiten zeichnen sich:

          .row.p
            .span4
              address#jgraichen
                .name Jan Graichen
                .address Stahnsdorfer Str. 144a
                .city DE-14482 Potsdam
            .span4
              address#kfabian
                .name Kai Fabian
                .address Frankenhauser Str. 37
                .city DE-12249 Berlin
            .span4
              address#mspringer
                .name Matthias Springer
                .address Stahnsdorfer Str. 144c
                .city DE-14482 Potsdam
          p
            ' sowie
            em Christian Nicolai
  .span4
    .section
      section
        header
          h2 Kommentare?
        .content
          p= raw "Du hast Kritik oder Anregung für uns? Dann schreib uns einfach ein Nachricht an #{link_to 'info@openmensa.org', 'mailto:info@openmensa.org'}."


- title 'Strecke editieren'
.row
  .col-md-3 style='margin-bottom: 10px'
    h1 = yield :title
    .hidden#track-id
      = @track.id
    = render 'form'
  .col-md-9#map-col
    .map#map-edit-track

Fix sidebar height in edit view

- title 'Strecke editieren'
.row
  #side-bar.col-md-3
    h1 = yield :title
    .hidden#track-id
      = @track.id
    = render 'form'
  .col-md-9#map-col
    .map#map-edit-track


strong = feedback_field_value[:label]
.form-group class=feedback_field
  label.form-label Key strength
  .form-value.no-js-update
    p = feedback.public_send("#{feedback_field}_strength").presence || content_tag(:i, "No feedback has been added yet")
  .input.form-group
    = f.input "#{feedback_field}_strength", as: :text, input_html: { class: 'form-control', rows: 4 }, label: false
  .clear

  label.form-label Information to strengthen the application
  .form-value.no-js-update
    p = feedback.public_send("#{feedback_field}_weakness").presence || content_tag(:i, "No feedback has been added yet")
  .input.form-group
    = f.input "#{feedback_field}_weakness", as: :text, input_html: { class: 'form-control', rows: 4 }, label: false
  .clear

  - if policy(feedback).update?
    = link_to "#", class: "form-edit-link pull-right" do
      span.glyphicon.glyphicon-pencil
        ' Edit
    = f.submit "Save", class: "btn btn-primary form-save-button pull-right"
.clear

Fix admin feedback edit link font size


- provide :title, @user.fullname
- provide :image, gravatar_url(@user, size: 200)

#profile-page.container
  table.table
    tr
      td
        h1
          => gravatar_for @user, size: 100
          = @user.fullname
        - if current_user && current_user.is_moderator?
          = status_warning
          a href=(admin_edit_user_path(@user))

  .row
    .col-md-6
      h3
        | Scites (#{@user.scites_count})
      - if @user.scites_count == 0
        p No papers scited.
      - else
        ul.nav.nav-tabs
          li class=('active' if @scite_order == :scited)
            = link_to "Sort by Scite Date", url_for(params.merge(scite_order: :scited))
          li class=('active' if @scite_order == :published)
            = link_to "Sort by Publication Date", url_for(params.merge(scite_order: :published))
        = render partial: "papers/paper", collection: @scited_papers, locals: { showabs: false }
        = will_paginate @scited_papers, param_name: 'scite_page'
    .col-md-6
      h3
        | Comments (#{@user.comments_count})
      - if @user.comments_count == 0
        p No comments posted.
      - else
        = render @comments
        = will_paginate @comments, param_name: 'comment_page'

Fix admin edit user link

- provide :title, @user.fullname
- provide :image, gravatar_url(@user, size: 200)

#profile-page.container
  table.table
    tr
      td
        h1
          => gravatar_for @user, size: 100
          = @user.fullname
        - if current_user && current_user.is_moderator?
          = status_warning
          a href=(admin_edit_user_path(@user))  edit user

  .row
    .col-md-6
      h3
        | Scites (#{@user.scites_count})
      - if @user.scites_count == 0
        p No papers scited.
      - else
        ul.nav.nav-tabs
          li class=('active' if @scite_order == :scited)
            = link_to "Sort by Scite Date", url_for(params.merge(scite_order: :scited))
          li class=('active' if @scite_order == :published)
            = link_to "Sort by Publication Date", url_for(params.merge(scite_order: :published))
        = render partial: "papers/paper", collection: @scited_papers, locals: { showabs: false }
        = will_paginate @scited_papers, param_name: 'scite_page'
    .col-md-6
      h3
        | Comments (#{@user.comments_count})
      - if @user.comments_count == 0
        p No comments posted.
      - else
        = render @comments
        = will_paginate @comments, param_name: 'comment_page'


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

Sort AKI Alerts on patient

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


- if Rails.env.production?
  javascript:
    !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";
      analytics.load("#{ENV['ECHO_TRELLO_SEGMENT_WRITE_KEY']}");
      analytics.page()
    }}();

  - if current_user.present?
    javascript:
      analytics.identify(#{current_user.id}, {
        name: '#{current_user.full_name}',
        nickname: '#{current_user.nickname}'
        uid: '#{current_user.uid}'
      });

Fix missing comma when setting up Segment

- if Rails.env.production?
  javascript:
    !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.1.0";
      analytics.load("#{ENV['ECHO_TRELLO_SEGMENT_WRITE_KEY']}");
      analytics.page()
    }}();

  - if current_user.present?
    javascript:
      analytics.identify(#{current_user.id}, {
        name: '#{current_user.full_name}',
        nickname: '#{current_user.nickname}',
        uid: '#{current_user.uid}'
      });


ul.text-light-normal
  li
    a href="http://article-level-metrics.plos.org/" Article Metrics
  li
    a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report

Change Article Metrics link to articlemetrics.github.io

ul.text-light-normal
  li
    a href="http://articlemetrics.github.io" Article Metrics
  li
    a href="https://github.com/articlemetrics/alm-report" articlemetrics/alm-report


doctype html
html
  head
    title #{current_page.data.title}
    meta name="viewport" content="width=device-width,initial-scale=1"
    | #{stylesheet_link_tag "normalize", "all", "gridism"}
    | #{javascript_include_tag "all"}

  body
    == yield

Add Google Analytics for the site.

doctype html
html
  head
    title #{current_page.data.title}
    meta name="viewport" content="width=device-width,initial-scale=1"
    | #{stylesheet_link_tag "normalize", "all", "gridism"}
    | #{javascript_include_tag "all"}

  body
    == yield

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

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


= simple_form_for @project do |f|
  .row
    = f.input :repo_name, autofocus: true
  .row
    = f.input :ci_type, collection: [:travis, :codeship, :circleci], prompt: "Please select a Provider"
  .row
    = f.input :travis_token
  .row
    = f.input :codeship_uuid
  .row
    = f.input :circleci_token

  .mar-lg-top.mar-lg-bottom
    = render "shared/actions/form_actions",
      f: f,
      cancel_new_path: projects_path,
      cancel_edit_path: projects_path,
      destroy_path: can?(:destroy, @project) && @project

Add a notice paragraph for tokens and uuid.

= simple_form_for @project do |f|
  .row
    = f.input :repo_name, autofocus: true
  .row
    = f.input :ci_type, collection: [:travis, :codeship, :circleci], prompt: "Please select a Provider"
  .row
    .col.s12
      p.grey-text Only private repository needs to fill in token or uuid.
  .row
    = f.input :travis_token
  .row
    = f.input :codeship_uuid
  .row
    = f.input :circleci_token

  .mar-lg-top.mar-lg-bottom
    = render "shared/actions/form_actions",
      f: f,
      cancel_new_path: projects_path,
      cancel_edit_path: projects_path,
      destroy_path: can?(:destroy, @project) && @project


.navbar
  .navbar-inner
    .container
      .row
        .span7
          = link_to image_tag('logo_03.png'), root_path
        .span5
          ul.nav
            li= link_to 'Home', 'http://www.crowdint.com'
            li= link_to 'Projects', 'http://www.crowdint.com/projects'
            li= link_to 'Services', 'http://www.crowdint.com/services'
            li.active= link_to 'Blog', root_path
            li= link_to 'About', 'http://www.crowdint.com/about'

Fix the app nav bar so the About Us link points to the correct path in Crowdsite

.navbar
  .navbar-inner
    .container
      .row
        .span7
          = link_to image_tag('logo_03.png'), root_path
        .span5
          ul.nav
            li= link_to 'Home', 'http://www.crowdint.com'
            li= link_to 'Projects', 'http://www.crowdint.com/projects'
            li= link_to 'Services', 'http://www.crowdint.com/services'
            li.active= link_to 'Blog', root_path
            li= link_to 'About', 'http://www.crowdint.com/about_us'


= simple_form_for (audit_certificate || form_answer.build_audit_certificate),
                  as: :audit_certificate,
                  url: users_form_answer_audit_certificate_path(form_answer),
                  html: {class: "qae-form", method: :post} do |f|
  ul.list-add
    li
      = f.input :attachment,
                as: :file,
                required: true

  = f.submit "Upload", class: "button button-add non-js-audit-certificate-submit"
.clear

COPY audit certificate label for non-JS

= simple_form_for (audit_certificate || form_answer.build_audit_certificate),
                  as: :audit_certificate,
                  url: users_form_answer_audit_certificate_path(form_answer),
                  html: {class: "qae-form", method: :post} do |f|
  ul.list-add
    li
      = f.input :attachment,
                as: :file,
                required: true,
                label: "Upload Audit Certificate"

  = f.submit "Upload", class: "button button-add non-js-audit-certificate-submit"
.clear


| {{#authenticated}}
form.form-horizontal data-view='ReplyPostForm' method='POST'
  input type='hidden' name='mentions_post_id' value='{{id}}'
  input type='hidden' name='mentions_post_entity' value='{{entity}}'
  .span7
    .alert.alert-error

    textarea.span7 name='text' placeholder="What's on your mind?" rows='3' value='^{{entity}} '
    .clearfix
      span.char-limit 140

    input.btn.btn-success.pull-right type='submit' value='Post'
| {{/authenticated}}

Fix pre-populate textarea with mention

| {{#authenticated}}
form.form-horizontal data-view='ReplyPostForm' method='POST'
  input type='hidden' name='mentions_post_id' value='{{id}}'
  input type='hidden' name='mentions_post_entity' value='{{entity}}'
  .span7
    .alert.alert-error

    textarea.span7 name='text' placeholder="What's on your mind?" rows='3' ^{{entity}}
    .clearfix
      span.char-limit 140

    input.btn.btn-success.pull-right type='submit' value='Post'
| {{/authenticated}}


- cache [game, current_category] do
  - category = game.categories.first
  ul#popular-categories.nav.nav-tabs role='tablist'
    - (game.popular_categories | [current_category]).each do |category|
      li class="#{category == current_category ? 'active' : ''}"
        - if link_type == :sum_of_best
          = link_to category, game_category_sum_of_bests_path(game, category)
        - else
          = link_to category, game_category_path(game, category)
    - if (game.unpopular_categories - [current_category]).present?
      li = link_to 'more »', '#', id: 'show-unpopular-categories'
  ul#unpopular-categories.nav.nav-tabs role='tablist'
    - (game.unpopular_categories - [current_category]).each do |category|
      li class="#{category == current_category ? 'active' : ''}"
        = link_to category, game_category_sum_of_bests_path(game, category), class: 'unpopular-category'

Fix a category tab caching issue

- cache [game, current_category, link_type] do
  - category = game.categories.first
  ul#popular-categories.nav.nav-tabs role='tablist'
    - (game.popular_categories | [current_category]).each do |category|
      li class="#{category == current_category ? 'active' : ''}"
        - if link_type == :sum_of_best
          = link_to category, game_category_sum_of_bests_path(game, category)
        - else
          = link_to category, game_category_path(game, category)
    - if (game.unpopular_categories - [current_category]).present?
      li = link_to 'more »', '#', id: 'show-unpopular-categories'
  ul#unpopular-categories.nav.nav-tabs role='tablist'
    - (game.unpopular_categories - [current_category]).each do |category|
      li class="#{category == current_category ? 'active' : ''}"
        = link_to category, game_category_sum_of_bests_path(game, category), class: 'unpopular-category'


= block_with_caption :bottom, {:class=>'imageblock', :style=>style_value(text_align: (attr :align), float: (attr :float))}
  = html_tag_if (attr? :link), :a, {:class=>'image', :href=>(attr :link)}
    img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)

Add support for the window option for a link to block image

= block_with_caption :bottom, {:class=>'imageblock', :style=>style_value(text_align: (attr :align), float: (attr :float))}
  = html_tag_if (attr? :link), :a, {:class=>'image', :href=>(attr :link), :target=>(attr :window), :rel=>link_rel}
    img src=image_uri(attr :target) alt=(attr :alt) width=(attr :width) height=(attr :height)


doctype html
html
  head
    title magi
    = csrf_meta_tags
    = stylesheet_link_tag "application", media: "all"
    = javascript_include_tag "application"

  body class = action_classes
    = yield

Add view hook point in head tag

doctype html
html
  head
    title magi
    = csrf_meta_tags
    = stylesheet_link_tag "application", media: "all"
    = javascript_include_tag "application"
    = content_for :head

  body class = action_classes
    = yield


p#notice = notice

p
  strong Index:
  = @music.index
p
  strong Show:
  = @music.show

= link_to 'Edit', edit_music_path(@music)
'|
= link_to 'Back', musics_path

Fix show templates * Remove unnecessary attributes and links

p#notice = notice

p
  strong Name:
  = @music.name
p
  strong Score:
  = @music.score

= link_to 'Back', musics_path


.js-overlay-comment-list.scrolling data-replace-self-on-ajax-success=true
  ul.spaced-list
    - comments.each do |comment|
      li
        p= comment.user.name
        p= comment.body

  - if current_user.signed_in?
    = form_for comment, url: photo_comments_path(photo_id), remote: true do |f|
      = f.text_area :body, class: 'textarea'
      = f.submit class: 'square-button'

Change comment form submit text

.js-overlay-comment-list.scrolling data-replace-self-on-ajax-success=true
  ul.spaced-list
    - comments.each do |comment|
      li
        p= comment.user.name
        p= comment.body

  - if current_user.signed_in?
    = form_for comment, url: photo_comments_path(photo_id), remote: true do |f|
      = f.text_area :body, class: 'textarea'
      = f.submit class: 'square-button', value: 'Comment'


= rb.hidden_field :regime_id

.row
  .large-5.columns.inline
    = rb.input :bag_type_id,
               collection: bag_types,
               include_blank: t("collection.blank_option")

  .large-3.columns.inline
    = rb.input :volume,
                collection: Renalware::PD::BagVolume.values,
                include_blank: t("collection.blank_option"),
                wrapper_class: "small-12 medium-12"

  .large-2.columns
    .right
      = rb.submit "Remove", name: "actions[remove][#{rb.index}]", class: "right remove-bag"
      = rb.link_to_remove "Remove", class: "remove-bag hide"

.row.bag-days
  .large-12.columns class="#{highlight_days_invalid(rb.object)}"
    div.title
      label Days to be administered:
      a.deselect-bag-days(href="#") Deselect all
    div
      - %i(sunday monday tuesday wednesday thursday friday saturday).each do |day|
        = rb.input day,
                   as: :boolean,
                   boolean_style: :inline,
                   wrapper: false,
                   label_html: {class: "nested"}

Switch bag_types to use a simple_form association

= rb.hidden_field :regime_id

.row
  .large-5.columns.inline
    = rb.association :bag_type,
                      collection: bag_types,
                      include_blank: t("collection.blank_option")

  .large-3.columns.inline
    = rb.input :volume,
                collection: Renalware::PD::BagVolume.values,
                include_blank: t("collection.blank_option"),
                wrapper_class: "small-12 medium-12"

  .large-2.columns
    .right
      = rb.submit "Remove", name: "actions[remove][#{rb.index}]", class: "right remove-bag"
      = rb.link_to_remove "Remove", class: "remove-bag hide"

.row.bag-days
  .large-12.columns class="#{highlight_days_invalid(rb.object)}"
    div.title
      label Days to be administered:
      a.deselect-bag-days(href="#") Deselect all
    div
      - rb.object.days_to_sym.each do |day|
        = rb.input day,
                   as: :boolean,
                   boolean_style: :inline,
                   wrapper: false,
                   label_html: {class: "nested"}


= wrap_layout :layout do
	== yield

	ul
		- data.owner.social.each do |service, href|
			li: a(href="#{href}") #{service.capitalize}

Change social links on home page.

= wrap_layout :layout do
	== yield

	ul
		- data.owner.social.each do |service, href|
			li
				a(href="#{href}" class="#{service}" target="_blank")
					span
					= service.capitalize


#toolbar
  a href=wiki_link_edit()
    i class="fa fa-pencil-square" aria-hidden="true"
  a href=wiki_link_create()
    i class="fa fa-plus-square" aria-hidden="true"
  / include _searchbox.html
  <input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search">
    i class="fa fa-navicon" aria-hidden="true"

Test for drop down list icon.

#toolbar
  a href=wiki_link_edit()
    i class="fa fa-pencil-square" aria-hidden="true"
  a href=wiki_link_create()
    i class="fa fa-plus-square" aria-hidden="true"
  / include _searchbox.html
  <input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search">
    i class="fa fa-sort-down" aria-hidden="true"


/ OH GOD I'M SO SORRY. I SWEAR I'LL FIX IT./
a.planner_item.keynote
	.item-container
		.talk_room == keynote.keynote.data.room
		.talk_title == keynote.keynote.data.title
		.speaker == keynote.keynote.data.speaker
  	div.forward-arrow
    	<i class="fa fa-chevron-right"></i>

Reformat keynotes in the planner

/ OH GOD I'M SO SORRY. I SWEAR I'LL FIX IT./
= link_to keynote.keynote do
  .planner_item.keynote
	  .item-container
		  .talk_room == keynote.keynote.data.room
		  .talk_title == keynote.keynote.data.title
		  span.speaker == keynote.keynote.data.speaker
  	  div.forward-arrow
    	  <i class="fa fa-chevron-right"></i>


doctype html
html
  head
    title Melissa Page
    meta(name="author" content="Melissa Page")
    meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    meta(name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1.0, user-scalable=no, target-densityDpi=device-dpi")
    link(rel="stylesheet" href="css/foundation.css")
    link(href="/stylesheets/portfolio.css" rel="stylesheet")
    link(href="/stylesheets/#{@page}.css" rel="stylesheet")
    link(href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet")
    link(href="http://fonts.googleapis.com/css?family=Duru+Sans%7CMontserrat+Alternates%7CExo+2%7CAlef%7CSanchez" rel="stylesheet" type="text/css")
    link(rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico")
    script(src="js/modernizr.js")
    script(src="js/jquery.js")
    script(src="js/main.js")
  body
    == yield

Tweak for small phones p5! THE SAGA CONTINUES

doctype html
html
  head
    title Melissa Page
    meta(name="author" content="Melissa Page")
    meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    meta(content="True" name="HandheldFriendly")
    meta(name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1.0, user-scalable=no, target-densityDpi=device-dpi")
    link(rel="stylesheet" href="css/foundation.css")
    link(href="/stylesheets/portfolio.css" rel="stylesheet")
    link(href="/stylesheets/#{@page}.css" rel="stylesheet")
    link(href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet")
    link(href="http://fonts.googleapis.com/css?family=Duru+Sans%7CMontserrat+Alternates%7CExo+2%7CAlef%7CSanchez" rel="stylesheet" type="text/css")
    link(rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico")
    script(src="js/modernizr.js")
    script(src="js/jquery.js")
    script(src="js/main.js")
  body
    == yield


- stories.each do |story|
  .large-12.columns.story-list-item
    h4 = link_to story.title, story_path(story)
    br
    == story.fragments.first.content.truncate(100, separator: ' ')
    ul
      li = "Creator: #{link_to story.creator.profile.pen_name, user_path(story.creator)}"
      li = "Contributors: #{story.authors.count}"
      li = "Created on: #{story.created_at.to_date}"
      li = "Last updated: #{story.updated_at.to_date}"
  - if story != stories.last
    hr

Fix broken link to author in story list item

- stories.each do |story|
  .large-12.columns.story-list-item
    h4 = link_to story.title, story_path(story)
    br
    == story.fragments.first.content.truncate(100, separator: ' ')
    ul
      li == "Creator: #{link_to story.creator.profile.pen_name, user_path(story.creator)}"
      li = "Contributors: #{story.authors.count}"
      li = "Created on: #{story.created_at.to_date}"
      li = "Last updated: #{story.updated_at.to_date}"
  - if story != stories.last
    hr


doctype html
html
  head
    title Melissa Page
    meta(name="author" content="Melissa Page")
    meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    meta(name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, user-scalable=no, target-densityDpi=device-dpi")
    link(rel="stylesheet" href="css/foundation.css")
    link(href="/stylesheets/portfolio.css" rel="stylesheet")
    link(href="/stylesheets/#{@page}.css" rel="stylesheet")
    link(href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet")
    link(href="http://fonts.googleapis.com/css?family=Duru+Sans%7CMontserrat+Alternates%7CExo+2%7CAlef%7CSanchez" rel="stylesheet" type="text/css")
    link(rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico")
    script(src="js/modernizr.js")
    script(src="js/jquery.js")
    script(src="js/main.js")
  body
    == yield

Tweak for small phones p4

doctype html
html
  head
    title Melissa Page
    meta(name="author" content="Melissa Page")
    meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
    meta(name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1.0, user-scalable=no, target-densityDpi=device-dpi")
    link(rel="stylesheet" href="css/foundation.css")
    link(href="/stylesheets/portfolio.css" rel="stylesheet")
    link(href="/stylesheets/#{@page}.css" rel="stylesheet")
    link(href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet")
    link(href="http://fonts.googleapis.com/css?family=Duru+Sans%7CMontserrat+Alternates%7CExo+2%7CAlef%7CSanchez" rel="stylesheet" type="text/css")
    link(rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico")
    script(src="js/modernizr.js")
    script(src="js/jquery.js")
    script(src="js/main.js")
  body
    == yield


doctype html
html ng-app="app"
  head
    title Rails Assets
    == stylesheet_tag 'master'
    == stylesheet_tag 'app'
    == javascript_tag 'app'
    == javascript_tag '//use.typekit.net/jvv3pir.js'
    javascript:
      try{Typekit.load();}catch(e){}

  body
    == yield

Remove the link to stylesheet that doesn’t exist

doctype html
html ng-app="app"
  head
    title Rails Assets
    == stylesheet_tag 'app'
    == javascript_tag 'app'
    == javascript_tag '//use.typekit.net/jvv3pir.js'
    javascript:
      try{Typekit.load();}catch(e){}

  body
    == yield


noscript
  .alert.flash-error CodeTriage requires JavaScript, please enable it!

.top-bar-red
.top-bar-yellow
.top-bar-green
.top-bar-blue

nav.application-navigation
  ul.application-navigation-list
    - if user_signed_in?
      li.application-navigation-list-item= image_tag current_user.avatar_url, class: 'user-profile-image'
      li.application-navigation-list-item= link_to current_user.github, current_user
      li.application-navigation-list-item= link_to "Submit Repo", new_repo_path
      li.application-navigation-list-item= link_to "Sign Out", destroy_user_session_path, method: :delete
    - else
      li.application-navigation-list-item= link_to 'About', what_path
      li.application-navigation-list-item= link_to 'Log in', user_github_omniauth_authorize_path
      li.application-navigation-list-item= link_to 'Sign Up', user_github_omniauth_authorize_path

div.application-logo
  = link_to root_path
    span.application-logo-image

Add descriptive alt text to user profile image

noscript
  .alert.flash-error CodeTriage requires JavaScript, please enable it!

.top-bar-red
.top-bar-yellow
.top-bar-green
.top-bar-blue

nav.application-navigation
  ul.application-navigation-list
    - if user_signed_in?
      li.application-navigation-list-item= image_tag current_user.avatar_url, class: 'user-profile-image', alt: 'user avatar'
      li.application-navigation-list-item= link_to current_user.github, current_user
      li.application-navigation-list-item= link_to "Submit Repo", new_repo_path
      li.application-navigation-list-item= link_to "Sign Out", destroy_user_session_path, method: :delete
    - else
      li.application-navigation-list-item= link_to 'About', what_path
      li.application-navigation-list-item= link_to 'Log in', user_github_omniauth_authorize_path
      li.application-navigation-list-item= link_to 'Sign Up', user_github_omniauth_authorize_path

div.application-logo
  = link_to root_path
    span.application-logo-image


.well.text-center
  i.fa.fa-hand-peace-o.fa-4x
  h1 Welcome to Ruby Taiwan Reboot
.well.text-center#chat-with-us
  .heading
    h2 Chat With Us
  .row.text-center
    .col-sm-8.col-sm-offset-2
      .col-sm-6
        = link_to "https://rubytaiwan.slack.com", class: 'icon' do
          = icon :slack
        p Slack
      .col-sm-6
        strong Invite yourself to our Slack group!
        hr
        = form_for Invitation.new, html: {class: 'form-horizontal'} do |f|
          .form-group
            .col-sm-8.col-sm-offset-2
              = f.text_field :email, class: 'form-control', placeholder: 'Enter Email'
          .form-group
            .col-sm-8.col-sm-offset-2
              = f.submit 'Send Invite', class: 'btn btn-success btn-block', data: { disable_with: 'processing...' }

Remove well and use double quotes in welcome page

.text-center
  i.fa.fa-hand-peace-o.fa-4x
  h1 Welcome to Ruby Taiwan Reboot
.text-center#chat-with-us
  .heading
    h2 Chat With Us
  .row.text-center
    .col-sm-8.col-sm-offset-2
      .col-sm-6
        = link_to "https://rubytaiwan.slack.com", class: "icon" do
          = icon :slack
        p Slack
      .col-sm-6
        strong Invite yourself to our Slack group!
        hr
        = form_for Invitation.new, html: {class: "form-horizontal"} do |f|
          .form-group
            .col-sm-8.col-sm-offset-2
              = f.text_field :email, class: "form-control", placeholder: "Enter Email"
          .form-group
            .col-sm-8.col-sm-offset-2
              = f.submit "Send Invite", class: "btn btn-success btn-block", data: { disable_with: "processing..." }


h2 Create your profile
= render 'form'

Add alert about blank profile to profile new view

- if @profile.new_record?
  div.alert.alert-danger
    p
      | Your profile is blank! You will be ineligible to receive invitations
      |  until it is complete.
h2 Create your profile
= render 'form'


.row
  .col-md-12
    .alert.alert-info role="alert"
      p
        strong Notice:
        | From Monday, June 13 until Tuesday, June 21, Echo For Trello was not generating any cards due to a server issue that I was unaware of. The problem has been corrected, so your cards should be automatically generated again as expected (as of Tuesday, June 21).
      p I apologize for any inconvenience this caused, and will be taking steps to make sure these types of issues are dealt with quickly.

.row
  .col-md-12
    h2.text-center Select the board where you want to create a recurring card

- @boards.in_groups_of(3, false) do |group|
  .row
    - group.each do |board|
      = link_to board_path(board["id"]), class: 'board-link' do
        .col-md-4.board-view.text-center
          p class=(board["prefs"]["background"])
            = board["name"]

Remove alert message explaining issues from previous weeks


nav.navbar.navbar-default.navbar-fixed-top role="navigation"
      .container
        .navbar-header
          button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse"
            span.icon-bar
            span.icon-bar
            span.icon-bar
          a.navbar-brand href="/" JobHunt
        .navbar-collapse.collapse.navbar-responsive-collapse
          ul.nav.navbar-nav
            li= navbar_tab_to "Recruiters", recruiters_path
            li= navbar_tab_to "Interviews", interviews_path
            li= navbar_tab_to "Lists", recruiter_lists_path
            li= link_to "MailChimp", "https://us10.admin.mailchimp.com/", {target: "_blank"}

Change project label in navbar.

nav.navbar.navbar-default.navbar-fixed-top role="navigation"
      .container
        .navbar-header
          button.navbar-toggle type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse"
            span.icon-bar
            span.icon-bar
            span.icon-bar
          a.navbar-brand href="/" Recruiters on Rails
        .navbar-collapse.collapse.navbar-responsive-collapse
          ul.nav.navbar-nav
            li= navbar_tab_to "Recruiters", recruiters_path
            li= navbar_tab_to "Interviews", interviews_path
            li= navbar_tab_to "Lists", recruiter_lists_path
            li= link_to "MailChimp", "https://us10.admin.mailchimp.com/", {target: "_blank"}


article
  header
    h2 Contact Details

  dl.dl-horizontal
    dt Email
    - if patient.email.present?
      dd= patient.email
    - if patient.current_address&.email.present?
      dd= patient.current_address&.email

    dt Telephone
    - if patient.telephone1.present?
      dd= patient.telephone1
    - if patient.telephone2.present?
      dd= patient.telephone2
    - if patient.current_address&.telephone.present?
      dd= patient.current_address&.telephone

Fix telephone/email layout in patient demographics

article
  header
    h2 Contact Details

  dl.dl-horizontal
    - if patient.email.present?
      dt Email
      dd= patient.email
    - if patient.current_address&.email.present?
      dt Email
      dd= patient.current_address&.email

    - if patient.telephone1.present?
      dt Telephone
      dd= patient.telephone1
    - if patient.telephone2.present?
      dt Telephone
      dd= patient.telephone2
    - if patient.current_address&.telephone.present?
      dt Telephone
      dd= patient.current_address&.telephone


nav class="top-bar patient-nav" data-topbar="" role="navigation"
  section.top-bar-section
    ul
      li= link_to "ClinSumm", clinical_summary_patient_path(@patient), title: "Clinical Summary"
      li= link_to "Admin", demographics_patient_path(@patient), title: "Demographics"
      li= link_to "Modals", patient_modalities_path(@patient), title: "Patient Modality"
      li= link_to "Problems (#{@patient.problems.length})", problems_patient_path(@patient), title: "Manage Problems"
      li= link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title: "Manage Medications"
      li= link_to "Events (#{@patient.events.length})", patient_events_path(@patient), title: "Patient Events"
      li= link_to "Clinic Visits (#{@patient.clinic_visits.length})", patient_clinic_visits_path(@patient), title: "Clinic Visits"
      li= link_to "Letters (#{@patient.letters.length})", patient_letters_path(@patient), title: "Letters"

Move 'Admin' option first for patient sub-nav

nav class="top-bar patient-nav" data-topbar="" role="navigation"
  section.top-bar-section
    ul
      li= link_to "Admin", demographics_patient_path(@patient), title: "Demographics"
      li= link_to "ClinSumm", clinical_summary_patient_path(@patient), title: "Clinical Summary"
      li= link_to "Modals", patient_modalities_path(@patient), title: "Patient Modality"
      li= link_to "Problems (#{@patient.problems.length})", problems_patient_path(@patient), title: "Manage Problems"
      li= link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title: "Manage Medications"
      li= link_to "Events (#{@patient.events.length})", patient_events_path(@patient), title: "Patient Events"
      li= link_to "Clinic Visits (#{@patient.clinic_visits.length})", patient_clinic_visits_path(@patient), title: "Clinic Visits"
      li= link_to "Letters (#{@patient.letters.length})", patient_letters_path(@patient), title: "Letters"


#page_content.channel_footer
  .container
    nav
      = link_to t('channels.footer.terms'), 'http://suporte.catarse.me/knowledgebase/articles/190852-termo-de-uso-canal-asas', title: t('channels.footer.terms'), target: '_blank'
      .separator
      = link_to t('channels.footer.privacy_policy'), 'http://suporte.catarse.me/knowledgebase/articles/161103-pol%C3%ADtica-de-privacidade', title: t('channels.footer.privacy_policy'), target: '_blank'
      .separator
      = link_to t('channels.footer.how_it_works', name: @profile.name), channels_about_path, title: t('channels.footer.how_it_works', name: @profile.name), target: '_blank'
      .separator
      = mail_to @profile.email, t('channels.footer.contact'), title: t('channels.footer.contact'), target: '_blank'
      .separator
      = link_to t('channels.footer.how_channels_work'), 'http://blog.catarse.me/conheca-os-canais-do-catarse/', title: t('channels.footer.how_channels_work'), target: '_blank'

Change footer links on channels

#page_content.channel_footer
  .container
    nav
      = link_to t('channels.footer.terms'), terms_url(host: ::Configuration[:base_domain]), title: t('channels.footer.terms'), target: :blank
      .separator
      = link_to t('channels.footer.privacy_policy'), privacy_url(host: ::Configuration[:base_domain]), title: t('channels.footer.privacy_policy'), target: '_blank'
      .separator
      = link_to t('channels.footer.how_it_works', name: @profile.name), how_it_works_url(host: ::Configuration[:base_domain]), title: t('channels.footer.how_it_works', name: @profile.name), target: '_blank'
      .separator
      = mail_to @profile.email, t('channels.footer.contact'), title: t('channels.footer.contact'), target: '_blank'
      /.separator
      /= link_to t('channels.footer.how_channels_work'), 'http://blog.catarse.me/conheca-os-canais-do-catarse/', title: t('channels.footer.how_channels_work'), target: '_blank'


= render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?

header.header-site
  - if @search_module.enabled? || I18n.available_locales.length > 1
    .upper-header
      .row
        .small-12.columns
          = render 'elements/header/language' if I18n.available_locales.length > 1
          = render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'

  .lower-header
    .row.small-collapse.large-uncollapse
      .small-12.medium-3.columns.columns-for-logo
        = render 'elements/header/logo', primary: true

      .small-12.medium-8.columns.columns.columns-for-menu
        = render 'elements/menu/no_dropdown'

.clearfix

== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?

Remove clearfix div between header and breadcrumb

= render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?

header.header-site
  - if @search_module.enabled? || I18n.available_locales.length > 1
    .upper-header
      .row
        .small-12.columns
          = render 'elements/header/language' if I18n.available_locales.length > 1
          = render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'

  .lower-header
    .row.small-collapse.large-uncollapse
      .small-12.medium-3.columns.columns-for-logo
        = render 'elements/header/logo', primary: true

      .small-12.medium-8.columns.columns.columns-for-menu
        = render 'elements/menu/no_dropdown'

== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?


h2 Sign in

= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .field
    = f.label :email
    = f.email_field :email, autofocus: true

  .field
    = f.label :password
    = f.password_field :password, autocomplete: "off"

  div
    = f.submit "Sign in"

Update new session template with user_name

h2 Sign in

= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .field
    = f.label :user_name
    = f.text_field :user_name, autofocus: true

  .field
    = f.label :password
    = f.password_field :password, autocomplete: "off"

  div
    = f.submit "Sign in"


.row
  .col-md-8
    = form_for [:admin, chapter, event] do |f|
      .form-group
        = f.label :title
        = f.text_field :title, class: "form-control"
      .form-group
        = f.label :description
        = f.text_area :description, class: "form-control"
      .form-group
        = f.label :starts_at
        = f.datetime_select :starts_at, class: "form-control"
      .form-group
        = f.label :ends_at
        = f.datetime_select :ends_at, class: "form-control"
      .form-group
        - if event.persisted?
          = f.submit "Save changes", class: "btn btn-primary"
        - else
          = f.submit "Create new event", class: "btn btn-primary"
        =< link_to "Cancel", admin_chapter_event_path(chapter, event), class: "btn btn-default"

Use Rails' built in helpers for date/time pickers.

.row
  .col-md-8
    = form_for [:admin, chapter, event] do |f|
      .form-group
        = f.label :title
        = f.text_field :title, class: "form-control"
      .form-group
        = f.label :description
        = f.text_area :description, class: "form-control"
      .form-group
        => f.label :starts_at, "Start date"
        = f.date_select :starts_at, order: [:day, :month, :year]
        br
        => f.label :starts_at, "Start time"
        = f.time_select :starts_at, ignore_date: true, minute_step: 15
      .form-group
        => f.label :ends_at, "End date"
        = f.date_select :ends_at, order: [:day, :month, :year]
        br
        => f.label :ends_at, "End time"
        = f.time_select :ends_at, ignore_date: true, minute_step: 15
      .form-group
        - if event.persisted?
          = f.submit "Save changes", class: "btn btn-primary"
        - else
          = f.submit "Create new event", class: "btn btn-primary"
        =< link_to "Cancel", admin_chapter_event_path(chapter, event), class: "btn btn-default"


.event-info
  - if @event.present?
    ul.small-block-grid-1.medium-block-grid-2.large-block-grid-2
      li
        i.fa.fa-map-marker  #{@event.location.name}
      li
        i.fa.fa-calendar  #{@event.date}
      /li
        /i.fa.fa-microphone 4 Ponentes
      /li
        /i.fa.fa-ticket 50 tickets
    h1= @event.theme
    p  #{@event.description}

Add speakers count to event description

.event-info
  - if @event.present?
    ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3
      li
        i.fa.fa-map-marker  #{@event.location.name}
      li
        i.fa.fa-calendar  #{@event.date}
      li
        i.fa.fa-microphone  #{@event.speakers.count} Ponentes
      /li
        /i.fa.fa-ticket 50 tickets
    h1= @event.theme
    p  #{@event.description}


<!DOCTYPE html>
html
  head
    title
      = Setting.title
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  body
    .navbar.navbar-default.navbar-static-top
      .navbar-collapse.navbar-responsive-collapse
        ul.nav.navbar-nav
          - if current_user
            li = link_to "Journal"      , journals_path
            li = link_to "Topics"       , topics_path
            li = link_to "Feeds"        , feeds_path
            li = link_to "Categories"   , categories_path
            li = link_to "Subscriptions", subscriptions_path
            li = link_to "Keywords"     , keywords_path
            li = link_to "Tags"         , tags_path
            li = link_to "Entries"      , entries_path
            li = link_to "Tracks"       , tracks_path
            - 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 albums and playlists index view to header

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

    .container
      = flash_messages
      = yield


h3 Waiting for evidence

- if @waiting_for_evidence.present?
  table.waiting-for-evidence
    tr
      th Reference
      th Form
      th Applicant
      th Processed by
      th Expires
    - @waiting_for_evidence.each do |application|
      tr
        td =application.reference
        td =application.form_name
        td =application.full_name
        td =application.user.name
        td =application.evidence_check.expires_at.to_s(:gov_uk_long)

- else
  p There are no applications waiting for evidence

Add links to the evidence flow from dashboard

h3 Waiting for evidence

- if @waiting_for_evidence.present?
  table.waiting-for-evidence
    tr
      th Reference
      th Form
      th Applicant
      th Processed by
      th Expires
    - @waiting_for_evidence.each do |application|
      tr
        td =link_to(application.reference, evidence_show_path(application.evidence_check))
        td =application.form_name
        td =application.full_name
        td =application.user.name
        td =application.evidence_check.expires_at.to_s(:gov_uk_long)

- else
  p There are no applications waiting for evidence


.comable-page
  .comable-main-fixed-top
    .comable-page-heading
      ul.pull-right.list-inline
        li
          = link_to comable.product_path(@product), class: 'btn btn-default' do
            span.fa.fa-external-link>
            = Comable.t('admin.view')
        li
          = link_to_save

      h1.page-header
        ol.breadcrumb
          li>
            = link_to Comable.t('admin.nav.product'), comable.admin_products_path
          li.active
            = @product.name

  .comable-page-body
    = render 'form'
    hr
    .panel.panel-danger
      .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
        strong
          span.fa.fa-angle-down>
          = Comable.t('admin.actions.destroy')
      #comable-danger.collapse
        .panel-body
          p
            = Comable.t('admin.confirmation_to_remove_product')
          = link_to Comable.t('admin.actions.destroy'), comable.admin_product_path(@product), method: :delete, class: 'btn btn-danger'

Fix the path to destroy a variant

.comable-page
  .comable-main-fixed-top
    .comable-page-heading
      ul.pull-right.list-inline
        li
          = link_to comable.product_path(@product), class: 'btn btn-default' do
            span.fa.fa-external-link>
            = Comable.t('admin.view')
        li
          = link_to_save

      h1.page-header
        ol.breadcrumb
          li>
            = link_to Comable.t('admin.nav.product'), comable.admin_products_path
          li.active
            = @product.name

  .comable-page-body
    = render 'form'
    hr
    .panel.panel-danger
      .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
        strong
          span.fa.fa-angle-down>
          = Comable.t('admin.actions.destroy')
      #comable-danger.collapse
        .panel-body
          p
            = Comable.t('admin.confirmation_to_remove_product')
          = link_to Comable.t('admin.actions.destroy'), comable.admin_product_variant_path(@product, @variant), method: :delete, class: 'btn btn-danger'


= render layout: "renalware/patients/layout", locals: { title: "PD Summary" } do
  = render partial: 'renalware/pd_regimes/current_regime' unless @current_regime.nil?

  h6= "CAPD Regimes (#{@capd_regimes.length})"
  = render partial: 'renalware/patients/capd_regimes'

  h6= "APD Regimes (#{@apd_regimes.length})"
  = render partial: 'renalware/patients/apd_regimes'

  h6= "Peritonitis Episodes (#{@peritonitis_episodes.length})"
  = render partial: "renalware/patients/peritonitis_episodes"

  h6= "Exit Site Infections (#{@exit_site_infections.length})"
  = render partial: "renalware/patients/exit_site_infections"

Introduce field sets for groups

= render layout: "renalware/patients/layout", locals: { title: "PD Summary" } do
  = render partial: 'renalware/pd_regimes/current_regime' unless @current_regime.nil?

  = field_set_tag "CAPD Regimes (#{@capd_regimes.length})" do
    = render partial: 'renalware/patients/capd_regimes'

  = field_set_tag "APD Regimes (#{@apd_regimes.length})" do
    = render partial: 'renalware/patients/apd_regimes'

  = field_set_tag "Peritonitis Episodes (#{@peritonitis_episodes.length})" do
    = render partial: "renalware/patients/peritonitis_episodes"

  = field_set_tag "Exit Site Infections (#{@exit_site_infections.length})"
    = render partial: "renalware/patients/exit_site_infections"


- input_name = "#{type}[#{name}]"
- if value.kind_of? Array
  - input_name << '[]'
  label.control-label for=input_name = name
  .controls
    select.input.input-xxlarge name=input_name multiple=true
      - value.each do |option|
        option value=option selected=true = option
- elsif value.kind_of?(Hash)
  - value.each_pair do |name, value|
    .control-group.span8
      legend = name
      == slim :_profile_type_fields, :locals => { :type => type, :name => name, :value => value }
- elsif value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
  label.checkbox
    input type='checkbox' name=input_name value='true' checked=value = name
- else
  label.control-label for=input_name = name
  .controls
    input.input.input-xxlarge type='text' name=input_name value=value

Remove fields from update profile (public entities groups)

- input_name = "#{type}[#{name}]"
- if value.kind_of? Array
  - input_name << '[]'
  label.control-label for=input_name = name
  .controls
    select.input.input-xxlarge name=input_name multiple=true
      - value.each do |option|
        option value=option selected=true = option
- elsif value.kind_of?(Hash)
  - value.each_pair do |name, value|
    - next if %w( groups entities public ).include?(name.to_s)
    .control-group.span8
      legend = name
      == slim :_profile_type_fields, :locals => { :type => type, :name => name, :value => value }
- elsif value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
- else
  label.control-label for=input_name = name
  .controls
    input.input.input-xxlarge type='text' name=input_name value=value


article.foundation_widget
  section.fw-header
    h3= truncate(project.name, length: 23)
    span.city= "#{project.address_city}, #{project.address_state}"

    p.headline= project.headline

  section.fw-info
    p.opendata
      span.raised
        | #{project.display_pledged} raised (#{project.progress}%)
      span.timeleft
        | #{project.time_to_go[:time]} #{project.time_to_go[:unit]} left
      .clearfix

  section.fw-fountain-image
    = image_tag('catarse/fountain-marker.png', alt: 'Fountain Marker')
  section.fw-fountain-raised
    div class='total_raised' style='width: 100%'
      .bar style='height: #{project.display_progress}%; width: 100%'
        |

  section.fw-footer
    = link_to 'Save our fountains', project_url(project), class: 'fountain-btn', target: "__blank"

Fix foundation widget project url

article.foundation_widget
  section.fw-header
    h3= truncate(project.name, length: 23)
    span.city= "#{project.address_city}, #{project.address_state}"

    p.headline= project.headline

  section.fw-info
    p.opendata
      span.raised
        | #{project.display_pledged} raised (#{project.progress}%)
      span.timeleft
        | #{project.time_to_go[:time]} #{project.time_to_go[:unit]} left
      .clearfix

  section.fw-fountain-image
    = image_tag('catarse/fountain-marker.png', alt: 'Fountain Marker')
  section.fw-fountain-raised
    div class='total_raised' style='width: 100%'
      .bar style='height: #{project.display_progress}%; width: 100%'
        |

  section.fw-footer
    = link_to 'Save our fountains', project_by_slug_url(project.permalink), class: 'fountain-btn', target: "__blank"


doctype html
html
head
  title BlogIt
  = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
  script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"
  = javascript_include_tag 'application', 'data-turbolinks-track' => true
  = csrf_meta_tags

body
  nav.navbar.navbar-default
    .container
      .navbar-header
        - if current_user
          button.navbar-toggle.collapsed type="button" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false"
            span.sr-only Toggle navigation
            span.icon-bar
            span.icon-bar
            span.icon-bar
        = link_to 'Scribbles', root_url, class: 'navbar-brand'
      - if current_user
        #navbar-collapse-1.collapse.navbar-collapse
          ul.nav.navbar-nav.navbar-right
            li = link_to 'New scribble', new_scribble_url
            li = link_to 'Log out', logout_url
  .container
    .row
      .col-sm-12
        = yield
  footer.footer
    .container
      /p.text-muted Place sticky footer content here.

Add meta tags for mobile devices and ie

doctype html
html
head
  meta charset="utf-8"
  meta http-equiv="X-UA-Compatible" content="IE=edge"
  meta name="viewport" content="width=device-width, initial-scale=1"

  title BlogIt
  = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
  script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"
  = javascript_include_tag 'application', 'data-turbolinks-track' => true
  = csrf_meta_tags

body
  nav.navbar.navbar-default
    .container
      .navbar-header
        - if current_user
          button.navbar-toggle.collapsed type="button" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false"
            span.sr-only Toggle navigation
            span.icon-bar
            span.icon-bar
            span.icon-bar
        = link_to 'Scribbles', root_url, class: 'navbar-brand'
      - if current_user
        #navbar-collapse-1.collapse.navbar-collapse
          ul.nav.navbar-nav.navbar-right
            li = link_to 'New scribble', new_scribble_url
            li = link_to 'Log out', logout_url
  .container
    .row
      .col-sm-12
        = yield
  footer.footer
    .container
      /p.text-muted Place sticky footer content here.


h1.header
  = icon('inbox')
  span Application drafts

table.table.table-striped.table-bordered.table-condensed
  thead
    tr
      th Project Name
      th Team
      th Created
  tbody
    - @application_drafts.each do |draft|
      tr
        td= link_to (draft.project_name.presence || '<Pending>'), edit_application_draft_path(draft)
        td= link_to draft.team.display_name, team_path(draft.team), class: "team #{draft.team.kind}"
        td= draft.created_at

Add team role to drafts index

h1.header
  = icon('inbox')
  span Application drafts

table.table.table-striped.table-bordered.table-condensed
  thead
    tr
      th Project Name
      th Team
      th Created
      th Your Role
  tbody
    - @application_drafts.each do |draft|
      tr
        td= link_to (draft.project_name.presence || '<Pending>'), edit_application_draft_path(draft)
        td= link_to draft.team.display_name, team_path(draft.team), class: "team #{draft.team.kind}"
        td= draft.created_at
        td= draft.role_for(current_user)


.editable
  span.status class=('edited' if has_dataset_edit?(key))
  strong.key title=(key.to_s)
    = truncate(key.to_s, length: 48)
  span.val
    - if is_boolean_value?(value)
      i.fa class=(value ? "fa-check" : "fa-times")
    - else
      = value

  .actions
    = link_to "Edit", edit_dataset_dataset_edit_path(@dataset.area, key), class: "button"
    span.or or
    = link_to "Cancel", "#", class: "button cancel"

  .clear

Fix direction of status icon boolean

.editable
  span.status class=('edited' if has_dataset_edit?(key))
  strong.key title=(key.to_s)
    = truncate(key.to_s, length: 48)

  span.val
    - if is_boolean_value?(value)
      i.fa class=(value.to_s == "true" ? "fa-check" : "fa-times")
    - else
      = value

  .actions
    = link_to "Edit", edit_dataset_dataset_edit_path(@dataset.area, key), class: "button"
    span.or or
    = link_to "Cancel", "#", class: "button cancel"

  .clear


#proposals.grid-items.clearfix
  = for proposal <- @proposals do
    div.grid-col.grid-2x3-col.sec-item.sec-feature
      div.contents-wrap.clearfix
        h3.hs-secondary-small
          a href="#{proposal_path(@conn, :show, proposal)}"
            = proposal.organisation.name

        = for tag <- proposal.tags do
          a href="#{proposal_path @conn, :tagged, tag.slug}" title="#{tag.category}" class="ac-btn btn-smallest tag #{tag.slug}"
            = tag.name

        p = String.slice(proposal.summary, 0..100)
        a.ac-btn-alt.fw-bolder href="#{proposal_path(@conn, :show, proposal)}" More on this project

Add number of proposals to return

p
  = "#{length(@proposals)} proposals"
#proposals.grid-items.clearfix
  = for proposal <- @proposals do
    div.grid-col.grid-2x3-col.sec-item.sec-feature
      div.contents-wrap.clearfix
        h3.hs-secondary-small
          a href="#{proposal_path(@conn, :show, proposal)}"
            = proposal.organisation.name

        = for tag <- proposal.tags do
          a href="#{proposal_path @conn, :tagged, tag.slug}" title="#{tag.category}" class="ac-btn btn-smallest tag #{tag.slug}"
            = tag.name

        p = String.slice(proposal.summary, 0..100)
        a.ac-btn-alt.fw-bolder href="#{proposal_path(@conn, :show, proposal)}" More on this project


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

Remove content_tag nastiness for log in icon

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


- if resources_for('/').empty?
  h1 Site is empty, create some pages
- else
  h1.glypto-title = site_title
  - main_sections.each do |section|
    h2 = link_to section.metadata.locals.name, section.path

Use correct class for main title

- if resources_for('/').empty?
  h1 Site is empty, create some pages
- else
  h1.glypto-title = site_title
  - main_sections.each do |section|
    h2.glypto-title = link_to section.metadata.locals.section.title, section.path


=render({ :partial => '/shared/collection_tabs', :locals => { :selected => 10, :collection_id => @collection }})
div.columns
  div.maincol
    .image-container(id="image_container"
                     style="height: 500px")

      img(src="#{@page.canonical_facsimile_url}", style="height: 100%;")
  div.aside
    h2 =t('.page_layout')
    p Click on the top part of the image that contains a spreadsheet form

Use OSD for image display

=render({ :partial => '/shared/collection_tabs', :locals => { :selected => 10, :collection_id => @collection }})
div.columns
  div.maincol

    .page-columns(data-layout-mode="#{@layout_mode}" data-fullheight='{ "bottom": 30, "cssrule": "height" }')
      .page-column
        .page-imagescan
          =render :partial => '/shared/osd_div'
  div.aside
    h2 =t('.page_layout')
    p Click on the top part of the image that contains a spreadsheet form


.col-sm-3.col-md-3.hidden-xs
  form.navbar-form(role="search" ng-submit="doSearch()")
    .input-group
      input#keywords.form-control(type="text" placeholder="Search" ng-model="search.text" autofocus bs-typeahead
        data-delay="500" data-min-length="3" data-template="products/typeahead.html"
        ng-options="product.name as product.name for product in getProducts($viewValue)")

      .input-group-addon
        span.glyphicon.glyphicon-search(ng-click="doSearch()")

Add name to search form and search field

.col-sm-3.col-md-3.hidden-xs
  form.navbar-form(name="SearchForm" role="search" ng-submit="doSearch()")
    .input-group
      input.form-control(type="text" name="keywords" placeholder="Search" ng-model="search.text" autofocus bs-typeahead
        data-delay="500" data-min-length="3" data-template="products/typeahead.html"
        ng-options="product.name as product.name for product in getProducts($viewValue)")

      .input-group-addon
        span.glyphicon.glyphicon-search(ng-click="doSearch()")


- contribution = @notification.contribution
- company_name = CatarseSettings[:company_name]
- contact_email = CatarseSettings[:email_contact]

|Olá, #{contribution.user.decorate.display_name}!
br
br
| Não recebemos a confirmação de pagamento do apoio para o projeto #{link_to contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')}.
br
br
| Para se tornar realidade, esse projeto precisa muito do seu apoio, portanto, você tem até #{l(contribution.project.expires_at)}
| para realizar uma #{link_to 'nova contribuição', project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')}.
| Junte-se a mais #{contribution.project.total_contributions} pessoas que querem tirar o projeto #{link_to contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')} do papel.
br
br
| Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to contact_email}
br
br
|Um abraço,
br
| #{company_name}

Update the `contribution canceled` email template

- contribution = @notification.contribution
- company_name = CatarseSettings[:company_name]
- contact_email = CatarseSettings[:email_contact]

|Olá, #{contribution.user.decorate.display_name}!
br
br
| Não recebemos a confirmação de pagamento do apoio para o projeto #{link_to contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')}.
br
br
| Para se tornar realidade, esse projeto precisa muito do seu apoio, portanto, você tem até #{l(contribution.project.expires_at)}
| para realizar uma #{link_to 'nova contribuição', project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')}.
| Junte-se a mais #{contribution.project.total_contributions} apoiadores que querem tirar o projeto #{link_to contribution.project.name, project_by_slug_url(permalink: contribution.project.permalink, ref: 'notificacao_cancelado')} do papel.
br
br
| Se ficou com alguma dúvida, entre em contato conosco respondendo a esta mensagem ou através do e-mail #{mail_to contact_email}
br
br
|Um abraço,
br
| #{company_name}


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

Fix submitted application state for dashboard

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


.allocation-info.form-group id="comm-form-container-#{question.try(:id)}"
  - if reassign
    - label_text = 'Reassign action officer'
  - else
    - label_text = 'Action officer(s)'
  = label :action_officers_pqs, :action_officer_id, label_text, value: question.try(:id), class: 'form-label'
  = collection_select(:commission_form, :action_officer_id, action_officers, :id, :name_with_div, {include_blank: false}, {multiple: !reassign, class: 'multi-select-action-officers form-control required-for-commission', id: "action_officers_pqs_action_officer_id_#{question.try(:id)}" })

Add blank entry to the action officer dropdown

.allocation-info.form-group id="comm-form-container-#{question.try(:id)}"
  - if reassign
    - label_text = 'Reassign action officer'
  - else
    - label_text = 'Action officer(s)'
  = label :action_officers_pqs, :action_officer_id, label_text, value: question.try(:id), class: 'form-label'
  = collection_select(:commission_form, :action_officer_id, action_officers, :id, :name_with_div, {include_blank: true}, {multiple: !reassign, class: 'multi-select-action-officers form-control required-for-commission', id: "action_officers_pqs_action_officer_id_#{question.try(:id)}" })


.row
  .span12
    .year-navigation.pull-right[entity='entity' year='year']
.row
  .span4.value-box.positive-box
    h4
      | Orçamento Autorizado
      br
      small[ng-cloak]
        | (referente à {{year}})
    .large-number[title="{{entity.autorizado.total | currency:'R$ '}}"
      ng-bind="entity.autorizado.total | roundedCurrency"]
  .span4.value-box.negative-box
    h4
      | Pagamentos
      br
      small
        | (Pago + RP Pago)
    .large-number[title="{{entity.pagamentos.total | currency:'R$ '}}"
      ng-bind="entity.pagamentos.total | roundedCurrency"]
  .span4.value-box.attention-box
    h4
      | Não Executado
      br
      small
        | (Autorizado - Pagamentos)
    .large-number[title="{{entity.naoExecutado.total | currency:'R$ '}}"
      ng-bind="entity.naoExecutado.total | roundedCurrency"]

Remove select de ano do monitor.


li.has-dropdown
  = link_to " #{current_user.username}", dashboard_path, class: 'fi-home'
  ul.dropdown
    li
      = link_to "Update Profile", edit_user_registration_path
    li
      = link_to "View Letters", author_letters_path(current_user.id)

Add an explicit dashboard link to the user menu

li.has-dropdown
  = link_to " #{current_user.username}", dashboard_path, class: 'fi-home'
  ul.dropdown
    li= link_to "Dashboard", dashboard_path
    li= link_to "Update Profile", edit_user_registration_path
    li= link_to "View Letters", author_letters_path(current_user.id)


li class="repo-item #{ repo.weight }" data-language="#{ repo.language if repo.language }"
  = link_to repo
    header.repo-item-header
      h4.repo-item-title = repo.name
      span.repo-item-issues
        span.warning-svg.issue-icon
        = repo.issues_count
        |  Issues

    p.repo-item-description = repo.description

    - if repo.full_name.present?
      span.repo-item-full-name
        | (#{repo.full_name})

Update heading tags to be hierarchical

li class="repo-item #{ repo.weight }" data-language="#{ repo.language if repo.language }"
  = link_to repo
    header.repo-item-header
      h3.repo-item-title = repo.name
      span.repo-item-issues
        span.warning-svg.issue-icon
        = repo.issues_count
        |  Issues

    p.repo-item-description = repo.description

    - if repo.full_name.present?
      span.repo-item-full-name
        | (#{repo.full_name})