= form_tag login_path, method: :post do
  %table.form-table
    %thead
      %tr
        %th{colspan: 2} Sign In
    %tbody
      %tr#username
        %th.sub.vtop Username
        %td.even= text_field_tag :username, params[:username], placeholder: "Username"
      %tr#password
        %th.sub.vtop Password
        %td.odd
          = password_field_tag :password, params[:password], placeholder: "Password"
          #remember-link= link_to "Forgot Password?", new_password_reset_path
      %tr#remember-me
        %th.sub.vtop Remember me
        %td.even= check_box_tag :remember_me
    %tr
      %th.form-table-ender{colspan: 2}= submit_tag "Sign In", class: 'button'

Rename rows to prevent duplicate ids

= form_tag login_path, method: :post do
  %table.form-table
    %thead
      %tr
        %th{colspan: 2} Sign In
    %tbody
      %tr#username-row
        %th.sub.vtop Username
        %td.even= text_field_tag :username, params[:username], placeholder: "Username"
      %tr#password-row
        %th.sub.vtop Password
        %td.odd
          = password_field_tag :password, params[:password], placeholder: "Password"
          #remember-link= link_to "Forgot Password?", new_password_reset_path
      %tr#remember-me
        %th.sub.vtop Remember me
        %td.even= check_box_tag :remember_me
    %tr
      %th.form-table-ender{colspan: 2}= submit_tag "Sign In", class: 'button'


- content_for :body_classes, 'search-page'
- content_for :breadcrumbs do
  = breadcrumbs(Home.path + ['Search results'])

#search_results
  %h1.noborder= @page_title = 'Search results'
  .search-hint Select a person's name to view more details, or you can view their team if desired.
  .pagination= pluralize(@people.length, "result") + ' found'

  = render partial: 'search/team', collection: @teams
  = render partial: 'search/person', collection: @people, locals: { search_result: true }

  .add-new-person
    Can't find the person you're looking for? Why not
    = link_to 'add them', new_person_path

Update search hint copy to reflect teams are in results

- content_for :body_classes, 'search-page'
- content_for :breadcrumbs do
  = breadcrumbs(Home.path + ['Search results'])

#search_results
  %h1.noborder= @page_title = 'Search results'
  .search-hint Select a team or person's name to view more details.
  .pagination= pluralize(@people.length, "result") + ' found'

  = render partial: 'search/team', collection: @teams
  = render partial: 'search/person', collection: @people, locals: { search_result: true }

  .add-new-person
    Can't find the person you're looking for? Why not
    = link_to 'add them', new_person_path


= f.semantic_fields_for :vcard do |vcard|
  = vcard.input :full_name, :input_html => {"data-autofocus" => true}
  = vcard.semantic_fields_for :address do |address|
    = address.inputs :street_address, :extended_address, :postal_code, :locality

Split inputs into own single inputs for vcards form.

= f.semantic_fields_for :vcard do |vcard|
  = vcard.input :full_name, :input_html => {"data-autofocus" => true}
  = vcard.semantic_fields_for :address do |address|
    = address.input :street_address
    = address.input :extended_address
    = address.input :postal_code
    = address.input :locality


= format_field("Services", format_as_list(@org.fta_mode_types ) )
= format_field("Service Area Type", @org.fta_service_area_type.name )
= format_field("Service Districts", format_as_list(@org.districts) )
= format_field("Services Provided", format_as_list(@org.service_provider_types) ) if @org.respond_to? :service_provider_types

Add FTA Agency Type to Transit Orgs

= format_field("Agency Type", @org.fta_agency_type)
= format_field("Services", format_as_list(@org.fta_mode_types ) )
= format_field("Service Area Type", @org.fta_service_area_type )
= format_field("Service Districts", format_as_list(@org.districts) )
= format_field("Services Provided", format_as_list(@org.service_provider_types) ) if @org.respond_to? :service_provider_types


- @title = "Data Request Submitted"

- content_for :header do
  .text-center
    .mb-3= @title
    .lead
      Thank you, your data request was submitted successfully.

.dashboard-container-narrow
  %p
    Dear
    = succeed "," do
      = current_user.username

  %p
    Once your data request is approved, you will be able to download data from
    the datasets you requested.

  %p
    New to the NSRR? Get started with our
    = link_to "Where to Start", showcase_show_path("where-to-start")
    guide.

  %p
    Learn how to download data using the NSRR gem:
    = link_to "NSRR Demo", demo_path

  %p
    Also, post any questions on the
    = link_to "forum", topics_path
    or contact us directly at
    = mail_to ENV["support_email"]
    if you need any help!

  %p Welcome aboard!

  %p The NSRR Team

.text-center
  = link_to data_requests_path, class: "btn btn-light btn-shadow" do
    = icon("fas", "th-list")
    Review my data requests

  = link_to [:print, @data_request], class: "btn btn-primary btn-shadow", data: { turbolinks: false } do
    = icon("fas", "print")
    Print data request

Update text shown after submitting a data request

- @title = "Data Request Submitted"

- content_for :header do
  .text-center
    .mb-3= @title
    .lead
      Thank you, your data request was submitted successfully.

.dashboard-container-narrow
  %p
    Dear
    = succeed "," do
      = current_user.username

  %p
    Once your data request is approved, you will be able to download data from
    the datasets you requested.

  %p
    %strong
      Please allow up to two (2) weeks for your request to be reviewed by the
      NSRR team.

  %p
    If you need help, please post questions on the
    = link_to "forum", topics_path
    or contact us directly at
    = mail_to ENV["support_email"]
    .

  %p Welcome aboard!

  %p The NSRR Team

.text-center
  = link_to data_requests_path, class: "btn btn-light btn-shadow" do
    = icon("fas", "th-list")
    Review my data requests

  = link_to [:print, @data_request], class: "btn btn-primary btn-shadow", data: { turbolinks: false } do
    = icon("fas", "print")
    Print data request


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

Clean up layout of fully-funded donation widget

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


%br
=link_to '#' do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.pencil.icon
    .hidden.content
      Edit
=link_to new_development_flag_path(@development) do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.flag.icon
    .hidden.content
      Flag
=link_to new_development_claim_path(@development) do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.university.icon
    .hidden.content
      Claim
.ui.dropdown.icon.button#subscribe
  %i.unhide.icon
  -# TODO Add label for # of watchers
  %span.text Watch
  .menu
    .item
      .ui.unhide.icon
      Watching
      -# %span.description
      -#   Receiving notifications
    .item
      .ui.hide.icon
      Not Watching
      -# %span.description
      -#   Not receiving notifications about updates

Rearrange the actions so the watch menu appears first

%br
.ui.dropdown.icon.button#subscribe
  %i.unhide.icon
  -# TODO Add label for # of watchers
  %span.text Watch
  .menu
    .item
      .ui.unhide.icon
      Watching
      -# %span.description
      -#   Receiving notifications
    .item
      .ui.hide.icon
      Not Watching
      -# %span.description
      -#   Not receiving notifications about updates

-# Consider making this a partial
=link_to '#' do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.pencil.icon
    .hidden.content
      Edit

=link_to new_development_flag_path(@development) do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.flag.icon
    .hidden.content
      Flag

=link_to new_development_claim_path(@development) do
  .ui.vertical.animated.button{:tabindex => "0"}
    .visible.content
      %i.university.icon
    .hidden.content
      Claim


.form-page
  %section.card.form-card
    %h1 Join Growstuff
    .card-body
      %p Sign up for a Growstuff account to track your veggie garden and connect with other local growers.

    = form_for(resource, as: resource_name,
        url: registration_path(resource_name),
        html: { class: "text-center border border-light p-5" }) do |f|
      = devise_error_messages!

      = f.text_field :login_name, class: 'form-control form-control-lg{', placeholder: 'login name'
      %span This is the name that will show on the website.

      = icon 'fas', 'email'
      = f.email_field :email, class: 'form-control', placeholder: 'email', type: :email
      %span We'll use this address to contact you (we never spam!)

      %hr/
      = f.password_field :password, class: "form-control", placeholder: 'password', type: :password
      = f.password_field :password_confirmation, class: 'form-control', placeholder: 'confirm password'

      %hr/

      %p
        = f.check_box :tos_agreement
        I agree to the
        = link_to 'Terms of Service', "#{root_url}/policy/tos"

      %p
        = f.check_box :newsletter, checked: true
        Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter
      %p= render partial: 'newsletter_blurb'

      = f.submit "Sign up", class: 'btn btn-block my-4 btn-success'

    = render "devise/shared/links"

Update rego form, so it matches the specs

.form-page
  .card.form-card
    %h1 Join #{ENV['GROWSTUFF_SITE_NAME']}
    .card-body
      %p Sign up for a #{ENV['GROWSTUFF_SITE_NAME']} account to track your vegetable garden and connect with other local growers.

    = bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name),
        html: { class: "text-center border border-light p-5" }) do |f|
      = devise_error_messages!

      = f.text_field :login_name
      %span This is the name that will show on the website.

      = icon 'fas', 'email'
      = f.email_field :email
      %span We'll use this address to contact you (we never spam!)

      = f.password_field :password, type: :password
      = f.password_field :password_confirmation

      %p
        = f.check_box :tos_agreement, label: "I agree"
        to the #{link_to 'Terms of Service', "/policy/tos"}

      %p
        = f.check_box :newsletter, checked: true, label: "Subscribe to the #{ENV['GROWSTUFF_SITE_NAME']} newsletter"
      %p= render partial: 'newsletter_blurb'

      = f.submit "Sign up", class: 'btn btn-block btn-success'

    .card-footer= render "devise/shared/links"


.row
  .col-sm-12
    .col-sm-4
      = render partial: "assets/asset_details", locals: {asset:asset}
    .col-sm-4
      = render partial: "assets/asset_condition_details", locals: {asset:asset}
    .col-sm-4
      = render partial: "assets/asset_rehab_details", locals: {asset:asset}

Make asset popup in datatable display right

.row
  .col-sm-12
    .col-sm-4
      %fieldset
        %legend.panel-legend Asset Details
      = render partial: "assets/asset_details", locals: {asset:asset}
    .col-sm-4
      = render partial: "assets/asset_condition_details", locals: {asset:asset}
    .col-sm-4
      %fieldset
        %legend.panel-legend Replacement/Rehabilitation
        = render partial: "assets/asset_rehab_details", locals: {asset:asset}


- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")

- content_for :footer do
  = render partial: "new_user/dossiers/footer", locals: { dossier: @dossier }

#dossier-show
  = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }

  = render partial: 'shared/dossiers/demande', locals: { dossier: @dossier, demande_seen_at: nil }

  .container
    - if !@dossier.read_only?
      = link_to "Modifier le dossier", modifier_dossier_path(@dossier), class: 'button primary edit-form'

