%h3
  Integration with GitLab. Requires GitLab 6.3+
%hr
%form.form-horizontal
  .bs-callout.bs-callout-info
    %p
      Copy to GitLab → Project → Services
      (#{link_to 'screenshot', image_path('service_sample.png'), target: '_blank'})
    %ul
      %li build on push
      %li integration with Merge Requests
      %li links to GitLab instance

  .form-group
    = label_tag :token, 'Project Token', class: 'control-label'
    .col-sm-10
      = text_field_tag :token, @project.token, class: 'form-control', readonly: true
  .form-group
    = label_tag :url, 'Project URL', class: 'control-label'
    .col-sm-10
      = text_field_tag :url, project_url(@project), class: 'form-control', readonly: true

Fix Integration page header of required GitLab version

%h3
  Integration with GitLab. Requires GitLab 7.5+
%hr
%form.form-horizontal
  .bs-callout.bs-callout-info
    %p
      Copy to GitLab → Project → Services
      (#{link_to 'screenshot', image_path('service_sample.png'), target: '_blank'})
    %ul
      %li build on push
      %li integration with Merge Requests
      %li links to GitLab instance

  .form-group
    = label_tag :token, 'Project Token', class: 'control-label'
    .col-sm-10
      = text_field_tag :token, @project.token, class: 'form-control', readonly: true
  .form-group
    = label_tag :url, 'Project URL', class: 'control-label'
    .col-sm-10
      = text_field_tag :url, project_url(@project), class: 'form-control', readonly: true


- post_p = present(post)

.forum-post.card.mb-3
  %div{ id: "post_#{post.id}" }

  .card-header
    .user
      = render 'users/listing', user: post.created_by

  .card-body
    .content.markdown.pb-3
      = post_p.content

    .footer.row.no-gutters.align-items-center.pt-2
      .created-at{ 'data-toggle': 'tooltip', title: post_p.created_at }
        Posted #{post_p.created_at_in_words} ago

      - if post.edits.size > 1
        .edited-at.text-muted.ml-1{ 'data-toggle': 'tooltip', title: post_p.last_edited }
          \- edited #{post_p.last_edited_in_words} ago

      .actions.ml-auto
        - if defined? user_can_edit_post? && user_can_edit_post?(post)
          - if post.edits.size > 1
            = link_to 'History', edits_for_forums_post_path(post), class: 'action p-1'
            %span ·

          = link_to 'Edit', post_p.edit_path, class: 'action p-1'
          %span ·

        - if quote_id
          %a{ class: 'action p-1', data: { quote: { id: quote_id, text: post_p.quote } } }
            Quote
          %span ·

        = link_to 'Link', "#post_#{post.id}", class: 'action p-1'

Fix edit post link showing for all users

- post_p = present(post)

.forum-post.card.mb-3
  %div{ id: "post_#{post.id}" }

  .card-header
    .user
      = render 'users/listing', user: post.created_by

  .card-body
    .content.markdown.pb-3
      = post_p.content

    .footer.row.no-gutters.align-items-center.pt-2
      .created-at{ 'data-toggle': 'tooltip', title: post_p.created_at }
        Posted #{post_p.created_at_in_words} ago

      - if post.edits.size > 1
        .edited-at.text-muted.ml-1{ 'data-toggle': 'tooltip', title: post_p.last_edited }
          \- edited #{post_p.last_edited_in_words} ago

      .actions.ml-auto
        - if defined?(user_can_edit_post?) && user_can_edit_post?(post)
          - if post.edits.size > 1
            = link_to 'History', edits_for_forums_post_path(post), class: 'action p-1'
            %span ·

          = link_to 'Edit', post_p.edit_path, class: 'action p-1'
          %span ·

        - if quote_id && user_signed_in?
          %a{ class: 'action p-1', data: { quote: { id: quote_id, text: post_p.quote } } }
            Quote
          %span ·

        = link_to 'Link', "#post_#{post.id}", class: 'action p-1'


%a{:href => "https://github.com/codeintheschools/check_me_out"}
  %img{:alt => "Fork me on GitHub", "data-canonical-src" => "https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png", :src => "https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67", :style => "position: absolute; top: 0; right: 0; border: 0;"}/

Hide fork ribbon on smaller screens

.hidden-xs.hidden-sm
  %a{:href => "https://github.com/codeintheschools/check_me_out"}
    %img{:alt => "Fork me on GitHub", "data-canonical-src" => "https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png", :src => "https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67", :style => "position: absolute; top: 0; right: 0; border: 0;"}/


= image_tag absolute_url_for(picture.image_file.variant(resize: Settings.sizes.small)), title: picture, alt: picture
%p
  = link_to absolute_url_for(picture.gallery) do
    This picture is part of the
    = surround '"' do
      = picture.gallery
    gallery on IMGSHR.

Fix image preview in feed

= image_tag absolute_url_for(picture.image_file.variant(Settings.sizes.small)), title: picture, alt: picture
%p
  = link_to absolute_url_for(picture.gallery) do
    This picture is part of the
    = surround '"' do
      = picture.gallery
    gallery on IMGSHR.


- page_title "Network"
= render "head"
.project-network
  .controls
    = form_tag namespace_project_network_path(@project.namespace, @project, @id), method: :get, class: 'form-inline network-form' do |f|
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha'
      = button_tag class: 'btn btn-success btn-search-sha' do
        %i.fa.fa-search
      .inline.prepend-left-20
        .checkbox.light
          = label_tag :filter_ref do
            = check_box_tag :filter_ref, 1, @options[:filter_ref]
            %span Begin with the selected commit

  .network-graph
    = spinner nil, true

:javascript
  disableButtonIfEmptyField('#extended_sha1', '.btn-search-sha')

  network_graph = new Network({
    url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}',
    commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}',
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
  })
  new ShortcutsNetwork(network_graph.branch_graph)

Include ref in network page title.

- page_title "Network", @ref
= render "head"
.project-network
  .controls
    = form_tag namespace_project_network_path(@project.namespace, @project, @id), method: :get, class: 'form-inline network-form' do |f|
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha'
      = button_tag class: 'btn btn-success btn-search-sha' do
        %i.fa.fa-search
      .inline.prepend-left-20
        .checkbox.light
          = label_tag :filter_ref do
            = check_box_tag :filter_ref, 1, @options[:filter_ref]
            %span Begin with the selected commit

  .network-graph
    = spinner nil, true

:javascript
  disableButtonIfEmptyField('#extended_sha1', '.btn-search-sha')

  network_graph = new Network({
    url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}',
    commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}',
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
  })
  new ShortcutsNetwork(network_graph.branch_graph)


.standalone
  - form_tag(passwords_path, one_submit_only(:passwords)) do
    .title #{t :forgot_password}
    .intro #{t :password_intro}
    .section
      .label #{t :email}:
      = text_field_tag :email
    %br
    .buttonbar
      = submit_tag t(:reset_password), :id => "passwords_submit"

Fix forgot password page, content now appears

.standalone
  = form_tag(passwords_path, one_submit_only(:passwords)) do
    .title #{t :forgot_password}
    .intro #{t :password_intro}
    .section
      .label #{t :email}:
      = text_field_tag :email
    %br
    .buttonbar
      = submit_tag t(:reset_password), :id => "passwords_submit"


!!!
%html
  %head
    %title Circle - Continuous Integration made easy

    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
    %meta{:content => "Continuous Integration made easy", :name => "description"}

    = stylesheet_link_tag "application"

    = javascript_include_tag "application"
    = javascript_include_tag params[:controller]

    = csrf_meta_tags

    = render :partial => 'google-analytics'

  %body
    %ul.hmenu
      = render 'shared/navigation'
    - flash.each do |name, msg|
      = content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)

    = yield

Remove unused description meta tag.

!!!
%html
  %head
    %title Circle - Continuous Integration made easy

    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}

    = stylesheet_link_tag "application"

    = javascript_include_tag "application"
    = javascript_include_tag params[:controller]

    = csrf_meta_tags

    = render :partial => 'google-analytics'

  %body
    %ul.hmenu
      = render 'shared/navigation'
    - flash.each do |name, msg|
      = content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)

    = yield


- if current_user
  .transparent_backdrop{style: 'display:none;'}
  .user_menu
    = link_to raw("#{t('nav.user.label', username: h(current_user.username))} ▼"), '#', onclick: "return handleUserMenuClick();"
    %div{ style: 'position:relative;top:3px;'}
      .user_options{style: 'display: none;'}
        - if current_user.teacher?
          = link_to t('nav.user.classroom'), followers_url
          %hr
        = link_to t('nav.user.stats'), root_url
        %br/
        = link_to t('nav.user.settings'), edit_user_registration_url
        %br/
        = link_to t('nav.user.prizes'), my_prizes_path
        %br/
        = link_to t('nav.user.logout'), destroy_user_session_url
- else
  = link_to t('nav.user.signup'), new_user_registration_url
  |
  = link_to t('nav.user.signin'), new_user_session_url

Use "sign in" button, instead of sign in/up text.

- if current_user
  .transparent_backdrop{style: 'display:none;'}
  .user_menu
    = link_to raw("#{t('nav.user.label', username: h(current_user.username))} ▼"), '#', onclick: "return handleUserMenuClick();"
    %div{ style: 'position:relative;top:3px;'}
      .user_options{style: 'display: none;'}
        - if current_user.teacher?
          = link_to t('nav.user.classroom'), followers_url
          %hr
        = link_to t('nav.user.stats'), root_url
        %br/
        = link_to t('nav.user.settings'), edit_user_registration_url
        %br/
        = link_to t('nav.user.prizes'), my_prizes_path
        %br/
        = link_to t('nav.user.logout'), destroy_user_session_url
- elsif params[:controller] !~ /^devise/
  = link_to t('nav.user.signin'), new_user_session_url, class: "btn btn-lg btn-primary"


- if @portal_clazz.is_teacher?(current_user) || current_user.has_role?("admin")
  = render :partial =>'portal/clazzes/show', :locals => {:portal_clazz => @portal_clazz}
  = render :partial => 'portal/offerings/list_for_clazz', :locals => {:portal_clazz => @portal_clazz }
  %br
  = render :partial => 'portal/students/list_for_clazz', :locals => {:portal_clazz => @portal_clazz, :existing_students => @portal_clazz.teacher.students - @portal_clazz.students }
- elsif current_user.has_role?("manager", "researcher")
  = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- else
  = render :partial =>'portal/clazzes/show', :locals => {:portal_clazz => @portal_clazz}
  - # Added to show investigations to students in class view. -- Cantina-CMH 6/21/10
  %h5 #{APP_CONFIG[:top_level_container_name].capitalize.pluralize}:
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @portal_clazz.offerings }

Use helper method for top level container name.

- if @portal_clazz.is_teacher?(current_user) || current_user.has_role?("admin")
  = render :partial =>'portal/clazzes/show', :locals => {:portal_clazz => @portal_clazz}
  = render :partial => 'portal/offerings/list_for_clazz', :locals => {:portal_clazz => @portal_clazz }
  %br
  = render :partial => 'portal/students/list_for_clazz', :locals => {:portal_clazz => @portal_clazz, :existing_students => @portal_clazz.teacher.students - @portal_clazz.students }
