.post

  %h3.title
    = link_to post.title, post

  %p.meta
    %span.date
      #{post.created_at.day} de #{I18n.t('date.month_names')[post.created_at.month.to_i]} de #{post.created_at.year}
    %span.comments
      Comentarios:
      = link_to post.comments.visible_by(current_user).count, post_path(post, :anchor => "comments")
    - if can? :update, post
      %span.edit= link_to "Editar", edit_admin_post_path(post)
    %span.share
      %span.twitter-share= tweet_button_for post
      %span.facebook-share= fb_like_button_for post

  .audios
    = render post.audios
    = render post.media

  .content
    - if post.content?
      = markdown_format post.content, :filter_html => false

  - if can?(:update, Post) && post.pending?
    %p.meta
      = link_to "Aprobar contribución", approve_contribution_admin_post_path(post)
      (Enviado por #{link_to post.contributor.alias, post.contributor})

Add contributor to post view

.post

  %h3.title
    = link_to post.title, post

  %p.meta
    %span.date
      #{post.created_at.day} de #{I18n.t('date.month_names')[post.created_at.month.to_i]} de #{post.created_at.year}
    %span.comments
      Comentarios:
      = link_to post.comments.visible_by(current_user).count, post_path(post, :anchor => "comments")
    - if can? :update, post
      %span.edit= link_to "Editar", edit_admin_post_path(post)
    %span.share
      %span.twitter-share= tweet_button_for post
      %span.facebook-share= fb_like_button_for post
    - if post.contributor
      %span.contribution
        %br/
        (contribución de #{link_to post.contributor.alias, user_url(post.contributor)})

  .audios
    = render post.audios
    = render post.media

  .content
    - if post.content?
      = markdown_format post.content, :filter_html => false

  - if can?(:update, Post) && post.pending?
    %p.meta
      = link_to "Aprobar contribución", approve_contribution_admin_post_path(post)
      (Enviado por #{link_to post.contributor.alias, post.contributor})


- url = @user.new_record? ? user_path : user_path(@user)
= semantic_form_for(@user, :url => url) do |form|
  = form.inputs do
    = form.input :name
    = form.input :email
    = form.input :password
    = form.input :password_confirmation
    = form.input :profile
    = form.input :image
    = form.input :team, :collection => Team.all
  = form.buttons do
    = form.commit_button
    %li.button.cancel
      %input{ :type => 'submit', :name => 'cancel', :value => 'Cancel' }

Change field types on user form

- url = @user.new_record? ? user_path : user_path(@user)
= semantic_form_for(@user, :url => url) do |form|
  = form.inputs do
    = form.input :name
    = form.input :email
    = form.input :password
    = form.input :password_confirmation
    = form.input :profile, :as => :text
    = form.input :image
    = form.input :team, :collection => Team.all
  = form.buttons do
    = form.commit_button
    %li.button.cancel
      %input{ :type => 'submit', :name => 'cancel', :value => 'Cancel' }


%div.modal-centered{ "ng-if" => "::enterprise.twitter || enterprise.facebook || enterprise.linkedin || enterprise.instagram"}
  %p.modal-header {{'follow' | t}}
  .follow-icons
    %span{"ng-if" => "::enterprise.twitter"}
      %a{"ng-href" => "http://twitter.com/{{::enterprise.twitter}}", target: "_blank"}
        %i.ofn-i_041-twitter

    %span{"ng-if" => "::enterprise.facebook"}
      %a{"ng-href" => "http://{{::enterprise.facebook | stripUrl}}", target: "_blank"}
        %i.ofn-i_044-facebook

    %span{"ng-if" => "::enterprise.linkedin"}
      %a{"ng-href" => "http://{{::enterprise.linkedin | stripUrl}}", target: "_blank"}
        %i.ofn-i_042-linkedin

    %span{"ng-if" => "::enterprise.instagram"}
      %a{"ng-href" => "http://instagram.com/{{::enterprise.instagram}}", target: "_blank"}
        %i.ofn-i_043-instagram

Update follow partial to reflect social urls correctly

%div.modal-centered{ "ng-if" => "::enterprise.twitter || enterprise.facebook || enterprise.linkedin || enterprise.instagram"}
  %p.modal-header {{'follow' | t}}
  .follow-icons
    %span{"ng-if" => "::enterprise.twitter"}
      %a{"ng-href" => "http://www.twitter.com/{{::enterprise.twitter}}", target: "_blank"}
        %i.ofn-i_041-twitter

    %span{"ng-if" => "::enterprise.facebook"}
      %a{"ng-href" => "http://{{::enterprise.facebook | stripUrl}}", target: "_blank"}
        %i.ofn-i_044-facebook

    %span{"ng-if" => "::enterprise.linkedin"}
      %a{"ng-href" => "http://{{::enterprise.linkedin | stripUrl}}", target: "_blank"}
        %i.ofn-i_042-linkedin

    %span{"ng-if" => "::enterprise.instagram"}
      %a{"ng-href" => "http://www.instagram.com/{{::enterprise.instagram}}", target: "_blank"}
        %i.ofn-i_043-instagram


- if @asset.depreciable
  %fieldset
    %legend.panel-legend Depreciation
    = format_field("Book Value", format_as_currency(@asset.book_value))
    = format_field("Current Depreciation Date", format_as_date(@asset.current_depreciation_date))

Tweak summary info for assets

- if @asset.depreciable
  = format_field("Book Value", format_as_currency(@asset.book_value))


.title
  Lead Scoring

.list
  = form_for :lead_scoring_rules do |f|
    %ul#lead_scoring_rules
      - @lead_scoring_rules.each_with_index do |rule, i|
        = f.fields_for i.to_s, rule do |r|
          = render "form", :r => r, :index => i

    .buttonbar.lead_scoring_buttons
      = add_lead_scoring_rule_button(f)
      .save_or_cancel
        = submit_tag 'Save', :name => :save
        #{t :or}
        = link_to "Cancel", admin_lead_scoring_index_path

Add observed_cloudfuji_events javascript array for input autocomplete

:javascript
  var observed_cloudfuji_events = #{Cloudfuji::Data.observed_events.map(&:to_s).inspect};

.title
  Lead Scoring

.list
  = form_for :lead_scoring_rules do |f|
    %ul#lead_scoring_rules
      - @lead_scoring_rules.each_with_index do |rule, i|
        = f.fields_for i.to_s, rule do |r|
          = render "form", :r => r, :index => i

    .buttonbar.lead_scoring_buttons
      = add_lead_scoring_rule_button(f)
      .save_or_cancel
        = submit_tag 'Save', :name => :save
        #{t :or}
        = link_to "Cancel", admin_lead_scoring_index_path


- if ep && ep.size > 0
  .error-summary{role: "group", 'aria-labelledby': "error-summary-heading", tabindex:'-1'}
    %h1.heading-medium.error-summary-heading{id: 'error-summary-heading'}
      = "#{t('.prohibited_save')} #{pluralize(ep.size, t('.error'))}"

    %span.form-hint
      = t('shared.errors.form_error_hint')

    %ul.error-summary-list
      - ep.header_errors.sort_by { |error| error.attribute }.each do |error_detail|
        %li
          = error_detail.long_message_link

Sort orders according to custom sequence in error_messages.yml

- if ep && ep.size > 0
  .error-summary{role: "group", 'aria-labelledby': "error-summary-heading", tabindex:'-1'}
    %h1.heading-medium.error-summary-heading{id: 'error-summary-heading'}
      = "#{t('.prohibited_save')} #{pluralize(ep.size, t('.error'))}"

    %span.form-hint
      = t('shared.errors.form_error_hint')

    %ul.error-summary-list
      - ep.header_errors.each do |error_detail|
        %li
          = error_detail.long_message_link


---
layout: default
title: Blog archives
---

.blog.archives
  .wrapper
    .section
      %ul
        - blog.articles.each do |post|
          %li
            = link_to post.url do
              = post.title
            - if post.date
              %time
                = post.date.to_time.strftime '%b %e, %Y'

Add the letter signup layout in the blog archives page

---
layout: default
title: Blog archives
---

.blog.archives
  .wrapper
    = partial "includes/newsletter-signup.html"
    .section
      %ul
        - blog.articles.each do |post|
          %li
            = link_to post.url do
              = post.title
            - if post.date
              %time
                = post.date.to_time.strftime '%b %e, %Y'
    = partial "includes/newsletter-signup.html"


%h1 Newsletters

%div.row
  %ul.block-grid-md-4.block-grid-sm-2
    - @newsletters.each do |newsletter|
      %li
        = link_to newsletter do
          = image_tag attachment_url(newsletter, :featured_image, :fill, 300, 300, format: "jpg")
        %h2
          = link_to newsletter.name, newsletter
        = link_to 'Learn more', newsletter.url, class: 'btn btn-block btn-lg btn-primary'
        = newsletter.description
  %br

  = link_to 'New Newsletter', new_newsletter_path

Set up the newsletter set up

%div.row
  %h1
    = params[:tag].capitalize.html_safe
    Newsletters

  %ul.block-grid-md-4.block-grid-sm-2
    - @newsletters.each do |newsletter|
      %li
        = link_to newsletter do
          = image_tag attachment_url(newsletter, :featured_image, :fill, 300, 300, format: "jpg")
        %h2
          = link_to newsletter.name, newsletter
        = link_to 'Learn more', newsletter.url, class: 'btn btn-block btn-lg btn-primary'
        = newsletter.description
  %br
  - if current_user && current_user.is_admin?
    = link_to 'New Newsletter', new_newsletter_path


= simple_form_for @user do |f|
  = f.input :login if @user.respond_to? :login
  = f.input :email
  = f.input :password, :hint => !f.object.new_record?, :input_html => {:autocomplete => "off"}
  = f.input :password_confirmation
  = f.input :current_password, :required => true unless can?(:manage, User)
  = f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple'}, :required => true if can?(:manage, Role)

  = f.button :submit

Use proper bootstrap markup for users/form.

= simple_form_for @user do |f|
  .row-fluid
    .span6= f.input :login if @user.respond_to? :login
    .span6= f.input :email
  .row-fluid
    .span6= f.input :password, :hint => !f.object.new_record?, :input_html => {:autocomplete => "off"}
    .span6= f.input :password_confirmation
  - unless can?(:manage, User)
    .row-fluid
      .span6= f.input :current_password, :required => true
  .row-fluid
    .span6= f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple'}, :required => true if can?(:manage, Role)

  .form-actions
    = f.button :submit


- content_for :page_title do
  = Spree.t(:editing_shipping_method)
- content_for :page_actions do
  %li
    = button_link_to t(:new), spree.new_admin_shipping_method_path, :icon => 'icon-plus'
  %li
    = button_link_to Spree.t(:back_to_shipping_methods_list), spree.admin_shipping_methods_path, :icon => 'icon-arrow-left'
%div
  = render :partial => 'spree/shared/error_messages', :locals => { :target => @shipping_method }
%div
  = form_for [:admin, @shipping_method] do |f|
    %fieldset.no-border-top
      = render :partial => 'form', :locals => { :f => f }
      .one.column
      = render :partial => 'spree/admin/shared/hubs_sidebar', :locals => { f: f, klass: :shipping_method }
      .clear
      %div
        = render :partial => 'spree/admin/shared/edit_resource_links'

Change to new ruby hash syntax

- content_for :page_title do
  = Spree.t(:editing_shipping_method)
- content_for :page_actions do
  %li
    = button_link_to t(:new), spree.new_admin_shipping_method_path, icon: 'icon-plus'
  %li
    = button_link_to Spree.t(:back_to_shipping_methods_list), spree.admin_shipping_methods_path, icon: 'icon-arrow-left'
%div
  = render partial: 'spree/shared/error_messages', locals: { target: @shipping_method }
%div
  = form_for [:admin, @shipping_method] do |f|
    %fieldset.no-border-top
      = render partial: 'form', locals: { f: f }
      .one.column
      = render partial: 'spree/admin/shared/hubs_sidebar', locals: { f: f, klass: :shipping_method }
      .clear
      %div
        = render partial: 'spree/admin/shared/edit_resource_links'


- heroes.each do |hero|
  %a{:href => short_hero_path(hero)}
    = image_tag(hero.avatar_url, :alt => hero.login, :class => 'hero-shot')

Add the hero name as the title

- heroes.each do |hero|
  %a{:href => short_hero_path(hero)}
    = image_tag(hero.avatar_url, :alt => hero.login, :class => 'hero-shot', :title => hero.name)


= form_tag search_path, method: 'get' do
  = search_field_tag 'query[keywords]'
  = submit_tag 'search'

Use symbol for a constant value

= form_tag search_path, method: :get do
  = search_field_tag 'query[keywords]'
  = submit_tag 'search'


= form.text_field :value,
  placeholder: champ.libelle,
  class: 'small-margin',
  data: { siret: champs_siret_path(format: :js, champ_id: champ) },
  required: champ.mandatory?
.spinner.right-spinner
%div{ id: "etablissement-for-#{champ.id}" }
  - if champ.etablissement.present?
    = render partial: 'shared/dossiers/editable_champs/etablissement_titre', locals: { etablissement: champ.etablissement }
  = form.fields_for :etablissement do |form|
    = render partial: 'shared/dossiers/editable_champs/etablissement', locals: { form: form, signature: champ.etablissement.sign }

Disable Champ SIRET autocomplete for previews

= form.text_field :value,
  placeholder: champ.libelle,
  class: 'small-margin',
  data: { siret: champ.persisted? ? champs_siret_path(format: :js, champ_id: champ) : nil },
  required: champ.mandatory?
.spinner.right-spinner
%div{ id: "etablissement-for-#{champ.id}" }
  - if champ.etablissement.present?
    = render partial: 'shared/dossiers/editable_champs/etablissement_titre', locals: { etablissement: champ.etablissement }
  = form.fields_for :etablissement do |form|
    = render partial: 'shared/dossiers/editable_champs/etablissement', locals: { form: form, signature: champ.etablissement.sign }


.row
  .col-md-2
    %h2
      = link_to help_path, class: 'btn btn-default btn-xs' do
        =icon 'angle-left'
        = t 'help.back'
      %span.pull-right API
    %hr

    #ul.nav.nav-pills.nav-stacked
      - %w(README tenants appliance_types port_mapping_templates endpoints port_mapping_properties appliance_configuration_templates appliance_sets appliances appliance_configuration_instances http_mappings virtual_machines virtual_machine_templates port_mappings dev_mode_property_sets user_keys security_proxies security_policies users appliance_endpoints virtual_machine_flavors).sort.each do |file|
        = nav_tab :category, file do
          = link_to file.titleize, help_api_file_path(file)
  .col-md-10
    = preserve do
      = markdown File.read(@doc_file)

Fix compute site help page

.row
  .col-md-2
    %h2
      = link_to help_path, class: 'btn btn-default btn-xs' do
        =icon 'angle-left'
        = t 'help.back'
      %span.pull-right API
    %hr

    #ul.nav.nav-pills.nav-stacked
      - %w(README compute_sites appliance_types port_mapping_templates endpoints port_mapping_properties appliance_configuration_templates appliance_sets appliances appliance_configuration_instances http_mappings virtual_machines virtual_machine_templates port_mappings dev_mode_property_sets user_keys security_proxies security_policies users appliance_endpoints virtual_machine_flavors).sort.each do |file|
        = nav_tab :category, file do
          = link_to file.titleize, help_api_file_path(file)
  .col-md-10
    = preserve do
      = markdown File.read(@doc_file)


= form_for @entry do |f|
  - @attributes_for_form.each do |attribute|
    %fieldset.form-group
      = f.label @resource.human_attribute_name(attribute.name)
      = render attribute.form_partial_path, f: f, entry: @entry, attribute: attribute
  %fieldset.form-group
    = f.submit 'Submit', class: 'btn btn-primary'
    = link_to 'Back', send("#{ @resource.model_name.route_key }_path"),
      class: 'btn btn-secondary-outline'
    - if @entry.persisted?
      = link_to 'Delete', send("#{ @resource.model_name.element }_path", @entry),
        class: 'btn btn-danger-outline pull-md-right', method: :delete,
        data: { confirm: 'Are you sure?' }

Fix back and delete links for resources form

= form_for @entry do |f|
  - @attributes_for_form.each do |attribute|
    %fieldset.form-group
      = f.label @resource.human_attribute_name(attribute.name)
      = render attribute.form_partial_path, f: f, entry: @entry, attribute: attribute
  %fieldset.form-group
    = f.submit 'Submit', class: 'btn btn-primary'
    = link_to 'Back', polymorphic_path(@resource),
      class: 'btn btn-secondary-outline'
    - if @entry.persisted?
      = link_to 'Delete', polymorphic_path(@entry),
        class: 'btn btn-danger-outline pull-md-right', method: :delete,
        data: { confirm: 'Are you sure?' }


.auth__form
  %h2= I18n.t 'auth.forgot.link'

  = simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
    = devise_error_messages!
    = f.input :email, autofocus: true, required: true
    = f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'

  = render "users/shared/links"

Remove generic devise error message

.auth__form
  %h2= I18n.t 'auth.forgot.link'

  = simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
    = f.input :email, autofocus: true, required: true
    = f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'

  = render "users/shared/links"


- present(@claim) do |claim|
  %h1.page-title
    = t('.thanks')

  %p
    = t('.will_be_processed')

  %h2
    =t('.claim_summary')

  %p
    =t('.fees_summary')
    = claim.fees_total

  %p
    =t('.expenses_total')
    = claim.expenses_total

  - if claim.apply_vat?
    %p
      =t('.vat_amount')
      = claim.vat_amount

  %h2
    = t('.total')
    = claim.total_inc_vat

  %p
    = link_to t('link.file_another_claim'), new_advocates_claim_path, class: 'button'

    = t('common.or')

    = link_to t('link.view_claim'), advocates_root_url, class: 'button'

Add feedback message on the confirmation page

- present(@claim) do |claim|
  %h1.page-title
    = t('.thanks')

  %p
    = t('.will_be_processed')

  %h2
    =t('.claim_summary')

  %p
    =t('.fees_summary')
    = claim.fees_total

  %p
    =t('.expenses_total')
    = claim.expenses_total

  - if claim.apply_vat?
    %p
      =t('.vat_amount')
      = claim.vat_amount

  %h2
    = t('.total')
    = claim.total_inc_vat

  %p
    = link_to "Please could you spare 2 minutes of your time to complete two questions. This will help us improve this service for you.", new_feedback_path

  %p
    = link_to t('link.file_another_claim'), new_advocates_claim_path, class: 'button'

    = t('common.or')

    = link_to t('link.view_claim'), advocates_root_url, class: 'button'


.page-header
  %h1 All edits made in the last week

- history = (PaperTrail::Version.where("created_at > ?", 1.week.ago) + WikiMotion.where("edit_date > ?", 1.week.ago)).sort_by{|v| -v.created_at.to_i}

%ul
  - history.each do |version|
    %li
      - if version.kind_of?(WikiMotion)
        Changed text on
        = link_to version.division.name, version.division
        by
        #{link_to version.user.name, version.user},
        = time_ago_in_words(version.created_at)
        ago
      - else
        = version_sentence(version, show_policy: true)

Add title to history page

- content_for :title, 'Recent edits'
.page-header
  %h1 All edits made in the last week

- history = (PaperTrail::Version.where("created_at > ?", 1.week.ago) + WikiMotion.where("edit_date > ?", 1.week.ago)).sort_by{|v| -v.created_at.to_i}

%ul
  - history.each do |version|
    %li
      - if version.kind_of?(WikiMotion)
        Changed text on
        = link_to version.division.name, version.division
        by
        #{link_to version.user.name, version.user},
        = time_ago_in_words(version.created_at)
        ago
      - else
        = version_sentence(version, show_policy: true)


.login-panel.panel.panel-default
  .panel-heading
    %h3.panel-title
      = t('messages.please_sign_in')
  .panel-body
    = render partial: "shared/error"
    = form_for(:session, url: sessions_path) do |f|
      .form-group
        = f.text_field :name, placeholder: t('terms.name')
      .form-group
        = f.password_field :password, placeholder: t('terms.password')

      = submit_tag t("terms.sign_in"), class: "btn btn-success"

Apply bootstrap inputbox design to ones in login form

.login-panel.panel.panel-default
  .panel-heading
    %h3.panel-title
      = t('messages.please_sign_in')
  .panel-body
    = render partial: "shared/error"
    = form_for(:session, url: sessions_path) do |f|
      .form-group
        = f.text_field :name, placeholder: t('terms.name'), class: "form-control"
      .form-group
        = f.password_field :password, placeholder: t('terms.password'), class: "form-control"

      = submit_tag t("terms.sign_in"), class: "btn btn-success"


- page        ||= index_branch
- children      = @pages_by_parent[page.id]
- siblings      = @pages_by_parent[page.parent_id]
- has_children  = children.present?
- has_siblings  = siblings.size > 1
- branch_open   = (session[:cms_page_tree] || []).member?(page.id.to_s) || page.root?
- category_view = @filters_present

%li{:class => 'listing__item', :id => dom_id(page)}
  %h2.listing__heading
    = link_to page.label, edit_comfy_admin_cms_site_page_path(@site, page), :class => 'item-label'
    = render :partial => 'comfy/admin/cms/categories/categories', :object => page

  %p.listing__text
    = truncate(page.blocks.find {|b| b.identifier == "content"}.content, length: 100)
  .listing__meta
    %dl.meta
      %dt.meta__title Status:
      %dd.meta__description= @site.label.upcase
      %dt.meta__title Type:
      %dd.meta__description= current_status(page.current_state)
      %dt.meta__title Last edit:
      %dd.meta__description= page.updated_at.strftime("%d/%m/%Y, %H:%M")

  .listing__link
    = link_to page.url, page.url, :target => '_blank'

  - if !category_view && has_children && branch_open
    %ul.children.sortable
      = render :partial => 'index_branch', :collection => children

Remove categories from page listing

- page        ||= index_branch
- children      = @pages_by_parent[page.id]
- siblings      = @pages_by_parent[page.parent_id]
- has_children  = children.present?
- has_siblings  = siblings.size > 1
- branch_open   = (session[:cms_page_tree] || []).member?(page.id.to_s) || page.root?
- category_view = @filters_present

%li{:class => 'listing__item', :id => dom_id(page)}
  %h2.listing__heading
    = link_to page.label, edit_comfy_admin_cms_site_page_path(@site, page)
  %p.listing__text
    = truncate(page.blocks.find {|b| b.identifier == "content"}.content, length: 100)
  .listing__meta
    %dl.meta
      %dt.meta__title Status:
      %dd.meta__description= @site.label.upcase
      %dt.meta__title Type:
      %dd.meta__description= current_status(page.current_state)
      %dt.meta__title Last edit:
      %dd.meta__description= page.updated_at.strftime("%d/%m/%Y, %H:%M")

  .listing__link
    = link_to page.url, page.url, :target => '_blank'

  - if !category_view && has_children && branch_open
    %ul.children.sortable
      = render :partial => 'index_branch', :collection => children


.modal.modal-wide.hide.fade#start-cert-modal
  .modal-header
    %button.close{:type => :button, 'data-dismiss' => :modal, 'aria-hidden' => true} ×
    %h3= t('homepage.start_new_certificate')
  .modal-body
    .row-fluid
      .span6.log-in
        %h1= t('homepage.log_in')
        = render 'devise/sessions/form', resource: User.new, resource_name: 'user', remote: true, form_id: 'start_cert_modal_form'
      .span6
        %h1= t('homepage.dont_have_an_account')
        %p= t('homepage.register_later_message')
        = form_tag non_authenticated_start_questionnaire_path, class: 'start-survey' do

          %button.btn.btn-large.btn-primary{"data-btn-confirmable" => t('homepage.creating_questionnaire')}= t('homepage.continue_without_registering')
        = link_to t('homepage.create_an_account'), new_user_registration_path, :class => 'btn btn-large btn-info btn-info-modal'

Convert start questionnaire modal to use helper

= modal_popup('start-cert-modal', '', t('homepage.start_new_certificate')) do
  .row-fluid
    .span6.log-in
      %h1= t('homepage.log_in')
      = render 'devise/sessions/form', resource: User.new, resource_name: 'user', remote: true, form_id: 'start_cert_modal_form'
    .span6
      %h1= t('homepage.dont_have_an_account')
      %p= t('homepage.register_later_message')
      = form_tag non_authenticated_start_questionnaire_path, class: 'start-survey' do

        %button.btn.btn-large.btn-primary{"data-btn-confirmable" => t('homepage.creating_questionnaire')}= t('homepage.continue_without_registering')
      = link_to t('homepage.create_an_account'), new_user_registration_path, :class => 'btn btn-large btn-info btn-info-modal'


%p
  Dear #{@recipient.ops_first_name},
%p
  Thanks for attending your #{@workshop.phase_info[:long_name]} in-person workshop.
%br
  We appreciate any feedback you have. Please take a moment to complete this
  = render partial: 'exit_survey_url', locals: {workshop: @workshop, link_text: "short survey"}
  about your Code.org workshop experience.

- if @workshop.phase == 2
  %p
    %strong
      Phase 2: Blended Summer Study:
  %p
    You’ll receive access to the online portion of Phase 2 on Monday. You must complete this before September 7th. For online PD troubleshooting, visit the FAQ.
- elsif @workshop.phase == 8
  %h2
    How to stay involved in the Code.org community:
  %p
    Now that you’ve finished your first year teaching ECS, we hope you’re as excited as we are to keep the momentum going locally! Please
    %a
      complete this survey to update your contact info
    and tell us how you’d like to be involved in the future.
    %a
      Check out this PDF
    for the many ways you can stay in touch with this community.
%p
  The Code.org PD team

Exit survey formatting tweak (paragraph instead of line break)

%p
  Dear #{@recipient.ops_first_name},
%p
  Thanks for attending your #{@workshop.phase_info[:long_name]} in-person workshop.
%p
  We appreciate any feedback you have. Please take a moment to complete this
  = render partial: 'exit_survey_url', locals: {workshop: @workshop, link_text: "short survey"}
  about your Code.org workshop experience.

- if @workshop.phase == 2
  %p
    %strong
      Phase 2: Blended Summer Study:
  %p
    You’ll receive access to the online portion of Phase 2 on Monday. You must complete this before September 7th. For online PD troubleshooting, visit the FAQ.
- elsif @workshop.phase == 8
  %h2
    How to stay involved in the Code.org community:
  %p
    Now that you’ve finished your first year teaching ECS, we hope you’re as excited as we are to keep the momentum going locally! Please
    %a
      complete this survey to update your contact info
    and tell us how you’d like to be involved in the future.
    %a
      Check out this PDF
    for the many ways you can stay in touch with this community.
%p
  The Code.org PD team


- form_for [:admin, @fabulator_edition], :html => {:onsubmit_status => onsubmit_status(@fabulator_edition)} do |f|
  = f.hidden_field :lock_version
  = render_region :form_top
  .form_area
    - render_region :form do |form|
      - form.edit_title do
        %p.title
          = f.label :name
          = f.text_field :name, :class => 'textbox activate', :maxlength => 100
      - form.edit_download_filename do
        %p.download_filename
          = f.label :download_filename, "Download Filename"
          = f.text_field :download_filename, :class => 'textbox', :maxlength => 100
      - form.edit_content do
        %p.content
          = f.label :description, "Description"
          ~ f.text_area :description, :class => "textarea large", :style => "width: 100%"
  - render_region :form_bottom do |form_bottom|
    - form_bottom.edit_buttons do
      %p.buttons{:style=>"clear: left"}
        = save_model_button(@fabulator_edition, :label => @fabulator_edition.new_record? ? 'Create Edition' : 'Save Changes')
        = save_model_and_continue_editing_button(@fabulator_edition)
        or
        = link_to 'Cancel', admin_fabulator_editions_url
    - form_bottom.edit_timestamp do
      %p.updated_line
        = updated_stamp @fabulator_edition

Move download filename to same section as title

- form_for [:admin, @fabulator_edition], :html => {:onsubmit_status => onsubmit_status(@fabulator_edition)} do |f|
  = f.hidden_field :lock_version
  = render_region :form_top
  .form_area
    - render_region :form do |form|
      - form.edit_title do
        %p.title
          = f.label :name
          = f.text_field :name, :class => 'textbox activate', :maxlength => 100
        %p.download_filename
          = f.label :download_filename, "Download Filename"
          = f.text_field :download_filename, :class => 'textbox', :maxlength => 100
      - form.edit_content do
        %p.content
          = f.label :description, "Description"
          ~ f.text_area :description, :class => "textarea large", :style => "width: 100%"
  - render_region :form_bottom do |form_bottom|
    - form_bottom.edit_buttons do
      %p.buttons{:style=>"clear: left"}
        = save_model_button(@fabulator_edition, :label => @fabulator_edition.new_record? ? 'Create Edition' : 'Save Changes')
        = save_model_and_continue_editing_button(@fabulator_edition)
        or
        = link_to 'Cancel', admin_fabulator_editions_url
    - form_bottom.edit_timestamp do
      %p.updated_line
        = updated_stamp @fabulator_edition


/ requires: grade_span, portal_clazz_id, domain_id (next line is a hack, so that portal_clazz_id is defined)
- portal_clazz_id ||= nil

.action_menu
  #search_title
    ="Search #{ExternalActivity.display_name.pluralize}"
  .progress_container
    #search_spinner.tiny{:style=>'display: none;'}
      searching ...
      = image_tag "ajax-loader.gif"

%form{ :id => 'page_search_form'}
  = hidden_field_tag 'portal_clazz_id', portal_clazz_id
  %table{:width => "100%"}
    %tr
      %td{:style=>"padding: 0.5em;"}
        = label_tag :filter, 'matching: ', :class=>"right"
        = text_field_tag :name, name
      %td{:style=>"padding: 0.5em;"}
        = label_tag :filter, 'drafts too: ', :class=>"right"
        = check_box_tag 'include_drafts', 'include drafts', session[:include_drafts]

Fix form name so that the form observer works.

/ requires: grade_span, portal_clazz_id, domain_id (next line is a hack, so that portal_clazz_id is defined)
- portal_clazz_id ||= nil

.action_menu
  #search_title
    ="Search #{ExternalActivity.display_name.pluralize}"
  .progress_container
    #search_spinner.tiny{:style=>'display: none;'}
      searching ...
      = image_tag "ajax-loader.gif"

%form{ :id => 'external_activity_search_form'}
  = hidden_field_tag 'portal_clazz_id', portal_clazz_id
  %table{:width => "100%"}
    %tr
      %td{:style=>"padding: 0.5em;"}
        = label_tag :filter, 'matching: ', :class=>"right"
        = text_field_tag :name, name
      %td{:style=>"padding: 0.5em;"}
        = label_tag :filter, 'drafts too: ', :class=>"right"
        = check_box_tag 'include_drafts', 'include drafts', session[:include_drafts]


%div
  "#{link_to @note.author_name, user_url(@note.author)} wrote:"
%div
  = markdown(@note.note, pipeline: :email)

Revert "Make sure notify email always has author info."


= render 'name_and_timing_form', f: f

.row
  .alpha.two.columns
    = label_tag 'Pickup time'
  .six.columns
    = text_field_tag 'order_cycle_outgoing_exchange_0_pickup_time', '', 'id' => 'order_cycle_outgoing_exchange_0_pickup_time', 'placeholder' => 'Ready for (ie. Date / Time)', 'ng-model' => 'outgoing_exchange.pickup_time'
  .two.columns
    = label_tag 'Pickup instructions'
  .six.columns.omega
    = text_field_tag 'order_cycle_outgoing_exchange_0_pickup_instructions', '', 'id' => 'order_cycle_outgoing_exchange_0_pickup_instructions', 'placeholder' => 'Pick-up instructions', 'ng-model' => 'outgoing_exchange.pickup_instructions'

%table.exchanges
  %tbody{ng: {repeat: "exchange in order_cycle.incoming_exchanges"}}
    %tr.products
      = render 'exchange_supplied_products_form'

= render 'coordinator_fees', f: f

.actions
  = f.submit @order_cycle.new_record? ? 'Create' : 'Update', 'ng-disabled' => '!loaded()'
  %span{'ng-show' => 'loaded()'}
    or
    = link_to 'Cancel', main_app.admin_order_cycles_path
  %span{'ng-hide' => 'loaded()'} Loading...

Clean up simple order cycle interface

= render 'name_and_timing_form', f: f

.row
  .alpha.two.columns
    = label_tag 'Ready for'
  .six.columns
    = text_field_tag 'order_cycle_outgoing_exchange_0_pickup_time', '', 'id' => 'order_cycle_outgoing_exchange_0_pickup_time', 'placeholder' => 'Date / time', 'ng-model' => 'outgoing_exchange.pickup_time', 'size' => 30
  .two.columns
    = label_tag 'Customer instructions'
  .six.columns.omega
    = text_field_tag 'order_cycle_outgoing_exchange_0_pickup_instructions', '', 'id' => 'order_cycle_outgoing_exchange_0_pickup_instructions', 'placeholder' => 'Pick-up or delivery notes', 'ng-model' => 'outgoing_exchange.pickup_instructions', 'size' => 30

= label_tag 'Products'
%table.exchanges
  %tbody{ng: {repeat: "exchange in order_cycle.incoming_exchanges"}}
    %tr.products
      = render 'exchange_supplied_products_form'

%br/
= label_tag 'Fees'
= render 'coordinator_fees', f: f

.actions
  = f.submit @order_cycle.new_record? ? 'Create' : 'Update', 'ng-disabled' => '!loaded()'
  %span{'ng-show' => 'loaded()'}
    or
    = link_to 'Cancel', main_app.admin_order_cycles_path
  %span{'ng-hide' => 'loaded()'} Loading...


/ locals: indent, map, show_selection_controls, offering, learners
%div{:style => "padding-left: #{indent}px;"}
  - map.keys.sort_by{|container| container.position}.each do |container|
    %div{:id => dom_id_for(container)}
      %div
        %span{:style => 'font-weight: bold;'}= container.class.to_s
        - if show_selection_controls
          = selectAllNone(dom_id_for(container))
        –
        = "#{container.name}"
      - children = map[container]
      - if children.is_a? Array
        %div{:style => "padding-left: #{indent + 10}px;"}
          = render :partial => '/portal/reports/page_embeddables', :locals => { :page_embeddables => children, :show_selection_controls => show_selection_controls, :offering => offering, :learners => learners}
      - else
        = render :partial => '/portal/reports/container_heading', :locals => { :indent => indent + 10, :map => children, :show_selection_controls => show_selection_controls, :offering => offering, :learners => learners}

Hide All and None links for activity report

/ locals: indent, map, show_selection_controls, offering, learners
%div{:style => "padding-left: #{indent}px;"}
  - map.keys.sort_by{|container| container.position}.each do |container|
    %div{:id => dom_id_for(container)}
      %div
        %span{:style => 'font-weight: bold;'}= container.class.to_s
        - if show_selection_controls
          - if @activity_report_id == nil
            = selectAllNone(dom_id_for(container))
        –
        = "#{container.name}"
      - children = map[container]
      - if children.is_a? Array
        %div{:style => "padding-left: #{indent + 10}px;"}
          = render :partial => '/portal/reports/page_embeddables', :locals => { :page_embeddables => children, :show_selection_controls => show_selection_controls, :offering => offering, :learners => learners}
      - else
        = render :partial => '/portal/reports/container_heading', :locals => { :indent => indent + 10, :map => children, :show_selection_controls => show_selection_controls, :offering => offering, :learners => learners}


= render 'navigation/mobile/profile'
%nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block#rs-mobile-nav{ role: :navigation }
  .container{ class: ios_web_app? ? 'ios-web-app' : '' }
    %ul.nav.navbar-nav.navbar-icon-row
      = nav_entry t('views.navigation.timeline'), root_path, icon: 'home', icon_only: true
      = nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count, icon: 'inbox', icon_only: true
      - if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
        = nav_entry t('views.navigation.discover'), discover_path, icon: 'compass', icon_only: true
      = nav_entry t('views.navigation.notifications'), '#', icon: 'bell-o', icon_only: true
      %li.nav-item.profile--image-dropdown
        %a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-profile' }, aria: { controls: 'rs-mobile-nav-profile', expanded: 'false' } }
          %img.avatar-md.d-inline{ src: current_user.profile_picture.url(:small) }

Make notification icon show notification count badge

= render 'navigation/mobile/profile'
:ruby
  notification_count = Notification.for(current_user).where(new: true).count
  notification_count = nil if notification_count.zero?
  notifications_icon = notification_count.nil? ? 'bell-o' : 'bell'
%nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block#rs-mobile-nav{ role: :navigation }
  .container{ class: ios_web_app? ? 'ios-web-app' : '' }
    %ul.nav.navbar-nav.navbar-icon-row
      = nav_entry t('views.navigation.timeline'), root_path, icon: 'home', icon_only: true
      = nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count, icon: 'inbox', icon_only: true
      - if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
        = nav_entry t('views.navigation.discover'), discover_path, icon: 'compass', icon_only: true
      = nav_entry t('views.navigation.notifications'), '/notifications', badge: notification_count, icon: notifications_icon, icon_only: true
      %li.nav-item.profile--image-dropdown
        %a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-profile' }, aria: { controls: 'rs-mobile-nav-profile', expanded: 'false' } }
          %img.avatar-md.d-inline{ src: current_user.profile_picture.url(:small) }


#new_comment
  - if flash[:comment_errors]
    .flash
      .error= flash[:comment_errors]
  - form_for :comment, Comment.new, :url => comments_path(@post) do |f|
    .user_name
      %label{:for => 'user_name'} Name
      = text_field_tag 'user[name]', h(current_user.name), :id => 'user_name'
    .user_email
      %label{:for => 'user_email'} Email (optional)
      = text_field_tag 'user[email]', h(current_user.email), :id => 'user_email'
    .user_site
      %label{:for => 'user_link'} Website (also optional)
      = text_field_tag 'user[link]', h(current_user.link), :id => 'user_link'
    .email
      %label{:for => 'email'} Email (you shouldn't see this - if you do, let me know)
      = text_field_tag 'email', '', :id => 'email'
    %p.textile
      Make your comments snazzy with
      = succeed '!' do
        %a{:href => 'http://hobix.com/textile/quick.html'} Textile
    #content_field~ f.text_area :content
    = preview_button new_comment_path(current_object), 'preview'
    = submit_tag 'Comment!', :class => 'button'
  #preview.content{:style => 'display: none'}

Fix a markup invalidity in the new comment form.

#new_comment
  - if flash[:comment_errors]
    .flash
      .error= flash[:comment_errors]
  - form_for :comment, Comment.new, :url => comments_path(@post) do |f|
    %fieldset
      .user_name
        %label{:for => 'user_name'} Name
        = text_field_tag 'user[name]', h(current_user.name), :id => 'user_name'
      .user_email
        %label{:for => 'user_email'} Email (optional)
        = text_field_tag 'user[email]', h(current_user.email), :id => 'user_email'
      .user_site
        %label{:for => 'user_link'} Website (also optional)
        = text_field_tag 'user[link]', h(current_user.link), :id => 'user_link'
      .email
        %label{:for => 'email'} Email (you shouldn't see this - if you do, let me know)
        = text_field_tag 'email', '', :id => 'email'
      %p.textile
        Make your comments snazzy with
        = succeed '!' do
          %a{:href => 'http://hobix.com/textile/quick.html'} Textile
      #content_field~ f.text_area :content
      = preview_button new_comment_path(current_object), 'preview'
      = submit_tag 'Comment!', :class => 'button'
  #preview.content{:style => 'display: none'}


%li
  .repo-info
    =link_to template_repo.uri, template_repo.uri
    %span.count
      %label Templates:
      = template_repo.template_count
    %span.updated
      %label Last Refreshed:
      = DateTime.parse(template_repo.updated_at).strftime("%m/%d/%Y %H:%M:%S UTC")

  .actions
    = link_to 'Refresh Source',
              reload_template_repo_path(template_repo.id),
              method: :post,
              class: 'reload',
              title: 'reload'
    = link_to 'Delete Source',
              template_repo_path(template_repo.id),
              class: 'delete-action',
              title: 'delete',
              method: 'delete',
              data: { delete_confirm: 'Delete this template repository?', delete_remove_at: 'li' }

Use informal time in template_repo date presentation.

%li
  .repo-info
    =link_to template_repo.uri, template_repo.uri
    %span.count
      %label Templates:
      = template_repo.template_count
    %span.updated
      %label Last Refreshed:
      = l(Time.zone.parse(template_repo.updated_at), format: :informal)

  .actions
    = link_to 'Refresh Source',
              reload_template_repo_path(template_repo.id),
              method: :post,
              class: 'reload',
              title: 'reload'
    = link_to 'Delete Source',
              template_repo_path(template_repo.id),
              class: 'delete-action',
              title: 'delete',
              method: 'delete',
              data: { delete_confirm: 'Delete this template repository?', delete_remove_at: 'li' }


%section.new-thread
  = t '.message_for_html', other: link_to_profile(@user)
  = semantic_form_for @thread, as: :thread, url: {action: :create}, html: {class: 'guided'} do |f|
    = f.semantic_errors
    = f.inputs do
      = f.input :title, input_html: {autofocus: true}
      = semantic_fields_for @message do |f2|
        = f2.semantic_errors
        = f2.input :body, input_html: { rows: 10 }
    = f.actions do
      = f.action :submit, button_html: {class: "btn-green submit"}, label: t('.send')
      = cancel_link user_profile_path(@user)

Use a header for new private messages.

%section.new-thread
  %header
    %h1= t '.message_for_html', other: link_to_profile(@user)
  = semantic_form_for @thread, as: :thread, url: {action: :create}, html: {class: 'guided'} do |f|
    = f.semantic_errors
    = f.inputs do
      = f.input :title, input_html: {autofocus: true}
      = semantic_fields_for @message do |f2|
        = f2.semantic_errors
        = f2.input :body, input_html: { rows: 10 }
    = f.actions do
      = f.action :submit, button_html: {class: "btn-green submit"}, label: t('.send')
      = cancel_link user_profile_path(@user)


%table.zebra-striped
  %tbody
    - @versions.each do |version|
      - user = nil
      - if version.whodunnit
        - begin
          - user = User.find(version.whodunnit)
        - rescue
      %tr
        %td= version.created_at.to_s(:long)
        - if user and user.person
          %td= image_box user.person.avatar, :small
          %td= link_to user.person.full_name, user.person
        -else
          %td= image_box User.first.person.avatar, :small
          %td deleted id
        %td= verb_for version.event
        %td
          - if version.item
            - if version.associated_id
              = version.item.to_s
              on
              \#{associated_link_for version}
            - else
              = link_to version.item.to_s, version.item
          - else
            = version.item_type
        %td
          - if version.event == "update"
            %a{:href => "#", :rel => "popover", :"data-placement" => "below", :"data-original-title" => "Detailed Changes", :"data-content" => render("recent_changes/detailed_changes", :version => version), :"data-html" => "true", :"data-trigger" => "manual"} Details

Use default avatar for deleted persons

%table.zebra-striped
  %tbody
    - @versions.each do |version|
      - user = nil
      - if version.whodunnit
        - begin
          - user = User.find(version.whodunnit)
        - rescue
      %tr
        %td= version.created_at.to_s(:long)
        - if user and user.person
          %td= image_box user.person.avatar, :small
          %td= link_to user.person.full_name, user.person
        -else
          %td= image_box Person.new.avatar, :small
          %td deleted id
        %td= verb_for version.event
        %td
          - if version.item
            - if version.associated_id
              = version.item.to_s
              on
              \#{associated_link_for version}
            - else
              = link_to version.item.to_s, version.item
          - else
            = version.item_type
        %td
          - if version.event == "update"
            %a{:href => "#", :rel => "popover", :"data-placement" => "below", :"data-original-title" => "Detailed Changes", :"data-content" => render("recent_changes/detailed_changes", :version => version), :"data-html" => "true", :"data-trigger" => "manual"} Details


- item_action ||= lambda{|object| url_for(object)}

%tr[charge_booking_template]
  %td
    = link_to "%s (%s)" % [charge_booking_template.title, charge_booking_template.code], item_action.call(charge_booking_template)
    - if charge_booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= charge_booking_template.comments
  %td= link_to charge_booking_template.credit_account.code, account_path(charge_booking_template.credit_account), :title => charge_booking_template.credit_account.title unless charge_booking_template.credit_account.nil?
  %td= link_to charge_booking_template.debit_account.code, account_path(charge_booking_template.debit_account), :title => charge_booking_template.debit_account.title unless charge_booking_template.debit_account.nil?
  %td.currency= link_to amount_to_s(charge_booking_template), charge_booking_template.charge_rate
  %td= t(charge_booking_template.amount_relates_to, :scope => 'booking_template.relation') if charge_booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, charge_booking_template)
    = list_link_for(:delete, charge_booking_template)

Support AJAX deletion for charge booking templates.

- item_action ||= lambda{|object| url_for(object)}

%tr[charge_booking_template]
  %td
    = link_to "%s (%s)" % [charge_booking_template.title, charge_booking_template.code], item_action.call(charge_booking_template)
    - if charge_booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= charge_booking_template.comments
  %td= link_to charge_booking_template.credit_account.code, account_path(charge_booking_template.credit_account), :title => charge_booking_template.credit_account.title unless charge_booking_template.credit_account.nil?
  %td= link_to charge_booking_template.debit_account.code, account_path(charge_booking_template.debit_account), :title => charge_booking_template.debit_account.title unless charge_booking_template.debit_account.nil?
  %td.currency= link_to amount_to_s(charge_booking_template), charge_booking_template.charge_rate
  %td= t(charge_booking_template.amount_relates_to, :scope => 'booking_template.relation') if charge_booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, charge_booking_template)
    = list_link_for(:delete, charge_booking_template, :remote => true)


- content_for :injection_data do
  = inject_available_shipping_methods
  = inject_available_payment_methods
  = inject_saved_credit_cards

= form_for current_order,
  html: {name: "checkout",
    id: "checkout_form",
    novalidate: true,
    "ng-submit" => "purchase($event, checkout)"} do |f|

  = render "checkout/details", f: f
  = render "checkout/billing", f: f
  = render "checkout/shipping", f: f
  = render "checkout/payment", f: f
  = render "checkout/already_ordered", f: f if show_bought_items?
  = render "checkout/terms_and_conditions", f: f
  %p
    %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } }
      = t :checkout_send
    / {{ checkout.$valid }}

Fix checkout form order path

- content_for :injection_data do
  = inject_available_shipping_methods
  = inject_available_payment_methods
  = inject_saved_credit_cards

= form_for current_order,
  url: spree_order_path(current_order),
  html: {name: "checkout",
    id: "checkout_form",
    novalidate: true,
    "ng-submit" => "purchase($event, checkout)"} do |f|

  = render "checkout/details", f: f
  = render "checkout/billing", f: f
  = render "checkout/shipping", f: f
  = render "checkout/payment", f: f
  = render "checkout/already_ordered", f: f if show_bought_items?
  = render "checkout/terms_and_conditions", f: f
  %p
    %button.button.primary{ type: :submit, ng: { disabled: "terms_and_conditions_activated && !terms_and_conditions_accepted" } }
      = t :checkout_send
    / {{ checkout.$valid }}


= render 'clone_panel'

- if @project.import? && !@project.imported
  .save-project-loader
    %center
      = image_tag "ajax_loader.gif"
      %h3 Importing repository.
      %p.monospace git clone --bare #{@project.import_url}
      %p Please wait until we import repository for you. Refresh at will.
      :javascript
        new ProjectImport();

- else
  %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'
        %span.clone= "git remote add origin #{@project.url_to_repo}"
        :preserve
          git push -u origin master

    %fieldset
      %legend Existing Git Repo?
      %pre.dark
        :preserve
          cd existing_git_repo
        %span.clone= "git remote add origin #{@project.url_to_repo}"
        :preserve
          git push -u origin master

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

Improve the repository import message

= render 'clone_panel'

- if @project.import? && !@project.imported
  .save-project-loader
    %center
      = image_tag "ajax_loader.gif"
      %h3 Importing repository.
      %p.monospace git clone --bare #{@project.import_url}
      %p Please wait while we import the repository for you. Refresh at will.
      :javascript
        new ProjectImport();

- else
  %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'
        %span.clone= "git remote add origin #{@project.url_to_repo}"
        :preserve
          git push -u origin master

    %fieldset
      %legend Existing Git Repo?
      %pre.dark
        :preserve
          cd existing_git_repo
        %span.clone= "git remote add origin #{@project.url_to_repo}"
        :preserve
          git push -u origin master

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


.append-bottom-20
  = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
  .pull-right.visible-lg.light You can move around the graph by using the arrow keys.

Use gray content block for network graph header

.gray-content-block.top-block.append-bottom-default
  .tree-ref-holder
    = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}

  .oneline
    You can move around the graph by using the arrow keys.