Add a clearfix below the edit-form button

- content_for(:title, "Demande · Dossier nº #{@dossier.id} (#{@dossier.procedure.libelle})")

- content_for :footer do
  = render partial: "new_user/dossiers/footer", locals: { dossier: @dossier }

#dossier-show
  = render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }

  = render partial: 'shared/dossiers/demande', locals: { dossier: @dossier, demande_seen_at: nil }

  .container
    - if !@dossier.read_only?
      = link_to "Modifier le dossier", modifier_dossier_path(@dossier), class: 'button primary edit-form'
      .clearfix


/ User's Repositories
%div.panel.panel-default
  %div.panel-heading
    %h3.panel-title= current_user.first_name + "'s Repositories"
  %div.panel-body
    - current_user.permissions.each do |permission|
      - if (permission.item_type == "Repository")
        - repository = Repository.find(permission.item_id)
        %span.glyphicon.glyphicon-hdd
        = link_to repository.name, repository

Make one repository per line

/ User's Repositories
%div.panel.panel-default
  %div.panel-heading
    %h3.panel-title= current_user.first_name + "'s Repositories"
  %div.panel-body
    - current_user.permissions.each do |permission|
      - if (permission.item_type == "Repository")
        - repository = Repository.find(permission.item_id)
        %div
          %span.glyphicon.glyphicon-hdd
          = link_to repository.name, repository


-# Render only the calculator settings and not the surrounding form
- enterprise_fee_set = Sets::ModelSet.new(EnterpriseFee, EnterpriseFee.where(:id => enterprise_fee.id))
- calculator_form_string = nil
- form_for enterprise_fee_set, :as => :sets_enterprise_fee_set, :url => '' do |form|
  - form.fields_for :collection do |f|
    - calculator_form_string = capture do
      - if !enterprise_fee.new_record?
        .calculator-settings
          = f.fields_for :calculator do |calculator_form|
            - preference_fields(enterprise_fee.calculator, calculator_form).each do |field|
              .field.alpha.one.columns
                = field[:label]
              .field.omega.two.columns
                = field[:field]

= calculator_form_string

Improve enterprise fees calculator fields

-# Render only the calculator settings and not the surrounding form
- enterprise_fee_set = Sets::ModelSet.new(EnterpriseFee, EnterpriseFee.where(:id => enterprise_fee.id))
- calculator_form_string = nil
- form_for enterprise_fee_set, :as => :sets_enterprise_fee_set, :url => '' do |form|
  - form.fields_for :collection do |f|
    - calculator_form_string = capture do
      - if !enterprise_fee.new_record?
        .calculator-settings
          = f.fields_for :calculator do |calculator_form|
            - preference_fields(enterprise_fee.calculator, calculator_form).each do |field|
              %span.field
                = field[:label]
              %p.field
                = field[:field]

= calculator_form_string


%div.card.card--ad.card--no-image.js-card.js-card-ad.card--double.is-closed
  .tag--horizontal.tag--horizontal--left
    Advertisement
  %div.card__content#js-ad-mpu.ad-mpu.is-faded-out

Make the mpu card be open by default again.

%div.card.card--ad.card--no-image.js-card.js-card-ad.card--double
  .tag--horizontal.tag--horizontal--left
    Advertisement
  %div.card__content.ad-mpu
    #js-ad-mpu


= devise_error_messages!
.field
  = f.label :email
  %br/
  = f.email_field :email, autofocus: true

Add name fields to forms

= devise_error_messages!
.field
  = f.label :email
  %br/
  = f.email_field :email, autofocus: true
.field
  = f.label :first_name
  = f.text_field :first_name
.field
  = f.label :last_name
  = f.text_field :last_name


= paginator.render do
  .pagination
    %ul
      = prev_page_tag unless current_page.first?
      - each_page do |page|
        - if page.left_outer? || page.right_outer? || page.inside_window?
          = page_tag page
        - elsif !page.was_truncated?
          = gap_tag
      = next_page_tag unless current_page.last?

Fix kaminari paginator view file.

= paginator.render do
  %nav
    %ul.pagination
      = prev_page_tag unless current_page.first?
      - each_page do |page|
        - if page.left_outer? || page.right_outer? || page.inside_window?
          = page_tag page
        - elsif !page.was_truncated?
          = gap_tag
      = next_page_tag unless current_page.last?


!!! 5
%html
  %head
    %title WebLapine
    = stylesheet_link_tag :all
    = javascript_include_tag :defaults
    = csrf_meta_tag

  %body
    %h1 WebLapine
    %ul#menu
      %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues'
    = yield

Add a link to RSS

!!! 5
%html
  %head
    %title WebLapine
    = stylesheet_link_tag :all
    = javascript_include_tag :defaults
    = csrf_meta_tag

  %body
    %h1 WebLapine
    %ul#menu
      %li= link_to 'Issues on Github', 'https://github.com/AlSquire/WebLapine/issues'
      %li= link_to 'RSS', url_for(:format => :rss)
    = yield


!!!
%html
  %head
    %title Rulebook
    = stylesheet_link_tag    "application", :media => "all"
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render "shared/analytics/google"
    :javascript
      tinymce.init({selector:'.js--wysiwyg',
        menubar: false,
        height: 300,
        width: '100%',
        statusbar: false,
        plugins: 'link table',
        toolbar1: 'bold italic underline strikethrough | bullist numlist | cut copy paste | link unlink | table | undo redo',
        paste_word_valid_elements: 'ol,ul,li,b,strong,i,em,u,ins',
        target_list: false,
        link_title: false})
  %body
    - if content_for?(:top_nav)
      = yield :top_nav
    .main_nav
      %p#notice= notice
      %p.alert= alert
      = yield
    - if content_for?(:bottom_nav)
      %hr
      = yield :bottom_nav
    = debug(params) if Rails.env.development?

Enable browser spellcheck in tinyMCE

!!!
%html
  %head
    %title Rulebook
    = stylesheet_link_tag    "application", :media => "all"
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render "shared/analytics/google"
    :javascript
      tinymce.init({selector:'.js--wysiwyg',
        menubar: false,
        height: 300,
        width: '100%',
        statusbar: false,
        browser_spellcheck : true,
        plugins: 'link table',
        toolbar1: 'bold italic underline strikethrough | bullist numlist | cut copy paste | link unlink | table | undo redo',
        paste_word_valid_elements: 'ol,ul,li,b,strong,i,em,u,ins',
        target_list: false,
        link_title: false})
  %body
    - if content_for?(:top_nav)
      = yield :top_nav
    .main_nav
      %p#notice= notice
      %p.alert= alert
      = yield
    - if content_for?(:bottom_nav)
      %hr
      = yield :bottom_nav
    = debug(params) if Rails.env.development?


!!!
- conditional_html
%head
  %meta{:charset => "utf-8"}
  %title= content_for?(:title) ? yield(:title) : "Tweet Depository"
  = csrf_meta_tags
  %meta{:content => "Archive your Tweets", :name => "description"}
  %meta{:content => "on", "http-equiv" => "cleartype"}
  %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}
  %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}

  - if private_timeline?
    %meta{:content => "noindex, nofollow", :name => "robots"}
  - elsif is_search?
    %meta{:content => "noindex", :name => "robots"}

  = favicon_link_tag "/favicon.ico"
  = stylesheet_link_tag "global", media: "all"
  = stylesheet_link_tag "ss-standard", media: "all"
  = javascript_include_tag "application"

%body
  %article
    - if notice
      .flash.notice= notice
    - if alert
      .flash.alert= alert
    = yield

Use the user's avatar as the favicon

!!!
- conditional_html
%head
  %meta{:charset => "utf-8"}
  %title= content_for?(:title) ? yield(:title) : "Tweet Depository"
  = csrf_meta_tags
  %meta{:content => "Archive your Tweets", :name => "description"}
  %meta{:content => "on", "http-equiv" => "cleartype"}
  %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}
  %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}

  - if private_timeline?
    %meta{:content => "noindex, nofollow", :name => "robots"}
  - elsif is_search?
    %meta{:content => "noindex", :name => "robots"}

  - if @user.present?
    = favicon_link_tag @user.avatar_url
  - else
    = favicon_link_tag "/favicon.ico"

  = stylesheet_link_tag "global", media: "all"
  = stylesheet_link_tag "ss-standard", media: "all"
  = javascript_include_tag "application"

%body
  %article
    - if notice
      .flash.notice= notice
    - if alert
      .flash.alert= alert
    = yield


.photo
  = image_tag @photo.photo_medium.url,
      alt: t(".photo_alt", caption: @photo.caption),
      class: "close"
  %figcaption
    = @photo.caption

Remove the close class from overview pictures, since the css was making them tiny.

.photo
  = image_tag @photo.photo_medium.url,
      alt: t(".photo_alt", caption: @photo.caption)
  %figcaption
    = @photo.caption


.row
  .col-md-3
  .center.col-md-6
    = render 'shared/article_single_show', :object => @thisOne
    %h1 Share this Cutout!
    =form_tag("#{article_path(@thisOne)}/share", method: :post, class: "form") do
      = text_field_tag "emails", "", { :placeholder => "Please enter comma separated email IDs to share with here (maximum 5)", :required => true }
      = text_field_tag "share_as", "", { :placeholder => "The name that will be on the email. Default: #{current_user.username}" }
      = text_area_tag "comments", "", { :placeholder => "Add any comments you want to put in this email alongwith your cutout" }
      .form-group.row
        .form-check.form-check-inline.col-auto
          = check_box_tag "cc_myself", "", false, class: "form-check-input", id: "cc_myself"
          = label_tag "cc_myself", "cc myself", class: "form-check-label"
      = submit_tag "Share with these email IDs"

Change the size of the title on the Share page

.row
  .col-md-3
  .center.col-md-6
    = render 'shared/article_single_show', :object => @thisOne
    %h3 Share this Cutout!
    =form_tag("#{article_path(@thisOne)}/share", method: :post, class: "form") do
      = text_field_tag "emails", "", { :placeholder => "Please enter comma separated email IDs to share with here (maximum 5)", :required => true }
      = text_field_tag "share_as", "", { :placeholder => "The name that will be on the email. Default: #{current_user.username}" }
      = text_area_tag "comments", "", { :placeholder => "Add any comments you want to put in this email alongwith your cutout" }
      .form-group.row
        .form-check.form-check-inline.col-auto
          = check_box_tag "cc_myself", "", false, class: "form-check-input", id: "cc_myself"
          = label_tag "cc_myself", "cc myself", class: "form-check-label"
      = submit_tag "Share with these email IDs"


- content_for :title do
  Tag use in Gerrit over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