- elsif current_user.has_role?("manager", "researcher")
  = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- else
  = render :partial =>'portal/clazzes/show', :locals => {:portal_clazz => @portal_clazz}
  - # Added to show investigations to students in class view. -- Cantina-CMH 6/21/10
  %h4 #{top_level_container_name.capitalize.pluralize}:
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @portal_clazz.offerings }


- @no_container = true
- add_to_breadcrumbs _("Compare Revisions"), project_compare_index_path(@project)
- page_title "#{params[:from]}...#{params[:to]}"

%div{ class: container_class }
  .sub-header-block.no-bottom-space
    = render "form"

  - if @commits.present?
    = render "projects/commits/commit_list"
    = render "projects/diffs/diffs", diffs: @diffs, environment: @environment
  - else
    .light-well
      .center
        %h4
          = s_("CompareBranches|There isn't anything to compare.")
        %p.slead
          - if params[:to] == params[:from]
            - sourceBranch = capture_haml do
              %span.ref-name= params[:from]
            - targetBranch = capture_haml do
              %span.ref-name= params[:to]
            = (s_("CompareBranches|%{source_branch} and %{target_branch} are the same.") % { source_branch: sourceBranch, target_branch: targetBranch }).html_safe
          - else
            = _("You'll need to use different branch names to get a valid comparison.")

Fix incorrect case of ruby vars

- @no_container = true
- add_to_breadcrumbs _("Compare Revisions"), project_compare_index_path(@project)
- page_title "#{params[:from]}...#{params[:to]}"

%div{ class: container_class }
  .sub-header-block.no-bottom-space
    = render "form"

  - if @commits.present?
    = render "projects/commits/commit_list"
    = render "projects/diffs/diffs", diffs: @diffs, environment: @environment
  - else
    .light-well
      .center
        %h4
          = s_("CompareBranches|There isn't anything to compare.")
        %p.slead
          - if params[:to] == params[:from]
            - source_branch = capture_haml do
              %span.ref-name= params[:from]
            - target_branch = capture_haml do
              %span.ref-name= params[:to]
            = (s_("CompareBranches|%{source_branch} and %{target_branch} are the same.") % { source_branch: source_branch, target_branch: target_branch }).html_safe
          - else
            = _("You'll need to use different branch names to get a valid comparison.")


.form-group
  .form__label-heading

  .form__input-wrapper
    .form__group.form__group--inline
      .form__group-item
        = label_tag do
          = form.check_box :suppress_from_links_recirculation
          Suppress from links recirculation
      .form__group-item
        = label_tag do
          = form.check_box :regulated_box
          Regulated Content

Add 'supports_amp' check box to create/edit view

.form-group
  .form__label-heading

  .form__input-wrapper
    .form__group.form__group--inline
      .form__group-item
        = label_tag do
          = form.check_box :suppress_from_links_recirculation
          Suppress from links recirculation
      .form__group-item
        = label_tag do
          = form.check_box :regulated_box
          Regulated Content
      .form__group-item
        = label_tag do
          = form.check_box :supports_amp
          Supports Google AMP


.center.jumbotron
  %h1 Ecotone
  %h2 A Living, Learning Laboratory at OSU Cascades
/ source: http://getbootstrap.com/examples/carousel/#
.container
  .row
    .col-lg-4.center
      = image_tag('ecotone-plants-tykeson-hall-osu-cascades-200x200.jpg', class: 'img-circle', alt: 'Native plant species at OSU cascades')
      %h3 Native Plant Landscaping
      %p Natural resources and biology students constructed long-term monitoring plots for native species on the OSU Cascades campus.
    .col-lg-4.center
      = image_tag('ecotone-plot-with-trees-osu-cascades-bend-or-200x200.jpg', class: 'img-circle', alt: 'Ecotone plot on OSU Cascades campus in Bend, OR')
      %h3 Education
      %p Biology students can periodically collect and record data samples to track plant health and plot biodiversity on campus.
    .col-lg-4.center
      = image_tag('ecotone-flower2-osu-cascades-200x200.jpg', class: 'img-circle', alt: 'Flower on OSU Cascades campus')
      %h3 Plant Identification
      %p Learn more about plant species that are native to Central Oregon! Look for the QR codes posted at each plot around campus, and use your smartphone camera or any "QR code app" to scan a code and learn more.

Update short description to be of equal length to the others (RUI concept), fix grammar

.center.jumbotron
  %h1 Ecotone
  %h2 A Living, Learning Laboratory at OSU-Cascades
/ source: http://getbootstrap.com/examples/carousel/#
.container
  .row
    .col-lg-4.center
      = image_tag('ecotone-plants-tykeson-hall-osu-cascades-200x200.jpg', class: 'img-circle', alt: 'Native plant species at OSU cascades')
      %h3 Native Plant Landscaping
      %p Natural resources and biology students constructed long-term monitoring plots for native species on the OSU Cascades campus
    .col-lg-4.center
      = image_tag('ecotone-plot-with-trees-osu-cascades-bend-or-200x200.jpg', class: 'img-circle', alt: 'Ecotone plot on OSU Cascades campus in Bend, OR')
      %h3 Education
      %p Biology students can periodically collect and record data samples to track plant health and plot biodiversity
    .col-lg-4.center
      = image_tag('ecotone-flower2-osu-cascades-200x200.jpg', class: 'img-circle', alt: 'Flower on OSU Cascades campus')
      %h3 Plant Identification
      %p Learn more about plant species that are native to Central Oregon by scanning the QR codes posted at each plot around campus


!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
  %body{class: controller_path.gsub('/', '_')}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
              %li= link_to t(".issues"), issues_path
              %li= link_to t(".threads"), threads_path
          .account-menu
            %ul
              %li.name= link_to current_user.name, user_profile_path(current_user)
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer

Standardize body class with dashes.

!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
  %body{class: controller_path.tr("/_", "-")}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
              %li= link_to t(".issues"), issues_path
              %li= link_to t(".threads"), threads_path
          .account-menu
            %ul
              %li.name= link_to current_user.name, user_profile_path(current_user)
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer


- content_for :header_tags do
  %link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/

.activity-stream.activity-stream-headless
  = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }

Add some OpenGraph tags to public statuses

- content_for :header_tags do
  %link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
  %meta{ name: 'og:site_name', content: 'Mastodon' }/
  %meta{ name: 'og:type', content: 'article' }/
  %meta{ name: 'og:article:author', content: @account.username }/

.activity-stream.activity-stream-headless
  = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }


- breadcrumb :company, company
.row
  .large-8.columns
    = render 'companies/info_card'
    - if can? :edit, company
      .show-for-small-only
        = link_to t('offers.add_new_offer'), new_offer_path, class: 'button expanded'

    - if candidate_signed_in?
      .card#rate_company
        = render 'companies/show/rate'

    - if company.description.present?
      .card#company_description
        .card-section.company__description
          %p!= markdown company.description

  .large-4.columns
    - if can? :edit, company
      .hide-for-small-only
        = link_to t('offers.add_new_offer'), new_offer_path, class: 'button expanded large success'

    .card#recent_offers
      .card-divider
        %h3= t('companies.show.recent_offers')
      = render company.recent_offers, short: true, ref: 'company'
      .card-section
        = link_to t('.all_offers'), company_offers_path(company)

Make "Add new offer" button blue in company profile

- breadcrumb :company, company
.row
  .large-8.columns
    = render 'companies/info_card'
    - if can? :edit, company
      .show-for-small-only
        = link_to t('offers.add_new_offer'), new_offer_path, class: 'button expanded'

    - if candidate_signed_in?
      .card#rate_company
        = render 'companies/show/rate'

    - if company.description.present?
      .card#company_description
        .card-section.company__description
          %p!= markdown company.description

  .large-4.columns
    - if can? :edit, company
      .hide-for-small-only
        = link_to t('offers.add_new_offer'), new_offer_path, class: 'button expanded large'

    .card#recent_offers
      .card-divider
        %h3= t('companies.show.recent_offers')
      = render company.recent_offers, short: true, ref: 'company'
      .card-section
        = link_to t('.all_offers'), company_offers_path(company)


%orderdetails
  = form_for current_order, url: "#", html: {"ng-submit" => "purchase($event)"} do |f|
    %fieldset
      %legend Your order
      %table
        %tr
          %th Items
          %td.text-right= current_order.display_item_total

        / - checkout_adjustments_for_summary(current_order, exclude_shipping: true).each do |adjustment|
        /   %tr
        /     %th= adjustment.label
        /     %td.text-right= adjustment.display_amount.to_html
        %tr
          %th Shipping
          %td.text-right {{ Checkout.shippingPrice() | currency }}
        %tr
          %th Total
          %td.text-right {{ Checkout.cartTotal() | currency }}
        - if current_order.price_adjustment_totals.present?
          - current_order.price_adjustment_totals.each do |label, total|
            %tr
              %th= label
              %td= total

      //= f.submit "Purchase", class: "button", "ng-disabled" => "checkout.$invalid", "ofn-focus" => "accordion['payment']"
      %a.button.secondary{href: cart_url}
        %i.ofn-i_008-caret-left
        Back to Cart

Remove the logic around fees breakdown as not showing on this view now

%orderdetails
  = form_for current_order, url: "#", html: {"ng-submit" => "purchase($event)"} do |f|
    %fieldset
      %legend Your order
      %table
        %tr
          %th Items
          %td.text-right= current_order.display_item_total

        / - checkout_adjustments_for_summary(current_order, exclude_shipping: true).each do |adjustment|
        /   %tr
        /     %th= adjustment.label
        /     %td.text-right= adjustment.display_amount.to_html
        %tr
          %th Shipping
          %td.text-right {{ Checkout.shippingPrice() | currency }}
        %tr
          %th Total
          %td.text-right {{ Checkout.cartTotal() | currency }}
        / - if current_order.price_adjustment_totals.present?
        /   - current_order.price_adjustment_totals.each do |label, total|
        /     %tr
        /       %th= label
        /       %td= total

      //= f.submit "Purchase", class: "button", "ng-disabled" => "checkout.$invalid", "ofn-focus" => "accordion['payment']"
      %a.button.secondary{href: cart_url}
        %i.ofn-i_008-caret-left
        Back to Cart


.field-set{ "data-index" => index }
  = hidden_field_tag "#{prefix}[type]", field_set.type.demodulize, :id => nil

  .drag

  .drag-area
    = label_tag "fieldset_#{index}_legend", "Fieldset Legend:"
    = text_field_tag "#{prefix}[legend]", field_set.legend, :id => "fieldset_#{index}_legend"

    %span.note (leave blank for none)

  .fields{ "data-prefix" => "form[fields][#{index}][fields]" }
    = render_fields(field_set.fields, "form[fields][#{index}][fields]")

  = link_to "Delete", '#', :class => 'delete'

Fix server-rendered prefixes for nested fieldsets

.field-set{ "data-index" => index }
  = hidden_field_tag "#{prefix}[type]", field_set.type.demodulize, :id => nil

  .drag

  .drag-area
    = label_tag "fieldset_#{index}_legend", "Fieldset Legend:"
    = text_field_tag "#{prefix}[legend]", field_set.legend, :id => "fieldset_#{index}_legend"

    %span.note (leave blank for none)

  .fields{ "data-prefix" => "#{prefix}[fields]" }
    = render_fields(field_set.fields, "#{prefix}[fields]")

  = link_to "Delete", '#', :class => 'delete'


