%div.embeddable-container
  .embeddable_options
    Managed interactive
    .model-edit
      .interactive-content
        %div{:id => "authorable-interactive-#{embeddable.id}"}
  = render :partial => "shared/embedded_editor_wrapper_plugins", :locals => { :embeddable => embeddable }
.embeddable_tools
  .drag_handle
  = render :partial => "shared/embedded_editor_links", :locals => { :embeddable => embeddable, :page => page, :type => 'managed_int', :allow_hide => allow_hide }
.embeddable_options
  Managed interactive
  .model-edit
    .interactive-content
      %div{:id => "authorable-interactive-#{embeddable.id}"}

%div{:id => "interactive-preview-#{embeddable.id}"}

= render :partial => "shared/embedded_editor_wrapper_plugins", :locals => { :embeddable => embeddable }

:javascript
  $(document).ready( function() {
    LARA.PageItemAuthoring.renderInteractiveAuthoringPreview(document.getElementById("interactive-preview-#{embeddable.id}"), {
      interactive: #{embeddable.to_interactive_json}
    });
  });

Remove old drag handle icon from managed interactive.

%div.embeddable-container
  .embeddable_options
    Managed interactive
    .model-edit
      .interactive-content
        %div{:id => "authorable-interactive-#{embeddable.id}"}
  = render :partial => "shared/embedded_editor_wrapper_plugins", :locals => { :embeddable => embeddable }
.embeddable_tools
  = render :partial => "shared/embedded_editor_links", :locals => { :embeddable => embeddable, :page => page, :type => 'managed_int', :allow_hide => allow_hide }
.embeddable_options
  Managed interactive
  .model-edit
    .interactive-content
      %div{:id => "authorable-interactive-#{embeddable.id}"}

%div{:id => "interactive-preview-#{embeddable.id}"}

= render :partial => "shared/embedded_editor_wrapper_plugins", :locals => { :embeddable => embeddable }

:javascript
  $(document).ready( function() {
    LARA.PageItemAuthoring.renderInteractiveAuthoringPreview(document.getElementById("interactive-preview-#{embeddable.id}"), {
      interactive: #{embeddable.to_interactive_json}
    });
  });


.summary-mod
  = content_for :title do
    = "Response Summary for #{@activity.name}"

  .actions
    .print{ :onclick => 'window.print();'} Print
    .close{ :onclick => 'window.close();'} Close

  %p The activity questions are shown in bold and your answers are presented in order below.

  %h2.h2= @activity.name
  - @answers.each do |answer|
    = render :partial => "#{answer.class.name.underscore.pluralize}/summary",
      :locals => {:answer => answer}

  .actions.bottom
    .print{ :onclick => 'window.print();'} Print
    .close{ :onclick => 'window.close();'} Close

Add sequence to summary title when relevant

.summary-mod
  = content_for :title do
    = "Response Summary for #{@activity.name}"

  .actions
    .print{ :onclick => 'window.print();'} Print
    .close{ :onclick => 'window.close();'} Close

  %p The activity questions are shown in bold and your answers are presented in order below.

  %h2.h2= @activity.name
  - if @sequence
    %h3= "in #{@sequence.title}"
  - @answers.each do |answer|
    = render :partial => "#{answer.class.name.underscore.pluralize}/summary",
      :locals => {:answer => answer}

  .actions.bottom
    .print{ :onclick => 'window.print();'} Print
    .close{ :onclick => 'window.close();'} Close


.variants.row
  .small-3.medium-4.large-6.columns.variant-name
    .inline {{ ::variant.name_to_display }}
    .variant-unit {{ ::variant.unit_to_display }}
    .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"}
      %i.ofn-i_056-bulk><
      %em><
        \ {{::'bulk' | t}}
  .small-4.medium-3.large-2.columns.variant-price
    -# Now in a template in app/assets/javascripts/templates !
    %price-breakdown{"price-breakdown" => "_", variant: "variant",
      "price-breakdown-append-to-body" => "true",
      "price-breakdown-placement" => "left",
      "price-breakdown-animation" => true}
    {{ variant.price_with_fees | localizeCurrency }}
  .medium-2.large-1.columns.total-price
    %span{"ng-class" => "{filled: variant.line_item.total_price}"}
      {{ variant.line_item.total_price | localizeCurrency }}

  %ng-include{src: "'partials/shop_variant_no_group_buy.html'"}
  %ng-include{src: "'partials/shop_variant_with_group_buy.html'"}

Fix "Place price-breakdown and price in the middle"

.variants.row
  .small-3.medium-4.large-6.columns.variant-name
    .inline {{ ::variant.name_to_display }}
    .variant-unit {{ ::variant.unit_to_display }}
    .bulk-buy.inline{"ng-if" => "::variant.product.group_buy"}
      %i.ofn-i_056-bulk><
      %em><
        \ {{::'bulk' | t}}
  .small-4.medium-3.large-2.columns.variant-price
    %price-breakdown{"price-breakdown" => "_", variant: "variant",
      "price-breakdown-append-to-body" => "true",
      "price-breakdown-placement" => "left",
      "price-breakdown-animation" => true}
    {{ variant.price_with_fees | localizeCurrency }}
  .medium-2.large-1.columns.total-price
    %span{"ng-class" => "{filled: variant.line_item.total_price}"}
      {{ variant.line_item.total_price | localizeCurrency }}

  %ng-include{src: "'partials/shop_variant_no_group_buy.html'"}
  %ng-include{src: "'partials/shop_variant_with_group_buy.html'"}


:ruby
  basedir = "#{root}/#{source}#{current_page.url}"

  dirs = Dir.glob("#{basedir}**/*html*")
  #dirs = Dir.glob("#{basedir}*/*html*")

  pages = sitemap.resources.select do |p|
    dirs.include?(p.source_file)
  end

~ wrap_layout :layout do
  = yield

  - fallback_title = current_page.url.split('/').last.parameterize.titleize

  %h1= "#{pages.count} pages under #{current_page.data.title || fallback_title}"

  %ul
    - pages.sort_by { |p| p.data[:title].downcase }.each do |p|
      - next if p.url == current_page.url
      %li= link_to p.data.title, p.url

Fix the build after the ovirt 4.0 merge

:ruby
  basedir = "#{root}/#{source}#{current_page.url}"

  dirs = Dir.glob("#{basedir}**/*html*")
  #dirs = Dir.glob("#{basedir}*/*html*")

  pages = sitemap.resources.select do |p|
    dirs.include?(p.source_file)
  end

~ wrap_layout :layout do
  = yield

  - fallback_title = current_page.url.split('/').last.parameterize.titleize

  %h1= "#{pages.count} pages under #{current_page.data.title || fallback_title}"

  %ul
    - pages.sort_by { |p| ( p.data[:title] || p.url.split('/').last.parameterize.titleize).downcase }.each do |p|
      - next if p.url == current_page.url
      %li= link_to p.data.title, p.url


%header#header
  .container
    %h1.header__logo.logo
      %a.scroll-to{href: "#intro"}
        = partial "svg-logo", locals: { width: 68, height: 24, strokeColor: "#fff" }
        %span.name Alpinelab

    %nav.header__navigation{role: "navigation"}
      %ul.header__navigation-list
        - get_menu_labels(%w{what-we-do our-projects team commitments}).each_with_index do |(key, label), index|
          %li.header__navigation-item
            %a.scroll-to{href: "##{key}"}= label
        %li.header__navigation-item
          %a{href: "/blog"}
            -# FIXME: test/check this change
            Blog

    %a.header__write-us{href: "mailto:dahu@alpine-lab.com", title: I18n.t("corporate.footer.title")}
      %i.fa.fa-pencil

    %ul.header__languages
      - [:fr, :en].each do |lang|
        %li.header__languages-item
          %a{class: ('active' if lang == I18n.locale), href: I18n.locale == lang ? nil : "/#{lang unless lang == :fr}"}= lang

Remove trailing spaces from header partial


.row.closed-shop-header
  .small-12.columns
    .content{ "darker-background" => true }
      %h4
        .warning-sign
          .rectangle
          %strong !
        .message
          = t :shopping_oc_closed
      %p
        = render partial: "shopping_shared/next_order_cycle"
        = render partial: "shopping_shared/last_order_cycle"

.row
  .small-12.columns
    .content
      .shopfront_closed_message
      - if shopfront_closed_message?
        = current_distributor.preferred_shopfront_closed_message.html_safe
      - else
        = t :shopping_oc_closed_description

Fix closed shop message not displaying full-width

.closed-shop-header
  .row
    .small-12.columns
      .content{ "darker-background" => true }
        %h4
          .warning-sign
            .rectangle
            %strong !
          .message
            = t :shopping_oc_closed
        %p
          = render partial: "shopping_shared/next_order_cycle"
          = render partial: "shopping_shared/last_order_cycle"

.row
  .small-12.columns
    .content
      .shopfront_closed_message
      - if shopfront_closed_message?
        = current_distributor.preferred_shopfront_closed_message.html_safe
      - else
        = t :shopping_oc_closed_description


%OTOrganism{ :local_id => ot_local_id_for(biologica_organism), :name => biologica_organism.name, :sex => biologica_organism.sex, :allowFatalCharacteristic => biologica_organism.fatal_characteristics, :alleles => biologica_organism.alleles, :strain => biologica_organism.strain, :chromosomesColor => biologica_organism.chromosomes_color}
  %world
    = render_scoped_reference(biologica_organism.biologica_world)

Fix the "allow fatal characteristics" attribute in biologica organisms.

%OTOrganism{ :local_id => ot_local_id_for(biologica_organism), :name => biologica_organism.name, :sex => biologica_organism.sex, :allowFatalCharacteristic => biologica_organism.fatal_characteristics.to_s, :alleles => biologica_organism.alleles, :strain => biologica_organism.strain, :chromosomesColor => biologica_organism.chromosomes_color}
  %world
    = render_scoped_reference(biologica_organism.biologica_world)


= form_tag(omniauth_callback_path(:user, server['provider_name']), id: 'new_ldap_user', class: "show-gl-field-errors") do
  .form-group
    = label_tag :username, "#{server['label']} Login"
    = 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 btn-block"

Use correct verbiage for username in login form.

= form_tag(omniauth_callback_path(:user, server['provider_name']), id: 'new_ldap_user', class: "show-gl-field-errors") do
  .form-group
    = label_tag :username, "#{server['label']} 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 btn-block"


%ul.list-unstyled
  - @committee.committee_members.each do |committee_member|
    %li
      = link_to committee_member.member.name, committee_member.member
      = link_to 'Remove', editor_committee_committee_member_path(@committee, committee_member), method: :delete, data: { confirm: "Are you sure you want to remove Committee Member #{committee_member.member.name}?" }, class: 'btn btn-xs btn-danger'
  %li= link_to 'Add Committee Member', new_editor_committee_committee_member_path(@committee), class: 'btn btn-xs btn-primary'

Order committee members by last name, first name.

%ul.list-unstyled
  - @committee.committee_members.includes(:member).order('members.last_name', 'members.first_name').each do |committee_member|
    %li
      = link_to committee_member.member.name_reverse, committee_member.member
      = link_to 'Remove', editor_committee_committee_member_path(@committee, committee_member), method: :delete, data: { confirm: "Are you sure you want to remove Committee Member #{committee_member.member.name}?" }, class: 'btn btn-xs btn-danger'
  %li= link_to 'Add Committee Member', new_editor_committee_committee_member_path(@committee), class: 'btn btn-xs btn-primary'