%section{ data: { view: 'Tags', authors: h(@authors.to_json) } }
  %h2 Global tag use
  #global-used= haml :'shared/progress'

  %h2 Per-author tag use
  - @authors.each do |author|
    %h3&= author
    %ul.nav.nav-tabs{ data: { tabs: 'tabs' } }
      %li.active
        %a{ href: "##{name_to_id author}-used", data: { toggle: 'tab' } } Used
      %li
        %a{ href: "##{name_to_id author}-received", data: { toggle: 'tab' } } Received

    .tab-content
      .tab-pane{ id: "#{name_to_id author}-used" }
      .tab-pane{ id: "#{name_to_id author}-received" }

Make "from" tab pane selected at display time

- content_for :title do
  Tag use in Gerrit over past #{pluralize @days, 'day'}
  %small
    %span{day_links}

%section{ data: { view: 'Tags', authors: h(@authors.to_json) } }
  %h2 Global tag use
  #global-used= haml :'shared/progress'

  %h2 Per-author tag use
  - @authors.each do |author|
    %h3&= author
    %ul.nav.nav-tabs{ data: { tabs: 'tabs' } }
      %li.active
        %a{ href: "##{name_to_id author}-used", data: { toggle: 'tab' } } Used
      %li
        %a{ href: "##{name_to_id author}-received", data: { toggle: 'tab' } } Received

    .tab-content
      .tab-pane.active{ id: "#{name_to_id author}-used" }
      .tab-pane{ id: "#{name_to_id author}-received" }


%p Your account is set up to require the use of a one-time password in order to log in.
%p You currently have #{recovery_code_count} unused recovery codes.
= button_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-danger', method: 'delete',
          data: { confirm: t('views.settings.security.2fa.detach_confirm') }
= button_to 'Re-generate recovery codes', reset_user_recovery_codes_path, class: 'btn btn-primary', method: 'delete',
          data: { confirm: 'Are you sure? This will disable your previous set of recovery codes.' }

Add translations for TOTP enabled security view

%p= t(".body")
%p= t(".recovery_code_count", count: recovery_code_count)
= button_to t(".remove.action"), destroy_user_2fa_path, class: "btn btn-danger", method: "delete",
          data: { confirm: t(".remove.confirm") }
= button_to t(".regenerate.action"), reset_user_recovery_codes_path, class: "btn btn-primary", method: "delete",
          data: { confirm: t(".regenerate.confirm") }


%h3.heading-small
  Help with sending the evidence
  = t('disk_evidence.help_sending_evidence')

%p
  = t('disk_evidence.hint')

%p
  = t('disk_evidence.hint_html')

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

Fix broken disc evidence coversheet link

%h3.heading-small
  Help with sending the evidence
  = t('disk_evidence.help_sending_evidence')

%p
  = t('disk_evidence.hint')

%p
  = t('disk_evidence.hint_html', link: disc_evidence_external_users_claim_path(@claim))

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


- if @results.present?
  .container.form-container
    %h1 Results
    - @results.each do |result|
      %li= result

.container.form-container
  %h1 Requested accounts for your courses

  - if @courses.empty?
    %p No requested accounts
  - else
    - @courses.each do |title, requested_accounts|
      - course_slug = requested_accounts.first.course.slug
      %h2
        %a{href: "/courses/#{course_slug}"}= title
      %table.table.w100
        %thead
          %th.w25 Username
          %th Email
          %th.w25 Actions
        %tbody
          - requested_accounts.each do |account|
            %tr
              %td= account.username
              %td= account.email
              %td
                %a{href: "/requested_accounts/#{course_slug}/#{account.id}/delete", 'data-method': :delete}> Delete this request
      .container.mt2.mb2
        %a.button{href: "/requested_accounts/#{course_slug}/create", 'data-method': :post} Create these accounts
    %hr
    .container.mt2.mb2
      %a.button.danger{href: "/requested_accounts", 'data-method': :post} Create all accounts

Add creation date to /requested_accounts

- if @results.present?
  .container.form-container
    %h1 Results
    - @results.each do |result|
      %li= result

.container.form-container
  %h1 Requested accounts for your courses

  - if @courses.empty?
    %p No requested accounts
  - else
    - @courses.each do |title, requested_accounts|
      - course_slug = requested_accounts.first.course.slug
      %h2
        %a{href: "/courses/#{course_slug}"}= title
      %table.table.w100
        %thead
          %th.w25 Username
          %th Email
          %th Timestamp
          %th.w25 Actions
        %tbody
          - requested_accounts.each do |account|
            %tr
              %td= account.username
              %td= account.email
              %td= account.created_at
              %td
                %a{href: "/requested_accounts/#{course_slug}/#{account.id}/delete", 'data-method': :delete}> Delete this request
      .container.mt2.mb2
        %a.button{href: "/requested_accounts/#{course_slug}/create", 'data-method': :post} Create these accounts
    %hr
    .container.mt2.mb2
      %a.button.danger{href: "/requested_accounts", 'data-method': :post} Create all accounts


%dl#dashboards-nav
  %dt Tableaux de bord
  - [:default, :legals].each do |d|
    - if d == :default
      %dd= link_to(d, controller: :dashboards, action: :index)
    - else
      %dd.active= link_to(d, controller: :dashboards, action: d)

= beehive(:legals) do |b|
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans

Add legal dashboard (in progress)

%dl#dashboards-nav
  %dt Tableaux de bord
  - [:default, :legals].each do |d|
    - if d == :default
      %dd= link_to(d, controller: :dashboards, action: :index)
    - else
      %dd.active= link_to(d, controller: :dashboards, action: d)

-# Réglementaire
= beehive(:legals) do |b|
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans
    - b.cell :guide_evolution
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans

-# Commercialisation
= beehive(:trade) do |b|
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans
    - b.cell :guide_evolution
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans

-# Social
= beehive(:social) do |b|
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Plans

-# PAC
= beehive(:cap) do |b|
  - b.hbox do
    - b.cell :manure_management_plans do
      %p Cap


.form-view
  = render "form"

= render 'show_salaries'
= render 'show_invoices'
= render 'show_attachments'

Add a tab navigation to the employee show view.

%ul.tabs
  %li.active= link_to t_model, '#tab-employee'
  %li= link_to t_model(Salary), '#tab-salaries'
  %li= link_to t_model(Invoice), '#tab-invoices'
  %li= link_to t_model(Attachment), '#tab-attachments'

.tab-content
  #tab-employee.active= render "form"
  #tab-salaries= render 'show_salaries'
  #tab-invoices= render 'show_invoices'
  #tab-attachments= render 'show_attachments'


- unless @hide_user_nav
  #user-nav.user-data.clearfix.navbar
    %ul.nav.navbar-nav
      %li Julia Richards:
      %li= link_to 'Your details', '#'
      %li= link_to 'Sign out', '#'

Change name in login bar

- unless @hide_user_nav
  #user-nav.user-data.clearfix.navbar
    %ul.nav.navbar-nav
      %li Louis Robert Stevenson:
      %li= link_to 'Your details', '#'
      %li= link_to 'Sign out', '#'


.search
  = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
    = text_field_tag "search", nil, placeholder: search_placeholder, class: "search-input"
    = hidden_field_tag :group_id, @group.try(:id)
    - if @project && @project.persisted?
      = hidden_field_tag :project_id, @project.id
      = hidden_field_tag :search_code, true
    = hidden_field_tag :repository_ref, @ref
    = submit_tag 'Go' if ENV['RAILS_ENV'] == 'test'
    .search-autocomplete-opts.hide{:'data-autocomplete-path' => search_autocomplete_path, :'data-autocomplete-project-id' => @project.try(:id), :'data-autocomplete-project-ref' => @ref }

Use search field instead of text field

.search
  = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
    = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input"
    = hidden_field_tag :group_id, @group.try(:id)
    - if @project && @project.persisted?
      = hidden_field_tag :project_id, @project.id
      = hidden_field_tag :search_code, true
    = hidden_field_tag :repository_ref, @ref
    = submit_tag 'Go' if ENV['RAILS_ENV'] == 'test'
    .search-autocomplete-opts.hide{:'data-autocomplete-path' => search_autocomplete_path, :'data-autocomplete-project-id' => @project.try(:id), :'data-autocomplete-project-ref' => @ref }


- if server.stopping?
  %p Server is coming down...
  = link_to "destroy", server_path(server), method: :delete, class: 'btn btn-danger'
-else
  = link_to "stop", stop_server_path(server), method: :patch, class: 'btn btn-danger'
  - if server.paused?
    = link_to "resume", resume_server_path(server), method: :patch, class: 'btn btn-default'
  - else
    = link_to "pause", pause_server_path(server), method: :patch, class: 'btn btn-default'

Change message when a server is coming down.

- if server.stopping?
  %p Server is stopping...
  = link_to "destroy", server_path(server), method: :delete, class: 'btn btn-danger'
-else
  = link_to "stop", stop_server_path(server), method: :patch, class: 'btn btn-danger'
  - if server.paused?
    = link_to "resume", resume_server_path(server), method: :patch, class: 'btn btn-default'
  - else
    = link_to "pause", pause_server_path(server), method: :patch, class: 'btn btn-default'


-#
  Parameters:
    widget -- MiqWidget object
#zoomed_chart_div
  .panel.panel-default
    .panel-heading
      %h3.panel-title
        = h(widget.title)
        %a{:title => "Close", :href => "#",
            :onclick => "miqSparkle(false);$('#lightbox-panel').fadeOut(300);"}
          %i.fa.fa-close.pull-right
    .panel-body{:style => "padding: 0"}
      = chart_remote('dashboard', :id => 'my_chart', :width => 700, :height => 500, :bgcolor => "#f2f2f2")
    = render :partial => 'widget_footer', :locals => {:widget => widget}

Adjust zoomed chart styling in modal

-#
  Parameters:
    widget -- MiqWidget object
#zoomed_chart_div
  .panel.panel-default
    .panel-heading
      %h3.panel-title
        = h(widget.title)
        %a{:title => "Close", :href => "#",
            :onclick => "miqSparkle(false);$('#lightbox-panel').fadeOut(300);"}
          %i.fa.fa-close.pull-right
    .panel-body{:style => "padding: 0"}
      = chart_remote('dashboard', :id => 'my_chart', :width => 664, :height => 450, :bgcolor => "#f2f2f2")
    = render :partial => 'widget_footer', :locals => {:widget => widget}


- if @google_analytics_code
  :plain
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '#{@google_analytics_code}']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>

Use Google's 'Universal Analytics' tracking code

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

      ga('create', '#{@google_analytics_code}', 'auto');
      ga('send', 'pageview');
    </script>