- @title = @root_error.message

= render :partial => 'errors/sidebar_summary'

#error
  = render :partial => 'errors/header_error'

  %h2 Backtrace
  %pre
    - @error.backtrace.each do |line|
      = line.to_s.gsub(/^(\s+)/){ |x| $1.size }

Add indentation in backtrace for Python's backtrace by example

- @title = @root_error.message

= render :partial => 'errors/sidebar_summary'

#error
  = render :partial => 'errors/header_error'

  %h2 Backtrace
  %pre
    - @error.backtrace.each do |line|
      = line.to_s.gsub(/^(\s+)/){ |x| ' '*$1.size }


.row.results_summary
  .col-12
    - if @cards.present?
      #{pluralize(@cards.count, "card")} unimplemented cards
    - else
      All cards are implemented!
- @cards.each do |card, printings|
  .row.card_row
    .col-8.cardinfo
      %h3.card_title
        = link_to_card(card) do
          = card.name
        - legality = @ech.legality(card)
        - if legality.start_with? "restricted"
          = " "
          %i{class: "legality-restricted"} restricted in ECH
        - elsif legality.start_with? "banned"
          = " "
          %i{class: "legality-banned"} banned in ECH
    .col-2.cardinfo
      - votes = @exh.legality(card).split("-")[1].to_i
      = link_to({controller: "exh", action: "vote", name: card.name}, class: "legality-banned") do
        %i{class: (signed_in? && exh_card(card).voters.include?(current_user)) ? "voted" : ""}
          = "#{votes} vote#{votes == 1 ? "" : "s"}"
    .d-none.d-md-block.col-2
      = render 'printings_short', card: card, printings: printings_view(card, printings)

Fix rendering of printings list in todo list

.row.results_summary
  .col-12
    - if @cards.present?
      #{pluralize(@cards.count, "card")} unimplemented cards
    - else
      All cards are implemented!
- @cards.each do |card, printings|
  .row.card_row
    .col-8.cardinfo
      %h3.card_title
        = link_to_card(card) do
          = card.name
        - legality = @ech.legality(card)
        - if legality.start_with? "restricted"
          = " "
          %i{class: "legality-restricted"} restricted in ECH
        - elsif legality.start_with? "banned"
          = " "
          %i{class: "legality-banned"} banned in ECH
    .col-2.cardinfo
      - votes = @exh.legality(card).split("-")[1].to_i
      = link_to({controller: "exh", action: "vote", name: card.name}, class: "legality-banned") do
        %i{class: (signed_in? && exh_card(card).voters.include?(current_user)) ? "voted" : ""}
          = "#{votes} vote#{votes == 1 ? "" : "s"}"
    .d-none.d-md-block.col-2
      = render 'card/printings_short', card: card, printings: printings_view(card, printings)


- page_title t("to_vote")

.row.show-for-medium-up
  .medium-12.columns
    %ul.breadcrumbs
      %li
        = link_to t("home"), root_path
      %li
        = link_to @conference.title, conference_path(@conference)
      %li
        = link_to truncate(@event.title), conference_event_path(@conference, @event)
      %li.current
        = t("to_vote")

.row
  .medium-12.columns
    %h1.subheader
      = t("thanks.vote_thanks")
    %hr
.row
  .medium-6.columns
    %p
      = t("thanks.vote_thanks_msg", :title => @event.title)
    %p
      = t("thanks.vote_thanks_reminder")
  .medium-6.columns
    / TODO: tanslate!
    = link_to "Votar otra actividad", conference_path(@conference), :class => "button radius success expand"
    = link_to t("event.back_to_event"), conference_event_path(@conference, @event), :class => "button radius expand"

Remove 'Home' in breadcurums bar

- page_title t("to_vote")

.row.show-for-medium-up
  .medium-12.columns
    %ul.breadcrumbs
      %li
        = link_to @conference.title, conference_path(@conference)
      %li
        = link_to truncate(@event.title), conference_event_path(@conference, @event)
      %li.current
        = t("to_vote")

.row
  .medium-12.columns
    %h1.subheader
      = t("thanks.vote_thanks")
    %hr
.row
  .medium-6.columns
    %p
      = t("thanks.vote_thanks_msg", :title => @event.title)
    %p
      = t("thanks.vote_thanks_reminder")
  .medium-6.columns
    / TODO: tanslate!
    = link_to "Votar otra actividad", conference_path(@conference), :class => "button radius success expand"
    = link_to t("event.back_to_event"), conference_event_path(@conference, @event), :class => "button radius expand"


.user-profile
  %h1= @user.name
  - if @user == current_user
    %ol
      %li= link_to t(".edit"), action: :edit
      %li= link_to t(".update_account"), edit_user_registration_path
      %li= link_to t(".my_locations"), user_locations_path
  .website
    = @profile.website
  - if @profile.picture
    = image_tag @profile.picture.url, alt: "", title: t(".profile_picture_title", name: @user.name)
  .about
    = @profile.about
  .groups
    %p= t ".is_a_member_of_groups", name: @user.name, count: @user.groups.count
    - if @user.groups.count > 0
      %ol
        - @user.groups.each do |g|
          %li= link_to g.name, group_path(g)

Make the profile website a clickable link with nofollow

.user-profile
  %h1= @user.name
  - if @user == current_user
    %ol
      %li= link_to t(".edit"), action: :edit
      %li= link_to t(".update_account"), edit_user_registration_path
      %li= link_to t(".my_locations"), user_locations_path
  .website
    = link_to @profile.website, @profile.website, rel: :nofollow unless @profile.website.empty?
  - if @profile.picture
    = image_tag @profile.picture.url, alt: "", title: t(".profile_picture_title", name: @user.name)
  .about
    = @profile.about
  .groups
    %p= t ".is_a_member_of_groups", name: @user.name, count: @user.groups.count
    - if @user.groups.count > 0
      %ol
        - @user.groups.each do |g|
          %li= link_to g.name, group_path(g)


.thread-event.thread-comment{ng_controller: 'NewCommentItemController'}
  .thread-event-header.media
    .pull-left{ng-include: "'generated/templates/user/avatar.html'", ng-init: 'user = comment.author()'}
    .media-body
      %strong {{comment.authorName()}}
  .thread-event-body{btf-markdown: 'comment.body' }
    -#{{ comment.body }}

  .thread-event-footer
    .thread-actions-and-meta
      %a{translate: 'common.action.like', ng-show: '!currentUserLikesIt()', href: '#', ng_click: 'like()'}>
      %a{translate: 'common.action.unlike', href: '#', ng_click: 'unlike()', ng-show: 'currentUserLikesIt()'}>
      ·
      %a{translate: 'common.action.reply', href: '#', ng_click: 'reply()'}>
      ·
      %timeago{timestamp: 'comment.createdAt' }>

    .thread-attachments
      .thread-attachment{ng-repeat: 'attachment in comment.attachments()'}
        %a{ng-href: '{{attachment.location}}', target: '_blank'}
          {{ attachment.filename }}

    .thread-liked-by-sentence{ng_show: 'anybodyLikesIt()'}
      {{ likedBySentence }}

Move attachments above like/reply line

.thread-event.thread-comment{ng_controller: 'NewCommentItemController'}
  .thread-event-header.media
    .pull-left{ng-include: "'generated/templates/user/avatar.html'", ng-init: 'user = comment.author()'}
    .media-body
      %strong {{comment.authorName()}}
  .thread-event-body{btf-markdown: 'comment.body' }

  .thread-attachments
    .thread-attachment{ng-repeat: 'attachment in comment.attachments()'}
      %a{ng-href: '{{attachment.location}}', target: '_blank'}
        {{ attachment.filename }}

  .thread-event-footer
    .thread-actions-and-meta
      %a{translate: 'common.action.like', ng-show: '!currentUserLikesIt()', href: '#', ng_click: 'like()'}>
      %a{translate: 'common.action.unlike', href: '#', ng_click: 'unlike()', ng-show: 'currentUserLikesIt()'}>
      ·
      %a{translate: 'common.action.reply', href: '#', ng_click: 'reply()'}>
      ·
      %timeago{timestamp: 'comment.createdAt' }>

    .thread-liked-by-sentence{ng_show: 'anybodyLikesIt()'}
      {{ likedBySentence }}


.tag.tag--price
  .tag--price__inner
    .tag--price__values
      from
      .tag--price__amount<
        %span.tag--price__currency.js-currency<
          = properties[:currency]
        %span.js-price<>
          = properties[:price]

      - if properties[:scope]
        %span.tag--price__scope<
          = properties[:scope]

    - if properties[:retail_price]
      .tag--price__retail<
        = properties[:currency]
        = properties[:retail_price]

Allow an ID on the tag and add a variable hook for the scope value

.tag.tag--price{ id: properties[:id] ? properties[:id] : nil }
  .tag--price__inner
    .tag--price__values
      from
      .tag--price__amount<
        %span.tag--price__currency.js-currency<
          = properties[:currency]
        %span.js-price<>
          = properties[:price]

      - if properties[:scope]
        %span.tag--price__scope.js-scope<
          = properties[:scope]

    - if properties[:retail_price]
      .tag--price__retail<
        = properties[:currency]
        = properties[:retail_price]


.row-fluid
  .span6
    - cache "interesting_crops", :expires_in => 1.day do
      %h2 Some of our crops
      - Crop.interesting.each do |c|
        .span3{:style => 'margin:0px; padding: 3px'}
          = render :partial => 'crops/image_with_popover', :locals => { :crop => c }

  .span6
    - cache "interesting_plantings" do
      %h2 Recently planted
      = render :partial => 'plantings/list', :locals => { :plantings => Planting.interesting.first(4) }

.row-fluid
  .span12
    - cache "recent_crops" do
      %p{ :style => 'margin-top: 11.25px' }
        %strong
          Recently added crops:
        != Crop.recent.limit(12).map {|c| link_to(c, c) }.join(", ")

    %p.text-right
      =link_to "View all crops »", crops_path

Hide crops when in mobile view

.row-fluid
  .span6.hidden-phone
    - cache "interesting_crops", :expires_in => 1.day do
      %h2 Some of our crops
      - Crop.interesting.each do |c|
        .span3{:style => 'margin:0px; padding: 3px'}
          = render :partial => 'crops/image_with_popover', :locals => { :crop => c }

  .span6
    - cache "interesting_plantings" do
      %h2 Recently planted
      = render :partial => 'plantings/list', :locals => { :plantings => Planting.interesting.first(4) }

.row-fluid
  .span12
    - cache "recent_crops" do
      %p{ :style => 'margin-top: 11.25px' }
        %strong
          Recently added crops:
        != Crop.recent.limit(12).map {|c| link_to(c, c) }.join(", ")

    %p.text-right
      =link_to "View all crops »", crops_path


- cache ["v3", scraper] do
  = link_to scraper, class: "list-group-item" do
    %div.scraper-block
      - unless scraper.language.blank?
        %small.scraper-lang.pull-right= scraper.language.human
      .icon-box.pull-right= render partial: "scrapers/auto_clock", locals: {scraper: scraper}
      - if scraper.queued? || scraper.running?
        .icon-box.pull-right= render partial: "scrapers/running_indicator", locals: {scraper: scraper}
      - elsif scraper.last_run && scraper.last_run.finished_with_errors?
        %span.label.label-danger.pull-right errored
      %strong.full_name= scraper.full_name
      %div
        - unless scraper.description.blank?
          = scraper.description