= simple_form_for email_template, url: email_template_form_url(email_template) do |f|
  = f.input :subject
  = f.input :slug, disabled: true
  = f.input :from
  = f.input :cc
  = f.input :bcc
  = f.input :body

  = f.button :submit

Increase the height of EmailTemplate.body form field

= simple_form_for email_template, url: email_template_form_url(email_template) do |f|
  = f.input :subject
  = f.input :slug, disabled: true
  = f.input :from
  = f.input :cc
  = f.input :bcc
  = f.input :body, input_html: { rows: 10 }

  = f.button :submit


- content_for(:title, 'Vous avez été invité à donner votre avis')

- avis_link = @avis.gestionnaire.present? ? gestionnaire_avis_url(@avis) : sign_up_gestionnaire_avis_url(@avis.id, @avis.email)

- content_for(:footer) do
  Merci de ne pas répondre à cet email. Donnez votre avis
  = link_to("sur notre site", avis_link)
  ou
  = succeed '.' do
    = mail_to(@avis.claimant.email, "contactez la personne qui vous a invité")

%p
  Bonjour,

%p
  Vous avez été invité par
  %strong= @avis.claimant.email
  = "à donner votre avis sur le dossier nº #{@avis.dossier.id} de la démarche :"
  %strong= @avis.dossier.procedure.libelle

%p
  = "#{@avis.claimant.email} vous a écrit :"
  %br
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 16px;" }
  = @avis.introduction

- if @avis.gestionnaire.present?
  %p
    = link_to "Connectez-vous pour donner votre avis", avis_link
- else
  %p
    = link_to "Inscrivez-vous pour donner votre avis", avis_link

= render partial: "layouts/mailers/signature"

Improve the avis invitation email footer

- content_for(:title, 'Vous avez été invité à donner votre avis')

- avis_link = @avis.gestionnaire.present? ? gestionnaire_avis_url(@avis) : sign_up_gestionnaire_avis_url(@avis.id, @avis.email)

- content_for(:footer) do
  Merci de ne pas répondre à cet email. Donnez votre avis
  = link_to("sur demarches-simplifiees.fr", avis_link)
  ou
  = succeed '.' do
    = mail_to(@avis.claimant.email, "contactez la personne qui vous a invité")

%p
  Bonjour,

%p
  Vous avez été invité par
  %strong= @avis.claimant.email
  = "à donner votre avis sur le dossier nº #{@avis.dossier.id} de la démarche :"
  %strong= @avis.dossier.procedure.libelle

%p
  = "#{@avis.claimant.email} vous a écrit :"
  %br
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 16px;" }
  = @avis.introduction

- if @avis.gestionnaire.present?
  %p
    = link_to "Connectez-vous pour donner votre avis", avis_link
- else
  %p
    = link_to "Inscrivez-vous pour donner votre avis", avis_link

= render partial: "layouts/mailers/signature"


%h1 Admin Event Proposals

%table.table.table-striped
  %thead
    %tr
      %th Title
      %th Submitted by
      %th Status

  %tbody
    - @admin_event_proposals.each do |event_proposal|
      %tr
        %td= link_to event_proposal.title, admin_event_proposal_path(event_proposal)
        %td= event_proposal.owner&.name
        %td= event_proposal.status

Add capacity and duration to proposal admin screen

%h1 Admin Event Proposals

%table.table.table-striped
  %thead
    %tr
      %th Title
      %th Submitted by
      %th.text-right Capacity
      %th.text-right Duration
      %th Status

  %tbody
    - @admin_event_proposals.each do |event_proposal|
      %tr
        %td= link_to event_proposal.title, admin_event_proposal_path(event_proposal)
        %td= event_proposal.owner&.name
        %td.text-right
          - if event_proposal.registration_policy.slots_limited?
            .text-nowrap
              = event_proposal.registration_policy.minimum_slots
              \/
              = event_proposal.registration_policy.preferred_slots
              \/
              = event_proposal.registration_policy.total_slots
          - else
            'unlimited'
        %td.text-right
          #{(event_proposal.length_seconds / 1.hour).floor}:#{sprintf('%02d', (event_proposal.length_seconds / 1.minute) % (1.hour / 1.minute))}
        %td= event_proposal.status


%ul
  - load_profile_category.load_profiles.order(:name).each do |profile|
    %li
      = link_to profile do
        = profile.display_name
      %span= I18n.l(profile.created_at, format: :short)

Sort load profiles by 'key' instead of 'name'

%ul
  - load_profile_category.load_profiles.order(:key).each do |profile|
    %li
      = link_to profile do
        = profile.display_name
      %span= I18n.l(profile.created_at, format: :short)


.delete
  = f.hidden_field :_destroy
  = link_to 'Delete page part', '#', :class => 'icon delete', :title => "Delete the current page part"

= f.error_notification

= f.input :title, :class => 'page_part_title'
= f.input :filter, :collection => PageEngine.filters, :include_blank => false, :class => 'filter', :input_html => { :class => 'filter', :rel => "page_part_content_#{f.object.id}" }
= f.input :content, :input_html => { 'data-filter' => f.object.filter, :class => 'editor ignore_tab', :id => "page_part_content_#{f.object.id}" }

Rename the text area class

.delete
  = f.hidden_field :_destroy
  = link_to 'Delete page part', '#', :class => 'icon delete', :title => "Delete the current page part"

= f.error_notification

= f.input :title, :class => 'page_part_title'
= f.input :filter, :collection => PageEngine.filters, :include_blank => false, :class => 'filter', :input_html => { :class => 'filter', :rel => "page_part_content_#{f.object.id}" }
= f.input :content, :input_html => { 'data-filter' => f.object.filter, :class => 'page_engine_editor ignore_tab', :id => "page_part_content_#{f.object.id}" }


- if merge_request.merged?
  - mr_status_date = merge_request.merged_at
  - mr_status_title = 'Merged'
  - mr_status_icon = 'merge'
  - mr_status_class = 'merged'
- elsif merge_request.closed?
  - mr_status_date = merge_request.closed_event&.created_at
  - mr_status_title = 'Closed'
  - mr_status_icon = 'issue-close'
  - mr_status_class = 'closed'
- else
  - mr_status_date = merge_request.created_at
  - mr_status_title = 'Opened'
  - mr_status_icon = 'issue-open-m'
  - mr_status_class = 'open'

- mr_status_tooltip = "
#{mr_status_title}
#{l(mr_status_date.to_time, format: :timeago_tooltip)}"

%span.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title:  mr_status_tooltip } }
  = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")

Update tooltip for issues related merge request status

- time_format = '%b %e, %Y %l:%M%P %Z%z'

- if merge_request.merged?
  - mr_status_date = merge_request.merged_at
  - mr_status_title = 'Merged'
  - mr_status_icon = 'merge'
  - mr_status_class = 'merged'
- elsif merge_request.closed?
  - mr_status_date = merge_request.closed_event&.created_at
  - mr_status_title = 'Closed'
  - mr_status_icon = 'issue-close'
  - mr_status_class = 'closed'
- else
  - mr_status_date = merge_request.created_at
  - mr_status_title = 'Opened'
  - mr_status_icon = 'issue-open-m'
  - mr_status_class = 'open'

- mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}"

%span.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title:  mr_status_tooltip } }
  = sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")


%p
  == #{@group.admin_user.first_name} has invited you to join #{@group.name} at #{link_to('DrawAList.com', new_user_url(token: @group.token, email: @invitation.email))}

%p
  == Once a member of #{@group.name}, you'll be able to fill out your wishlist. Once everyone is ready to go, group members will be randomly paired with each other. Your pair will see your wishlist and you will see your pair's wishlist. We'll even alert you if your pair makes any changes to their list, so you can be sure to the perfect gift!

%p
  == All you have to do is #{link_to('sign up', '#')} and get started!

%p
  == - The DrawAList Team

Add correct link to invitations email

%p
  == #{@group.admin_user.first_name} has invited you to join #{@group.name} at #{link_to('DrawAList.com', new_user_url(token: @group.token))}

%p
  == Once a member of #{@group.name}, you'll be able to fill out your wishlist. Once everyone is ready to go, group members will be randomly paired with each other. Your pair will see your wishlist and you will see your pair's wishlist. We'll even alert you if your pair makes any changes to their list, so you can be sure to the perfect gift!

%p
  == All you have to do is #{link_to('sign up', new_user_url(token: @group.token))} and get started!

%p
  == - The DrawAList Team


= simple_form_for @receipt_item_category do |f|
  = f.errors
  .inputs
    = f.input :name
    .form-group
      .col-sm-offset-2
        = f.submit t('general.save'), class: 'btn btn-primary'
        - if !@receipt_item_category.new_record?
          = link_to t('general.delete'), @receipt_item_category, class: 'btn btn-default', method: :delete, confirm: t('general.are_you_sure')

Fix receipt item category form

= simple_form_for @receipt_item_category do |f|
  - if @receipt_item_category.errors.any?
    #error_explanation
      %h2= "#{pluralize(@receipt_item_category.errors.count, "error")} prohibited this from being saved:"
      %ul
        - @receipt_item_category.errors.full_messages.each do |msg|
          %li= msg
  .inputs
    = f.input :name
    .form-group
      .col-sm-offset-2
        = f.submit t('general.save'), class: 'btn btn-primary'
        - if !@receipt_item_category.new_record?
          = link_to t('general.delete'), @receipt_item_category, class: 'btn btn-default', method: :delete, confirm: t('general.are_you_sure')


.dropdown.inline
  = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }, id: 'sort-members-dropdown')
  %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
    %li.dropdown-header
      Sort by
    - member_sort_options_hash.each do |value, title|
      %li
        = link_to filter_group_project_member_path(sort: value), class: ("is-active" if @sort == value) do
          = title

Remove unused id from shared members sort dropdown

.dropdown.inline
  = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' })
  %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
    %li.dropdown-header
      Sort by
    - member_sort_options_hash.each do |value, title|
      %li
        = link_to filter_group_project_member_path(sort: value), class: ("is-active" if @sort == value) do
          = title


= contextual_links

%h2= t_title

= paginated_section @ccounts, :params => {:query => params[:query]} do
  %table.list#days_list
    %tr
      %th= t_attr :date
      %th.currency= t_attr :cash
      %th.currency= t_attr :card_turnover
      %th.currency= t_attr :gross_turnover
      %th.currency= t_attr :net_turnover
      %th.currency= t_attr :client_count
      %th.currency= t_attr :expenses
      %th.currency= t_attr :credit_turnover
      %th.currency= t_attr :discount
      %th.action-links

    = render @days

Fix type in days index view.

= contextual_links

%h2= t_title

= paginated_section @accounts, :params => {:query => params[:query]} do
  %table.list#days_list
    %tr
      %th= t_attr :date
      %th.currency= t_attr :cash
      %th.currency= t_attr :card_turnover
      %th.currency= t_attr :gross_turnover
      %th.currency= t_attr :net_turnover
      %th.currency= t_attr :client_count
      %th.currency= t_attr :expenses
      %th.currency= t_attr :credit_turnover
      %th.currency= t_attr :discount
      %th.action-links

    = render @days