.box-search-schemas
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:placeholder => "Ingresa nombre de Esquema", :type => "text", :name => "text_search"}/
.container
  .row
    .col-md-2.box-col-categories
      %h3
        Categorías
      %ul#categories-list
        - @categories.each do |category|
          %li
            %a(data-category="category-#{category.id}")
              = category.name
      %br
        = link_to 'Nuevo Schema', new_schema_path
    .col-md-10.schema-wrapper
      .schema-box-container
        - @schemas.each do |schema|
          .box-schema(data-categories="category-#{schema.schema_category.id}")
            .title
              %a{href: "#"}
                = truncate(schema.name, :length => 56)
            .body
              %span
                Descripción:
              = truncate(schema.description, :length => 183)

Add links to Schema title

.box-search-schemas
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:placeholder => "Ingresa nombre de Esquema", :type => "text", :name => "text_search"}/
.container
  .row
    .col-md-2.box-col-categories
      %h3
        Categorías
      %ul#categories-list
        - @categories.each do |category|
          %li
            %a(data-category="category-#{category.id}")
              = category.name
      %br
        = link_to 'Nuevo Schema', new_schema_path
    .col-md-10.schema-wrapper
      .schema-box-container
        - @schemas.each do |schema|
          .box-schema(data-categories="category-#{schema.schema_category.id}")
            .title
              = link_to edit_schema_path(schema) do
                = truncate(schema.name, :length => 56)
            .body
              %span
                Descripción:
              = truncate(schema.description, :length => 183)


%section#masthead
  %h1#logo Dairyvative Technologies, LLC
%nav
  %ul#main_nav
    %li#first_li
      = link_to 'Home', '/index.html'
    %li
      = link_to 'Innovation', '/innovation.html'
      %ul#sub_nav
        %li
          = link_to 'Stub', '/sustainability.html'
        %li
          = link_to 'Stub 2', '/about.html'
          %ul#sub_nav
            %li
              = link_to 'Stub', '/sustainability.html'
            %li
              = link_to 'Stub 2', '/about.html'
            %li
              = link_to 'Stub longer', '/contact.html'
          %li
            = link_to 'Stub thats longer', '/contact.html'
          %li
            = link_to 'distinct', '/sustainability.html'
            %ul#sub_nav
              %li
                = link_to 'Stub', '/sustainability.html'
              %li
                = link_to 'Stub 2', '/about.html'
              %li
                = link_to 'Stub longer', '/contact.html'
    %li
      = link_to 'About Us', '/about.html'
    %li
      = link_to 'Contact Info', '/contact.html'

Create Correct Nav Bar layout

%section#masthead
  %h1#logo Dairyvative Technologies, LLC
%nav
  %ul#main_nav
    %li#first_li
      = link_to 'Home', '/index.html'
    %li
      = link_to 'SEVENx Process', '/sevenx.html'
    %li
      = link_to 'Imagine', '/imagine.html'
    %li
      = link_to 'Benefits', '/benefits.html'
    %li
      = link_to 'About Us', '/about.html'
    %li
      = link_to 'Sustainability', '/sustainability.html'
    %li
      = link_to 'Contact', '/contact.html'

-#    %ul#sub_nav
-#        %li
          = link_to 'Stub 2', '/about.html'
          %ul#sub_nav
            %li
              = link_to 'Stub', '/sustainability.html'
            %li
              = link_to 'Stub 2', '/about.html'
            %li
              = link_to 'Stub longer', '/contact.html'
          %li
            = link_to 'Stub thats longer', '/contact.html'
          %li
            = link_to 'distinct', '/sustainability.html'
            %ul#sub_nav
              %li
                = link_to 'Stub', '/sustainability.html'
              %li
                = link_to 'Stub 2', '/about.html'
              %li
                = link_to 'Stub longer', '/contact.html'


.description-container
  .description-body
    - too_long = true if model.description && model.description.length > 500
    .short-description.model-description
      ~ markdown(truncate(model.description, length: 500, omission: '...', separator: ' '))
    .long-description.model-description{style: "display: none"}
      ~ markdown(model.description)
    = link_to "Show More", "#", class: 'see-more' if too_long
    - if can? :edit_description, model
      = link_to "Edit", "#", class: "edit-description edit-#{model_name}-description"

  - if can? :edit_description, model
    = form_tag send("edit_description_#{model_name}_path"), :id => "description-edit-form", :class => "hidden", :remote => true do |f|
      = hidden_field_tag 'id'
      .control-group
        - class_str = 'inputError limit-250' if model_name == "group"
        = text_area_tag 'description', model.description, {id: 'description-input', class: class_str, :autofocus => true }
        - unless model_name == "discussion"
          .character-counter
      .save-buttons.clearfix
        = submit_tag "Save", class: 'btn btn-small btn-grey run-validations', id: 'add-description-submit', :data => {:disable_with => "Saving"}
        = link_to "Cancel", "#", id: 'cancel-add-description'

Revert "changed edit link in description"

.description-container
  .description-body
    - too_long = true if model.description && model.description.length > 500
    .short-description.model-description
      ~ markdown(truncate(model.description, length: 500, omission: '...', separator: ' '))
    .long-description.model-description{style: "display: none"}
      ~ markdown(model.description)
    = link_to "Show More", "#", class: 'see-more' if too_long
    - if can? :edit_description, model
      = link_to "Edit #{model_name} info", "#", class: "edit-description edit-#{model_name}-description"

  - if can? :edit_description, model
    = form_tag send("edit_description_#{model_name}_path"), :id => "description-edit-form", :class => "hidden", :remote => true do |f|
      = hidden_field_tag 'id'
      .control-group
        - class_str = 'inputError limit-250' if model_name == "group"
        = text_area_tag 'description', model.description, {id: 'description-input', class: class_str, :autofocus => true }
        - unless model_name == "discussion"
          .character-counter
      .save-buttons.clearfix
        = submit_tag "Save", class: 'btn btn-small btn-grey run-validations', id: 'add-description-submit', :data => {:disable_with => "Saving"}
        = link_to "Cancel", "#", id: 'cancel-add-description'