- div_for(pitch) do
  .block-spacer-negative
  .box_white
    #equalize
      = render :partial => 'news_items/news_item', :object => pitch
      .span-235.button_news_items
        = render :partial => "donations/button", :locals => { :news_item => pitch }
    .clear

Fix styling for pitch partial

- div_for(pitch) do
  .block-spacer-negative
  .box_white
    #equalize
      = render :partial => 'news_items/news_item', :object => pitch
      .span-205.button_news_items
        = render :partial => "donations/button", :locals => { :news_item => pitch }
    .clear


= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Open+Sans:300italic,400,300,700'
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true

Fix http to https in a link

= stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Open+Sans:300italic,400,300,700'
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true


!!!
%html
  %head
    %title MwebEvents
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "bootstrap_and_overrides", :media => "all"

    = javascript_include_tag "application"
    = javascript_include_tag "twitter/bootstrap"

    = csrf_meta_tags

  %body{:class => "#{controller_name_for_view} #{params[:action]}"}

    = render partial: "shared/flash_messages", flash: flash
    = yield

Correct layout for dummy application

!!!
%html
  %head
    %title MwebEvents
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "bootstrap_and_overrides", :media => "all"

    = javascript_include_tag "application"
    = javascript_include_tag "twitter/bootstrap"

    = csrf_meta_tags

  %body{:class => "#{controller_name_for_view} #{params[:action]}"}

    .container
      %ul.nav.nav-pills.pull-right
        - if current_user
          %p
            Hello
            = current_user.email
          %li.active
            = link_to t('.logout'), main_app.destroy_user_session_path, :method => 'delete'

        - else
          %li.active
            = link_to t('.login'), main_app.new_user_session_path
          %li
            = link_to t('.register'), main_app.new_user_registration_path

    .container-fluid
      = render partial: "shared/flash_messages", flash: flash
      = yield