-# Not all inputs are ng inputs, they don't make the ng-form dirty on change.
-# ng-change is only valid for inputs, not for a form.
-# So we use onchange and have to get the scope to access the ng controller
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise_form",
  "ng-app" => 'admin.enterprises',
  "ng-controller" => 'enterpriseCtrl',
  'onchange' => 'angular.element(enterprise_form).scope().setFormDirty()',
  } do |f|

  %save-bar{ buttons: "[{ text: 'Update', action: submit, param: null, class: 'red' }, { text: 'Cancel', action: cancel, param: '#{main_app.admin_enterprises_path}' }]", form: "enterprise_form" }

  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'admin/shared/side_menu'
      .one.column
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f

Update editing enterprise page save-bar

-# Not all inputs are ng inputs, they don't make the ng-form dirty on change.
-# ng-change is only valid for inputs, not for a form.
-# So we use onchange and have to get the scope to access the ng controller
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise_form",
  "ng-app" => 'admin.enterprises',
  "ng-controller" => 'enterpriseCtrl',
  'onchange' => 'angular.element(enterprise_form).scope().setFormDirty()',
  } do |f|

  %save-bar{ dirty: "enterprise_form.$dirty", persist: "true" }
    %input.red{ type: "button", value: "Update", ng: { click: "submit()", disabled: "!enterprise_form.$dirty" } }
    %input{ type: "button", ng: { value: "enterprise_form.$dirty ? 'Cancel' : 'Close'", click: "cancel('#{main_app.admin_enterprises_path}')" } }

  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'admin/shared/side_menu'
      .one.column
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f


%h3.heading-small
  = "Help with sending the evidence"

%p
  You have electronic evidence on disk that relates to this claim. It is recommended that you send it by recorded delivery.

%p
  Please fill the
  %a{:href => "/CCD-Electronic-Evidence-coversheet.pdf", :rel => "external", :target => "_blank"}
    electronic evidence coversheet
  and include it with your disk(s).

= render partial: 'external_users/claims/supporting_documents/laa_address', locals: { f: f }

Update the reference to the disc_evidence_coversheet

%h3.heading-small
  = "Help with sending the evidence"

%p
  You have electronic evidence on disk that relates to this claim. It is recommended that you send it by recorded delivery.

%p
  Please fill the
  %a{:href => disc_evidence_external_users_claim_path(@claim), :rel => "external", :target => "_blank"}
    electronic evidence coversheet
  and include it with your disk(s).

= render partial: 'external_users/claims/supporting_documents/laa_address', locals: { f: f }


%script{ type: "text/ng-template", id: "shop/shop.html" }
  .order-cycle-bar.hide-for-large-up
    = render partial: "shopping_shared/order_cycles"

  - if no_open_order_cycles?
    = render partial: "shop/messages/closed_shop"

  - else
    .row
      .small-12.columns
        = render partial: "shop/messages/select_oc"
        = render partial: "shop/products/form"

Move messages and products form outside of row and columns to enable full-width

%script{ type: "text/ng-template", id: "shop/shop.html" }
  .order-cycle-bar.hide-for-large-up
    = render partial: "shopping_shared/order_cycles"

  - if no_open_order_cycles?
    = render partial: "shop/messages/closed_shop"

  - else
    = render partial: "shop/messages/select_oc"
    = render partial: "shop/products/form"


%p= form.collection_select :day, (1..31).collect, :to_s, :to_s
%p= form.text_field :explicit_value, :class=>:money
%p= form.text_field :vendor_name,    :default=>'vendor'
%p= form.text_field :description,    :default=>'description'
%p= form.text_field :tag_list,       :default=>'tags'

Fix preloaded day on recurring edit.

%p= form.collection_select :day, (1..31).collect, :to_i, :to_s
%p= form.text_field :explicit_value, :class=>:money
%p= form.text_field :vendor_name,    :default=>'vendor'
%p= form.text_field :description,    :default=>'description'
%p= form.text_field :tag_list,       :default=>'tags'


!!!
%html(lang="#{I18n.locale}")
  %head{ :profile => "http://dublincore.org/documents/dcq-html/" }
    %link{ :rel => "schema.DC", :href => "http://purl.org/dc/elements/1.1/" }
    %link{ :rel => "schema.DCTERMS", :href => "http://purl.org/dc/terms/" }
    = render :partial => 'shared/meta'

    - if content_for?(:head)
      = content_for(:head)
    - else
      %meta{:name => 'description', :content => t('header.meta.description')}
      %title=t('header.title')

    = render :partial => 'shared/html5_elements'

    = content_for :javascript_constants

    = include_stylesheets :screen, :media => 'screen, projection'

    = render :partial => 'shared/mixpanel_tracking'

  %body(class=browser_class)
    = render :partial => '/shared/header'
    #main
      = show_flash
      = yield

    #footer
      = render :partial => 'shared/footer'

    = render :partial => 'shared/google_tracking'

    = content_for :javascript

Include javascripts in application layout.

!!!
%html(lang="#{I18n.locale}")
  %head{ :profile => "http://dublincore.org/documents/dcq-html/" }
    %link{ :rel => "schema.DC", :href => "http://purl.org/dc/elements/1.1/" }
    %link{ :rel => "schema.DCTERMS", :href => "http://purl.org/dc/terms/" }
    = render :partial => 'shared/meta'

    - if content_for?(:head)
      = content_for(:head)
    - else
      %meta{:name => 'description', :content => t('header.meta.description')}
      %title=t('header.title')

    = render :partial => 'shared/html5_elements'

    = content_for :javascript_constants

    = include_stylesheets :screen, :media => 'screen, projection'

    = render :partial => 'shared/mixpanel_tracking'

  %body(class=browser_class)
    = render :partial => '/shared/header'
    #main
      = show_flash
      = yield

    #footer
      = render :partial => 'shared/footer'

    = render :partial => 'shared/google_tracking'

    = include_javascripts :default, :media => 'screen, projection'

    = content_for :javascript


.container-fluid.container-tiles-pf.containers-dashboard
  .row.row-tile-pf
    = render :partial => "ems_container/aggregate-status-card"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/utilization-trend-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/trends-chart"
      = render :partial => "ems_container/recent-images-line-chart"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/heatmap"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/recent-pods-line-chart"

  :javascript
    ManageIQ.angular.app.value('providerId', '#{@record ? @record.id : ''}');
    miq_bootstrap('.containers-dashboard');

Fix missing flash message for Re-check Authentication Status

#flash_msg_div
.container-fluid.container-tiles-pf.containers-dashboard
  .row.row-tile-pf
    = render :partial => "ems_container/aggregate-status-card"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/utilization-trend-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/trends-chart"
      = render :partial => "ems_container/recent-images-line-chart"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/heatmap"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "ems_container/recent-pods-line-chart"

  :javascript
    ManageIQ.angular.app.value('providerId', '#{@record ? @record.id : ''}');
    miq_bootstrap('.containers-dashboard');


%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
  %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #555; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
    %tr
      %td{width: "21"}
      %td
        %h2
          = "Project was moved in another location"
      %td{width: "21"}
    %tr
      %td{width: "21"}
      %td
        %p
          Project is now accessible via next link
          = link_to project_url(@project) do
            = @project.name_with_namespace
        %p
          You may want to update your local repository with new remote:
        %br
        %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
          %tr
            %td{valign: "top"}
              %p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
                git remote set-url origin #{@project.ssh_url_to_repo}
        %br
      %td{ width: "21"}

Fix text in project move mail

%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
  %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #555; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
    %tr
      %td{width: "21"}
      %td
        %h2
          = "Project was moved to another location"
      %td{width: "21"}
    %tr
      %td{width: "21"}
      %td
        %p
          The project is now located under
          = link_to project_url(@project) do
            = @project.name_with_namespace
        %p
          To update the remote url in your local repository run:
        %br
        %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
          %tr
            %td{valign: "top"}
              %p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
                git remote set-url origin #{@project.ssh_url_to_repo}
        %br
      %td{ width: "21"}