%h2== Search for "#{h(@query)}" (#{@search.total_entries} results)
-if @correction
  == Did you mean #{@correction}?
-unless @search.any?
  %em No results found.
-@search.each do |result|
  %p
    -if result.instance_of? Channel
      -channel = result
      =link_to "Channel Title: #{channel.title}", channel_path(channel)
    -elsif result.instance_of? Post
      -post = result
      -post_link = channel_path(post.channel, :anchor => "post_#{post.id}")
      =link_to "Channel Title: #{post.channel.title}", post_link
      %br/
      =link_to "Post: #{highlight_results h(post.body), @query}".html_safe, post_link
      ==by #{user_name(post.channel.user)}
=will_paginate(@search)

Put search results inside block

.block
  %h2== Search for "#{h(@query)}" (#{@search.total_entries} results)
  -if @correction
    == Did you mean #{@correction}?
  -unless @search.any?
    %em No results found.
  -@search.each do |result|
    %p
      -if result.instance_of? Channel
        -channel = result
        =link_to "Channel Title: #{channel.title}", channel_path(channel)
      -elsif result.instance_of? Post
        -post = result
        -post_link = channel_path(post.channel, :anchor => "post_#{post.id}")
        =link_to "Channel Title: #{post.channel.title}", post_link
        %br/
        =link_to "Post: #{highlight_results h(post.body), @query}".html_safe, post_link
        ==by #{user_name(post.channel.user)}
  =will_paginate(@search)


%h1#content-title= @project.name + ": Describe Experiment"

%iframe(name='kefedFrame' id='kefedFrame' src="#{kefed_editor_swf_url}#{@kefed_params}" width="100%" height="600")
  %p Your browser does not support iframes.

:javascript
  document.domain = '#{(Rails.env == 'development') ? 'localhost' : 'crux.msu.montana.edu'}';
  var kefed_frame = $('iframe#kefedFrame');
  kefed_frame.load(function() {
    //console.debug(this);
    //console.debug($(this).contents().find('#kefedStatus').contents());
    this.contentWindow.editorCallback = function(params){
      //alert("parent page" + params);
      target = $('#kefed_finish').attr('href');
      $('#kefed_finish').attr('href', target + '?uid=' + params.uid);
      $('#kefed_finish').toggle();
    };
  });

.text-center
  = link_to("Cancel",   projects_url, :class => 'big-button-link')
  = link_to("Finish & Continue", add_kefed_diagram_project_url(@project), :class => 'big-button-link', :id => 'kefed_finish', :style => 'display: none;')

Fix the javascript callback for the kefed editor

%h1#content-title= @project.name + ": Describe Experiment"

%iframe(name='kefedFrame' id='kefedFrame' src="#{kefed_editor_swf_url}#{@kefed_params}" width="100%" height="600")
  %p Your browser does not support iframes.

:javascript
  document.domain = '#{(Rails.env == 'development') ? 'localhost' : 'crux.msu.montana.edu'}';
  var kefed_frame = $('iframe#kefedFrame');
  var saved = false;
  kefed_frame.load(function() {
    //console.debug(this);
    //console.debug($(this).contents().find('#kefedStatus').contents());
    this.contentWindow.editorCallback = function(params){
      //alert("parent page" + params);
      target = $('#kefed_finish').attr('href');
      if(!saved){
        $('#kefed_finish').attr('href', target + '?uid=' + params.uid);
        $('#kefed_finish').show();
        saved = true;
      }
    };
  });

.text-center
  = link_to("Cancel",   projects_url, :class => 'big-button-link')
  = link_to("Finish & Continue", add_kefed_diagram_project_url(@project), :class => 'big-button-link', :id => 'kefed_finish', :style => 'display: none;')


.row
  .col-md-12
    - if @project.documents.empty?
      %p There are no supporting documents for this project.
      = link_to "Add a document", "#", :class => "btn btn-primary"
    - else
      %table.table.table-condensed.table-striped.table-hover.table-bordered#datatable{:width => "100%"}
        %thead
          %tr
            %th Name
            %th Description
            %th Type
            %th Actions
        %tbody
          - @project.documents.each do |a|
            %tr
              %td= a.name
              %td= a.description
              %td= a.type
              %td= link_to "Download", "#", :class => "btn btn-success btn-xs"

      = render 'shared/datatable_javascript'

Add documents partial for capital projects

.row
  .col-md-12{:style => 'height: 100px;overflow-y: scroll;'}
    - if @project.documents.empty?
      %p There are no documents for this project.
    - else
      = render :partial => 'shared/documents', :locals => {:documents => @project.documents}

.row
  .col-md-12
    %fieldset
      %legend Add Document
      = simple_form_for([@project, Document.new],
          :html => {:multipart => true, :class => 'form-vertical' },
          :wrapper => :vertical_form,
          :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
        = f.input :document
        = f.input :description, :as => :text, :input_html => { :rows => 3 }, :placeholder => 'Enter a brief description of the document...'
        = f.submit "Add document to project", :class => 'btn btn-primary'


- if flash[:notice]
  .notice=flash[:notice]

/ %div.row.form # .form_container
/   %div.row #.header
/     %div.small-10.small-push-1
/       %h1 Create a new event

%div.form_container
  %div
    %div
      %h1 Create a new event

  %div
    %div
      %div
        = form_for [:organizer, @event] do |f|
          %div
            = f.text_field :title, :placeholder => "title"
          %div
            = f.text_area :description, :placeholder => "talk description"
          %div.small-7
            = f.date_field :date
          %div.small-7
            = f.text_field :start_time, :placeholder => "start time"
          %div.right
            = f.submit "Create", :class => "button radius"

Change placeholder text on the new event form to be about events

- if flash[:notice]
  .notice=flash[:notice]

%div.form_container
  %div
    %div
      %h1 Create a new event

  %div
    %div
      %div
        = form_for [:organizer, @event] do |f|
          %div
            = f.text_field :title, :placeholder => "Name of the event"
          %div
            = f.text_area :description, :placeholder => "Description of the event"
          %div.small-7
            = f.date_field :date
          %div.small-7
            = f.text_field :start_time, :placeholder => "start time"
          %div.right
            = f.submit "Create", :class => "button radius"


.story-info.panel.panel-default.active
  .panel-heading
    .index-header
      Story Index
    .chapter-header.hide
      %a.index-back-btn{ href: '#', title: 'Back to Story Index'}
        %span.icon-story-index
        Back to Story Index
      .chapters-navigation
        %a.chapter-navigation.chapter-navigation-prev{ href: '#', title: 'Previous Chapter' }
          Previous Chapter
          %span.prev-chapter-icon
        .chapters-tracker
          %span.chapter-index
          \/ #{@story.chapters.length}
        %a.chapter-navigation.chapter-navigation-next{ href: '#', title: 'Next Chapter' }
          Next Chapter
          %span.next-chapter-icon
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    .index-content
      - if @story.chapters
        %ul.chapters-list
          - @story.chapters.each_with_index do |chapter, index|
            %li
              %a.chapter{ href: chapter_path(chapter), title: chapter.name }
                %span.index
                  = index+1
                %span.title
                  = chapter.name
      - if defined? edit
        %a.btn.btn-default.btn-primary{ href: new_story_chapter_path(@story) }
          Add Chapter
    .chapter-content.hide

Use chapter.id in chapters-list links in order to navigate to chapters using js

.story-info.panel.panel-default.active
  .panel-heading
    .index-header
      Story Index
    .chapter-header.hide
      %a.index-back-btn{ href: '#', title: 'Back to Story Index'}
        %span.icon-story-index
        Back to Story Index
      .chapters-navigation
        %a.chapter-navigation.chapter-navigation-prev{ href: '#', title: 'Previous Chapter' }
          Previous Chapter
          %span.prev-chapter-icon
        .chapters-tracker
          %span.chapter-index
          \/ #{@story.chapters.length}
        %a.chapter-navigation.chapter-navigation-next{ href: '#', title: 'Next Chapter' }
          Next Chapter
          %span.next-chapter-icon
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    .index-content
      - if @story.chapters
        %ul.chapters-list
          - @story.chapters.each_with_index do |chapter, index|
            %li
              %a.chapter{ href: chapter.id, title: chapter.name }
                %span.index
                  = index+1
                %span.title
                  = chapter.name
      - if defined? edit
        %a.btn.btn-default.btn-primary{ href: new_story_chapter_path(@story) }
          Add Chapter
    .chapter-content.hide


= render layout: 'help/layout' do
  %h3.page-title SSH Keys

  %p.slead
    SSH key allows you to establish a secure connection between your computer and GitLab

  %p.slead
    Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub . If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step.

  %p.slead
    To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location/filename, you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip the step by pressing enter. Note that the password you choose here can't be altered or retrieved.

  %pre.dark
    ssh-keygen -t rsa -C "#{current_user.email}"

  %p.slead
    Use code below to show your public key.

  %pre.dark
    cat ~/.ssh/id_rsa.pub

  %p.slead
    Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with 'ssh-' and ending with your username and host.

Split into one sentence per line for future edits.

= render layout: 'help/layout' do
  %h3.page-title SSH Keys

  %p.slead
    SSH key allows you to establish a secure connection between your computer and GitLab

  %p.slead
    Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub
    If your see a long string starting with 'ssh-rsa' or 'ssh-dsa', you can skip the ssh-keygen step.

  %p.slead
    To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password.
    When prompted for the location and filename you can press enter to use the default.
    It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter.
    Note that the password you choose here can't be altered or retrieved.

  %pre.dark
    ssh-keygen -t rsa -C "#{current_user.email}"

  %p.slead
    Use code below to show your public key.

  %pre.dark
    cat ~/.ssh/id_rsa.pub

  %p.slead
    Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile.
    Please copy the complete key starting with 'ssh-' and ending with your username and host.


!!!
%html
  %head
    %title Kuva
    = stylesheet_link_tag    "kuva/application", media: "all"
    = javascript_include_tag "kuva/application"
    = csrf_meta_tags

  %body(class: params[:controller].parameterize)
    = yield

Remove the controller specific class (styling).

!!!
%html
  %head
    %title Kuva
    = stylesheet_link_tag    "kuva/application", media: "all"
    = javascript_include_tag "kuva/application"
    = csrf_meta_tags

  %body
    = yield


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

Fix the dashes in the reports

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


- diff_file = discussion.diff_file
- blob = discussion.blob

.diff-file.file-holder
  .js-file-title.file-title
    = render "projects/diffs/file_header", diff_file: diff_file, url: discussion_path(discussion), show_toggle: false

  .diff-content.code.js-syntax-highlight
    %table
      - discussions = { discussion.original_line_code => [discussion] }
      = render partial: "projects/diffs/line",
        collection: discussion.truncated_diff_lines,
        as: :line,
        locals: { diff_file: diff_file,
          discussions: discussions,
          discussion_expanded: true,
          plain: true }

Fix file diff title and renames alignment in discussions

- diff_file = discussion.diff_file
- blob = discussion.blob

.diff-file.file-holder
  .js-file-title.file-title.file-title-flex-parent
    .file-header-content
      = render "projects/diffs/file_header", diff_file: diff_file, url: discussion_path(discussion), show_toggle: false

  .diff-content.code.js-syntax-highlight
    %table
      - discussions = { discussion.original_line_code => [discussion] }
      = render partial: "projects/diffs/line",
        collection: discussion.truncated_diff_lines,
        as: :line,
        locals: { diff_file: diff_file,
          discussions: discussions,
          discussion_expanded: true,
          plain: true }


%tr#bookings_footer
  %th{:style => "width: 10em"}= l Date.today
  %th{:colspan => 2}= direct_balance >= 0 ? t_attr(:open_amount, Invoice) : t_attr(:balance, Invoice)
  %th.currency= currency_fmt(direct_balance)

Use generic term for balance in direct booking list footer.

%tr#bookings_footer
  %th{:style => "width: 10em"}= l Date.today
  %th{:colspan => 2}= t_attr(:balance, Invoice)
  %th.currency= currency_fmt(direct_balance)


:javascript
  var partialSelector = '.styleguide__partial',
      inputSelector   = '.styleguide__input-copy',
      copyBoxes       = document.querySelectorAll(partialSelector),
      inputs          = document.querySelectorAll(inputSelector);

  copyBoxes.forEach(function(el) {
    el.on('click', showCopy, false);
  });
  inputs.forEach(function(el) {
    el.on('blur', hideCopy, false);
  });

  function showCopy(e) {
    var el = e.target,
        input = el.parentNode.querySelector(inputSelector);

    el.classList.add('is-hidden');
    input.classList.remove('is-hidden');

    input.focus();
  }

  function hideCopy(e) {
    var input = e.target,
        el = input.parentNode.querySelector(partialSelector);

    input.classList.add('is-hidden');
    el.classList.remove('is-hidden');
  }

Fix bug when clicking on "properties" in styleguide example text.

:javascript
  var partialSelector = '.styleguide__partial',
      inputSelector   = '.styleguide__input-copy',
      copyBoxes       = document.querySelectorAll(partialSelector),
      inputs          = document.querySelectorAll(inputSelector);

  copyBoxes.forEach(function(el) {
    el.on('click', showCopy, false);
  });
  inputs.forEach(function(el) {
    el.on('blur', hideCopy, false);
  });

  function showCopy(e) {
    var el = e.target,
        input;

    // Must've clicked on the "properties" element.
    if (el.nodeName == "B") {
      el = el.parentNode;
    }

    input = el.parentNode.querySelector(inputSelector)

    el.classList.add('is-hidden');
    input.classList.remove('is-hidden');

    input.focus();
  }

  function hideCopy(e) {
    var input = e.target,
        el = input.parentNode.querySelector(partialSelector);

    input.classList.add('is-hidden');
    el.classList.remove('is-hidden');
  }


.alert.alert-warning
  %i.fa.fa-bell-o.fa-lg.pull-left
  Missing documentation. Help out by providing a code snippet.

Use static javascript example code

%p
  This example uses #{link_to 'jquery', 'http://jquery.com/'}.
  Also, this example can be used in a web browser as it requests jsonp

%pre
  :preserve
    var morph_api_url = 'http://127.0.0.1:3000/morph-test-scrapers/test-ruby/data.json';
    var morph_api_params = {
      // Keep this key secret!
      key: 'sdjfskjdfhjsd',
      query: "select * from 'data' limit 10"
    };

    $.ajax({
      url: morph_api_url + '?' + $.param(morph_api_params),
      dataType: 'jsonp',
      success: function(data) {
        console.log('received data: ' + JSON.stringify(data));
      }
    });


.widget-header
  %h3 Review Tags
.widget-content
  %fieldset
    = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
      .form-group
        .tag-list
          = f.select :review_tags,
            options_for_select(event.review_tags, proposal.object.review_tags),
            {}, { class: 'multiselect review-tags', multiple: true }
          %button.pull-right.btn.btn-success{:type => "submit"} Update

Move button to avoid collision with long tags list

.widget-header
  %h3 Review Tags
.widget-content
  %fieldset
    = form_for proposal, url: event_staff_proposal_path(event, proposal), html: {role: 'form', remote: true} do |f|
      .form-group
        .tag-list
          = f.select :review_tags,
            options_for_select(event.review_tags, proposal.object.review_tags),
            {}, { class: 'multiselect review-tags', multiple: true }
      .form-group
        %button.btn.btn-success.pull-right{:type => "submit"} Update


- 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)

%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"

%hr

%p
  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é"

Use the layout's footer for the avis invitation email

- 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"


%h2= @page_title

%table.table.table-hover.table-condensed
  %thead
    %tr.warning
      %th= sortable 'name', _('Name')
      - FedoraRpm.fedora_versions.each do |t, g|
        %th= t
      %th= _('Upstream')
      %th= sortable 'commits', _('Commits')
      %th= sortable 'last_commit_date', _('Last Commit')
      %th= _('Patched?')
      %th= sortable 'owner', _('Owner')

  %tbody
    - @rpms.each do |rpm|
      - if rpm.up_to_date?
        %tr.success
      - else
        %tr.danger
        %td= link_to rpm.shortname.truncate(35), fedorarpm_path(rpm.name)
        -FedoraRpm.fedora_versions.each do |t, g|
          %td= rpm.version_for(t)
        %td= rpm.ruby_gem.version.truncate(8)
        %td= rpm.commits
        %td= rpm.last_commit_date_in_words
        %td
          - if rpm.any_patched?
            %span.glyphicon.glyphicon-ok
        %td
          - unless rpm.owner.nil?
            =link_to rpm.owner, fedorarpm_path(rpm.owner + '/by_owner')

%div.pagination
  = will_paginate @rpms

Remove truncate, breaks commits sorting.

%h2= @page_title

%table.table.table-hover.table-condensed
  %thead
    %tr.warning
      %th= sortable 'name', _('Name')
      - FedoraRpm.fedora_versions.each do |t, g|
        %th= t
      %th= _('Upstream')
      %th= sortable 'commits', _('Commits')
      %th= sortable 'last_commit_date', _('Last Commit')
      %th= _('Patched?')
      %th= sortable 'owner', _('Owner')

  %tbody
    - @rpms.each do |rpm|
      - if rpm.up_to_date?
        %tr.success
      - else
        %tr.danger
        %td= link_to rpm.shortname.truncate(35), fedorarpm_path(rpm.name)
        -FedoraRpm.fedora_versions.each do |t, g|
          %td= rpm.version_for(t)
        %td= rpm.ruby_gem.version
        %td= rpm.commits
        %td= rpm.last_commit_date_in_words
        %td
          - if rpm.any_patched?
            %span.glyphicon.glyphicon-ok
        %td
          - unless rpm.owner.nil?
            =link_to rpm.owner, fedorarpm_path(rpm.owner + '/by_owner')

%div.pagination
  = will_paginate @rpms


= render partial: 'layouts/header', locals: {page_heading: 'Contact us'}

- advocates_email  = 'advocates-fee@legalaid.gsi.gov.uk'
- litigators_email = 'litigators-fee@legalaid.gsi.gov.uk'

%section.contact-us
  %p
    For any queries about your claim, contact the following:

  %ul.contact-us-details
    %li
      Advocates’ graduated fee scheme
    %li
      Email: #{mail_to advocates_email, advocates_email}
    %li.last-element
      Phone:
      %a{:href => 'tel:01158526000'} 0115 852 6000
      (lines open 9am to 1pm)
    %li
      Litigators’ graduated fee scheme
    %li
      Email: #{mail_to litigators_email, litigators_email}
    %li
      Phone:
      %a{:href => 'tel:01158526000'} 0115 852 6000
      (lines open 10am to 12pm, 3pm to 5pm)

Remove hotline times from contact us page

= render partial: 'layouts/header', locals: {page_heading: 'Contact us'}

- advocates_email  = 'advocates-fee@legalaid.gsi.gov.uk'
- litigators_email = 'litigators-fee@legalaid.gsi.gov.uk'

%section.contact-us
  %p
    For any queries about your claim, contact the following:

  %ul.contact-us-details
    %li
      Advocates’ graduated fee scheme
    %li
      Email: #{mail_to advocates_email, advocates_email}
    %li.last-element
      Phone:
      %a{:href => 'tel:01158526000'} 0115 852 6000
    %li
      Litigators’ graduated fee scheme
    %li
      Email: #{mail_to litigators_email, litigators_email}
    %li
      Phone:
      %a{:href => 'tel:01158526000'} 0115 852 6000


- content_for :title do
  Recent history:
  = capitalise_initial_character(@policy.name_with_for)

.page-header.row
  %nav.header-actions.col-md-3
    =link_to_if(@policy, "Edit", edit_policy_path(@policy), title: "Change title and definition of policy", class: "btn btn-default btn-xs")
    =link_to "New policy", new_policy_path, class: "btn btn-primary btn-xs"
  -# TODO This title is just a stop-gap. Make it not suck.
  %h1.col-md-9= yield :title

%p
  Or
  = link_to "see all the recent changes", history_path

%ul
  - PaperTrail::Version.where(policy_id: @policy.id).order(created_at: :desc).each do |version|
    %li= version_sentence(version)

Add meta description to policy history page

- content_for :title do
  Recent history:
  = capitalise_initial_character(@policy.name_with_for)
- set_meta_tags description: "Recent changes made to the “#{@policy.name_with_for}” policy."

.page-header.row
  %nav.header-actions.col-md-3
    =link_to_if(@policy, "Edit", edit_policy_path(@policy), title: "Change title and definition of policy", class: "btn btn-default btn-xs")
    =link_to "New policy", new_policy_path, class: "btn btn-primary btn-xs"
  -# TODO This title is just a stop-gap. Make it not suck.
  %h1.col-md-9= yield :title

%p
  Or
  = link_to "see all the recent changes", history_path

%ul
  - PaperTrail::Version.where(policy_id: @policy.id).order(created_at: :desc).each do |version|
    %li= version_sentence(version)


%table.list
  %thead
    %tr
      %th Name
      %th.attendance Attendance
  %tbody
    - @attendees.each do |attendee|
      %tr{ :class => cycle('even', 'odd') }
        %td= link_to_member(attendee.member)
        %td.attendance= raid_attendance_colored(attendee.attendance)

Add a progress bar to Raid's attendees. Not 100% sold yet.

%table.list
  %thead
    %tr
      %th Name
      %th.attendance{ :style => 'width: 15%' } Attendance
  %tbody
    - @attendees.each do |attendee|
      %tr{ :class => cycle('even', 'odd') }
        %td= link_to_member(attendee.member)
        %td.attendance
          = progress_bar(attendee.attendance * 100, :container_width => 75)
          = raid_attendance_colored(attendee.attendance)


!!!
%html
  %head
    %title= title
    %meta{charset: "utf-8"}/
    %meta{content: "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
    %meta{name: "description", content: "Docomo Documentation / https://github.com/modeset/docomo "}/
    %meta{name: "author", content: "Mode Set / Docomo"}/
    %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}/
    %meta{name: "imagetoolbar", content: "no"}/
    %meta{name: "apple-touch-fullscreen", content: "yes"}/
    %meta{name: "apple-mobile-web-app-capable", content: "yes"}/
    %meta{name: "apple-mobile-web-app-status-bar-style", content: "black"}/
    %link{href: "/assets/docomo.css", rel: "stylesheet", type: "text/css"}
    %script{src: "/assets/docomo.js", type: "text/javascript"}
  %body{role: "document"}

    %aside#docomo_sidebar
      %h1{href: "/"}= title
      %ul
        - for item in aside_items
          %li
            %a{href: "##{item[:id]}"}= item[:title]

    %section#docomo_sections
      - for section in content_sections
        %a{name: section[:id]}
        %section.docomo-section= section[:content]

Use modern style haml and small tweaks.

!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=edge,chrome=1")
    %title= title
    %meta(name="description" content="Docomo Documentation / https://github.com/modeset/docomo")
    %meta(name="keywords" content="Mode Set Docomo Documentation")
    %meta(name="author" content="Mode Set")
    %meta(name="imagetoolbar" content="no")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %meta(name="apple-touch-fullscreen" content="yes")
    %meta(name="apple-mobile-web-app-capable" content="yes")
    %meta(name="apple-mobile-web-app-status-bar-style" content="black")
    %link(href="/assets/docomo.css" rel="stylesheet" type="text/css")

  %body(role="document")
    %aside#docomo_sidebar
      %h1
        %a(href="/")= title
      %ul
        - for item in aside_items
          %li
            %a(href="##{item[:id]}")= item[:title]

    %section#docomo_sections
      - for section in content_sections
        %a(name="#{section[:id]}")
        %section.docomo-section= section[:content]

    %script(src="/assets/docomo.js" type="text/javascript")


= semantic_form_for @project do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :name, :input_html => {'data-autofocus' => 'true'}
    = f.input :comment, :input_html => {:rows => 5}
    = f.input :from, :as => :date_field
    = f.input :to, :as => :date_field
    = f.input :project_state
    = f.input :client
  = f.buttons do
    = f.commit_button

Use combobox for client field in projects form.

= semantic_form_for @project do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :name, :input_html => {'data-autofocus' => 'true'}
    = f.input :comment, :input_html => {:rows => 5}
    = f.input :from, :as => :date_field
    = f.input :to, :as => :date_field
    = f.input :project_state
    = f.input :client, :as => :combobox
  = f.buttons do
    = f.commit_button


- provide :title, 'Projects'

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

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

    %tbody
      - @projects.each do |project|
        %tr{ data: { keyboard_focusable: true } }
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td.numeric= project.urls.size

Add friendly intro jumbotron to main page

- provide :title, 'Projects'

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

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

    %tbody
      - @projects.each do |project|
        %tr{ data: { keyboard_focusable: true } }
          %td= link_to project.name, project, class: 'url-multiline'
          %td= project.viewports.map(&:to_s).join(', ')
          %td.numeric= project.urls.size
- else
  -# There are no projects
  .jumbotron
    %h1 Hello, nice to meet you.

    %p
      Thanks for using Diffux! If you happen to bump into a problem or think of
      a feature you'd like to see,
      = succeed '.' do
        = link_to "we'd love to hear about it",
                  'https://github.com/trotzig/diffux/issues'
      And, if you are the coding type, we'd be delighted to accept your pull
      requests.

    %p
      First, you'll want to create a new project and give it some viewport
      widths and URLs to snapshot.

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


= link_to 'Parse issues', new_issue_path, class: 'btn btn-success'

.h1
  Listing issues

= form_for :filter, url: issues_path, method: :get do |f|
  .field
    = f.text_field :predicate
  .actions
    = f.submit 'Search', class: 'btn btn-info'

.row
  .col-xs-4.col-sm-4.col-md-4.text-center
    %strong Title
  .col-xs-6.col-sm-6.col-md-6.text-center
    %strong Body
  .col-xs-2.col-sm-2.col-md-2
%br
= render partial: 'issue', collection:  @issues.all

Improve output of search bar

= link_to 'Parse issues', new_issue_path, class: 'btn btn-success'

.h1
  Listing issues

= form_for :filter, url: issues_path, method: :get, class: 'form-inline' do |f|
  .input-group
    = f.text_field :predicate, class: 'form-control'
    %span.input-group-btn
      = f.button 'Search', class: 'btn btn-info'

%br

.row
  .col-xs-4.col-sm-4.col-md-4.text-center
    %strong Title
  .col-xs-6.col-sm-6.col-md-6.text-center
    %strong Body
  .col-xs-2.col-sm-2.col-md-2
%br
= render partial: 'issue', collection:  @issues.all


.container
  .row
    .col-xs-12
      %h1 #{pluralize(@scrapers.count, "scraper")} currently running
      .list-group= sync partial: "scraper", collection: @scrapers

Add a <title> so @henare can spot the page amongst his many tabs

- title "#{pluralize(@scrapers.count, "scraper")} currently running"

.container
  .row
    .col-xs-12
      %h1= title
      .list-group= sync partial: "scraper", collection: @scrapers


-# Copyright (C) 2009, 2010, Collaborative Software Initiative
-#
-# This file is part of CSI TriSano Enterprise Edition..

-content_for :title do
  =t('trisano_auth.login')
- form_for @user_session do |form|
  = form.error_messages
  .formList
    %li
      = form.label :user_name, t('trisano_auth.username')
      = form.text_field :user_name
    %li
      = form.label :password, t("trisano_auth.password")
      = form.password_field :password
    %li
      = form.submit(t("trisano_auth.submit"))

Make login page's user name field mobile friendly

-# Copyright (C) 2009, 2010, Collaborative Software Initiative
-#
-# This file is part of CSI TriSano Enterprise Edition..

-content_for :title do
  =t('trisano_auth.login')
- form_for @user_session do |form|
  = form.error_messages
  .formList
    %li
      = form.label :user_name, t('trisano_auth.username')
      = form.text_field :user_name, :autocorrect => "off", :autocapitalize => "off"
    %li
      = form.label :password, t("trisano_auth.password")
      = form.password_field :password
    %li
      = form.submit(t("trisano_auth.submit"))


= simple_form_for @booking do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :value_date, :as => :date_field
  .row-fluid
    .span6
      = f.input :amount, :as => :string, :input_html => {:size => 12}
    .span6
      = f.input :code

  .row-fluid
    .span6
      = f.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
    .span6
      = f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox

  .row-fluid
    .span12
      = f.input :comments, :input_html => {:rows => 4, :class => 'span12'}

  .row-fluid
    .span12
      = f.input :reference_type, :as => :hidden, :input_html => {:value => 'Invoice'}
      //= f.association :reference, :collection => suggested_invoices_for_booking(@booking, :include_all => true), :as => :combobox, :include_blank => true

  = f.button :submit

Use bootstrap markup for submit action in booking form.

= simple_form_for @booking do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :value_date, :as => :date_field
  .row-fluid
    .span6
      = f.input :amount, :as => :string, :input_html => {:size => 12}
    .span6
      = f.input :code

  .row-fluid
    .span6
      = f.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
    .span6
      = f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox

  .row-fluid
    .span12
      = f.input :comments, :input_html => {:rows => 4, :class => 'span12'}

  .row-fluid
    .span12
      = f.input :reference_type, :as => :hidden, :input_html => {:value => 'Invoice'}
      //= f.association :reference, :collection => suggested_invoices_for_booking(@booking, :include_all => true), :as => :combobox, :include_blank => true

  .form-actions
    = f.button :submit


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

  %body
    %h1{style: "background: #EEE; border-bottom: 1px solid #DDD; color: #474D57; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;"}
      GitLab
      - if @project
        \|
        = link_to @project.name_with_namespace, project_url(@project), style: 'color: #29B; text-decoration: none'
    %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"}
      %tr
        %td{align: "left", style: "margin: 0; padding: 10px;"}
          = yield
          %br
      %tr
        %td{align: "left", style: "margin: 0; padding: 10px;"}
          %p{style: "font-size:small;color:#777"}
            - if @project
              You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team.
              %br
            - if @target_url
              #{link_to "View in GitLab", @target_url}

Remove the header banner in notification emails

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

  %body
    %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"}
      %tr
        %td{align: "left", style: "margin: 0; padding: 10px;"}
          = yield
      %tr
        %td{align: "left", style: "margin: 0; padding: 10px;"}
          %p{style: "font-size:small;color:#777"}
            - if @project
              You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team.
              %br
            - if @target_url
              #{link_to "View in GitLab", @target_url}


- @attributes ||= collection.first.attribute_names - ['id', 'created_at', 'updated_at']
%table.list{:class => "#{collection.first.class.to_s.downcase.pluralize} collection"}
  %thead
    %tr
      - @attributes.each do |field|
        %th= t_attr field, collection.first.class
      %th.new-task= t_title(:new, Activity)
      %th.action-links

  - @attributes = @attributes - ['name', 'client_id', 'project_state_id']
  %tbody
    - collection.each do |r|
      %tr
        %td= link_to r.name, r, {'data-href-container' => 'tr'}
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td= r.client
        %td= r.project_state
        %td= link_to t_title(:new, Activity), new_project_activity_url(r)
        %td.action-links
          = list_link_for(:show, r)
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)

Drop direct action to create new activity in project list.

- @attributes ||= collection.first.attribute_names - ['id', 'created_at', 'updated_at']
%table.list{:class => "#{collection.first.class.to_s.downcase.pluralize} collection"}
  %thead
    %tr
      - @attributes.each do |field|
        %th= t_attr field, collection.first.class
      %th.action-links

  - @attributes = @attributes - ['name', 'client_id', 'project_state_id']
  %tbody
    - collection.each do |r|
      %tr
        %td= link_to r.name, r, {'data-href-container' => 'tr'}
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td= r.client
        %td= r.project_state
        %td.action-links
          = list_link_for(:show, r)
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)