%table.table.table-hover.table-bordered
  %tbody
    %tr
      %th= t('terms.backup_file')
      %th= t('terms.backup_time')
      %th= t('terms.note')
  - @backup_files.each do |file|
    %tr
      %td= link_to(file.name, daemon_setting_history_path(id: file.file_id))
      %td= file.ctime.strftime t('time.formats.default')
      %td
        = form_for :note, url: daemon_setting_note_path(id: file.note.file_id), method: :patch do |f|
          = f.text_field :content, value: file.note.content, class: "note-content", id: nil
          = submit_tag t('terms.save'), class: 'btn'

Set proper class for submit button.

%table.table.table-hover.table-bordered
  %tbody
    %tr
      %th= t('terms.backup_file')
      %th= t('terms.backup_time')
      %th= t('terms.note')
  - @backup_files.each do |file|
    %tr
      %td= link_to(file.name, daemon_setting_history_path(id: file.file_id))
      %td= file.ctime.strftime t('time.formats.default')
      %td
        = form_for :note, url: daemon_setting_note_path(id: file.note.file_id), method: :patch do |f|
          = f.text_field :content, value: file.note.content, class: "note-content", id: nil
          = submit_tag t('terms.save'), class: 'btn btn-default btn-sm pull-right'


%fieldset.form
  %legend Place Name

  -f.fields_for(:place, :builder => ExtendedFormBuilder) do |p|
    = error_messages_for :object => p.object
    -core_element :name, p, :horiz do
      =p.label(:name)
      =h(p.object.name)
    -core_element :place_type_ids, p, :horiz do
      =p.label(:place_type_ids, 'Types')
      =h(p.object.formatted_place_descriptions)

  -event_form.fields_for(:participations_place, :builder => ExtendedFormBuilder) do |p|
    -core_element :date_of_exposure, p, :horiz do
      =p.label(:date_of_exposure)
      =p.calendar_date_select(:date_of_exposure, :year_range => 5.years.ago..0.years.from_now)