Update the partial cache number after changes

- cache ["v4", scraper] do
  = link_to scraper, class: "list-group-item" do
    %div.scraper-block
      - unless scraper.language.blank?
        %small.scraper-lang.pull-right= scraper.language.human
      .icon-box.pull-right= render partial: "scrapers/auto_clock", locals: {scraper: scraper}
      - if scraper.queued? || scraper.running?
        .icon-box.pull-right= render partial: "scrapers/running_indicator", locals: {scraper: scraper}
      - elsif scraper.last_run && scraper.last_run.finished_with_errors?
        %span.label.label-danger.pull-right errored
      %strong.full_name= scraper.full_name
      %div
        - unless scraper.description.blank?
          = scraper.description


%h1 ListArticles#index
%p Find me in app/views/list_articles/index.html.haml

- # TODO: Figure out layout (boxes like Pocket?) ; Should look good in responsive as well

Add a basic list articles view

- # TODO: Figure out layout (boxes like Pocket?) ; Should look good in responsive as well
- @allArticles.each do |article|
  = render 'shared/article_single', :object => article


= render partial: 'shared/title', locals: { title: "Subscriptions", date: nil }
%section#banner
.row
  .large-12.columns
    - @groups.group_by(&:chapter).each do |chapter, groups|
      %h4= chapter.name
      %hr
      - groups.each do |group|
        .row
          .medium-9.columns
            %p= group.name
          .medium-3.columns
            - if belongs_to_group?(group)
              = simple_form_for :subscription, method: :delete do |f|
                = f.input :subscription_id, as: :hidden, input_html: { value: nil }
                = f.input :group_id, as: :hidden, input_html: { value: group.id }
                = f.submit "Subscribed", class: 'button tiny expand success'
            - else
              = simple_form_for :subscription do |f|
                = f.input :group_id, as: :hidden, input_html: { value: group.id }
                = f.submit "Subscribe", class: 'button tiny expand warn'

    %hr

Add an ID onto subscription buttons, so we can more easily hook into them in automated tests.

= render partial: 'shared/title', locals: { title: "Subscriptions", date: nil }
%section#banner
.row
  .large-12.columns
    - @groups.group_by(&:chapter).each do |chapter, groups|
      %h4= chapter.name
      %hr
      - groups.each do |group|
        .row
          .medium-9.columns
            %p= group.name
          .medium-3.columns
            - if belongs_to_group?(group)
              = simple_form_for :subscription, method: :delete do |f|
                = f.input :subscription_id, as: :hidden, input_html: { value: nil }
                = f.input :group_id, as: :hidden, input_html: { value: group.id }
                = f.submit "Subscribed", class: 'button tiny expand success', id: "#{chapter.name.downcase}-#{group.name.downcase}"
            - else
              = simple_form_for :subscription do |f|
                = f.input :group_id, as: :hidden, input_html: { value: group.id }
                = f.submit "Subscribe", class: 'button tiny expand warn', id: "#{chapter.name.downcase}-#{group.name.downcase}"

    %hr


= render partial: 'users/description/champs/drop_down_template', locals: {values: champ.drop_down_list.options, champ: champ}

Fix dropdown list partial render

- unless champ.drop_down_list.nil?
  = render partial: 'users/description/champs/drop_down_template', locals: {values: champ.drop_down_list.options, champ: champ}


= render 'timesheets/show'

Add hardcoded last month as second timesheet in employee view.

- WorkDay.create_or_update_upto(@employee, Date.today.end_of_month)

.row
  .span8
    - range = Date.parse('2012-01-01')..Date.parse('2012-01-31')
    = render 'timesheets/show', :work_days => @employee.work_days.where(:date => range)
  .span8
    - range = Date.today.beginning_of_month..Date.today.end_of_month
    = render 'timesheets/show', :work_days => @employee.work_days.where(:date => range)


- cache ["v3", scraper] do
  = link_to scraper, class: "list-group-item" do
    %div.scraper-block
      - unless scraper.language.blank?
        %small.scraper-lang.pull-right= scraper.language.human
      .icon-box.pull-right= render partial: "scrapers/auto_clock", locals: {scraper: scraper}
      .icon-box.pull-right= render partial: "scrapers/running_indicator", locals: {scraper: scraper}
      - if scraper.last_run && scraper.last_run.finished_with_errors?
        %span.label.label-danger errored
      %strong.full_name= scraper.full_name
      %div
        - unless scraper.description.blank?
          = scraper.description
        %p.text-muted
          Scrapes osom.cfa.vic.gov.au, ruralfire.qld.gov.au, sentinel.ga.gov.au, and 5 other domains.

Add a semantic class to domains list for applying styles

- cache ["v3", scraper] do
  = link_to scraper, class: "list-group-item" do
    %div.scraper-block
      - unless scraper.language.blank?
        %small.scraper-lang.pull-right= scraper.language.human
      .icon-box.pull-right= render partial: "scrapers/auto_clock", locals: {scraper: scraper}
      .icon-box.pull-right= render partial: "scrapers/running_indicator", locals: {scraper: scraper}
      - if scraper.last_run && scraper.last_run.finished_with_errors?
        %span.label.label-danger errored
      %strong.full_name= scraper.full_name
      %div
        - unless scraper.description.blank?
          = scraper.description
        %p.scraper-domains-list.text-muted
          Scrapes osom.cfa.vic.gov.au, ruralfire.qld.gov.au, sentinel.ga.gov.au, and 5 other domains.


.contaienr
  %p
    Hello #{user.login}
  %p
    - if monkeys.include? user.login
      %a{:href => '/_to/jenkins'}
        Log into Jenkins
.container
  .row
    .col-md-6
      %h2
        Recent Updates
      %ul
        %li
          Nothing new to report!
    .col-md-6
      %h2
        Usage
      %p
        Infinity!

Add some explanation for those who don't have a master

.contaienr
  %p
    Hello #{user.login}
  %p
    - if monkeys.include? user.login
      %a{:href => '/_to/jenkins'}
        Log into Jenkins
    - else
      Sorry, no Jenkins environment has been provisioned for you. Please refer to the project's
        %a{:href => 'https://github.com/rtyler/codevalet#joining-code-valet'}
        README
      for details on how to join.
.container
  .row
    .col-md-6
      %h2
        Recent Updates
      %ul
        %li
          Nothing new to report!
    .col-md-6
      %h2
        Usage
      %p
        Infinity!