=image_tag "black-bg-04.jpg", class: 'bg animate', "anim-detached" => 'true'
.story
  %div
    %h2 Temas del Mes.
    =image_tag "wdt-bubble-logo.png", class: 'logo animate', "anim-detached" => 'true'
    %ul
      %li
        .border-box
          %p 1
        %p Convocatoria Abierta
        =link_to 'por tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 2
        %p Convocatoria Abierta
        =link_to 'por tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 3
        %p Convocatoria Abierta
        =link_to 'por tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 4
        %p Convocatoria Abierta
        =link_to 'por tu nombre aquí', '#speakers'

Change label about the speaker topic

=image_tag "black-bg-04.jpg", class: 'bg animate', "anim-detached" => 'true'
.story
  %div
    %h2 Temas del Mes.
    =image_tag "wdt-bubble-logo.png", class: 'logo animate', "anim-detached" => 'true'
    %ul
      %li
        .border-box
          %p 1
        %p Convocatoria Abierta
        =link_to 'tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 2
        %p Convocatoria Abierta
        =link_to 'tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 3
        %p Convocatoria Abierta
        =link_to 'tu nombre aquí', '#speakers'
      %li
        .border-box
          %p 4
        %p Convocatoria Abierta
        =link_to 'tu nombre aquí', '#speakers'