Fix to get fb_place_core_field_configs_selspec-03.rb passing.

-# Copyright (C) 2007, 2008, 2009 The Collaborative Software Foundation
-#
-# This file is part of TriSano.
-#
-# TriSano is free software: you can redistribute it and/or modify it under the
-# terms of the GNU Affero General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# TriSano is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License
-# for more details.
-#
-# You should have received a copy of the GNU Affero General Public License along
-# with TriSano. If not, see http://www.gnu.org/licenses/agpl-3.0.txt.

%fieldset.form
  %legend Place Name

  -f.fields_for(:place, :builder => ExtendedFormBuilder) do |p|
    = error_messages_for :object => p.object
    -core_element :name, p, :horiz do
      =p.label(:name)
      =h(p.object.name)
    -core_element :place_type_id, p, :horiz do
      =p.label(:place_type_ids, 'Types')
      =h(p.object.formatted_place_descriptions)

  -event_form.fields_for(:participations_place, :builder => ExtendedFormBuilder) do |p|
    -core_element :date_of_exposure, p, :horiz do
      =p.label(:date_of_exposure)
      =p.calendar_date_select(:date_of_exposure, :year_range => 5.years.ago..0.years.from_now)


%nav
  .container
    .brand
      .p= t('brand')
    = link_to t('nav.home'), root_path
    = link_to t('nav.about'), about_path
    = link_to t('nav.blog'), articles_path
    - if authenticated?
      = link_to t('nav.logout'), logout_path, method: :delete
    - else
      = link_to t('nav.login'), login_path