.article-bottom.adsense
  %script(async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
  %ins(class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-7665673588234323"
    data-ad-slot="7276505790"
    data-ad-format="auto")
  :javascript
    (adsbygoogle = window.adsbygoogle || []).push({});

.article-bottom.related
  %script(async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
  %ins(class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-7665673588234323"
    data-ad-slot="3942164192"
    data-ad-format="autorelaxed")
  :javascript
    (adsbygoogle = window.adsbygoogle || []).push({});

Hide related ads on index

.article-bottom.adsense
  %script(async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
  %ins(class="adsbygoogle"
    style="display:block"
    data-ad-client="ca-pub-7665673588234323"
    data-ad-slot="7276505790"
    data-ad-format="auto")
  :javascript
    (adsbygoogle = window.adsbygoogle || []).push({});

- unless index?
  .article-bottom.related
    %script(async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
    %ins(class="adsbygoogle"
      style="display:block"
      data-ad-client="ca-pub-7665673588234323"
      data-ad-slot="3942164192"
      data-ad-format="autorelaxed")
    :javascript
      (adsbygoogle = window.adsbygoogle || []).push({});


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

    ga('create', 'UA-37745279-1');
    ga('send', 'pageview');

Set GA cookie on shared domain

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

    ga('create', 'UA-37745279-1', 'code.org');
    ga('send', 'pageview');


%head
  %meta{charset: "utf-8"}

  -# Go repository retrieval support.
  - if controller_name == 'projects' && action_name == 'show'
    %meta{name: "go-import", content: "#{@project.web_url_without_scheme} git #{@project.web_url}.git"}

  %title
    = "#{title} | " if defined?(title)
    GitLab
  = favicon_link_tag 'favicon.ico'
  = stylesheet_link_tag    "application"
  = javascript_include_tag "application"
  = csrf_meta_tags
  = include_gon

  = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id')

  -# Atom feed
  - if current_user
    - if controller_name == 'projects' && action_name == 'index'
      = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed"
    - if @project && !@project.new_record?
      - if current_controller?(:tree, :commits)
        = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}")
      - if current_controller?(:issues)
        = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues")

Move Go specific meta tag after the atom feed code.

%head
  %meta{charset: "utf-8"}
  %title
    = "#{title} | " if defined?(title)
    GitLab
  = favicon_link_tag 'favicon.ico'
  = stylesheet_link_tag    "application"
  = javascript_include_tag "application"
  = csrf_meta_tags
  = include_gon

  = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id')

  -# Atom feed
  - if current_user
    - if controller_name == 'projects' && action_name == 'index'
      = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed"
    - if @project && !@project.new_record?
      - if current_controller?(:tree, :commits)
        = auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}")
      - if current_controller?(:issues)
        = auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues")

  -# Go repository retrieval support.
  - if controller_name == 'projects' && action_name == 'show'
    %meta{name: "go-import", content: "#{@project.web_url_without_scheme} git #{@project.web_url}.git"}


- content_for :use_full_container, true

.page-header
  %h2{:class => "purity-#{@tag.purity}"}
    %span.glyphicon.glyphicon-tag
    = title @tag.name
  - if @tag.category.present?
    %ol.breadcrumb
      - [@tag.category.ancestors, @tag.category].flatten.each do |category|
        %li= link_to category.name, category

= render partial: 'wallpapers/list', locals: { wallpapers: @wallpapers }

Add categories to tag show breadcrumb

- content_for :use_full_container, true

.page-header
  %h2{:class => "purity-#{@tag.purity}"}
    %span.glyphicon.glyphicon-tag
    = title @tag.name
  - if @tag.category.present?
    %ol.breadcrumb
      %li= link_to 'Categories', categories_path
      - [@tag.category.ancestors, @tag.category].flatten.each do |category|
        %li= link_to category.name, category

= render partial: 'wallpapers/list', locals: { wallpapers: @wallpapers }


.manage-kiitos
  .title
    = t 'kiitos.kiitos'
  %ul
    = render @kiitos

Fix issue rendering kiito partial

.manage-kiitos
  .title
    = t 'kiitos.kiitos'
  %ul
    = render partial: 'kiitos/user_dashboard/admin/kiito', collection: @kiitos


- form_for([:admin, @site_option]) do |f|
  = f.label :value
  = fckeditor_textarea("site_option", "value", :toolbarSet => 'Spotus')
  %br/
  = f.submit

Increase width of site options text box

- form_for([:admin, @site_option]) do |f|
  = f.label :value
  = fckeditor_textarea("site_option", "value", :toolbarSet => 'Spotus', :width => '500')
  %br/
  = f.submit


#action_list_div
  #main_div
    = render :partial => 'layouts/gtl', :locals  => {:action_url => "action_get_all", :button_div => 'policy_bar'}

Remove duplicate main_div from control action list view

#action_list_div
  = render :partial => 'layouts/gtl', :locals  => {:action_url => "action_get_all", :button_div => 'policy_bar'}


.row
  .col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1.col-xs-12
    = simple_form_for([@documentable, Document.new],
        :html => {:multipart => true, :class => 'form-vertical' },
        :wrapper => :vertical_form,
        :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
      = f.input :comment, :input_html => {:rows => 3}, :placeholder => 'Enter comment...'
      = f.submit "Add comment", :class => 'btn btn-primary'

Fix incorrect references in Comment form (nothing actually uses this form)

.row
  .col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1.col-xs-12
    = simple_form_for([@commentable, Comment.new],
        :html => {:multipart => true, :class => 'form-vertical' },
        :wrapper => :vertical_form,
        :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
      = f.input :comment, :input_html => {:rows => 3}, :placeholder => 'Enter comment...'
      = f.submit "Add comment", :class => 'btn btn-primary'


%div{ style: 'margin-top:30px;margin-bottom: 30px' }
  = link_to dashboard_path do
    = image_tag 'pats-logo-transparent.png', alt: '', class: 'img-responsive'
%ul.left-menu
  %li.left-menu-header Dashboard
  %li
    = link_to 'Home', dashboard_path, class: (current_page?(dashboard_path) ? 'active' : nil)
  %li
    = link_to 'Directory', directory_path, class: (current_page?(directory_path) ? 'active' : nil)
  %li.left-menu-header Documents
  - Category.current.where(archived: false).each do |category|
    - if category.documents.where(archived: false).present?
      %li= link_to category.name, internal_category_path(category.slug)
  - if current_user.admin?
    %li.left-menu-header Admin
    %li= link_to 'Dashboard', admin_root_path
  - if current_user.editor?
    %li.left-menu-header Editor
    %li= link_to 'Dashboard', editor_path

Set active class for category menu items

%div{ style: 'margin-top:30px;margin-bottom: 30px' }
  = link_to dashboard_path do
    = image_tag 'pats-logo-transparent.png', alt: '', class: 'img-responsive'
%ul.left-menu
  %li.left-menu-header Dashboard
  %li
    = link_to 'Home', dashboard_path, class: (current_page?(dashboard_path) ? 'active' : nil)
  %li
    = link_to 'Directory', directory_path, class: (current_page?(directory_path) ? 'active' : nil)
  %li.left-menu-header Documents
  - Category.current.where(archived: false).each do |category|
    - if category.documents.where(archived: false).present?
      %li
        = link_to category.name, internal_category_path(category.slug), class: (current_page?(internal_category_path(category.slug)) ? 'active' : nil)
  - if current_user.admin?
    %li.left-menu-header Admin
    %li= link_to 'Dashboard', admin_root_path
  - if current_user.editor?
    %li.left-menu-header Editor
    %li= link_to 'Dashboard', editor_path


= render "home_panel"

%div.git-empty
  %fieldset
    %legend Git global setup:
    %pre.dark
      :preserve
        git config --global user.name "#{git_user_name}"
        git config --global user.email "#{git_user_email}"

  %fieldset
    %legend Create Repository
    %pre.dark
      :preserve
        mkdir #{@project.path}
        cd #{@project.path}
        git init
        touch README
        git add README
        git commit -m 'first commit'
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master

  %fieldset
    %legend Existing Git Repo?
    %pre.dark
      :preserve
        cd existing_git_repo
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master

- if can? current_user, :remove_project, @project
  .prepend-top-20
    = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"

Modify empty project instructions to use double quotes for commit msg.

= render "home_panel"

%div.git-empty
  %fieldset
    %legend Git global setup:
    %pre.dark
      :preserve
        git config --global user.name "#{git_user_name}"
        git config --global user.email "#{git_user_email}"

  %fieldset
    %legend Create Repository
    %pre.dark
      :preserve
        mkdir #{@project.path}
        cd #{@project.path}
        git init
        touch README
        git add README
        git commit -m "first commit"
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master

  %fieldset
    %legend Existing Git Repo?
    %pre.dark
      :preserve
        cd existing_git_repo
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master

- if can? current_user, :remove_project, @project
  .prepend-top-20
    = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"


#redaction_box.box
  %h1
    = link_to "Rédaction", '/redaction'
  %ul
    %li
      = link_to "Tribune de rédaction", '/redaction'
    = list_of(News.draft.sorted) do |news|
      - if news.node.board_status(current_account) == :new_board
        = image_tag "/images/icones/chat.png", :alt => "Nouveaux !", :title => "Il y a de l'activité sur cette dépêche"
      = link_to news.title, [:redaction, news]

Fix link to redaction board

#redaction_box.box
  %h1
    = link_to "Rédaction", '/redaction'
  %p
    = link_to "Tribune de rédaction", '/redaction'
  %ul
    = list_of(News.draft.sorted) do |news|
      - if news.node.board_status(current_account) == :new_board
        = image_tag "/images/icones/chat.png", :alt => "Nouveaux !", :title => "Il y a de l'activité sur cette dépêche"
      = link_to news.title, [:redaction, news]


-state = false #f.object.approved?

.row-fluid.object-info
  -if !object.new_record?
    %span
      %strong Created:
      %span #{object.created_at && object.created_at.strftime("%m/%d/%y")}
    %span
      %strong Updated:
      %span.updatedDate #{object.updated_at && object.updated_at.strftime("%m/%d/%y")}
    %span
      %strong Last Editor:
      %span #{object.modified_by.nil? ? 'unknown' : object.modified_by.display_name}
    -if has_feature?(:BETA)
      %span.demoText
        %strong Approved by:
        -if state == 'approved'
          %span.statustextgreen Approved
        -else
          %span.statustextred Not Approved
    -else
      %span
    %span.status
      %h5
        Status:
        %span.statusValue Active
  -else
    %span
      %strong Creator:
      %span #{current_user.display_name}
    %span
    %span.status
      %h5
        Status:
        %span.statusValue Draft
  %span.force-wrap

Remove object status from modal dialog footers

-state = false #f.object.approved?

.row-fluid.object-info
  -if !object.new_record?
    %span
      %strong Created:
      %span #{object.created_at && object.created_at.strftime("%m/%d/%y")}
    %span
      %strong Updated:
      %span.updatedDate #{object.updated_at && object.updated_at.strftime("%m/%d/%y")}
    %span
      %strong Last Editor:
      %span #{object.modified_by.nil? ? 'unknown' : object.modified_by.display_name}
    -if has_feature?(:BETA)
      %span.demoText
        %strong Approved by:
        -if state == 'approved'
          %span.statustextgreen Approved
        -else
          %span.statustextred Not Approved
    -else
      %span
    -#%span.status
      %h5
        Status:
        %span.statusValue Active
  -else
    %span
      %strong Creator:
      %span #{current_user.display_name}
    %span
    -#%span.status
      %h5
        Status:
        %span.statusValue Draft
  %span.force-wrap


:markdown
  Reference:

  - Titles – `#` (biggest), `##` (smaller), `###` (even smaller), ...
  - `*italic*` – *italic*
  - `**bold**` – **bold**
  - `[link](http://example.com)` – [link](http://example.com)
  - `<email@example.com>` – <email@example.com>

  In order to get paragraphs in texts, an additional empty new line is required between
  them.

  **Bad**:

  This is one paragraph.<br>
  This is another paragraph

  **Good**:

  This is one paragraph.

  This is another paragraph

Add dots at the end of paragraphs

:markdown
  Reference:

  - Titles – `#` (biggest), `##` (smaller), `###` (even smaller), ...
  - `*italic*` – *italic*
  - `**bold**` – **bold**
  - `[link](http://example.com)` – [link](http://example.com)
  - `<email@example.com>` – <email@example.com>

  In order to get paragraphs in texts, an additional empty new line is required between
  them.

  **Bad**:

  This is one paragraph.<br>
  This is another paragraph.

  **Good**:

  This is one paragraph.

  This is another paragraph.


%p#notice= notice

%p
  %b Alternate name:
  = @alternate_name.name
%p
  %b Crop:
  = link_to @alternate_name.crop

- if can? :edit, @alternate_name
  = link_to 'Edit', edit_alternate_name_path(@alternate_name), :class => 'btn btn-default btn-xs'
\|
= link_to 'Back', alternate_names_path

Fix link to crop on alternate name page

%p#notice= notice

%p
  %b Alternate name:
  = @alternate_name.name
%p
  %b Crop:
  = link_to @alternate_name.crop, @alternate_name.crop

- if can? :edit, @alternate_name
  = link_to 'Edit', edit_alternate_name_path(@alternate_name), :class => 'btn btn-default btn-xs'
\|
= link_to 'Back', alternate_names_path


-# The phone partial displays the phone icon, number and extension,
  as well as the phone type and department.
  e.g. [icon] (650) 403-4300 x 4385 voice
  If the `show_phone_type_and_department` local variable is set to true
  the partial will also include the phone type and phone department.

- if phone.present?
  %section.phone.icon-text-block{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' }
    %i{ class: phone_icon_for(phone.number_type) }
    %span.annotated-text-block
      %span{ itemprop: phone_microdata_for(phone.number_type) }
        = format_phone(phone.number)
      - if phone.extension.present?
        %span.phone-extension
          %span.delimiter
            = SETTINGS[:phone_extension_delimiter]
          %span.extension
            = phone.extension
      - if show_phone_type_and_department == true
        = render 'component/detail/phone_type_and_department', phone: phone

Add phone_hours field to service entry

-# The phone partial displays the phone icon, number and extension,
  as well as the phone type and department.
  e.g. [icon] (650) 403-4300 x 4385 voice
  If the `show_phone_type_and_department` local variable is set to true
  the partial will also include the phone type and phone department.

- if phone.present?
  %section.phone.icon-text-block{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' }
    %i{ class: phone_icon_for(phone.number_type) }
    %span.annotated-text-block
      %span{ itemprop: phone_microdata_for(phone.number_type) }
        = format_phone(phone.number)
      - if phone.extension.present?
        %span.phone-extension
          %span.delimiter
            = SETTINGS[:phone_extension_delimiter]
          %span.extension
            = phone.extension
      - if show_phone_type_and_department == true
        = render 'component/detail/phone_type_and_department', phone: phone
- if phone.phone_hours.present?
  %span.schedules.regular-schedules.icon-text-block
    %i.fa.fa-clock-o
    %span
      = phone.phone_hours


%li{:id => dom_id_for(section, :container), :class => 'menu' }
  %div{ :id => dom_id_for(section, :item), :class => @investigation.changeable?(current_user) ? 'item movable' : 'item' }
    %div.action_menu
      %div.action_menu_header_left
        =link_to name_for_component(section), section
      %div.action_menu_header_right
        %ul.menu
          - if (section.changeable?(current_user))
            %li= link_to 'duplicate', duplicate_section_url(section)
            / %li= link_to 'edit', section
            / %li.menu=toggle_more section
            %li.menu=link_to_remote 'delete', :confirm => "delete section #{section.name}?", :url => { :controller => 'investigations', :action => 'delete_section', :params => {:id=>section.investigation.id, :section_id => section.id}}, :html => {:class=>"delete"}
    %div{:id => dom_id_for(section, :details), :class => 'content', :style =>'display:block;'}
      = section.description
      %ul.tiny
      - section.pages.each_with_index do |page, i|
        %li.tiny
          = link_to "page: #{i+1}: #{page.name}", page
          %span.tiny= page.description

Fix for error on "add section"

%li{:id => dom_id_for(section, :container), :class => 'menu' }
  %div{ :id => dom_id_for(section, :item), :class => section.investigation.changeable?(current_user) ? 'item movable' : 'item' }
    %div.action_menu
      %div.action_menu_header_left
        =link_to name_for_component(section), section
      %div.action_menu_header_right
        %ul.menu
          - if (section.changeable?(current_user))
            %li= link_to 'duplicate', duplicate_section_url(section)
            / %li= link_to 'edit', section
            / %li.menu=toggle_more section
            %li.menu=link_to_remote 'delete', :confirm => "delete section #{section.name}?", :url => { :controller => 'investigations', :action => 'delete_section', :params => {:id=>section.investigation.id, :section_id => section.id}}, :html => {:class=>"delete"}
    %div{:id => dom_id_for(section, :details), :class => 'content', :style =>'display:block;'}
      = section.description
      %ul.tiny
      - section.pages.each_with_index do |page, i|
        %li.tiny
          = link_to "page: #{i+1}: #{page.name}", page
          %span.tiny= page.description


!!!
%html{:lang => "en"}
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:charset => "utf-8"}/
    %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
    %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
    / The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags
    = csrf_meta_tags
    %title
      - if content_for?(:title)
        = yield(:title)
        \-
      Check Me Out
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    / HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
    / WARNING: Respond.js doesn't work if you view the page via file://
    /[if lt IE 9]
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  %body
    - if content_for?(:title)
      .container
        %h1= yield(:title)

    = yield

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

Add content sections for page style and js

!!!
%html{:lang => "en"}
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:charset => "utf-8"}/
    %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
    %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
    / The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags
    = csrf_meta_tags
    %title
      - if content_for?(:title)
        = yield(:title)
        \-
      Check Me Out
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true

    - if content_for?(:stylesheets)
      = yield(:stylesheets)

    / HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
    / WARNING: Respond.js doesn't work if you view the page via file://
    /[if lt IE 9]
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  %body
    - if content_for?(:title)
      .container
        %h1= yield(:title)

    = yield

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

    - if content_for?(:javascripts)
      = yield(:javascripts)


%tr.nested-form-item[line_item.object]
  %td
  %td= line_item.text_field :title, :required => true, :style => 'width: 30em'
  %td
  %td
  %td
  %td.currency.total_amount= currency_fmt(line_item.object.accounted_amount)
  %td{:colspan => 2}
    .clearfix
      .input-prepend
        .add-on Σ
        = line_item.text_field :reference_code, :class => 'span6'

  %td.action_links
    = line_item.hidden_field :position
    = line_item.hidden_field :code
    = line_item.hidden_field :reference_code
    = line_item.hidden_field :booking_template_id
    = line_item.hidden_field :include_in_saldo_list
    = line_item.hidden_field :date
    = line_item.hidden_field :quantity, :value => 'saldo_of'
    = line_item.hidden_field :times
    = line_item.hidden_field :price
    = line_item.hidden_field :_destroy
    = link_to t_action(:delete), '#', :class => 'icon-delete-text delete-nested-form-item'

Fix too broad field in saldo line items.

%tr.nested-form-item[line_item.object]
  %td
  %td= line_item.text_field :title, :required => true, :style => 'width: 30em'
  %td
  %td
  %td
  %td.currency.total_amount= currency_fmt(line_item.object.accounted_amount)
  %td{:colspan => 2}
    .clearfix
      .input-prepend
        .add-on Σ
        = line_item.text_field :reference_code, :style => 'width: auto'

  %td.action_links
    = line_item.hidden_field :position
    = line_item.hidden_field :code
    = line_item.hidden_field :reference_code
    = line_item.hidden_field :booking_template_id
    = line_item.hidden_field :include_in_saldo_list
    = line_item.hidden_field :date
    = line_item.hidden_field :quantity, :value => 'saldo_of'
    = line_item.hidden_field :times
    = line_item.hidden_field :price
    = line_item.hidden_field :_destroy
    = link_to t_action(:delete), '#', :class => 'icon-delete-text delete-nested-form-item'


%ul.media-list
  - documents.each do |d|
    %li.media
      .well.well-small
        %i.fa.fa-3x.pull-left{:class => get_file_icon_for_filename(d.original_filename)}
        .media-body
          %h5.media-heading
            = "#{d.creator.name} at #{format_as_date_time(d.created_at)}"
            = link_to 'Remove', d, :method => :delete, :class => "btn btn-warning btn-xs pull-right", :style => "margin-left: 5px;", :data => { :confirm => 'Are you sure you want to remove this document?' }
            = link_to 'Download', download_document_path(d), :class => "btn btn-success btn-xs pull-right", :style => "margin-left: 5px;", :data => { :confirm => 'Are you sure you want to download this document?' }
          = d.description.html_safe

Remove confirmation dialog for downloading a linked document

%ul.media-list
  - documents.each do |d|
    %li.media
      .well.well-small
        %i.fa.fa-3x.pull-left{:class => get_file_icon_for_filename(d.original_filename)}
        .media-body
          %h5.media-heading
            = "#{d.creator.name} at #{format_as_date_time(d.created_at)}"
            = link_to 'Remove', d, :method => :delete, :class => "btn btn-warning btn-xs pull-right", :style => "margin-left: 5px;", :data => { :confirm => 'Are you sure you want to remove this document?' }
            = link_to 'Download', download_document_path(d), :class => "btn btn-success btn-xs pull-right", :style => "margin-left: 5px;"
          = d.description.html_safe


.search-result-item.template-result
  .badge
    %img{src: presenter.icon_src}
    = presenter.status_label
  .authority
    %div{:class => presenter.recommended_class}
  .basic-info
    %h3= presenter.title
    %p= presenter.short_description
    %p.microcopy= "Last Updated: #{presenter.updated_at}"
  .actions
    = form_tag applications_path do
      = hidden_field_tag 'application[template_id]', presenter.id
      = button_tag 'Run Template', class: 'button-positive', data: {disable_with: 'Starting App...'}
  .community-data
    .image-count
      %em= presenter.image_count
      = presenter.image_count_label

Add Google Analytics event for running a template

.search-result-item.template-result
  .badge
    %img{src: presenter.icon_src}
    = presenter.status_label
  .authority
    %div{:class => presenter.recommended_class}
  .basic-info
    %h3= presenter.title
    %p= presenter.short_description
    %p.microcopy= "Last Updated: #{presenter.updated_at}"
  .actions
    = form_tag applications_path do
      = hidden_field_tag 'application[template_id]', presenter.id
      %button.button-positive{ data: { disable_with: 'Starting App...', tracking: { method: 'click', action: 'Create Application', category: 'Run Template', label: presenter.title }}} Run Template
  .community-data
    .image-count
      %em= presenter.image_count
      = presenter.image_count_label


%h1#users_dossiers_index Vos dossiers
%br
%br
%table.table
  %thead
    %th Nom du Projet
    %th Etat
    %th Mise à jour
  - @dossiers.each do |dossier|
    %tr
      %td
        = link_to(dossier.nom_projet, users_dossier_recapitulatif_path(dossier))
      %td{id: "dossier_#{dossier.id}_state"}= dossier.state_fr
      %td= dossier.last_update

.pagination
  = will_paginate @dossiers, renderer: BootstrapPagination::Rails

Add procedure name on user dossier list

%h1#users_dossiers_index Vos dossiers
%br
%br
%table.table
  %thead
    %th Procédure
    %th Nom du Projet
    %th Etat
    %th Mise à jour
  - @dossiers.each do |dossier|
    %tr
      %td
        = dossier.procedure.libelle
      %td
        = link_to(dossier.nom_projet, users_dossier_recapitulatif_path(dossier))
      %td{id: "dossier_#{dossier.id}_state"}= dossier.state_fr
      %td= dossier.last_update

.pagination
  = will_paginate @dossiers, renderer: BootstrapPagination::Rails


%h1 Select an Assignment

= form_tag new_course_assignment_path(current_course), method: :get do
  %label{ for: "assignment_source" } Assignment
  = select_tag "assignment_source", options_from_collection_for_select(assignment_options, :fullpath, :pretty_name)
  = submit_tag "Set Milestones"

Make a button look button-y.

%h1 Select an Assignment

= form_tag new_course_assignment_path(current_course), method: :get do
  %label{ for: "assignment_source" } Assignment
  = select_tag "assignment_source", options_from_collection_for_select(assignment_options, :fullpath, :pretty_name)
  = submit_tag "Set Milestones", class: "button"


%footer.copyright-footer
  .footer-left-section#copyright
    %p
      Copyright ©
      %span.year
      Euro Team Outreach, Inc. All rights reserved.
  .footer-secondary-links
    %ul.footer-social
      %li
        = link_to "https://www.facebook.com/euroteamoutreach",
          class: "facebook" do
          = image_tag "facebook-logo-circle.png", alt: "ETO on Facebook"
      %li
        = link_to "https://twitter.com/eto_ukraine",
          class: "twitter" do
          = image_tag "twitter-logo-circle.png", alt: "ETO on Twitter"
      %li
        = link_to "https://github.com/joshukraine/euroteamoutreach.org",
          class: "github" do
          = image_tag "github-logo-circle.png", alt: "View source on GitHub"

Add title elements to social media links

%footer.copyright-footer
  .footer-left-section#copyright
    %p
      Copyright ©
      %span.year
      Euro Team Outreach, Inc. All rights reserved.
  .footer-secondary-links
    %ul.footer-social
      %li
        = link_to "https://www.facebook.com/euroteamoutreach",
          class: "facebook", title: "ETO on Facebook" do
          = image_tag "facebook-logo-circle.png", alt: "ETO on Facebook"
      %li
        = link_to "https://twitter.com/eto_ukraine",
          class: "twitter", title: "ETO on Twitter" do
          = image_tag "twitter-logo-circle.png", alt: "ETO on Twitter"
      %li
        = link_to "https://github.com/joshukraine/euroteamoutreach.org",
          class: "github", title: "View source on GitHub" do
          = image_tag "github-logo-circle.png", alt: "View source on GitHub"


- if @stripe_account = @enterprise.stripe_account
  = t :stripe_account_connected
  = link_to 'Delete', main_app.admin_enterprise_stripe_account_path(@enterprise,@stripe_account), method: :delete
- else
  %a.stripe-connect{href: 'stripe_connect'}
    .stripe-info
      -# Recommended info to impart (from Stripe Connect docs):
      -# indicate to the user what you’re responsible for and what they’ll be expected to do. It’s particularly important to communicate:
      -# That they’ll need to create and maintain their Stripe account.
      -# That they’ll need to handle chargebacks and all customer service issues.
      -# Who is responsible for paying the Stripe fees.
      -# What, if any, fees the platform charges.
      =t :stripe_connect_info
      %span= t :connect_with_stripe

Tidy up (temp) UI a bit

- if @stripe_account = @enterprise.stripe_account
  .stripe-info
    .row
      = t('.stripe_account_connected')
    .row
      %a.button{href: "#{link_to t('.disconnect'), main_app.admin_enterprise_stripe_account_path(@enterprise,@stripe_account), method: :delete}"}
        =t('.disconnect')
- else
  .row.stripe-info
    .six.columns.alpha
      -# Recommended info to impart (from Stripe Connect docs):
      -# indicate to the user what you’re responsible for and what they’ll be expected to do. It’s particularly important to communicate:
      -# That they’ll need to create and maintain their Stripe account.
      -# That they’ll need to handle chargebacks and all customer service issues.
      -# Who is responsible for paying the Stripe fees.
      -# What, if any, fees the platform charges.
      =t('.stripe_connect_info')
    .five.columns.omega.text-right
      %a.stripe-connect{href: 'stripe_connect'}
        %span= t('.connect_with_stripe')


.row
  .col-md-12
    - if @asset.capital_projects.empty?
      %p This asset is not associated with any capital projects
    - else
      = render :partial => 'capital_projects/summary_index_table', :locals => {:projects => @asset.capital_projects.sort_by { |p| -p.fy_year }}

Sort capital projects related to assets by fiscal year, with earliest date first and latest last.

.row
  .col-md-12
    - if @asset.capital_projects.empty?
      %p This asset is not associated with any capital projects
    - else
      = render :partial => 'capital_projects/summary_index_table', :locals => {:projects => @asset.capital_projects.sort_by { |p| p.fy_year }}


= simple_form_for(@survey_assignment) do |f|
  .block.survey-assignments.block--clear.default-form
    = f.error_notification
    .form__row
      %h4 Survey
      = f.select :survey_id, options_from_collection_for_select(Survey.all, 'id', 'name', {:selected => (@survey_assignment.survey.nil? ? nil : @survey_assignment.survey.id)} ), {}, { :data => { :chosen_select => true}}

    .form__row
      %h4 Distribution Target
      = f.select :cohort_ids, options_from_collection_for_select(Cohort.all, 'id', 'title', {:selected => @survey_assignment.cohorts.pluck(:id) }), {}, { :multiple => true,  :data => { :chosen_select => true}}

    .form__row
      = f.label :courses_user_role
      = user_role_select(f)

    .form__row
      %h4 Notification Schedule
      = f.number_field :send_date_days
      = f.label :send_date_days, "Days", class: 'inline-label'
      = f.select :send_before, options_for_select([['Before', true], ['After', false]])
      = f.select :send_date_relative_to, options_for_select(@send_relative_to_options)

    .form__row
      = f.check_box :published
      = f.label :published, "Publish this assignment", class: "inline-label"

    = f.button :submit, :class => "button dark"

Check for survey_id not survey

= simple_form_for(@survey_assignment) do |f|
  .block.survey-assignments.block--clear.default-form
    = f.error_notification
    .form__row
      %h4 Survey
      = f.select :survey_id, options_from_collection_for_select(Survey.all, 'id', 'name', {:selected => (@survey_assignment.survey_id.nil? ? nil : @survey_assignment.survey_id)} ), {}, { :data => { :chosen_select => true}}

    .form__row
      %h4 Distribution Target
      = f.select :cohort_ids, options_from_collection_for_select(Cohort.all, 'id', 'title', {:selected => @survey_assignment.cohorts.pluck(:id) }), {}, { :multiple => true,  :data => { :chosen_select => true}}

    .form__row
      = f.label :courses_user_role
      = user_role_select(f)

    .form__row
      %h4 Notification Schedule
      = f.number_field :send_date_days
      = f.label :send_date_days, "Days", class: 'inline-label'
      = f.select :send_before, options_for_select([['Before', true], ['After', false]])
      = f.select :send_date_relative_to, options_for_select(@send_relative_to_options)

    .form__row
      = f.check_box :published
      = f.label :published, "Publish this assignment", class: "inline-label"

    = f.button :submit, :class => "button dark"


- @title = "Version"

%h1 Version

.text-center{ style: 'margin-top:40px' }
  %p.lead
    Current version
    %strong= Review::VERSION::STRING

Use single quotes when interpolation isn't needed

- @title = 'Version'

%h1 Version

.text-center{ style: 'margin-top:40px' }
  %p.lead
    Current version
    %strong= Review::VERSION::STRING


!!! 5
<!--[if IE 8 ]>    <html lang="en" class="no-js #{ @body_class } ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js #{ @body_class } ie9"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
%head
  <!--<![endif]-->
  %meta{ :charset => "utf-8" }

  %meta{name: "viewport", content: "initial-scale=1.0,user-scalable=no,maximum-scale=1.0"}
  %meta{name: "apple-mobile-web-app-capable", content: "yes"}
  %link{rel: "apple-touch-icon", href: "/assets/conditions.png"}
  %link{rel: "apple-touch-icon", sizes: "114x114", href: "/assets/conditions@2x.png"}
  %link{rel: "shortcut icon", href: "/assets/conditions.png"}

  %title= content_for?(:title) ? yield(:title) : "Untitled"

  = stylesheet_link_tag "application"
  = javascript_include_tag "application"
  = csrf_meta_tag

%body{class: @body_class}
  #header
    .content
      .title
        %h1= yield :title
      .date
        = Date.today.to_s(:long)

  .content
    = yield

Fix reference to asset image to use asset_path.

!!! 5
<!--[if IE 8 ]>    <html lang="en" class="no-js #{ @body_class } ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js #{ @body_class } ie9"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
%head
  <!--<![endif]-->
  %meta{ :charset => "utf-8" }

  %meta{name: "viewport", content: "initial-scale=1.0,user-scalable=no,maximum-scale=1.0"}
  %meta{name: "apple-mobile-web-app-capable", content: "yes"}
  %link{rel: "apple-touch-icon", href: asset_path("conditions.png")}
  %link{rel: "apple-touch-icon", sizes: "114x114", href: asset_path("conditions@2x.png")}
  %link{rel: "shortcut icon", href: asset_path("conditions.png")}

  %title= content_for?(:title) ? yield(:title) : "Untitled"

  = stylesheet_link_tag "application"
  = javascript_include_tag "application"
  = csrf_meta_tag

%body{class: @body_class}
  #header
    .content
      .title
        %h1= yield :title
      .date
        = Date.today.to_s(:long)

  .content
    = yield


= form_tag('/organizations', :method => :get, :id=>"search-form") do
  %section#search-box
    %div
      %section#keyword-search-box>
        %label{:for => "keyword"}
          I need...
        = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords"
        - cache ['keywords-list', *cip_keywords] do
          %datalist#search-keywords
            <!--[if IE 8]><select disabled style="display:none"><![endif]-->
            - cip_keywords.each do |keyword|
              %option{:value=>keyword}
                = keyword
            <!--[if IE 8]> </select> <![endif]-->
        = hidden_field_tag "service_area", "smc"
        = hidden_field_tag "kind", "Human Services"

      %button.big-btn{:type=>'submit',:id=>'find-btn', :title=>"Search"}
        %i{:class=>"fa fa-search"}
        %span Search

Debug - test text to check page changes

= form_tag('/organizations', :method => :get, :id=>"search-form") do
  %section#search-box
    %div
      %section#keyword-search-box>
        %label{:for => "keyword"}
          I need...
        = search_field_tag :keyword, params[:keyword], :placeholder => "what are you looking for?", :list => "search-keywords"
        <b>TEST</b>
        - cache ['keywords-list', *cip_keywords] do
          %datalist#search-keywords
            <!--[if IE 8]><select disabled style="display:none"><![endif]-->
            - cip_keywords.each do |keyword|
              %option{:value=>keyword}
                = keyword
            <!--[if IE 8]> </select> <![endif]-->
        = hidden_field_tag "service_area", "smc"
        = hidden_field_tag "kind", "Human Services"

      %button.big-btn{:type=>'submit',:id=>'find-btn', :title=>"Search"}
        %i{:class=>"fa fa-search"}
        %span Search


%h3.page-title
  %i.icon-code-fork
  New branch
= form_tag project_branches_path, method: :post, class: "form-horizontal" do
  .form-group
    = label_tag :branch_name, 'Name for new branch', class: 'control-label'
    .col-sm-10
      = text_field_tag :branch_name, nil, placeholder: 'feature/dashboard', required: true, tabindex: 1, class: 'form-control'
  .form-group
    = label_tag :ref, 'Create from', class: 'control-label'
    .col-sm-10
      = text_field_tag :ref, nil, placeholder: 'master', required: true, tabindex: 2, class: 'form-control'
      .light branch name or commit SHA
  .form-actions
    = submit_tag 'Create branch', class: 'btn btn-create', tabindex: 3
    = link_to 'Cancel', project_branches_path(@project), class: 'btn btn-cancel'

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#ref").autocomplete({
    source: availableTags,
    minLength: 1
  });

Replace hints with text that is obviously not valid.

%h3.page-title
  %i.icon-code-fork
  New branch
= form_tag project_branches_path, method: :post, class: "form-horizontal" do
  .form-group
    = label_tag :branch_name, 'Name for new branch', class: 'control-label'
    .col-sm-10
      = text_field_tag :branch_name, nil, placeholder: 'branch name, tag or commit SHA', required: true, tabindex: 1, class: 'form-control'
  .form-group
    = label_tag :ref, 'Create from', class: 'control-label'
    .col-sm-10
      = text_field_tag :ref, nil, placeholder: 'branch name, tag or commit SHA', required: true, tabindex: 2, class: 'form-control'
  .form-actions
    = submit_tag 'Create branch', class: 'btn btn-create', tabindex: 3
    = link_to 'Cancel', project_branches_path(@project), class: 'btn btn-cancel'

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#ref").autocomplete({
    source: availableTags,
    minLength: 1
  });


- plugins = Gitlab::Plugin.files

.row.prepend-top-default
  .col-lg-4
    %h4.prepend-top-0
      Plugins
    %p
      #{link_to 'Plugins', help_page_path('administration/plugins')} are similar to
      system hooks but can be are executed as files instead of URL.

  .col-lg-8.append-bottom-default
    - if plugins.any?
      %ul.content-list
        - plugins.each do |file|
          %li
            = boolean_to_icon true
            = File.basename(file)
    - else
      %p.light-well.text-center
        No plugins found.

Remove boolean icons from plugins page

- plugins = Gitlab::Plugin.files

.row.prepend-top-default
  .col-lg-4
    %h4.prepend-top-0
      Plugins
    %p
      #{link_to 'Plugins', help_page_path('administration/plugins')} are similar to
      system hooks but can be are executed as files instead of URL.

  .col-lg-8.append-bottom-default
    - if plugins.any?
      %ul.content-list
        - plugins.each do |file|
          %li
            = File.basename(file)
    - else
      %p.light-well.text-center
        No plugins found.


%h1.title Edit roster

= form_for @roster do |f|
  .form-group
    = f.label :name
    = f.text_field :name, class: 'form-control'
  .form-group
    = f.label :fallback_user
    .vert-center
      = f.select :fallback_user_id,
        options_from_collection_for_select(@users, :id, :last_name),
       {}, class: 'form-control custom-select'
  .form-group
    = f.submit 'Save', class: 'btn btn-primary'

Fix fallback user select box:

%h1.title Edit roster

= form_for @roster do |f|
  .form-group
    = f.label :name
    = f.text_field :name, class: 'form-control'
  .form-group
    = f.label :fallback_user
    = f.collection_select :fallback_user_id, @users, :id, :last_name,
      { include_blank: true }, class: 'form-control custom-select'
  .form-group
    = f.submit 'Save', class: 'btn btn-primary'


- if current_user.plan == plan
  %strong You're awesome!
  This is what you're already signed up to
- else
  = button_tag plan_change_word(current_user.plan, plan),
               class: "btn btn-default btn-lg",
               data: {key: Rails.configuration.stripe[:publishable_key],
                      description: description,
                      amount: amount,
                      email: current_user.email,
                      plan_id: plan.stripe_plan_id,
                      stripe: !current_user.supporter? }

Make for minimal display of what level we're signed up for

- if current_user.plan == plan
  = button_tag class: "btn btn-default btn-lg", disabled: true do
    %i.fa.fa-check.text-success
    Signed up
- else
  = button_tag plan_change_word(current_user.plan, plan),
               class: "btn btn-default btn-lg",
               data: {key: Rails.configuration.stripe[:publishable_key],
                      description: description,
                      amount: amount,
                      email: current_user.email,
                      plan_id: plan.stripe_plan_id,
                      stripe: !current_user.supporter? }


.projet
  .contenu
    = link_to '', projet_path(projet), class: 'clic-fiche'
    %h2= projet.titre
    %h4= projet.objectif
    %p= projet.description.truncate(120)
  .bandeau
    %p Emilien A.

Fix - méthode truncate undefined sur nil

.projet
  .contenu
    = link_to '', projet_path(projet), class: 'clic-fiche'
    %h2= projet.titre
    %h4= projet.objectif
    %p= projet.description.try(:truncate, 120)
  .bandeau
    %p Emilien A.


.main
  .avatar
    %img{ src: gravatar_url_small }

  %h1= data.me.full_name
  .container
    %p
      #{data.me.long_description_non_work}. I'm also a #{data.work.job_title.downcase} at&nbsp
      %a{ href: data.work.url, target: '_blank' }>= data.work.name
      , #{data.work.short_description}.

  = partial '/partials/icons'

  / scripts
  %script{ src: '/assets/javascripts/all.js' }

Add async attribute to script tag

.main
  .avatar
    %img{ src: gravatar_url_small }

  %h1= data.me.full_name
  .container
    %p
      #{data.me.long_description_non_work}. I'm also a #{data.work.job_title.downcase} at&nbsp
      %a{ href: data.work.url, target: '_blank' }>= data.work.name
      , #{data.work.short_description}.

  = partial '/partials/icons'

  / scripts
  %script{ async: true, src: '/assets/javascripts/all.js' }


.sitemap
  %div
    %h4 Ideas
    %ul.nav.map
      %li= link_to "Share Your Idea", root_url
      %li= link_to "What's Hot", idea_search_path(:search => 'hot')
      %li= link_to 'Recent Ideas', idea_search_path(:search => 'recent')
      %li= link_to 'Nearby Ideas', map_path
  %div
    %h4 Look Around
    %ul.nav.map
      %li= link_to 'Comments', comments_path
      %li= link_to 'Tags', tags_path
  %div
    %h4 Get to Know Us
    %ul.nav.map
      %li= link_to "About BBYIDX", home_path('about')
      %li= link_to "Contact", home_path('contact')
%ul.nav.supp
  %li= link_to "Terms of Use", home_path('terms-of-use')
%p.credit
  Powered by
  = link_to "Best Buy", "http://bestbuy.com", :target => "_blank"
  and
  = link_to "Bust Out Solutions", "http://bustoutsolutions.com", :target => "_blank"
  using
  = link_to "Ruby on Rails", "http://rubyonrails.org", :target => "_blank"
  \.
.error
  %b Replace text in app/views/custom/* with your own company-specific info.

Fix broken links from old template

.sitemap
  %div
    %h4 Ideas
    %ul.nav.map
      %li= link_to "Share Your Idea", root_url
      %li= link_to "What's Hot", search_ideas_path(:search => 'hot')
      %li= link_to 'Recent Ideas', search_ideas_path(:search => 'recent')
  %div
    %h4 Look Around
    %ul.nav.map
      %li= link_to 'Currets', currents_path
      %li= link_to 'Tags', tags_path
  %div
    %h4 Get to Know Us
    %ul.nav.map
      %li= link_to "About BBYIDX", home_about_path
      %li= link_to "Contact", home_contact_path
%ul.nav.supp
  %li= link_to "Terms of Use", home_path('terms-of-use')
%p.credit
  Powered by
  = link_to "Best Buy", "http://bestbuy.com", :target => "_blank"
  and
  = link_to "Bust Out Solutions", "http://bustoutsolutions.com", :target => "_blank"
  using
  = link_to "Ruby on Rails", "http://rubyonrails.org", :target => "_blank"
  \.
.error
  %b Replace text in app/views/custom/* with your own company-specific info.


= render "layouts/manage/page_title", title: "Hackathon Configuration"

.row
  .col-lg-6
    .card
      .card-body
        %h5.card-title Hackathon Manager Config
        %h6.card-subtitle.mb-2.text-muted
          Hackathon Manager configuration can be changed in the source code at
          %code config/hackathon.yml
          \.
        %hr
        - Rails.configuration.hackathon.keys.each do |key|
          %p
            %b #{key}:
            %pre= Rails.configuration.hackathon[key]

  .col-lg-6
    .card
      .card-body
        %h5.card-title Environment Variables
        %h6.card-subtitle.mb-2.text-muted
          Environment variables are configured on the production server.
        %hr
        %p
          %b Carpool Link:
          %pre= ENV['CARPOOL_LINK'] || '[No value]'
        %p
          %b Slack Sign Up URL:
          %pre= ENV['SLACK_SIGNUP_URL'] || '[No value]'
        %p
          %b AWS S3 Bucket for Resumes:
          %pre= ENV['AWS_BUCKET'] || '[No value]'

Fix spacing of config page

= render "layouts/manage/page_title", title: "Hackathon Configuration"

.row
  .col-lg-6.mb-3
    .card
      .card-body
        %h5.card-title Hackathon Manager Config
        %h6.card-subtitle.mb-2.text-muted
          Hackathon Manager configuration can be changed in the source code at
          %code config/hackathon.yml
          \.
        %hr
        - Rails.configuration.hackathon.keys.each do |key|
          %p
            %b #{key}:
            %pre= Rails.configuration.hackathon[key]

  .col-lg-6.mb-3
    .card
      .card-body
        %h5.card-title Environment Variables
        %h6.card-subtitle.mb-2.text-muted
          Environment variables are configured on the production server.
        %hr
        %p
          %b Carpool Link:
          %pre= ENV['CARPOOL_LINK'] || '[No value]'
        %p
          %b Slack Sign Up URL:
          %pre= ENV['SLACK_SIGNUP_URL'] || '[No value]'
        %p
          %b AWS S3 Bucket for Resumes:
          %pre= ENV['AWS_BUCKET'] || '[No value]'


= contextual_links

%h1= t_title

= paginated_section collection do
  = render 'list'

= render 'sidebar'

Revert "No need to use invoices in sidebar partial path."

= contextual_links

%h1= t_title

= paginated_section collection do
  = render 'list'

= render 'invoices/sidebar'


- content_for :title do
  Pairing stats over past #{number_with_delimiter @days} days

%table.table.table-condensed.text-center
  - authors  = @pairs.keys.sort
  %tr
    %td
    - authors.each do |pairee|
      %th.text-center
        -# need inner container for tooltip, otherwise cell will resize on hover
        .pairee{ data: { toggle: 'tooltip' }, title: pairee }
          &= pairee.scan(/\b\w/).join
  - authors.each do |pairer|
    %tr
      %th.text-right
        -# need inner container for tooltip, otherwise cell will resize on hover
        .pairer{ data: { toggle: 'tooltip' }, title: pairer }
          &= pairer.scan(/\b\w/).join
      - authors.each do |pairee|
        - solo = pairer == pairee
        - alpha = @pairs[pairer][pairee].to_f / (solo ? @max_solo : @max_pair) * 0.5
        %td{ style: "background: rgba(0, #{solo ? 80 : 255}, #{solo ? 255 : 0}, #{alpha});" }
          - if @pairs[pairer][pairee] > 0
            -# need inner container for tooltip, otherwise cell will resize on hover
            .count{ data: { toggle: 'tooltip' }, title: solo ? pairee : "#{pairee} & #{pairer}" }
              = number_with_delimiter @pairs[pairer][pairee]
          - else

Add thead element to pairing matrix

- content_for :title do
  Pairing stats over past #{number_with_delimiter @days} days

%table.table.table-condensed.text-center
  - authors  = @pairs.keys.sort
  %thead
    %tr
      %td
      - authors.each do |pairee|
        %th.text-center
          -# need inner container for tooltip, otherwise cell will resize on hover
          .pairee{ data: { toggle: 'tooltip' }, title: pairee }
            &= pairee.scan(/\b\w/).join
  - authors.each do |pairer|
    %tr
      %th.text-right
        -# need inner container for tooltip, otherwise cell will resize on hover
        .pairer{ data: { toggle: 'tooltip' }, title: pairer }
          &= pairer.scan(/\b\w/).join
      - authors.each do |pairee|
        - solo = pairer == pairee
        - alpha = @pairs[pairer][pairee].to_f / (solo ? @max_solo : @max_pair) * 0.5
        %td{ style: "background: rgba(0, #{solo ? 80 : 255}, #{solo ? 255 : 0}, #{alpha});" }
          - if @pairs[pairer][pairee] > 0
            -# need inner container for tooltip, otherwise cell will resize on hover
            .count{ data: { toggle: 'tooltip' }, title: solo ? pairee : "#{pairee} & #{pairer}" }
              = number_with_delimiter @pairs[pairer][pairee]
          - else


= image_tag('fully_funded.png')
.small.uppcased_button_text
  .fully_funded_no_text This News Item is Fully Funded!
  .double_content_border

Clean up layout of fully-funded donation widget

= image_tag('fully_funded.png', :alt => 'This News Item is Fully Funded!')


%h1
  Closed merge requests for #{@project.name}
%p
  There #{@total > 1 ? 'are' : 'is'} a total of #{pluralize(@total, 'merge request')}
  #{search_request? ? 'found' : 'closed'},
  but better worry about the #{link_to 'pending code reviews', project_merge_requests_path(@project)}.
= render partial: 'search'
= render partial: 'list', locals: { mrs: @mrs, title: ['Finished review', 'Finished reviews'] }

Fix stupid bug when nothing was found in a search.

%h1
  Closed merge requests for #{@project.name}
%p
  There #{@total > 1 ? 'are' : 'is'} a total of #{pluralize(@total, 'merge request')}
  #{search_request? ? 'found' : 'closed'},
  but better worry about the #{link_to 'pending code reviews', project_merge_requests_path(@project)}.
= render partial: 'search'
= render partial: 'list', locals: { mrs: @mrs,
                                    title: ['Finished review', 'Finished reviews'],
                                    on_empty: 'Nothing found' }