.row
  %h2 We're sorry, that didn't work
  %p
    We're very sorry, but the query you have just run did not complete. Reasons for
    this are commonly due to large queries exceeding the time limit,
    or the result set being too large to transmit.

  %p
    %strong
      Things you can try:

  %ul
    %li
      Make the query more selective. For example, add values for some of the other search
      fields, such as county, postcode or street. In particular, if you don't enter values for
      %em any
      address fields, you're implicitly doing a search for all addresses across England and Wales.
    %li
      Limit the years that the data is selected for. If you don't specify a start date, you
      will be querying the data going back to January 1995.
    %li
      Set the sample size. By limiting the number of results to 100 or 1000, you can try out
      your queries without risking timeouts in the query engine.
    %li
      If you have a large analysis that requires all of the data as input, you may be better
      to
      %a{ href: "http://www.landregistry.gov.uk/market-trend-data/public-data" } download the raw data
      and perform your own analysis using your own software.

  %p
    If you are still having difficulties accessing the data that you want, or you think that
    your query should have completed normally, please
    %a{ href: "/index.html#contact-us"}
      contact us.

  %p
    = @query_command.error_message
    You can quote this number to support staff so that they can investigate this specific incident.

Change reference to download data

.row
  %h2 We're sorry, that didn't work
  %p
    We're very sorry, but the query you have just run did not complete. Reasons for
    this are commonly due to large queries exceeding the time limit,
    or the result set being too large to transmit.

  %p
    %strong
      Things you can try:

  %ul
    %li
      Make the query more selective. For example, add values for some of the other search
      fields, such as county, postcode or street. In particular, if you don't enter values for
      %em any
      address fields, you're implicitly doing a search for all addresses across England and Wales.
    %li
      Limit the years that the data is selected for. If you don't specify a start date, you
      will be querying the data going back to January 1995.
    %li
      Set the sample size. By limiting the number of results to 100 or 1000, you can try out
      your queries without risking timeouts in the query engine.
    %li
      If you have a large analysis that requires all of the data as input, you may be better
      to
      %a{ href: "https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads" } download the raw data
      and perform your own analysis using your own software.

  %p
    If you are still having difficulties accessing the data that you want, or you think that
    your query should have completed normally, please
    %a{ href: "/index.html#contact-us"}
      contact us.

  %p
    = @query_command.error_message
    You can quote this number to support staff so that they can investigate this specific incident.


.js-dialog-target.is-inactive{ 'data-dough-dialog-target' => 'insert-image' }
  %div{ 'data-dough-component' => 'ImageManager', 'data-dough-insertmanager-target' => 'insert-image', 'data-dough-insertmanager-context' => 'insert-image' }
    .l-tab-panels.l-tab-panels--add-link
      .l-tab-panels__item.l-tab-panels__item--content
        = render 'links/images/form', tab_name: 'image', search_file_path: site_links_images_path, file_type: :images

Remove unused options in insert image dialog


-# Not all inputs are ng inputs, they don't make the 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
-# The nav-check-callback is warning on leave if the form is dirty.
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise",
  "ng-app" => 'admin.enterprises',
  "ng-submit" => "navClear()",
  "ng-controller" => 'enterpriseCtrl',
  "nav-check-callback" => 'enterpriseNavCallback',
  'onchange' => 'angular.element(enterprise).scope().enterprise.$setDirty()',
  } do |f|
  .row
    .sixteen.columns.alpha
      .four.columns.omega
        = render 'side_menu'
      .one.column
      .eleven.columns.alpha.fullwidth_inputs
        = render 'form', f: f
  .row
    .twelve.columns.alpha
      = render partial: "spree/admin/shared/#{action}_resource_links"