Remove login link from navbar


.row
  .columns.small-12.medium-3
    - if current_order.nil? || current_order.distributor.nil? || current_order.distributor == @order.distributor
      - if current_order&.line_items.present?
        = link_to main_app.cart_path, :class => "button expand" do
          = t(:order_back_to_cart)
      - else
        = link_to "#{main_app.enterprise_shop_path(@order.distributor)}#/shop", class: "button expand" do
          = t(:order_back_to_store)
    - else

  - if order.changes_allowed?
    .columns.show-for-medium-up.medium-3
    .columns.small-12.medium-3
      = link_to spree.cancel_order_path(@order), method: :put, :class => "button secondary expand", "confirm-link-click" => t('orders_confirm_cancel') do
        %i.ofn-i_009-close
        = t(:cancel_order)
    .columns.small-12.medium-3
      = button_tag :class => 'button primary radius expand', :id => 'update-button', "ng-disabled" => 'update_order_form.$pristine' do
        %i.ofn-i_051-check-big
        %span{ ng: { show: 'update_order_form.$dirty' } }= t(:save_changes)
        %span{ ng: { hide: 'update_order_form.$dirty' } }= t(:order_saved)

Make button border radius consistent

.row
  .columns.small-12.medium-3
    - if current_order.nil? || current_order.distributor.nil? || current_order.distributor == @order.distributor
      - if current_order&.line_items.present?
        = link_to main_app.cart_path, :class => "button expand" do
          = t(:order_back_to_cart)
      - else
        = link_to "#{main_app.enterprise_shop_path(@order.distributor)}#/shop", class: "button expand" do
          = t(:order_back_to_store)
    - else

  - if order.changes_allowed?
    .columns.show-for-medium-up.medium-3
    .columns.small-12.medium-3
      = link_to spree.cancel_order_path(@order), method: :put, :class => "button secondary expand", "confirm-link-click" => t('orders_confirm_cancel') do
        %i.ofn-i_009-close
        = t(:cancel_order)
    .columns.small-12.medium-3
      = button_tag :class => 'button primary expand', :id => 'update-button', "ng-disabled" => 'update_order_form.$pristine' do
        %i.ofn-i_051-check-big
        %span{ ng: { show: 'update_order_form.$dirty' } }= t(:save_changes)
        %span{ ng: { hide: 'update_order_form.$dirty' } }= t(:order_saved)