.row
  .col-md-12
    .page-header
      %h1
        Registrations
        - if @event.max_attendees
          (#{@event.events_registrations.length}/#{@event.max_attendees})
        - else
          (#{@event.events_registrations.length})
      .text-muted
        for
        = @event.title

    - if @event.room && (@event_registrations.length > @event.room.size)
      %b Attention:
      You have more registrations than the capacity of the room!

    .well
      %table.datatable#registrations
        %thead
          %th
          %th Name
          %th Email
          %th Created At
          %th Attended
          %th Attended Conference
        %tbody
          - @event_registrations.each.with_index(1) do |event_registration, index|
            %tr
              %td= index
              %td= event_registration.name
              %td= event_registration.email
              %td= event_registration.created_at
              %td
                = check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "/admin/conferences/#{@conference.short_title}/program/events/#{@event.id}/toggle_attendance?events_registration_id=#{event_registration.id}&&event_registration[attended]="
              %td
                - if event_registration.registration.attended
                  %i.fa.fa-check.text-success
                - else
                  %i.fa.fa-close.text-danger

Fix event registatrion for rooms without size

.row
  .col-md-12
    .page-header
      %h1
        Registrations
        - if @event.max_attendees
          (#{@event.events_registrations.length}/#{@event.max_attendees})
        - else
          (#{@event.events_registrations.length})
      .text-muted
        for
        = @event.title

    - if @event.room.try(:size) && (@event_registrations.length > @event.room.size)
      %b Attention:
      You have more registrations than the capacity of the room!

    .well
      %table.datatable#registrations
        %thead
          %th
          %th Name
          %th Email
          %th Created At
          %th Attended
          %th Attended Conference
        %tbody
          - @event_registrations.each.with_index(1) do |event_registration, index|
            %tr
              %td= index
              %td= event_registration.name
              %td= event_registration.email
              %td= event_registration.created_at
              %td
                = check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', url: "/admin/conferences/#{@conference.short_title}/program/events/#{@event.id}/toggle_attendance?events_registration_id=#{event_registration.id}&&event_registration[attended]="
              %td
                - if event_registration.registration.attended
                  %i.fa.fa-check.text-success
                - else
                  %i.fa.fa-close.text-danger


- note_count         = @issuable_meta_data[issuable.id].user_notes_count
- issue_votes        = @issuable_meta_data[issuable.id]
- upvotes, downvotes = issue_votes.upvotes, issue_votes.downvotes
- issuable_url       = @collection_type == "Issue" ? issue_path(issuable, anchor: 'notes') : merge_request_path(issuable, anchor: 'notes')
- issuable_mr        = @issuable_meta_data[issuable.id].merge_requests_count(current_user)

- if issuable_mr > 0
  %li.issuable-mr.d-none.d-sm-block.has-tooltip{ title: _('Related merge requests') }
    = image_tag('icon-merge-request-unmerged.svg', class: 'icon-merge-request-unmerged')
    = issuable_mr

- if upvotes > 0
  %li.issuable-upvotes.d-none.d-sm-block.has-tooltip{ title: _('Upvotes') }
    = icon('thumbs-up')
    = upvotes

- if downvotes > 0
  %li.issuable-downvotes.d-none.d-sm-block.has-tooltip{ title: _('Downvotes') }
    = icon('thumbs-down')
    = downvotes

%li.issuable-comments.d-none.d-sm-block
  = link_to issuable_url, class: ['has-tooltip', ('no-comments' if note_count.zero?)], title: _('Comments') do
    = icon('comments')
    = note_count

Use issuable_path to allow support of epics

- note_count         = @issuable_meta_data[issuable.id].user_notes_count
- issue_votes        = @issuable_meta_data[issuable.id]
- upvotes, downvotes = issue_votes.upvotes, issue_votes.downvotes
- issuable_path      = issuable_path(issuable, anchor: 'notes')
- issuable_mr        = @issuable_meta_data[issuable.id].merge_requests_count(current_user)

- if issuable_mr > 0
  %li.issuable-mr.d-none.d-sm-block.has-tooltip{ title: _('Related merge requests') }
    = image_tag('icon-merge-request-unmerged.svg', class: 'icon-merge-request-unmerged')
    = issuable_mr

- if upvotes > 0
  %li.issuable-upvotes.d-none.d-sm-block.has-tooltip{ title: _('Upvotes') }
    = icon('thumbs-up')
    = upvotes

- if downvotes > 0
  %li.issuable-downvotes.d-none.d-sm-block.has-tooltip{ title: _('Downvotes') }
    = icon('thumbs-down')
    = downvotes

%li.issuable-comments.d-none.d-sm-block
  = link_to issuable_path, class: ['has-tooltip', ('no-comments' if note_count.zero?)], title: _('Comments') do
    = icon('comments')
    = note_count


.container-fluid
  On github:
  = revision_link_to @build.vcs_url, @build.vcs_revision
  - @logs.each do |l|
    -# wrapper allows the header and detail be siblings, for the JS
    .wrapper
      .action_header{ :class => action_header_style(l) }
        %span.command
          $
          = l.name
        %span.time
          = surround '(', ')' do
            = as_length_of_build(l.start_time, l[:end_time])

      .detail{ :class => action_log_style(l) }
        - if l["out"]
          %pre.output
            = preserve do
              !~ action_log_output(l.out)

  -#%table
    %thead
      %tr
        %th Time
        %th stdout/stderr
    %tbody
      - l["out"].each do |o|
        - if o["message"] != ""
          %tr
            %td
              = as_action_timestamp(o["time"])
            %td
              %div{ :class => o['type'] == "out" ? "alert-message block-message success" : "alert-message block-message error" }
                %pre
                  = o["message"]

Tidy up the commented code, we need to return to that soon.

.container-fluid
  On github:
  = revision_link_to @build.vcs_url, @build.vcs_revision
  - @logs.each do |l|
    -# wrapper allows the header and detail be siblings, for the JS
    .wrapper
      .action_header{ :class => action_header_style(l) }
        %span.command
          $
          = l.name
        %span.time
          = surround '(', ')' do
            = as_length_of_build(l.start_time, l[:end_time])

      .detail{ :class => action_log_style(l) }
        - if l["out"]
          %pre.output
            = preserve do
              !~ action_log_output(l.out)

          -#%table
            %tbody
              - l["out"].each do |o|
                - if o["message"] != ""
                  %tr
                    %td
                      = as_action_timestamp(o["time"])
                    %td
                      %div{ :class => o['type'] == "out" ? "alert-message block-message success" : "alert-message block-message error" }
                    %pre
                      !~ action_log_output([ o["message"] ] )


- dict_param = "dict=mw"
%dl.entry
  %dt.lemma{"xml:lang" => "san-Deva"}
    %a{:href => "/dict/#{result[:lemma]}?#{dict_param}"}
      %dfn
        = result[:lemma]
  - result[:transliterations].each do |method, string|
    %dt.transliteration{"xml:lang" => "san-Latn"}
      - transliterated = result[:transliterations][method]
      %a{:href => "/dict/#{transliterated}?iscript=#{method}&#{dict_param}"}
        = transliterated
  - result[:senses].each do |sense|
    %dd.sense= sense

Use the '/lemma' base URI for single lemmas

%dl.entry
  %dt.lemma{"xml:lang" => "san-Deva"}
    %a{:href => "/lemma/#{result[:lemma]}"}
      %dfn
        = result[:lemma]
  - result[:transliterations].each do |method, string|
    %dt.transliteration{"xml:lang" => "san-Latn"}
      - transliterated = result[:transliterations][method]
      %a{:href => "/lemma/#{transliterated}?iscript=#{method}"}
        = transliterated
  - result[:senses].each do |sense|
    %dd.sense= sense


%aside
  .container
    .logo
      %a.logo__link{:href => "/"}= logo_tag
    .home
      = link_to t('application.home'), root_url
      - if current_user && current_user.admin?
        = link_to t('application.recent_activity'), '/recent-activity'
    - if user_signed_in?
      .search
        = form_tag("/ask", method: "get", target: '_blank') do
          = text_field_tag(:q, '', placeholder: t('application.search'))
          = submit_tag(t('application.help'))
    .login
      - if user_signed_in?
        %b>= link_to current_user.wiki_id, :root
        = link_to I18n.t('application.log_out'), :destroy_user_session
      - else
        = link_to user_omniauth_authorize_path(:mediawiki_signup) do
          %i.icon.icon-wiki-logo
          Sign up
          %span.expand with Wikipedia
        = link_to user_omniauth_authorize_path(:mediawiki) do
          %i.icon.icon-wiki-logo
          Log in
          %span.expand with Wikipedia

Update nav items with 'My Dashboard and Explore' based on logged in state

%aside
  .container
    .logo
      %a.logo__link{:href => "/"}= logo_tag
    .home
      - if user_signed_in?
        = link_to 'My Dashboard', root_url
      - else
        = link_to 'Explore', '/courses'
      - if current_user && current_user.admin?
        = link_to t('application.recent_activity'), '/recent-activity'
    - if user_signed_in?
      .search
        = form_tag("/ask", method: "get", target: '_blank') do
          = text_field_tag(:q, '', placeholder: t('application.search'))
          = submit_tag(t('application.help'))
    .login
      - if user_signed_in?
        %b>= link_to current_user.wiki_id, :root
        = link_to I18n.t('application.log_out'), :destroy_user_session
      - else
        = link_to user_omniauth_authorize_path(:mediawiki_signup) do
          %i.icon.icon-wiki-logo
          Sign up
          %span.expand with Wikipedia
        = link_to user_omniauth_authorize_path(:mediawiki) do
          %i.icon.icon-wiki-logo
          Log in
          %span.expand with Wikipedia


.l-panel-content
  .l-constrained
    .l-panel-content__row
      .l-panel-content__col
        = comfy_form_for @user, url: url, html: {class: 'form form--vertical'}, label_col: "form__label-heading", control_col: "form__input-wrapper" do |f|
          =f.text_field :name
          =f.text_field :email
          =f.password_field :password

          .form-group
            .form__input-wrapper
              - if current_user.admin?
                =f.check_box :admin

          .form-group
            .form__input-wrapper
              = button_tag nil, value: 'value', type: 'submit', class: "button--action t-create-user" do
                %span.button__text
                  = @user.new_record? ? "Create user" : "Edit user"

      .l-panel-content__col

Update user settings submit copy

.l-panel-content
  .l-constrained
    .l-panel-content__row
      .l-panel-content__col
        = comfy_form_for @user, url: url, html: {class: 'form form--vertical'}, label_col: "form__label-heading", control_col: "form__input-wrapper" do |f|
          =f.text_field :name
          =f.text_field :email
          =f.password_field :password

          .form-group
            .form__input-wrapper
              - if current_user.admin?
                =f.check_box :admin

          .form-group
            .form__input-wrapper
              = button_tag nil, value: 'value', type: 'submit', class: "button--action t-create-user" do
                %span.button__text
                  = @user.new_record? ? "Create user" : "Update user"

      .l-panel-content__col


.col-xs-12
  .alert.alert-info
    Sorry, we couldn’t find any
    = @type == "users" ? @type : "scrapers"
    relevant to your search term
    %strong “#{@q}”.

Make no results notices all the same width

.col-xs-12.col-md-9
  .alert.alert-info
    Sorry, we couldn’t find any
    = @type == "users" ? @type : "scrapers"
    relevant to your search term
    %strong “#{@q}”.


- if current_user
  = menu_link(current_user.email, edit_user_registration_path) if Devise.mappings[:user].registerable?
  %li= link_to("Sign out", destroy_user_session_path, :method => :delete)

Check for Devise mappings before trying to use them

- if current_user && Devise.mappings[:user]
  = menu_link(current_user.email, edit_user_registration_path) if Devise.mappings[:user].registerable?
  %li= link_to("Sign out", destroy_user_session_path, :method => :delete)


= javascript_include_tag 'https://checkout.stripe.com/checkout.js'

= effective_form_with(model: subscripter, url: effective_orders.subscripter_path, remote: true, data: { stripe: subscripter_stripe_data(subscripter) }) do |f|
  = f.hidden_field :user_id, value: current_user.id
  = f.hidden_field :subscribable_global_id
  = f.hidden_field :stripe_token, value: nil
  = f.error :stripe_token

  = f.radios :stripe_plan_id, stripe_plans_collection(f), cards: true, label: false, required: true

  = f.submit 'Choose this Plan', center: true, class: ('effective-orders-stripe-token-required' if f.object.token_required?)

Change subscriptor form to use radio buttons, change button text to 'Choose Plan'

= javascript_include_tag 'https://checkout.stripe.com/checkout.js'

= effective_form_with(model: subscripter, url: effective_orders.subscripter_path, remote: true, data: { stripe: subscripter_stripe_data(subscripter) }) do |f|
  = f.hidden_field :user_id, value: current_user.id
  = f.hidden_field :subscribable_global_id
  = f.hidden_field :stripe_token, value: nil
  = f.error :stripe_token

  = f.radios :stripe_plan_id, stripe_plans_collection(f), inline: false, cards: false, label: false, required: true

  = f.submit 'Choose Plan', center: true, border: false, class: ('effective-orders-stripe-token-required' if f.object.token_required?)


.col-xs-1.question-up-vote
  %i.fa.fa-chevron-up(id="vote-for-{{question.id}}" ng-class="{'fa-chevron-up-voted': question.vote_id}" ng-click="toggleVote()")
  .question-up-vote-count {{question.votes_count}}

Make upvote a link to stop it toggling expanded of quesiton

.col-xs-1.question-up-vote
  %a(href="" ng-click="toggleVote()")
    %i.fa.fa-chevron-up(id="vote-for-{{question.id}}" ng-class="{'fa-chevron-up-voted': question.vote_id}")
  .question-up-vote-count {{question.votes_count}}


%div.row
  %h2
    Most Recent
  %ul.block-grid-sm-1
    - render_recent_newsletters(8).each do |newsletter|
      %li
        = render 'newsletters/element_notag', :local => { :item => newsletter, :has_tags => false }

%div.row
  = link_to 'See more newsletters', newsletters_path, class: 'btn btn-block btn-lg btn-inverse'

Save the content and make it work

%div.row
  .col-md-12
    %h2
      Most Recent
    %ul.block-grid-sm-1
      - render_recent_newsletters(8).each do |newsletter|
        %li
          = render 'newsletters/element_notag', :local => { :item => newsletter, :has_tags => false }

.row
  .col-md-12
    = link_to 'See more newsletters', newsletters_path, class: 'btn btn-block btn-lg btn-inverse'


%section#most-viewed-posts
  %header
    %h4.section-title= t("blog.most_viewed_posts.title")
    %span.section-legend= t("blog.most_viewed_posts.legend")

  = render "blog/shared/post-list",
    :posts => most_viewed_posts,
    :show_views => true

Make the 'most viewed posts' limit customizable.

- limit ||= 10

%section#most-viewed-posts
  %header
    %h4.section-title= t("blog.most_viewed_posts.title")
    %span.section-legend= t("blog.most_viewed_posts.legend")

  = render "blog/shared/post-list",
    :posts => most_viewed_posts(:limit => limit),
    :show_views => true


%h3 Acme Industries Inc.
.row
  .col-sm-6
    %p= mail_to EffectiveOrders.mailer[:admin_email] || 'info@acmeindustries.com'
    %p
      1234 Fake Street
      %br
      Edmonton, AB, T5H 4A5
      %br
      %small Customize me by overriding '/app/views/effective/orders/_order_header.html.haml'

  .col-sm-6
    - if order.persisted?
      %p Order: ##{order.to_param}

    - if order.purchased?
      %p Purchased at: #{order.purchased_at.strftime("%Y-%m-%d %H:%M")}
    - else
      %p Date: #{Time.zone.now.strftime("%Y-%m-%d %H:%M")}

Use the title ‘Receipt’ on a purchased Order in default header

%h3 Acme Industries Inc.
.row
  .col-sm-6
    %p= mail_to EffectiveOrders.mailer[:admin_email] || 'info@acmeindustries.com'
    %p
      1234 Fake Street
      %br
      Edmonton, AB, T5H 4A5
      %br
      %small Customize me by overriding '/app/views/effective/orders/_order_header.html.haml'

  .col-sm-6
    - if order.purchased?
      %p Receipt: ##{order.to_param}
    - elsif order.persisted?
      %p Order: ##{order.to_param}

    - if order.purchased?
      %p Purchased at: #{order.purchased_at.strftime("%Y-%m-%d %H:%M")}
    - else
      %p Date: #{Time.zone.now.strftime("%Y-%m-%d %H:%M")}


- content_for(:title, 'Activation du compte administrateur')

%p
  Bonjour,

%p
  Je vous remercie de l’intérêt que vous portez à notre outil de dématérialisation de démarches.

%p
  Votre compte administrateur a été créé pour l'adresse email #{@admin.email}.

%p
  %b
    Pour l’activer, je vous invite à cliquer sur le lien suivant :
    = link_to(admin_activate_url(token: @reset_password_token), admin_activate_url(token: @reset_password_token))

%p
  Afin de vous accompagner dans la découverte de demarches-simplifiees.fr, je vous propose de m’appeler pour faire un point sur vos besoins de dématérialisation.
  %br
  Vous pouvez me joindre au numéro suivant :
  = CONTACT_PHONE
  \.

%p
  Je vous invite également à consulter notre site de documentation qui regroupe l'ensemble des informations relatives à demarches-simplifiees.fr ainsi que des tutoriels d’utilisation :
  = link_to(DOC_URL, DOC_URL)

%p
  = render partial: "layouts/mailers/bizdev_signature", locals: { author_name: @author_name }

Remove one “invite” occurence (also written after this occurence)

- content_for(:title, 'Activation du compte administrateur')

%p
  Bonjour,

%p
  Je vous remercie de l’intérêt que vous portez à notre outil de dématérialisation de démarches.

%p
  Votre compte administrateur a été créé pour l'adresse email #{@admin.email}.

%p
  %b
    Pour l’activer, cliquez sur le lien suivant :
    = link_to(admin_activate_url(token: @reset_password_token), admin_activate_url(token: @reset_password_token))

%p
  Afin de vous accompagner dans la découverte de demarches-simplifiees.fr, je vous propose de m’appeler pour faire un point sur vos besoins de dématérialisation.
  %br
  Vous pouvez me joindre au numéro suivant :
  = CONTACT_PHONE
  \.

%p
  Je vous invite également à consulter notre site de documentation qui regroupe l'ensemble des informations relatives à demarches-simplifiees.fr ainsi que des tutoriels d’utilisation :
  = link_to(DOC_URL, DOC_URL)

%p
  = render partial: "layouts/mailers/bizdev_signature", locals: { author_name: @author_name }


- storing ||= f.object
- variant = Maybe(storing.parcel_item.variant)

.nested-fields.storing-fields
  .delivery-item
    = f.referenced_association :storage, source: :storage, label: false, input_html: { class: 'storing-storage', data: { product_of_delivery_item: { url: backend_product_path("RECORD_ID", format: :json), scope: 'storage' }, required: true } }
    %input.hidden{data: { 'when-item': 'name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'storage'}}
  .storing-quantifier
    = f.input :quantity, label: false, wrapper: :append do
      = f.input_field :quantity, class: 'storing-quantity', placeholder: '0', data: { required: true }
      %span.add-on.item-population-unit-name.storage-unit-name{data: { 'when-item': 'unit_name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'unit'}}
        = variant.unit_name.or_else('#')
  .nested-remove.act
    - if f.object.destroyable?
      = link_to_remove_association(content_tag(:i) + h(:destroy.tl), f, 'data-no-turbolink' => true, class: 'destroy remove remove-item')

Fix bug where storage name was not displayed on edit page

- storing ||= f.object
- variant = Maybe(storing.parcel_item.variant)
- storage_name = storing.storage.name if storing.storage

.nested-fields.storing-fields
  .delivery-item
    = f.referenced_association :storage, source: :storage, label: false, input_html: { class: 'storing-storage', data: { product_of_delivery_item: { url: backend_product_path("RECORD_ID", format: :json), scope: 'storage' }, required: true } }
    %input.hidden{data: { 'when-item': 'name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'storage'}, value: storage_name}
  .storing-quantifier
    = f.input :quantity, label: false, wrapper: :append do
      = f.input_field :quantity, class: 'storing-quantity', placeholder: '0', data: { required: true }
      %span.add-on.item-population-unit-name.storage-unit-name{data: { 'when-item': 'unit_name', 'when-set-value': 'RECORD_VALUE', 'when-scope': 'unit'}}
        = variant.unit_name.or_else('#')
  .nested-remove.act
    - if f.object.destroyable?
      = link_to_remove_association(content_tag(:i) + h(:destroy.tl), f, 'data-no-turbolink' => true, class: 'destroy remove remove-item')


- main_toolbar do |t|
  = link_to :generate_parcel.tl, { controller: :receptions, action: :new }, { class: 'btn btn-default no-icn disabled', id: 'generate-parcel-btn' }

= kujaku do |k|
  - k.text
  - responsibles = User.where(id: Purchase.select(:responsible_id).distinct)
  - suppliers = Entity.where(id: Purchase.select(:supplier_id).distinct)
  - if responsibles.any?
    - k.helper do
      %label= PurchaseOrder.human_attribute_name(:responsible)
      = select_tag(:responsible_id, options_for_select([[]] +  responsibles.map{|u| [u.label, u.id]}, params[:responsible_id].to_i))
  - if suppliers.any?
    - k.helper do
      %label= PurchaseOrder.human_attribute_name(:supplier)
      = select_tag(:supplier_id, options_for_select([[]] +  suppliers.map{|u| [u.label, u.id]}, params[:supplier_id].to_i))

= main_list

Remove empty line in index


:ruby
  column_type_dom_id = form.dom_id(field).sub(field.method_name.to_s, "")
  attr = column_type_dom_id.gsub(/[a-z_]+_variants_attributes/, '').gsub(/^_/, '[').gsub(/_$/, ']')

- options_for_klass(@object.class).each do |option|
  %h5= option.name
  = hidden_field_tag "#{@object.class.to_s.underscore}[variants_attributes]#{attr}[option_value_ids][]", nil
  - option.option_values.each do |option_value|
    %p
      = check_box_tag "#{@object.class.to_s.underscore}[variants_attributes]#{attr}[option_value_ids][]", option_value.id, form.object.option_values.include?(option_value), :style => "margin:-2px 5px 0px 0px;"
      %span= option_value.name

Add image to options value

:ruby
  column_type_dom_id = form.dom_id(field).sub(field.method_name.to_s, "")
  attr = column_type_dom_id.gsub(/[a-z_]+_variants_attributes/, '').gsub(/^_/, '[').gsub(/_$/, ']')

- options_for_klass(@object.class).each do |option|
  %h5= option.name
  = hidden_field_tag "#{@object.class.to_s.underscore}[variants_attributes]#{attr}[option_value_ids][]", nil
  - option.option_values.each do |option_value|
    %p
      = check_box_tag "#{@object.class.to_s.underscore}[variants_attributes]#{attr}[option_value_ids][]", option_value.id, form.object.option_values.include?(option_value), :style => "margin:-2px 5px 0px 0px;"
      = image_tag option_value.image.url(:thumb)
      %span= option_value.name


= link_to("Add project", new_project_path)

%h2 Projects:
- @projects.each do |project|
  %p= project.name

Revert "Revert "Testing zero downtime deploy.""

= link_to("Add project", new_project_path)

%h1 Projects:
- @projects.each do |project|
  %p= project.name


= link_to("Add project", new_project_path)

%h1 Projects:
- @projects.each do |project|
  %p= project.name

Revert "Testing zero downtime deploy."

= link_to("Add project", new_project_path)

%h2 Projects:
- @projects.each do |project|
  %p= project.name


- items = expand_textual_group(items)
- if items.present?
  %table.table.table-bordered.table-striped.table-summary-screen
    %thead
      %tr
        %th{:colspan => "6"}
          = title
      %tr
        %th{:rowspan => "2"} Bay Number
        %th{:rowspan => "2"} Name
        %th{:rowspan => "2"} Manufacturer
        %th{:rowspan => "2"} FRU
        %th{:colspan => "2", :style => "text-align: center"} Ports
      %tr
        %th Name
        %th MAC Address
    - items.each do |item|
      - item[:value].each do |subitem|
        %tr
          %td
            = subitem[:bay_number]
          %td
            = subitem[:adapter_name]
          %td
            = subitem[:manufacturer]
          %td
            = subitem[:fru]
          %td
            - subitem[:port_names].each do |port_name|
              = port_name
              %br/
          %td
            - subitem[:mac_addresses].each do |mac_address|
              = mac_address
              %br/

Add newline to end of file


%hr
.form-horizontal.resolve-conflicts-form
  .form-group
    .col-md-4
      %h4 Resolve conflicts on source branch
      .resolve-info
        Resolve the merge conflict by choosing
        %code Use ours
        or
        %code Use theirs
        in all the conflicted files above. Commit these changes into
        %strong {{conflictsData.sourceBranch}}.
    .col-md-8
      %label.label-light{ "for" => "commit-message" }
        #{ _('Commit message') }
      .commit-message-container
        .max-width-marker
        %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" }
  .form-group
    .col-md-offset-4.col-md-8
      .row
        .col-xs-6
          %button.btn.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" }
            %span {{commitButtonText}}
        .col-xs-6.text-right
          = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "btn btn-cancel"

Make source branch a link

%hr
.form-horizontal.resolve-conflicts-form
  .form-group
    .col-md-4
      %h4 Resolve conflicts on source branch
      .resolve-info
        Resolve the merge conflict by choosing
        %code Use ours
        or
        %code Use theirs
        in all the conflicted files above. Commit these changes into
        #{link_to @merge_request.source_branch, project_tree_path(@merge_request.project, @merge_request.source_branch)}.
    .col-md-8
      %label.label-light{ "for" => "commit-message" }
        #{ _('Commit message') }
      .commit-message-container
        .max-width-marker
        %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" }
  .form-group
    .col-md-offset-4.col-md-8
      .row
        .col-xs-6
          %button.btn.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" }
            %span {{commitButtonText}}
        .col-xs-6.text-right
          = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "btn btn-cancel"


= simple_form_for [:admin, @text] do |f|
  = f.input :key
  = f.input :title_en
  = f.input :title_nl
  = f.input :short_content_en
  = f.input :short_content_nl
  = f.input :content_en
  = f.input :content_nl
  = f.input :searchable,
    :hint => 'Check if you want the page to appear on the search page results'
  = f.button :submit

Remove "searchable" field admin Texts form

= simple_form_for [:admin, @text] do |f|
  = f.input :key
  = f.input :title_en
  = f.input :title_nl
  = f.input :short_content_en
  = f.input :short_content_nl
  = f.input :content_en
  = f.input :content_nl
  = f.button :submit


= render "projects/settings_nav"

%p.slead
  Deploy keys allow read-only access to repository. They can be used for CI, staging or production servers

%p
  You can create a deploy key or add existing one
  = link_to new_project_deploy_key_path(@project), class: "btn btn-primary pull-right", title: "New Deploy Key" do
    %i.icon-plus
    New Deploy Key

%hr.clearfix

.row
  .span6.enabled-keys
    %h5.cgreen
      Enabled deploy keys
      %small for this project
    %ul.bordered-list
      = render @enabled_keys
      - if @enabled_keys.blank?
        .light-well
          %p.nothing_here_message Create #{link_to 'new deploy key', new_project_deploy_key_path(@project)} or add existing one
  .span6.available-keys
    %h5
      Available deploy keys
      %small from projects you are able to manage
    %ul.bordered-list
      = render @available_keys
      - if @available_keys.blank?
        .light-well
          %p.nothing_here_message All deploy keys from projects you can manage will be displayed here

Improve accuracy of deploy key message.

= render "projects/settings_nav"

%p.slead
  Deploy keys allow read-only access to repository. They can be used for CI, staging or production servers

%p
  You can create a deploy key or add existing one
  = link_to new_project_deploy_key_path(@project), class: "btn btn-primary pull-right", title: "New Deploy Key" do
    %i.icon-plus
    New Deploy Key

%hr.clearfix

.row
  .span6.enabled-keys
    %h5.cgreen
      Enabled deploy keys
      %small for this project
    %ul.bordered-list
      = render @enabled_keys
      - if @enabled_keys.blank?
        .light-well
          %p.nothing_here_message Create #{link_to 'new deploy key', new_project_deploy_key_path(@project)} or add existing one
  .span6.available-keys
    %h5
      Available deploy keys
      %small from projects you are able to manage
    %ul.bordered-list
      = render @available_keys
      - if @available_keys.blank?
        .light-well
          %p.nothing_here_message All deploy keys created in projects you own will be displayed here


%p Use the following code snippet to get data from the API.

- block = capture do
  :coderay
    #!php
    <?php
    $morph_api_url = "[scraper_url]/data.json";
    $morph_api_key="[api_key]";

    $query="[query]";

    $response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
    $js=json_decode($response,true);

    foreach ($js as $line){
      [DO WIZARDRY]
    }
    ?>

= block.sub('[scraper_url]', "#{api_root}#{h(@scraper.full_name)}").sub('[api_key]', "#{current_user ? current_user.api_key : '[api_key]'}").sub('[query]', "#{h(@query)}").html_safe

Make entire php example runnable as is

%p Use the following code snippet to get data from the API.

- block = capture do
  :coderay
    #!php
    <?php
    $morph_api_url = "[scraper_url]/data.json";
    $morph_api_key="[api_key]";

    $query="[query]";

    $response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
    $js=json_decode($response,true);

    print_r($js);
    ?>

= block.sub('[scraper_url]', "#{api_root}#{h(@scraper.full_name)}").sub('[api_key]', "#{current_user ? current_user.api_key : '[api_key]'}").sub('[query]', "#{h(@query)}").html_safe


:javascript
  Portal.currentUser = {
    get isAnonymous() {
      return "#{current_visitor.anonymous?}" === "true";
    },
    get isLoggedIn() {
      return !this.isAnonymous;
    },
    get isAdmin() {
      return "#{current_visitor.has_role?('admin')}" === "true";
    },
    get isManager() {
      return "#{current_visitor.has_role?('manager')}" === "true";
    },
    get isResearcher() {
      return "#{current_visitor.has_role?('researcher')}" === "true";
    },
    get isAuthor() {
      return "#{current_visitor.has_role?('author')}" === "true";
    },
    get isTeacher() {
      // portal_teacher can return nil which is interpolated to "" string.
      return "#{current_visitor.portal_teacher}" != "";
    },
    get isStudent() {
      // portal_student can return nil which is interpolated to "" string.
      return "#{current_visitor.portal_student}" != "";
    },
    get firstName() {
      return "#{current_visitor.first_name}";
    },
    get lastName() {
      return "#{current_visitor.last_name}";
    },
    get fullName() {
      return "#{current_visitor.full_name}";
    },
    get homePath() {
      return "#{current_user_home_path}";
    }
  };

Fix bug causing warning in test output

:javascript
  Portal.currentUser = {
    get isAnonymous() {
      return "#{current_visitor.anonymous?}" === "true";
    },
    get isLoggedIn() {
      return !this.isAnonymous;
    },
    get isAdmin() {
      return "#{current_visitor.has_role?('admin')}" === "true";
    },
    get isManager() {
      return "#{current_visitor.has_role?('manager')}" === "true";
    },
    get isResearcher() {
      return "#{current_visitor.has_role?('researcher')}" === "true";
    },
    get isAuthor() {
      return "#{current_visitor.has_role?('author')}" === "true";
    },
    get isTeacher() {
      // portal_teacher can return nil which is interpolated to "" string.
      return "#{current_visitor.portal_teacher.present?}" === "true";
    },
    get isStudent() {
      // portal_student can return nil which is interpolated to "" string.
      return "#{current_visitor.portal_student.present?}" === "true";
    },
    get firstName() {
      return "#{current_visitor.first_name}";
    },
    get lastName() {
      return "#{current_visitor.last_name}";
    },
    get fullName() {
      return "#{current_visitor.full_name}";
    },
    get homePath() {
      return "#{current_user_home_path}";
    }
  };


!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= "#{page_title}"
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    - if url_for(only_path: true) == "/"
      %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、仮名遣いなどでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。")
      %meta(name="keywords" content="青空文庫,全文検索")
    - else
      %meta(name="robots" content="noindex")
    %link(href="#{@sub_url}vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="#{@sub_url}css/aozorasearch.css" rel="stylesheet" media="screen")
    %link(rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false

Update meta keywords and description

!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= "#{page_title}"
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    - if url_for(only_path: true) == "/"
      %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、児童書、仮名遣い、著作権の有無などでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。")
      %meta(name="keywords" content="青空文庫,検索,全文検索")
    - else
      %meta(name="robots" content="noindex")
    %link(href="#{@sub_url}vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="#{@sub_url}css/aozorasearch.css" rel="stylesheet" media="screen")
    %link(rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false


:javascript
  var require = {
    baseUrl: '/assets',
    paths: {
      gpt: "http://www.googletagservices.com/tag/js/gpt",
      jquery:  "jquery/jquery",
      jsmin: "lonelyplanet_minjs/dist/$",
      jplugs: "jquery/plugins",
      s_code: "omniture/s_code",
      sailthru: "sailthru/v1",
      flamsteed: "flamsteed/lib/javascripts/flamsteed",
      pointer: "pointer",
      touchwipe: "jquery.touchwipe.1.1.1",
      trackjs: "trackjs/trackjs"
    },
    waitSeconds: 20
  };

Increase the wait time for requirejs modules to help with slow gpt requests causing errors

:javascript
  var require = {
    baseUrl: '/assets',
    paths: {
      gpt: "http://www.googletagservices.com/tag/js/gpt",
      jquery:  "jquery/jquery",
      jsmin: "lonelyplanet_minjs/dist/$",
      jplugs: "jquery/plugins",
      s_code: "omniture/s_code",
      sailthru: "sailthru/v1",
      flamsteed: "flamsteed/lib/javascripts/flamsteed",
      pointer: "pointer",
      touchwipe: "jquery.touchwipe.1.1.1",
      trackjs: "trackjs/trackjs"
    },
    waitSeconds: 30
  };


= format_field("Cost", format_as_currency(@asset.purchase_cost) )
= format_field("Purchase Date", format_as_date(@asset.purchase_date) )
= format_field("Warranty Date", format_as_date(@asset.warranty_date) ) unless @asset.warranty_date.nil?
= format_field("In Service Date", format_as_date(@asset.in_service_date) )
= format_field("Purchased New", format_as_boolean(@asset.purchased_new) )
= format_field("Vendor", link_to(@asset.vendor, vendor_path(@asset.vendor))) unless @asset.vendor.nil?

= format_field("Expected Useful Life", @asset.expected_useful_life )

= format_field("Title Number", @asset.title_number )
= format_field("Title Owner", @asset.title_owner.name )

Fix display of EUL for Service Vehicle

= format_field("Cost", format_as_currency(@asset.purchase_cost) )
= format_field("Purchase Date", format_as_date(@asset.purchase_date) )
= format_field("Warranty Date", format_as_date(@asset.warranty_date) ) unless @asset.warranty_date.nil?
= format_field("In Service Date", format_as_date(@asset.in_service_date) )
= format_field("Purchased New", format_as_boolean(@asset.purchased_new) )
= format_field("Vendor", link_to(@asset.vendor, vendor_path(@asset.vendor))) unless @asset.vendor.nil?

= format_field("Expected Useful Life", "#{format_as_integer(@asset.expected_useful_life / 12 )} yrs")

= format_field("Title Number", @asset.title_number )
= format_field("Title Owner", @asset.title_owner.name )


= image_tag('landing/HoundLogo.svg', class: 'logo')
%ol.getting-started
  %li.step.pitch
    .tagline
      %h2 Review your Ruby code for style guide violations with a trusty hound.
    = link_to '/auth/github', class: 'auth button' do
      %i.fa.fa-github
      %span= t('authenticate')

  %li.step.step-activate
    %h3 Activate Repos
    %p Tell Hound which GitHub repos to watch.
    %figure
      = image_tag('landing/step-activate.png')

  %li.step.step-code
    %h3 Commit & Pull Request Code
    %p
      Write and commit code as you normally would then
      open a pull request to get reviewed by Hound.
    %figure
      = image_tag('landing/step-code.png')

  %li.step.step-comment
    %h3 View Hound Comments
    %p
      Hound will review your pull request and make inline comments on
      any style guide violations.
    %figure
      = image_tag('landing/step-comment.png')

  %li.step.cta
    = link_to '/auth/github', class: 'auth button' do
      %i.fa.fa-github
      %span= t('authenticate')

= render 'shared/footer'

Update tagline to include JavaScript, CoffeeScript

= image_tag('landing/HoundLogo.svg', class: 'logo')
%ol.getting-started
  %li.step.pitch
    .tagline
      %h2
        Review your JavaScript, CoffeeScript, and Ruby code
        for style guide violations
        with a trusty hound.
    = link_to '/auth/github', class: 'auth button' do
      %i.fa.fa-github
      %span= t('authenticate')

  %li.step.step-activate
    %h3 Activate Repos
    %p Tell Hound which GitHub repos to watch.
    %figure
      = image_tag('landing/step-activate.png')

  %li.step.step-code
    %h3 Commit & Pull Request Code
    %p
      Write and commit code as you normally would then
      open a pull request to get reviewed by Hound.
    %figure
      = image_tag('landing/step-code.png')

  %li.step.step-comment
    %h3 View Hound Comments
    %p
      Hound will review your pull request and make inline comments on
      any style guide violations.
    %figure
      = image_tag('landing/step-comment.png')

  %li.step.cta
    = link_to '/auth/github', class: 'auth button' do
      %i.fa.fa-github
      %span= t('authenticate')

= render 'shared/footer'


- if enabled_oauth_providers.present?
  %hr
  %div{:'data-no-turbolink' => 'data-no-turbolink'}
    %span Sign in with:
    - (enabled_oauth_providers - [:ldap]).each do |provider|
      %span
        - if default_providers.include?(provider)
          = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)
        - else
          = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn"

Hide sign-in bottom block if no providers

- providers = (enabled_oauth_providers - [:ldap])
- if providers.present?
  %hr
  %div{:'data-no-turbolink' => 'data-no-turbolink'}
    %span Sign in with:
    - providers.each do |provider|
      %span
        - if default_providers.include?(provider)
          = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)
        - else
          = link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn"


%span.str-truncated
  %span.tree_author= commit_author_link(commit, avatar: true, size: 16)
  = link_to_gfm commit.title, namespace_project_commit_path(@project.namespace, @project, commit.id), class: "tree-commit-link"

Drop the user name from tree row to improve readability of commit messages

%span.str-truncated
  = link_to_gfm commit.title, namespace_project_commit_path(@project.namespace, @project, commit.id), class: "tree-commit-link"


- unless crop.perennial.nil?
  .predictions
    .row
      %p
        #{crop.name} is
        - if crop.perennial == true
          = link_to 'https://en.wikipedia.org/wiki/Annual_vs._perennial_plant_evolution' do
            a perennial crop
          (living more than two years)
        - elsif crop.perennial == false
          = link_to 'https://en.wikipedia.org/wiki/Annual_vs._perennial_plant_evolution' do
            an annual crop
          (living and reproducing in a single year or less)

    .row
      - if crop.annual? && crop.median_lifespan.present?
        .metric.col-md-3.col-xs-5
          %h3 Median lifespan
          %strong= crop.median_lifespan
          %span days

      - if crop.median_days_to_first_harvest.present?
        .metric.col-md-3.col-xs-5
          %h3 First harvest expected
          %strong= crop.median_days_to_first_harvest
          %span days
          after planting

      - if crop.annual? && crop.median_days_to_last_harvest.present?
        .metric.col-md-3.col-xs-5
          %h3 Last harvest expected
          %strong= crop.median_days_to_last_harvest
          %span days
          after planting

Fix predictions, it wasn't showing nil

.predictions
  - unless crop.perennial.nil?
    .row
      %p
        #{crop.name} is
        - if crop.perennial == true
          = link_to 'https://en.wikipedia.org/wiki/Annual_vs._perennial_plant_evolution' do
            a perennial crop
          (living more than two years)
        - elsif crop.perennial == false
          = link_to 'https://en.wikipedia.org/wiki/Annual_vs._perennial_plant_evolution' do
            an annual crop
          (living and reproducing in a single year or less)

  .row
    - if crop.annual? && crop.median_lifespan.present?
      .metric.col-md-3.col-xs-5
        %h3 Median lifespan
        %strong= crop.median_lifespan
        %span days

    - if crop.median_days_to_first_harvest.present?
      .metric.col-md-3.col-xs-5
        %h3 First harvest expected
        %strong= crop.median_days_to_first_harvest
        %span days
        after planting

    - if crop.annual? && crop.median_days_to_last_harvest.present?
      .metric.col-md-3.col-xs-5
        %h3 Last harvest expected
        %strong= crop.median_days_to_last_harvest
        %span days
        after planting


.hero-unit
  %h1
    \#RubyFriends?
    %p
      Isn't it great meeting new Ruby friends at conferences, Ruby brigades,
      meetups, hackathons, or wherever?
    %p
      Wouldn't it be great to share that new friendship? Now you can! Just
      snap a pic of you and your new friend(s) together, tweet it with
      hashtag #RubyFriends, and we'll include it on the site here.
    %a{href: '/', class: 'btn btn-large'} Back

Remove about content from h1


!!!5
%head
    %title
        How to teach your baby tracker
    %meta{
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
    }
    %script{
        src: 'https://code.jquery.com/jquery-2.1.3.min.js',
        type: 'text/javascript',
    }
    %link{
        href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css',
        rel: 'stylesheet',
    }
    - block extrahead
%body
    .container
        - block body
    %script{
        src: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js',
        type: 'text/javascript',
    }
    :javascript
        $(function() {
            $('body').on('click', '[rel=ajax-post]', function(e) {
                e.preventDefault();
                var params = {
                    csrfmiddlewaretoken: '{{ csrf_token }}'
                };
                var $button = $(e.currentTarget);
                var url = $button.attr('href');
                $.post(url, params, function(data) {
                    $button.prop('disable', true);
                });
            });
        });
    - block final-inline-script

Add the disabled class instead

!!!5
%head
    %title
        How to teach your baby tracker
    %meta{
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
    }
    %script{
        src: 'https://code.jquery.com/jquery-2.1.3.min.js',
        type: 'text/javascript',
    }
    %link{
        href: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css',
        rel: 'stylesheet',
    }
    - block extrahead
%body
    .container
        - block body
    %script{
        src: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js',
        type: 'text/javascript',
    }
    :javascript
        $(function() {
            $('body').on('click', '[rel=ajax-post]', function(e) {
                e.preventDefault();
                var params = {
                    csrfmiddlewaretoken: '{{ csrf_token }}'
                };
                var $button = $(e.currentTarget);
                var url = $button.attr('href');
                $.post(url, params, function(data) {
                    $button.addClass('disabled');
                });
            });
        });
    - block final-inline-script


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

Fix invalid null check on user profile page.

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


.form-buttons.filter-actions.actions
  = button t(:create), 'icon-ok'
  %span.or= t(:or)
  = button_link_to t(:cancel), collection_url, icon: 'icon-remove'

Move Create and Cancel References to Actions Namespace

.form-buttons.filter-actions.actions
  = button t('actions.create'), 'icon-ok'
  %span.or= t(:or)
  = button_link_to t('actions.cancel'), collection_url, icon: 'icon-remove'


Dear #{@producer.name},
\
We now have all the consumer orders for next food drop.

- if @receival_instructions
  Extra instructions: #{@receival_instructions}

Please deliver to #{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode} during the regular delivery time. If this is not convenient then please call #{@coordinator.phone}.

Note: If you have to arrange a different delivery day and time, it is requested that you do not come on site during drop off/pick up times.

\
Orders summary
================
\
Here is a summary of the orders for your products:
\
- @line_items.each_pair do |variant, line_item|
  #{variant.sku} - #{raw(variant.product.supplier.name)} - #{raw(variant.product_and_variant_name)} (QTY: #{line_item.quantity}) @ #{line_item.single_money} = #{line_item.display_amount}

\
Details
=========
\
For a detailed orders breakdown, please log into your account.

Please confirm that you have received this email.

Please send me an invoice for this amount so we can send you payment.

If you need to phone on the day please call #{@coordinator.phone}.
\
Thanks and best wishes - #{@coordinator.name}

Simplify producer email to make it more generic

Dear #{@producer.name},
\
We now have all the consumer orders for the next food drop.
\
- if @receival_instructions
  Stock pickup/delivery instructions:
  = @receival_instructions

\
Orders summary
================
\
Here is a summary of the orders for your products:
\
- @line_items.each_pair do |variant, line_item|
  #{variant.sku} - #{raw(variant.product.supplier.name)} - #{raw(variant.product_and_variant_name)} (QTY: #{line_item.quantity}) @ #{line_item.single_money} = #{line_item.display_amount}
\
Thanks and best wishes,
#{@coordinator.name}
#{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode}
#{@coordinator.phone}
#{@coordinator.email}


%h1 Remove Snippet

%p
  Are you sure you want to
  %strong.warning permanently remove
  the following snippet?

%table.index#snippets{:cellpadding=>0, :cellspacing=>0, :border=>0}
  %tbody
    %tr.node.level-1
      %td.snippet
        = image('snippet', :alt => "snippet-icon")
        %span.title= @snippet.name

- form_tag do
  %p.buttons
    %input.button{:type=>"submit", :value=>"Delete Snippet"}/
    or
    = link_to 'Cancel', snippet_index_url

Fix broken URL in snippets/remove.

%h1 Remove Snippet

%p
  Are you sure you want to
  %strong.warning permanently remove
  the following snippet?

%table.index#snippets{:cellpadding=>0, :cellspacing=>0, :border=>0}
  %tbody
    %tr.node.level-1
      %td.snippet
        = image('snippet', :alt => "snippet-icon")
        %span.title= @snippet.name

- form_tag do
  %p.buttons
    %input.button{:type=>"submit", :value=>"Delete Snippet"}/
    or
    = link_to 'Cancel', admin_snippets_url


%li(data-filter="example, snippet, name")
  %img(alt="Example Snippet" data-snippet="example" src="/assets/mercury/default-snippet.png")
  %h4>Snippet Name
  .description A one or two line long description of what this snippet does.</div>

Use the snippet icon from the toolbar.

%li(data-filter="example, snippet, name")
  %img(alt="Example Snippet" data-snippet="example" src="/assets/toolbar/snippets.png")
  %h4>Snippet Name
  .description A one or two line long description of what this snippet does.</div>


%ul#notes-list.notes.main-notes-list.timeline
  = render "projects/notes/notes"
%ul.notes.notes-form.timeline
  %li.timeline-entry
    .flash-container.timeline-content

    - if can? current_user, :create_note, @project
      .timeline-icon.hidden-xs.hidden-sm
        %a.author_link{ href: user_path(current_user) }
          = image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
      .timeline-content.timeline-content-form
        = render "projects/notes/form", view: diff_view
    - else
      .disabled-comment.text-center
        .disabled-comment-text.inline
          Please
          = link_to "sign up", new_session_path(:user, redirect_to_referer: 'yes')
          or
          = link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
          to post a comment

:javascript
  var notes = new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}")

Clean up stray Sign up ref.

%ul#notes-list.notes.main-notes-list.timeline
  = render "projects/notes/notes"
%ul.notes.notes-form.timeline
  %li.timeline-entry
    .flash-container.timeline-content

    - if can? current_user, :create_note, @project
      .timeline-icon.hidden-xs.hidden-sm
        %a.author_link{ href: user_path(current_user) }
          = image_tag avatar_icon(current_user), alt: current_user.to_reference, class: 'avatar s40'
      .timeline-content.timeline-content-form
        = render "projects/notes/form", view: diff_view
    - else
      .disabled-comment.text-center
        .disabled-comment-text.inline
          Please
          = link_to "register", new_session_path(:user, redirect_to_referer: 'yes')
          or
          = link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes')
          to post a comment

:javascript
  var notes = new Notes("#{namespace_project_notes_path(namespace_id: @project.namespace, target_id: @noteable.id, target_type: @noteable.class.name.underscore)}", #{@notes.map(&:id).to_json}, #{Time.now.to_i}, "#{diff_view}")


= form_tag(User.ichain_login_url, :method => :post, :enctype => 'application/x-www-form-urlencoded', :id => 'login_form') do
  %p
    = hidden_field_tag :url, request.original_url
    = hidden_field_tag :context, ::Devise.ichain_context
    = hidden_field_tag :proxypath, ::Devise.ichain_proxypath
    = label_tag :username, t("activerecord.attributes.user.nickname")
    = text_field_tag :username, ""
  %p
    = label_tag :password, t("activerecord.attributes.user.password")
    = password_field_tag :password, ""
  %p= submit_tag(t(:login), :onclick => 'fillEmptyFields();')

Fix in the ichain login form of the bento theme

= form_tag(User.ichain_login_url, :method => :post, :enctype => 'application/x-www-form-urlencoded', :id => 'login_form') do
  %p
    = hidden_field_tag :url, @back_url || request.original_url
    = hidden_field_tag :context, ::Devise.ichain_context
    = hidden_field_tag :proxypath, ::Devise.ichain_proxypath
    = label_tag :username, t("activerecord.attributes.user.nickname")
    = text_field_tag :username, ""
  %p
    = label_tag :password, t("activerecord.attributes.user.password")
    = password_field_tag :password, ""
  %p= submit_tag(t(:login), :onclick => 'fillEmptyFields();')


%ul.breadcrumb
  %li
    = link_to 'URLs', root_path
    %span.divider /
  %li= @url.name

%h3 Snapshots
%table.table
  %tr
    %td
      %strong Website URL:
    %td= link_to @url.address, @url.address, target: '_blank'
  %tr
    %td
      %strong Viewport width:
    %td= pluralize(@url.viewport_width, 'pixel')
  %tr
    %td
      %strong Number of snapshots:
    %td= @url.snapshots.count
  - if @url.snapshots.count > 0
    %tr
      %td
        %strong Latest snapshot:
      %td
        = time_tag @url.snapshots.first.created_at do
          = time_ago_in_words(@url.snapshots.first.created_at) + ' ago'

= form_for Snapshot.new, class: 'form' do |f|
  = hidden_field_tag :url, @url.id
  Snapshots are taken every hour. If you are impatient, you can
  %button.btn.btn-info.spin-on-submit
    Create a new snapshot
  manually.

.clearfix
  = render @url.snapshots

Remove copy about snapshots being created every hour

%ul.breadcrumb
  %li
    = link_to 'URLs', root_path
    %span.divider /
  %li= @url.name

%h3 Snapshots
%table.table
  %tr
    %td
      %strong Website URL:
    %td= link_to @url.address, @url.address, target: '_blank'
  %tr
    %td
      %strong Viewport width:
    %td= pluralize(@url.viewport_width, 'pixel')
  %tr
    %td
      %strong Number of snapshots:
    %td= @url.snapshots.count
  - if @url.snapshots.count > 0
    %tr
      %td
        %strong Latest snapshot:
      %td
        = time_tag @url.snapshots.first.created_at do
          = time_ago_in_words(@url.snapshots.first.created_at) + ' ago'

= form_for Snapshot.new, class: 'form' do |f|
  = hidden_field_tag :url, @url.id
  %button.btn.btn-info.spin-on-submit
    Create new snapshot

.clearfix
  = render @url.snapshots


%h1
  = @author.name
  = @author.active ? "" : " (inactive)"
.author
  %aside= image_tag @author.image, class: "avatar"
%p
  = @author.email_tag
  %br Created #{@author.articles.count} articles and edited #{@author.edits.count}.

= simple_form_for @author.source, url: author_path(@author), method: :patch do |f|
  = f.input :shtick, as: :text, required: false, placeholder: "What's this author's shtick? What do they do? "
  = f.submit "Update That Shtick", class: "btn-a"

%h2 Articles created (#{@author.articles.count})
%ul
  - @author.articles.each do |article|
    %li= link_to article, article

%h2 Articles edited (#{@author.edits.count})
%ul
  - @author.edits.each do |edit|
    %li= link_to edit, edit

= simple_form_for :user, url: author_path(@author), method: :patch do |f|
  = f.input :avatar, as: :file, required: false, label: "Photo"
  = f.submit "Upload Avatar", class: "btn-a"

= link_to "Toggle Status", author_toggle_status_path(@author), method: :put

Put a stop to avatar shenanigans.

%h1
  = @author.name
  = @author.active ? "" : " (inactive)"
.author
  %aside= image_tag @author.image, class: "avatar"
%p
  = @author.email_tag
  %br Created #{@author.articles.count} articles and edited #{@author.edits.count}.

= simple_form_for @author.source, url: author_path(@author), method: :patch do |f|
  = f.input :shtick, as: :text, required: false, placeholder: "What's this author's shtick? What do they do? "
  = f.submit "Update That Shtick", class: "btn-a"

%h2 Articles created (#{@author.articles.count})
%ul
  - @author.articles.each do |article|
    %li= link_to article, article

%h2 Articles edited (#{@author.edits.count})
%ul
  - @author.edits.each do |edit|
    %li= link_to edit, edit

- if Rails.env.development? or current_user.id == 1
  = simple_form_for :user, url: author_path(@author), method: :patch do |f|
    = f.input :avatar, as: :file, required: false, label: "Photo"
    = f.submit "Upload Avatar", class: "btn-a"

= link_to "Toggle Status", author_toggle_status_path(@author), method: :put


:ruby
  events_view ||= cookies[:events_view] || 'list'

- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-filters.sidebar-box= render 'filters'
  #sidebar-exports.sidebar-box= render 'exports'
  #sidebar-event-details.sidebar-box

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), { :view => 'calendar' }, :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), { :view => 'list' }, :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title
  = t('.title')

= cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
  .events-view{:class => events_view}= render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date

Allow switching between calendar and list views w/o javascript

:ruby
  events_view ||= params[:view] || cookies[:events_view] || 'list'

- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-filters.sidebar-box= render 'filters'
  #sidebar-exports.sidebar-box= render 'exports'
  #sidebar-event-details.sidebar-box

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), { :view => 'calendar' }, :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), { :view => 'list' }, :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title
  = t('.title')

= cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
  .events-view{:class => events_view}= render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date


.slogan
  .white
    Want to learn
    %span.red
      Ruby on Rails
    in the city?
  .white
    Come join us for free.
    %span.red
      No fees, no charges, no tricks.
  .white
    Just having fun learning and socializing together!
  .register
    %a.a_button{:href => "#"}
      Register
    %a.link{:href => "/about"}
      Learn More About Us

Hide Register button if current user

.slogan
  .white
    Want to learn
    %span.red
      Ruby on Rails
    in the city?
  .white
    Come join us for free.
    %span.red
      No fees, no charges, no tricks.
  .white
    Just having fun learning and socializing together!
  .register
    - unless current_user
      %a.a_button{:href => "#"}
        Register
    %a.link{:href => "/about"}
      Learn More About Us


.snippet-container
  = diff_snippet(patch, comments.first.location)
.code-comment-recap
  - comments.each do |comment|
    .comment{ id: "comment-#{comment.id}" }
      = link_to('<i class="fa fa-link"></i>'.html_safe,
                project_merge_request_path(@project, @mr, to: @to, anchor: "comment-#{comment.id}"))
      = image_tag gravatar_url(comment.user), class: 'avatar'
      .comment-header
        = comment.user.name
        %span
          wrote #{time_ago_in_words(comment.created_at)} ago
      .comment-body.markdown= emojify(comment.content)

Use different element ids for comment from past versions.

.snippet-container
  = diff_snippet(patch, comments.first.location)
.code-comment-recap
  - comments.each do |comment|
    .comment{ id: "comment-ref-#{comment.id}" }
      = link_to('<i class="fa fa-link"></i>'.html_safe,
                project_merge_request_path(@project, @mr, to: @to, anchor: "comment-#{comment.id}"))
      = image_tag gravatar_url(comment.user), class: 'avatar'
      .comment-header
        = comment.user.name
        %span
          wrote #{time_ago_in_words(comment.created_at)} ago
      .comment-body.markdown= emojify(comment.content)


= simple_form_for([@badge, @earned_badge]) do |f|
  %h3= "You are awarding the #{@badge.name} #{term_for :badge} to..."
  = hidden_field_tag :badge_id, @badge.id
  .small-12.medium-4.columns
    = select_tag :student, options_from_collection_for_select(current_course.students, "id", "name", @earned_badge.try(:student_id)), :prompt => "Select Student"

  .clearfix

  .small-12.columns
    %label Feedback
    = f.bootsy_area :feedback

  %hr
  .right
    = f.button :submit, "#{@earned_badge.persisted? ? 'Update' : 'Award '} #{term_for :badge}",  :class => "button tiny radius"
    = link_to 'Cancel', badge_path(@badge), :class => 'button tiny radius'

Make students in earned badge form alphabetical

= simple_form_for([@badge, @earned_badge]) do |f|
  %h3= "You are awarding the #{@badge.name} #{term_for :badge} to..."
  = hidden_field_tag :badge_id, @badge.id
  .small-12.medium-4.columns
    = select_tag :student, options_from_collection_for_select(current_course.students.alpha, "id", "name", @earned_badge.try(:student_id)), :prompt => "Select Student"

  .clearfix

  .small-12.columns
    %label Feedback
    = f.bootsy_area :feedback

  %hr
  .right
    = f.button :submit, "#{@earned_badge.persisted? ? 'Update' : 'Award '} #{term_for :badge}",  :class => "button tiny radius"
    = link_to 'Cancel', badge_path(@badge), :class => 'button tiny radius'


!!!
%html
  %head
    %meta{ content: 'width=device-width, initial-scale=1.0', name: 'viewport' }
      %title= content_for?(:title) ? yield(:title) : 'Ohana API'
      %meta{ content: content_for?(:description) ? yield(:description) : 'An open-source API of human services, farmers markets, parks, libraries, museums, and other organizations in San Mateo County', name: 'description' }
        = stylesheet_link_tag 'application', media: 'all'
        = csrf_meta_tags
        = yield(:head)
  %body{ class: "#{controller_name} #{action_name}" }
    = render 'shared/navigation'
    #main{ role: 'main' }
      .content
        .container
          .row
            = render 'shared/messages'
            = yield
    = javascript_include_tag 'application'

Use `t('admin.api_location')` in meta description

!!!
%html
  %head
    %meta{ content: 'width=device-width, initial-scale=1.0', name: 'viewport' }
      %title= content_for?(:title) ? yield(:title) : 'Ohana API'
      %meta{ content: content_for?(:description) ? yield(:description) : "An open-source API of human services, farmers markets, parks, libraries, museums, and other organizations in #{t('admin.api_location')}", name: 'description' }
        = stylesheet_link_tag 'application', media: 'all'
        = csrf_meta_tags
        = yield(:head)
  %body{ class: "#{controller_name} #{action_name}" }
    = render 'shared/navigation'
    #main{ role: 'main' }
      .content
        .container
          .row
            = render 'shared/messages'
            = yield
    = javascript_include_tag 'application'