Rearrange columns for action buttons on enterprise form

-# Not all inputs are ng inputs, they don't make the 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
-# The nav-check-callback is warning on leave if the form is dirty.
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise",
  "ng-app" => 'admin.enterprises',
  "ng-submit" => "navClear()",
  "ng-controller" => 'enterpriseCtrl',
  "nav-check-callback" => 'enterpriseNavCallback',
  'onchange' => 'angular.element(enterprise).scope().enterprise.$setDirty()',
  } do |f|
  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'side_menu'
      .one.column
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f
  .row
    .five.columns.alpha

    .eleven.columns.alpha
      = render partial: "spree/admin/shared/#{action}_resource_links"


.body-content
  = govuk_inset_text do
    %p
      Statistics reports in tabular format.

    %table
      - @available_reports.each do |title, url_part|
        %tr
          %td= link_to(title, send("#{url_part}_geckoboard_api_widgets_path", format: 'html'))

Migrate statistics table to GOVUK list component

.govuk-grid-row
  .govuk-grid-column-two-thirds
    %h1.govuk-heading-l
      = 'Statistics reports'

  .govuk-grid-column-two-thirds
    %ul.govuk-list.govuk-list--bullet.govuk-list--spaced
      - @available_reports.each do |title, url_part|
        %li
          = link_to(title, send("#{url_part}_geckoboard_api_widgets_path", format: 'html'))


%accordion-heading
  .row
    .small-8.medium-10.columns
      %em
        %small
          {{ summary() | printArray }}
    .small-4.medium-2.columns.text-right
      %span.accordion-up
        %em
          %small Hide
        %i.ofn-i_053-point-up
      %span.accordion-down
        %em
          %small Expand
        %i.ofn-i_052-point-down

Tweak responsive heading columns now that container is a bit smaller

%accordion-heading
  .row
    .small-8.medium-9.columns
      %em
        %small
          {{ summary() | printArray }}
    .small-4.medium-3.columns.text-right
      %span.accordion-up
        %em
          %small Hide
        %i.ofn-i_053-point-up
      %span.accordion-down
        %em
          %small Expand
        %i.ofn-i_052-point-down


= render 'navigation/desktop'
= render 'navigation/mobile'

= render 'modal/ask'
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{ data: { target: '#modal-ask-followers', toggle: :modal }, type: 'button' }
  %i.fa.fa-pencil-square-o

Fix ask fab not being visible at tablet size

= render 'navigation/desktop'
= render 'navigation/mobile'

= render 'modal/ask'
%button.btn.btn-primary.btn-fab.d-block.d-lg-none{ data: { target: '#modal-ask-followers', toggle: :modal }, type: 'button' }
  %i.fa.fa-pencil-square-o


.large-3.columns
  = image_tag @user.profile_pic
  %hr
  - if signed_in?
    %section
      = render 'users/stats'

  %hr
  %h4 New Workout:
  = form_for @completion, html: {class: "custom"}, remote: true do |f|
    .field
      = f.label :milliseconds
      = f.number_field :milliseconds
    .field
      = f.label :wod_id
      = f.collection_select :wod_id, Wod.all.collect, :id, :name, include_blank: false
    .actions
      = f.submit "Save", {class: 'button small expand'}

  / move this into a partial
  /(supposed to be no logic in view)
.large-7.columns#completions
  = render 'completions/completions'

.large-2.columns
  %p Following:
  - @user.followed_users.each do |followed_user|
    = link_to(followed_user) do
      = image_tag followed_user.profile_pic
      %p= followed_user.name

Make prof pics links to user show pages

.large-3.columns
  = image_tag @user.profile_pic
  %hr
  - if signed_in?
    %section
      = render 'users/stats'

  %hr
  %h4 New Workout:
  = form_for @completion, html: {class: "custom"}, remote: true do |f|
    .field
      = f.label :milliseconds
      = f.number_field :milliseconds
    .field
      = f.label :wod_id
      = f.collection_select :wod_id, Wod.all.collect, :id, :name, include_blank: false
    .actions
      = f.submit "Save", {class: 'button small expand'}

  / move this into a partial
  /(supposed to be no logic in view)
.large-7.columns#completions
  = render 'completions/completions'

.large-2.columns
  %p Following:
  - @user.followed_users.each do |followed_user|
    = link_to(followed_user) do
      = link_to image_tag(followed_user.profile_pic), followed_user
      %p= followed_user.name


.poll-common-form
  .poll-common-form__select-poll-type{ng-if: "!poll.pollType"}
    %md-list-item.decision-tools-card__poll-type{ng-click: "poll.pollType = pollType", ng-repeat: "pollType in pollTypes() track by $index"}
      %i.material-icons.decision-tools-card__icon {{fieldFromTemplate(pollType, 'material_icon')}}
      .decision-tools-card__content
        .decision-tools-card__poll-type-title.md-body-2{translate: "decision_tools_card.{{pollType}}_title"}
        .decision-tools-card__poll-type-subtitle.md-caption{translate: "decision_tools_card.{{pollType}}_subtitle"}
  -# .poll-common-form__select-community{ng-if: "poll.pollType && !poll.communityType"}
    -# SELECT A COMMUNITY FOR {{poll.pollType}}
  .poll-common-form__create-poll{ng-if: "poll.pollType"}
    %poll_common_directive{poll: "poll", name: "form"}

Add header to start poll form

.poll-common-form
  .poll-common-form__select-poll-type{ng-if: "!poll.pollType"}
    %md-list-item.decision-tools-card__poll-type{ng-click: "poll.pollType = pollType", ng-repeat: "pollType in pollTypes() track by $index"}
      %i.material-icons.decision-tools-card__icon {{fieldFromTemplate(pollType, 'material_icon')}}
      .decision-tools-card__content
        .decision-tools-card__poll-type-title.md-body-2{translate: "decision_tools_card.{{pollType}}_title"}
        .decision-tools-card__poll-type-subtitle.md-caption{translate: "decision_tools_card.{{pollType}}_subtitle"}
  -# .poll-common-form__select-community{ng-if: "poll.pollType && !poll.communityType"}
    -# SELECT A COMMUNITY FOR {{poll.pollType}}
  .poll-common-form__create-poll{ng-if: "poll.pollType"}
    .poll-common-card-header.lmo-flex
      %i.material-icons {{ fieldFromTemplate(poll.pollType, 'material_icon') }}
      %h2.lmo-card-heading.poll-common-card-header__poll-type{translate: "poll_types.{{poll.pollType}}"}
    %poll_common_directive{poll: "poll", name: "form"}


%td{:colspan => 3}
  .exchange-product{'ng-repeat' => 'product in supplied_products | filter:productSuppliedToOrderCycle'}
    .exchange-product-details
      .supplier {{ product.supplier_name }}
      %label
        = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-hide' => 'product.variants', 'ng-disabled' => 'product.variants.length > 0', 'ng-model' => 'exchange.variants[product.master_id]', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}'
        %img{'ng-src' => '{{ product.image_url }}'}
        {{ product.name }}
    .exchange-product-variant{'ng-repeat' => 'variant in product.variants | filter:variantSuppliedToOrderCycle'}
      %label
        = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}', 1, 1, 'ng-model' => 'exchange.variants[variant.id]', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}'
        {{ variant.label }}

Select all distributed products on order cycle admin page

%td{:colspan => 3}
  .exchange-select-all-variants
    %label
      = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$index }}_select_all_variants', 1, 1, 'ng-model' => 'exchange.select_all_variants', 'ng-click' => 'setExchangeVariants(exchange, incomingExchangesVariants(), exchange.select_all_variants)', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$index }}_select_all_variants'
      Select all

  .exchange-product{'ng-repeat' => 'product in supplied_products | filter:productSuppliedToOrderCycle'}
    .exchange-product-details
      .supplier {{ product.supplier_name }}
      %label
        = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-hide' => 'product.variants', 'ng-disabled' => 'product.variants.length > 0', 'ng-model' => 'exchange.variants[product.master_id]', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}'
        %img{'ng-src' => '{{ product.image_url }}'}
        {{ product.name }}
    .exchange-product-variant{'ng-repeat' => 'variant in product.variants | filter:variantSuppliedToOrderCycle'}
      %label
        = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}', 1, 1, 'ng-model' => 'exchange.variants[variant.id]', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}'
        {{ variant.label }}


- breadcrumb('Asset Library', :asset_library)
- breadcrumb('Tags', :asset_tags)

= content do
  %table.fixed-header
    %thead
      %tr
        %th Tag
        %th Entries
        %th Last Addition

    %tbody
      - @asset_tags.each do |tag|
        %tr
          %td
            = link_to(tag.name, path(tag), :class => 'title')
          %td.indicator
            %span.indicator= tag.assets_count
          %td.meta
            %span.time jhh

Remove 'last addition' from asset tag list.

- breadcrumb('Asset Library', :asset_library)
- breadcrumb('Tags', :asset_tags)

= content do
  %table.fixed-header
    %thead
      %tr
        %th Tag
        %th Entries

    %tbody
      - @asset_tags.each do |tag|
        %tr
          %td
            = link_to(tag.name, path(tag), :class => 'title')
          %td.indicator
            %span.indicator= tag.assets_count


-# navigation styled for Zurb Foundation 5
-# the syntax for data-topbar may need to change for Zurb Foundation 5
%nav.top-bar{"data-topbar" => true}
  %ul.title-area
    %li.name
      = render title_partial

  .top-bar-section{style: 'float: right; margin-right: 3em;'}
    %ul
      %li
        %a Sign in

  #flash-messages
    #nav-js-alert.hide
      .nav-alert.alert-box.radius{data: {alert: ''}}
    = render 'layouts/express_admin/messages'

Add back sign in/out links in top navbar

-# navigation styled for Zurb Foundation 5
-# the syntax for data-topbar may need to change for Zurb Foundation 5
%nav.top-bar{"data-topbar" => true}
  %ul.title-area
    %li.name
      = render title_partial

  .top-bar-section{style: 'float: right; margin-right: 3em;'}
    %ul
      %li
        - if user_signed_in?
          = link_to 'Sign out', Rails.application.routes.url_helpers.destroy_user_session_path, method: :delete
        - else
          = link_to 'Sign in', Rails.application.routes.url_helpers.user_omniauth_authorize_path(:appexpress)

  #flash-messages
    #nav-js-alert.hide
      .nav-alert.alert-box.radius{data: {alert: ''}}
    = render 'layouts/express_admin/messages'