-# HTTP error response Haml markup for Damien Dart's personal website.
-#
-# Copyright (C) 2013-2015 Damien Dart, <damiendart@pobox.com>.
-# This file is distributed under the MIT licence. For more information,
-# please refer to the accompanying "LICENCE" file.

!!! 5
%html{:lang => "en"}
  %head
    %meta{:charset => "utf-8"}
    %meta{:content => "nofollow, noindex", :name => "robots"}
    %meta{:content => "initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width", "name" => "viewport"}
    %script{:src => "//use.typekit.net/mnw2jkv.js"}
    %script try{Typekit.load();}catch(e){}
    :scss
      #{File.read(File.join(File.dirname(__FILE__), "public", "_error.scss"))}
    %title #{error_code} (www.robotinaponcho.net)
  %body
    %h1.error_code #{error_code}

Remove Typekit stuff from HTTP error responses.

-# HTTP error response Haml markup for Damien Dart's personal website.
-#
-# Copyright (C) 2013-2015 Damien Dart, <damiendart@pobox.com>.
-# This file is distributed under the MIT licence. For more information,
-# please refer to the accompanying "LICENCE" file.

!!! 5
%html{:lang => "en"}
  %head
    %meta{:charset => "utf-8"}
    %meta{:content => "nofollow, noindex", :name => "robots"}
    %meta{:content => "initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width", "name" => "viewport"}
    :scss
      #{File.read(File.join(File.dirname(__FILE__), "public", "_error.scss"))}
    %title #{error_code} (www.robotinaponcho.net)
  %body
    %h1.error_code #{error_code}


- content_for :page_title do
  %h1
    = @enterprise.name
    %span.small
      (
      = enterprise_type_name(@enterprise)
      )

- content_for :page_actions do
  :javascript
    function toggleType(){
      $("#type_selection").slideToggle()
    }
  #type_button
    %button#toggle_type{ onClick: 'toggleType()' } Change type

#type_selection{ hidden: true }
  = render partial: "change_type_form"

#message
  Message bar

.row
  .alpha.seven.columns
    See your profile live on the Open Food Network map.
    %br/
    -# Can we pass an anchor here to zoom to our enterprise?
    = link_to "#{@enterprise.name} live", main_app.map_path

  .two.columns

  .seven.columns.omega
    Change or tweak any of the details of your profile
    %br/
    = link_to "Manage #{@enterprise.name}", main_app.edit_admin_enterprise_path(@enterprise)

.row
  .alpha.seven.columns
    - if can? :admin, Spree::Product
      Add and manage products
      %br/
      = link_to "Manage products", bulk_edit_admin_products_path

  .two.columns

  .seven.columns.omega
    - if can? :admin, OrderCycle
      Add and manage order cycles
      %br/
      = link_to "Manage order cycles", main_app.admin_order_cycles_path

Remove whitespace, add alert box

- content_for :page_title do
  %h1
    = @enterprise.name
    %span.small<
      = "(#{enterprise_type_name(@enterprise)})"

- content_for :page_actions do
  :javascript
    function toggleType(){
      $("#type_selection").slideToggle()
    }
  #type_button
    %button#toggle_type{ onClick: 'toggleType()' } Change type

#type_selection{ hidden: true }
  = render partial: "change_type_form"

.alert-box{"data-alert" => ""}
  Alert box. Timely and contextual messages go here. Should animate in and be closeable.
  %a.close{:href => "#"} ×

.row
  .alpha.seven.columns
    See your profile live on the Open Food Network map.
    %br/
    -# Can we pass an anchor here to zoom to our enterprise?
    = link_to "#{@enterprise.name} live", main_app.map_path

  .two.columns

  .seven.columns.omega
    Change or tweak any of the details of your profile
    %br/
    = link_to "Manage #{@enterprise.name}", main_app.edit_admin_enterprise_path(@enterprise)

.row
  .alpha.seven.columns
    - if can? :admin, Spree::Product
      Add and manage products
      %br/
      = link_to "Manage products", bulk_edit_admin_products_path

  .two.columns

  .seven.columns.omega
    - if can? :admin, OrderCycle
      Add and manage order cycles
      %br/
      = link_to "Manage order cycles", main_app.admin_order_cycles_path


- set_meta_tags title: @fixed_page.title

%article
  = raw render_markdown(@fixed_page.body)

= link_to 'Back', root_path

Remove unnecessary back link from fixed page


= field_set do
  = hidden_field_tag :journal_id, (resource.new_record? ? params[:journal_id] : resource.journal_id)
  -# = f.referenced_association :journal, readonly: true, input_html: {data: {dependents: "#items-form"}}
  = f.input :number
  = f.input :printed_on, input_html: {data: {dependents: "#items-form", parameter_name: "printed_on"}}
  = f.custom_fields
  #items-form{href: new_backend_journal_entry_path, data: {refresh: new_backend_journal_entry_path, refresh_mode: :update, with: "#journal_id"}}
    = render partial: "items_form"

  = f.attachments_field_set

Remove nested nested_fields in journal entries form


.Grid
  .Grid-2-3

    %header
      %h1 Thank you
      %p A confirmation email has been sent to the visitor.

    - if Date.today < Date.parse('2015-01-30')
      #latest-change.notice
        %h1 Staff update: letting visitors know about closed visits
        %p You can now let visitors know if they'll be attending a 'closed visit' when you process a visit booking request.
        %p
          %a(href="/staff/changes") Read more about recent updates

Add staff alert for Easter bank holiday

.Grid
  .Grid-2-3

    %header
      %h1 Thank you
      %p A confirmation email has been sent to the visitor.

    - if Date.today < Date.parse('2015-03-25')
      #latest-change.notice
        %h1 Staff update: visits on Easter Bank Holiday

        %p Please notify us now if your social visits slots will change due to Easter Bank Holidays. Please email changes to prison-visits-feedback@digital.justice.gov.uk.

        %p
          %a(href="/staff/changes") Read about recent updates


.clearfix
  - groups.each do |group|
    = link_to group, class: 'profile-groups-avatars', title: group.name do
      = image_tag group_icon(group.path), class: 'avatar s40'

Fix tooltip for groups on user page

.clearfix
  - groups.each do |group|
    = link_to group, class: 'profile-groups-avatars', title: group.name do
      = image_tag group_icon(group.path), class: 'avatar avatar-inline s40'


- user = local_assigns.fetch(:user)
- avatar = local_assigns.fetch(:avatar, { })

%li.filter-dropdown-item{ class: ('js-current-user' if user == current_user) }
  %button.btn.btn-link.dropdown-user{ type: :button }
    .avatar-container.s40
      = user_avatar_without_link(user: user, lazy: avatar[:lazy], url: avatar[:url], size: 40, has_tooltip: false).gsub('/images/{{avatar_url}}','{{avatar_url}}').html_safe
    .dropdown-user-details
      %span
        = user.name
      %span.dropdown-light-content
        = user.to_reference

Remove unnecessary use of `gsub`

- user = local_assigns.fetch(:user)
- avatar = local_assigns.fetch(:avatar, { })

%li.filter-dropdown-item{ class: ('js-current-user' if user == current_user) }
  %button.btn.btn-link.dropdown-user{ type: :button }
    .avatar-container.s40
      = user_avatar_without_link(user: user, lazy: avatar[:lazy], url: avatar[:url], size: 40, has_tooltip: false)
    .dropdown-user-details
      %span
        = user.name
      %span.dropdown-light-content
        = user.to_reference


%hr
%ul
  %li
    %a{ href: "/cookies" } Om cookies
  %li
    = AppMetadata.release_version
    != surround "(", ")" do
      %a{ href: "https://github.com/Starkast/wikimum/commit/#{AppMetadata.commit}" }= AppMetadata.short_commit

Add the man to the footer

%hr
%ul
  %li
    %a{ href: "/cookies" } Om cookies
  %li
    = AppMetadata.release_version
    != surround "(", ")" do
      %a{ href: "https://github.com/Starkast/wikimum/commit/#{AppMetadata.commit}" }= AppMetadata.short_commit
  %li
    %img{ src: "/favicon.ico", alt: "Starkast" }


%main.row
  .cell.well.well--l

    - if user_signed_in?
      .g
        %main.g-b.g-b--2of3
          .split.search-bar.mbm
            .form.form--inline.split-item
              .split-cell.split-cell--fluid.prm
                = form_tag articles_path, method: :get, remote: true do
                  = search_field_tag :search, params[:search], placeholder: "Search articles by keyword", class: 'form-input'
              .split-cell.split-cell--fixed
                = link_to "New Article", new_article_url, class: 'btn btn--a form-btn'
          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }

Apply responsive grid classes to Article index

%main.row
  .cell.well.well--l

    - if user_signed_in?
      .g
        %main.g-b.g-b--m--2of3
          .split.search-bar.mbm
            .form.form--inline.split-item
              .split-cell.split-cell--fluid.prm
                = form_tag articles_path, method: :get, remote: true do
                  = search_field_tag :search, params[:search], placeholder: "Search articles by keyword", class: 'form-input'
              .split-cell.split-cell--fixed
                = link_to "New Article", new_article_url, class: 'btn btn--a form-btn'
          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--m--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }


- if flash.any?
  .row
    .large-10.large-centered.columns
      - flash.each do |name, msg|
        %div{ data: {alert: ""}, class: "alert-box radius #{name == :notice ? "success" : "alert"}" }
          = msg
          %a{href: "#", class: "close"} ×

Make flash message span 12 columns.

- if flash.any?
  .row
    .large-12.large-centered.columns
      - flash.each do |name, msg|
        %div{ data: {alert: ""}, class: "alert-box radius #{name == :notice ? "success" : "alert"}" }
          = msg
          %a{href: "#", class: "close"} ×


%h3= t('poll_mailer.common.results')
%table{style: "width: 100%"}
  %thead
    %th
    %th
    - (1..@info.poll.minimum_stance_choices).each do |score|
      %th.align-right= t(:"ordinal._#{score}")
    %th.align-right= t(:"common.total")
  - @info.poll_options.sort_by(&:total_score).reverse.each_with_index do |poll_option, index|
    %tr
      %td= render "poll_mailer/common/chip", color: poll_option.color
      %td= poll_option.display_name
      - (1..@info.poll.minimum_stance_choices).each do |score|
        %td.align-right= poll_option.stance_choices.where(score: score).count
      %td.align-right= poll_option.total_score

Fix ranked choice vote order

%h3= t('poll_mailer.common.results')
%table{style: "width: 100%"}
  %thead
    %th
    %th
    - (1..@info.poll.minimum_stance_choices).each do |score|
      %th.align-right= t(:"ordinal._#{score}")
    %th.align-right= t(:"common.total")
  - @info.poll_options.sort_by(&:total_score).reverse.each do |poll_option|
    %tr
      %td= render "poll_mailer/common/chip", color: poll_option.color
      %td= poll_option.display_name
      - (1..@info.poll.minimum_stance_choices).reverse_each do |score|
        %td.align-right= poll_option.stance_choices.where(score: score).count
      %td.align-right= poll_option.total_score


- bugsnag_js_key = ENV['BUGSNAG_JS_KEY'] || ENV['BUGSNAG_API_KEY']
- if bugsnag_js_key.present?
  %script{src: "//d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js"}
  :javascript
    window.bugsnagClient = bugsnag({
      apiKey: "#{bugsnag_js_key}",
      beforeSend: function (report) {
        report.app.releaseStage = "#{Rails.env}"
      }
    });

Update BugsnagJS to latest version and update initialization syntax

- bugsnag_js_key = ENV['BUGSNAG_JS_KEY'] || ENV['BUGSNAG_API_KEY']
- if bugsnag_js_key.present?
  %script{src: "//d2wy8f7a9ursnm.cloudfront.net/v7/bugsnag.min.js"}
  :javascript
    Bugsnag.start({
      apiKey: "#{bugsnag_js_key}",
      releaseStage: "#{Rails.env}"
    })


!!! 5
%html(lang='en')
  %head
    %meta(charset='utf-8')
    %meta(http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1')
    %meta(name='viewport' content='width=device-width, initial-scale=1.0')
    %title= content_for?(:title) ? yield(:title) : 'HomeAutomation'
    = csrf_meta_tags
    = stylesheet_link_tag 'application', :media => 'all'
    = javascript_include_tag 'application'

  %body
    - if user_signed_in?
      .navbar.navbar-default.navbar-static-top
        .container
          %button.navbar-toggle(type='button' data-toggle='collapse' data-target='.navbar-responsive-collapse')
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar
          %a.navbar-brand(href='#') HomeAutomation
          .navbar-collapse.collapse.navbar-responsive-collapse
            %ul.nav.navbar-nav
              %li= link_to 'Dashboard', '/'
              %li= link_to 'All devices', all_devices_path
              %li= link_to 'My devices', user_devices_path(current_user.uid)

    .container
      .row
        .col-lg-12
          = bootstrap_flash
          = yield

Use root_path rather than /

!!! 5
%html(lang='en')
  %head
    %meta(charset='utf-8')
    %meta(http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1')
    %meta(name='viewport' content='width=device-width, initial-scale=1.0')
    %title= content_for?(:title) ? yield(:title) : 'HomeAutomation'
    = csrf_meta_tags
    = stylesheet_link_tag 'application', :media => 'all'
    = javascript_include_tag 'application'

  %body
    - if user_signed_in?
      .navbar.navbar-default.navbar-static-top
        .container
          %button.navbar-toggle(type='button' data-toggle='collapse' data-target='.navbar-responsive-collapse')
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar
          %a.navbar-brand(href='#') HomeAutomation
          .navbar-collapse.collapse.navbar-responsive-collapse
            %ul.nav.navbar-nav
              %li= link_to 'Dashboard', root_path
              %li= link_to 'All devices', all_devices_path
              %li= link_to 'My devices', user_devices_path(current_user.uid)

    .container
      .row
        .col-lg-12
          = bootstrap_flash
          = yield


= render "projects/blob/breadcrumb", blob: blob

.info-well.hidden-xs
  .well-segment
    %ul.blob-commit-info
      = render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref

  = render "projects/blob/auxiliary_viewer", blob: blob

#blob-content-holder.blob-content-holder
  - if !show_new_repo?
    = render 'projects/blob/header', blob: blob
    = render 'projects/blob/content', blob: blob

Add .file-holder back to _blob

= render "projects/blob/breadcrumb", blob: blob

.info-well.hidden-xs
  .well-segment
    %ul.blob-commit-info
      = render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref

  = render "projects/blob/auxiliary_viewer", blob: blob

#blob-content-holder.blob-content-holder
  - if !show_new_repo?
    %article.file-holder
      = render 'projects/blob/header', blob: blob
      = render 'projects/blob/content', blob: blob


= form_for @spree_user, :as => :spree_user, :url => spree.spree_user_password_path, :method => :put do |f|
  = render :partial => 'spree/shared/error_messages', :locals => { :target => @spree_user }
  %fieldset
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %legend= t(:change_my_password)
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %label{ for: 'spree_user_password'}= t(:password)
        = f.password_field :password
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %label{ for: 'spree_user_password_confirmation'}= t(:password_confirmation)
        = f.password_field :password_confirmation
    = f.hidden_field :reset_password_token
    .row
      .small-10.medium-6.large-4.columns.small-centered
        = f.submit t(:update_password), :class => 'button primary'

Improve look and feel by adding some responsive margins

= form_for @spree_user, :as => :spree_user, :url => spree.spree_user_password_path, :method => :put do |f|
  .row
    .small-12.medium-10.large-6.columns.medium-centered.large-centered
      = render :partial => 'spree/shared/error_messages', :locals => { :target => @spree_user }
  %fieldset
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %legend= t(:change_my_password)
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %label{ for: 'spree_user_password'}= t(:password)
        = f.password_field :password
    .row
      .small-12.medium-6.large-4.columns.medium-centered.large-centered
        %label{ for: 'spree_user_password_confirmation'}= t(:password_confirmation)
        = f.password_field :password_confirmation
    = f.hidden_field :reset_password_token
    .row
      .small-10.medium-6.large-4.columns.small-centered
        = f.submit t(:update_password), :class => 'button primary'


-# Renders the graph node with both the status icon, status name and action icon

- detailed_status = subject.detailed_status(current_user)
- details_path = detailed_status.details_path if detailed_status.has_details?
- klass = "ci-status-icon ci-status-icon-#{detailed_status}"

- if details_path
  = link_to details_path, data: { toggle: 'tooltip', title: "#{subject.name} - #{detailed_status}" } do
    %span{ class: klass }= custom_icon(detailed_status.icon)
    .ci-status-text= subject.name
- else
  %span{ class: klass }= custom_icon(detailed_status.icon)
  .ci-status-text= subject.name

- if detailed_status.has_action?
  = link_to detailed_status.action_path, method: detailed_status.action_method,
    title: "#{subject.name}: #{detailed_status.action_title}", class: 'ci-action-icon-container' do
    %i.ci-action-icon-wrapper
      = icon(detailed_status.action_icon, class: detailed_status.action_class)

Simplify graph status badge partial and require locals

-# Renders the graph node with both the status icon, status name and action icon

- subject = local_assigns.fetch(:subject)
- status = subject.detailed_status(current_user)
- klass = "ci-status-icon ci-status-icon-#{status}"

- if status.has_details?
  = link_to status.details_path, data: { toggle: 'tooltip', title: "#{subject.name} - #{status}" } do
    %span{ class: klass }= custom_icon(status.icon)
    .ci-status-text= subject.name
- else
  %span{ class: klass }= custom_icon(status.icon)
  .ci-status-text= subject.name

- if status.has_action?
  = link_to status.action_path, method: status.action_method,
    title: "#{subject.name}: #{status.action_title}", class: 'ci-action-icon-container' do
    %i.ci-action-icon-wrapper
      = icon(status.action_icon, class: status.action_class)


:markdown
  # Webhooks

  You can use webhooks to trigger actions in external services
  every time one of your scrapers finishes a run.
  You can trigger all kind of fun actions:
  send emails when a scraper is finished;
  immediately pull fresh data from a scraper’s API;
  or run realtime analysis—anything you like.

  Add *webhook URLs* under the **Webhooks heading
  on your scraper’s Settings page**.
  Every time your scraper finishes a run
  we’ll make an [HTTP POST request](https://en.wikipedia.org/wiki/POST_(HTTP))
  to each URL you’ve added.
  Use this request to trigger your custom code.

  ## Payloads

  We currently just make an empty HTTP POST request
  to your specified webhook URLs.
  You can send information through the request
  by putting it in the webhook URL,
  either as the path or as GET parameters.
  If there’s something specific you’d like included in the webhook payload
  then please [ask a question on our help forum](https://help.morph.io/).

Clarify and link first 'payloads' sentence to the heading

:markdown
  # Webhooks

  You can use webhooks to trigger actions in external services
  every time one of your scrapers finishes a run.
  You can trigger all kind of fun actions:
  send emails when a scraper is finished;
  immediately pull fresh data from a scraper’s API;
  or run realtime analysis—anything you like.

  Add *webhook URLs* under the **Webhooks heading
  on your scraper’s Settings page**.
  Every time your scraper finishes a run
  we’ll make an [HTTP POST request](https://en.wikipedia.org/wiki/POST_(HTTP))
  to each URL you’ve added.
  Use this request to trigger your custom code.

  ## Payloads

  We currently just make an empty HTTP POST request
  to your specified webhook URLs;
  no information about the scraper run
  is added as a payload.
  You can send information through the request
  by putting it in the webhook URL,
  either as the path or as GET parameters.
  If there’s something specific you’d like included in the webhook payload
  then please [ask a question on our help forum](https://help.morph.io/).


= form_tag(omniauth_authorize_path(:user, :crowd), id: 'new_crowd_user', class: 'show-gl-field-errors') do
  .form-group
    = label_tag 'Username or email', for: :username
    = text_field_tag :username, nil, {class: "form-control top", title: "This field is required", autofocus: "autofocus", required: true }
  .form-group
    = label_tag :password
    = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", required: true }
  - if devise_mapping.rememberable?
    .remember-me.checkbox
      %label{for: "remember_me"}
        = check_box_tag :remember_me, '1', false, id: 'remember_me'
        %span Remember me
  = button_tag "Sign in", class: "btn-save btn"

Fix aesthetic issues on CROWD login.

= form_tag(omniauth_authorize_path(:user, :crowd), id: 'new_crowd_user', class: 'show-gl-field-errors') do
  .form-group
    = label_tag :username, 'Username or email'
    = text_field_tag :username, nil, {class: "form-control top", title: "This field is required", autofocus: "autofocus", required: true }
  .form-group
    = label_tag :password
    = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", required: true }
  - if devise_mapping.rememberable?
    .remember-me.checkbox
      %label{for: "remember_me"}
        = check_box_tag :remember_me, '1', false, id: 'remember_me'
        %span Remember me
  = submit_tag "Sign in", class: "btn-save btn"


:css
  .page-alert .alert-box { background-color: #f27052; }

.alert-cta
  %h6
    NEW Open Food Network
    %strong
      = link_to "Connect", "https://openfoodnetwork.org/au/connect/", target: '_blank'
    and
    %strong
      = link_to "Learn", "https://openfoodnetwork.org/au/learn/", target: '_blank'
    \- Go exploring and get inspired!

Update page alert label and background colour

:css
  .page-alert .alert-box { background-color: #fdddac; }

.alert-cta
  %h6
    Open Food Network
    %strong
      = link_to t(:label_connect), "https://openfoodnetwork.org/au/connect/", target: '_blank'
    and
    %strong
      = link_to t(:label_learn), "https://openfoodnetwork.org/au/learn/", target: '_blank'
    \- Go exploring and get inspired!


= render 'settings/muted'

- provide(:title, generate_title('Muted words'))
- parent_layout 'user/settings'

Add translation for mute rules title

= render "settings/muted"

- provide(:title, generate_title(t(".title")))
- parent_layout "user/settings"


%header.jumbotron
  .row.justify-content-center.align-items-center
    .col-8.col-md-6.col-lg-4
      = image_tag 'logo.png', alt: 'LiveLog logo', class: 'img-fluid'
    .col-lg.text-center
      %h1.display-3 LiveLog
      %p.lead<
        京都大学を中心に活動するアコースティック軽音サークル
        %br
        「京大アンプラグド」のセットリスト管理アプリ
      = render 'songs/form_search'
      %p
        = link_to 'https://play.google.com/store/apps/details?id=net.ku_unplugged.livelog&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1', target: '_blank' do
          %img{src: 'https://play.google.com/intl/en_us/badges/images/generic/ja_badge_web_generic.png', alt: 'Google Play で手に入れよう', width: 160}

%section.mb-3
  %header.page-header
    %h2 Today's Pickup!
  .song-list
    = render @song if @song

%section
  %header.page-header
    %h2 Latest Lives
.row
  .col-lg-6
    .card
      %table.table.table-hover
        %tbody
          = render partial: 'lives/live', collection: @lives, cached: true

Remove link to google play

%header.jumbotron
  .row.justify-content-center.align-items-center
    .col-8.col-md-6.col-lg-4
      = image_tag 'logo.png', alt: 'LiveLog logo', class: 'img-fluid'
    .col-lg.text-center
      %h1.display-3 LiveLog
      %p.lead<
        京都大学を中心に活動するアコースティック軽音サークル
        %br
        「京大アンプラグド」のセットリスト管理アプリ
      = render 'songs/form_search'

%section.mb-3
  %header.page-header
    %h2 Today's Pickup!
  .song-list
    = render @song if @song

%section
  %header.page-header
    %h2 Latest Lives
.row
  .col-lg-6
    .card
      %table.table.table-hover
        %tbody
          = render partial: 'lives/live', collection: @lives, cached: true


%tr(class="level-#{level} #{group.type.tableize.singularize.gsub('_', '-')}")
  %td
    = link_to(group.name, path(group), :class => 'title')
  %td
    %span.indicator.numeric.neutral= group.assets_count
  %td
    %span.time= group.updated_at
    by #{group.updater_name}

- if group.collection? and !group.children.empty?
  - group.children.summary.each do |group|
    = render :partial => 'islay/asset_groups/group', :locals => {:group => group, :level => level + 1}

Use the correct full path when rendering the group partial.

%tr(class="level-#{level} #{group.type.tableize.singularize.gsub('_', '-')}")
  %td
    = link_to(group.name, path(group), :class => 'title')
  %td
    %span.indicator.numeric.neutral= group.assets_count
  %td
    %span.time= group.updated_at
    by #{group.updater_name}

- if group.collection? and !group.children.empty?
  - group.children.summary.each do |group|
    = render :partial => 'islay/admin/asset_groups/group', :locals => {:group => group, :level => level + 1}


- provide :title, 'Projects'

.page-header
  %h1= yield :title

- if @projects.any?
  %table.table.table-striped
    %thead
      %tr
        %th Name
        %th Viewports
        %th
          = succeed 's' do
            %abbr.initialism{ title: 'Uniform Resource Locators' } URL

    %tbody
      - @projects.each do |project|
        %tr
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td= project.urls.count

= link_to new_project_path, class: 'btn btn-primary' do
  %span.glyphicon.glyphicon-plus
  Add new Project

Move "Add new Project" button to header

- provide :title, 'Projects'

.page-header
  %h1
    = yield :title
    = link_to new_project_path, class: 'btn btn-primary' do
      %span.glyphicon.glyphicon-plus
      Add new Project

- if @projects.any?
  %table.table.table-striped
    %thead
      %tr
        %th Name
        %th Viewports
        %th
          = succeed 's' do
            %abbr.initialism{ title: 'Uniform Resource Locators' } URL

    %tbody
      - @projects.each do |project|
        %tr
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td= project.urls.count


%p
  %label{:for => 'title'} Title:
  =form.text_field :title
%p
  %label{:for => 'template'} Template:
  =select(:frame, :template, TemplateManager.inner_templates(@presentation ? @presentation.template : presentation.template ))
%p
  %label{:for => 'parent'} Parent:
  =select(:frame, :parent_id, options_from_collection_for_select(@presentation ? Frame.where(:presentation_id => @presentation.id).order("position") : Frame.where(:presentation_id => presentation.id).order("position"), 'id', 'title', {:selected => @frame ? @frame.parent_id : 1 , :disabled => disable_self ? @frame.id : ""}))

Remove the parent_frame selection box. This is easier through drag&drop and saves some space.


- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .col-xs-12
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12.text-center
    .text-content
      - if has_button && current_user
        %h4
          The Issue Tracker is the place to add things that need to be improved or solved in a project
        %p
          Issues can be bugs, tasks or ideas to be discussed.
          Also, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        .text-center
          %h4 There are no issues to show.

Remove double new issue button on group issue dashboard empty state

- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .col-xs-12
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12.text-center
    .text-content
      - if has_button && current_user
        %h4
          The Issue Tracker is the place to add things that need to be improved or solved in a project
        %p
          Issues can be bugs, tasks or ideas to be discussed.
          Also, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        - else
          = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        .text-center
          %h4 There are no issues to show.


- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
- token = local_assigns.fetch(:token)

- scopes.each do |scope|
  %fieldset
    = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}"
    = label_tag ("#{prefix}_scopes_#{scope}"), scope
    %span= t(scope, scope: [:doorkeeper, :scopes])
    .scope-description= t scope, scope: [:doorkeeper, :scope_desc]

Resolve "Labels were bold in 10.8 but not with bootstrap4"

- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
- token = local_assigns.fetch(:token)

- scopes.each do |scope|
  %fieldset
    = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}"
    = label_tag ("#{prefix}_scopes_#{scope}"), scope, class: "label-light"
    %span= t(scope, scope: [:doorkeeper, :scopes])
    .scope-description= t scope, scope: [:doorkeeper, :scope_desc]


.search
  =form_tag({:controller=>:accountancy, :action=>:accounts, :prefix=>params[:prefix]}, :method=>:get) do
    %table
      %tr
        %td.crit
          %label=tc("search_account")
          =text_field_tag :key, params[:key]||session[:account_key]
          %label{:for=>"used_accounts"}=tc(:used_accounts)
          =check_box_tag("used_accounts", "1", params[:used_accounts], :onchange=>"toggleInterval();")
        %td.submit{:rowspan=>2}=submit_tag tg("search_go"), :name=>nil
      %tr
        %td.crit#interval
          %label=tg(:from)
          =calendar_field_tag(:started_on, (params[:started_on]||(Date.today-1.year+1.day)))
          %label=tg(:to)
          =calendar_field_tag(:stopped_on, (params[:stopped_on]||Date.today))
  :javascript
    window.toggleInterval=function() { toggleElement('interval', $('used_accounts').checked); }
    toggleInterval();


Create form for changing amount of money

= simple_form_for :campaign, url: campaign_change_money_url(campaign.id) do |f|
  = f.error_notification

  .form-inputs
    = f.input :money_change

  .form-actions
    = f.button :submit, 'Change'


%pre
  %code
    :preserve

      # Require the hoptoad_notifier gem in you App.
      # --------------------------------------------
      #
      # Rails 3 - In your Gemfile
      #  gem 'hoptoad_notifier'
      #
      # Rails 2 - In environment.rb
      #  config.gem 'hoptoad_notifier'
      #
      # Then add the following to config/initializers/errbit.rb
      # -------------------------------------------------------
      HoptoadNotifier.configure do |config|
         config.api_key = '#{app.api_key}'
         config.host    = '#{request.host}'
         config.port    = #{request.port} # Note: Deployment notifications only work on port 80
      end
      #
      # Testing
      # -------
      #
      # Rails 2 - you'll need to vendor hoptoad_notifier to get the rake tasks
      #  rake gems:unpack GEM=hoptoad_notifier
      #
      # Run:
      #  rake hoptoad:test
      #  refresh this page

Remove lie comment about deploy requiring port 80.

%pre
  %code
    :preserve

      # Require the hoptoad_notifier gem in you App.
      # --------------------------------------------
      #
      # Rails 3 - In your Gemfile
      #  gem 'hoptoad_notifier'
      #
      # Rails 2 - In environment.rb
      #  config.gem 'hoptoad_notifier'
      #
      # Then add the following to config/initializers/errbit.rb
      # -------------------------------------------------------
      HoptoadNotifier.configure do |config|
         config.api_key = '#{app.api_key}'
         config.host    = '#{request.host}'
         config.port    = #{request.port}
      end
      #
      # Testing
      # -------
      #
      # Rails 2 - you'll need to vendor hoptoad_notifier to get the rake tasks
      #  rake gems:unpack GEM=hoptoad_notifier
      #
      # Run:
      #  rake hoptoad:test
      #  refresh this page


- content_for :page_title do
  = t(:new)

- content_for :page_actions do
  %li= button_link_to t(:back_to_orders_list), spree.admin_orders_path, :icon => 'icon-arrow-left'

= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Order Details' }

= csrf_meta_tags

%div{"data-hook" => "admin_order_new_header"}
  = render :partial => 'spree/shared/error_messages', :locals => { :target => @order }

= render :partial => 'add_product'

- unless @order.line_items.any?
  %div{"data-hook" => "admin_order_new_form"}
    #order-form-wrapper
      = render :partial => 'form'

- content_for :head do
  = javascript_tag 'var expand_variants = true;'


Move all the barclamp files into the barclamps for the views.

%p
  = render :partial => "barclamp/node_selector"

:javascript
  $(document).ready(function(){
    var constraints = { "deployer-client": { "unique": false, "count": -1 } };
    node_selector($('#drag_drop'), constraints);
  });


Add avatar upload form from Heroku tutorial

= form_for(@friend, multipart: true) do |f|
  - if @friend.errors.any?
    #error_explanation
      %h2
        = pluralize(@friend.errors.count, "error")
        prohibited this friend from being saved:
      %ul
        - @friend.errors.full_messages.each do |msg|
          %li= msg
  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :avatar
    = f.file_field :avatar
  .actions
    = f.submit 'Make a friend'
    = link_to 'Nevermind', friends_path, class: 'button'


.contextual
  = contextual_links

%h1= t_title

#user
  = render :partial => 'form'

Fix double contextual class in new user view.


Move the Basic tab to a partial, though we're not currently using what's in it

%table.list
  %thead{ :style => "max-height: 0.5em" }
    %tr
      %th{ :colspan => '6', :style => "line-height: 0.1em" }
  %tbody
    %tr
      %th.right{ :style => "width: 15%" } 30-Day
      %td.attendance= member_attendance_colored(@member.attendance_30)
      %td= progress_bar(@member.attendance_30 * 100, :container_width => 75)
    %tr
      %th.right 90-Day
      %td.attendance= member_attendance_colored(@member.attendance_90)
      %td= progress_bar(@member.attendance_90 * 100, :container_width => 75)
    %tr
      %th.right Lifetime
      %td.right{ :style => "width: 20%" }= member_attendance_colored(@member.attendance_lifetime)
      %td= progress_bar(@member.attendance_lifetime * 100, :container_width => 75)
    %tr
      %th.right Normal LF
      %td.number= number_with_precision(@member.lf, :precision => 2)
    %tr
      %th.right Best in Slot LF
      %td.number= number_with_precision(@member.bislf, :precision => 2)
    %tr
      %th.right Situational LF
      %td.number= number_with_precision(@member.sitlf, :precision => 2)


%li.user
  = link_to image_tag(gravatar_url(user.gravatar_id), :width => 80, :height => 80, :alt =>user.nickname), user.nickname, rel: 'tooltip', data: { original_title: "#{user.nickname} - #{user.pull_requests.year(current_year).count} pull requests." }

Use proper link in user partial

%li.user
  = link_to image_tag(gravatar_url(user.gravatar_id), :width => 80, :height => 80, :alt =>user.nickname), user_path(user.nickname), rel: 'tooltip', data: { original_title: "#{user.nickname} - #{user.pull_requests.year(current_year).count} pull requests." }


Add .l-panel-content to new article view

.l-panel-content
  .l-constrained
    %h2= t('.title')

  = comfy_form_for @page, :as => :page, :url => {:action => :create}, :html => {:multipart => true} do |form|
    = render form