- @page_title = t('shoppe.subscription_plans.subscription_plans')

= content_for :header do
  %p.buttons= link_to t('shoppe.subscription_plans.new'), :new_subscription_plan, :class => 'button green'
  %h2.subscription_plans= t('shoppe.subscription_plans.subscription_plans')

.table
  %table.data
    %thead
      %tr
        %th= t('shoppe.subscription_plans.amount')
        %th= t('shoppe.subscription_plans.interval')
        %th= t('shoppe.subscription_plans.interval_count')
        %th= t('shoppe.subscription_plans.name')
        %th= t('shoppe.subscription_plans.currency')
        %th= t('shoppe.subscription_plans.id')
        %th= t('shoppe.subscription_plans.trial_period_days')
    %tbody
      - if @subscription_plans.empty?
        %tr.empty
          %td{:colspan => 7}= t('shoppe.subscription_plans.no_subscription_plans')
      - else
        - for subscription_plan in @subscription_plans
          %tr
            %td= link_to subscription_plan.amount, [:edit, subscription_plan]
            %td= subscription_plan.interval
            %td= subscription_plan.interval_count
            %td= link_to subscription_plan.name, [:edit, subscription_plan]
            %td= subscription_plan.currency
            %td= subscription_plan.id
            %td= subscription_plan.trial_period_days

Add currency to subscription plan list

- @page_title = t('shoppe.subscription_plans.subscription_plans')

= content_for :header do
  %p.buttons= link_to t('shoppe.subscription_plans.new'), :new_subscription_plan, :class => 'button green'
  %h2.subscription_plans= t('shoppe.subscription_plans.subscription_plans')

.table
  %table.data
    %thead
      %tr
        %th= t('shoppe.subscription_plans.amount')
        %th= t('shoppe.subscription_plans.interval')
        %th= t('shoppe.subscription_plans.interval_count')
        %th= t('shoppe.subscription_plans.name')
        %th= t('shoppe.subscription_plans.currency')
        %th= t('shoppe.subscription_plans.id')
        %th= t('shoppe.subscription_plans.trial_period_days')
    %tbody
      - if @subscription_plans.empty?
        %tr.empty
          %td{:colspan => 7}= t('shoppe.subscription_plans.no_subscription_plans')
      - else
        - for subscription_plan in @subscription_plans
          %tr
            %td= link_to "#{Shoppe.settings.currency_unit.html_safe}#{subscription_plan.amount}", [:edit, subscription_plan]
            %td= subscription_plan.interval
            %td= subscription_plan.interval_count
            %td= link_to subscription_plan.name, [:edit, subscription_plan]
            %td= subscription_plan.currency
            %td= subscription_plan.id
            %td= subscription_plan.trial_period_days


= render partial: 'shared/components/filter_controls'

.row.animate-show{"ng-show" => "filtersActive"}
  .small-12.columns

    .row.filter-box
      .small-12.large-8.columns
        %h5.tdhead
          .light Filter by
          Type
      .small-12.large-4.columns
        %h5.tdhead
          .light Filter by
          Delivery

    .row.filter-box
      .small-12.large-8.columns
        %taxon-selector{objects: "hubs | hubs:query",
          results: "activeTaxons"}

      .small-12.large-4.columns
        %shipping-type-selector{results: "shippingTypes"}

    .row.filter-box.animate-show{"ng-show" => "filtersActive && totalActive() > 0"}
      .small-12.columns
        %a.button.secondary.small.expand{"ng-click" => "clearAll()"}
          %i.ofn-i_009-close
          Clear all filters

Adjust layout for small views

= render partial: 'shared/components/filter_controls'

.row.animate-show{"ng-show" => "filtersActive"}
  .small-12.columns
    .row.filter-box
      .small-12.large-9.columns
        %h5.tdhead
          .light Filter by
          Type
        %taxon-selector{objects: "hubs | hubs:query",
          results: "activeTaxons"}
      .small-12.large-3.columns
        %h5.tdhead
          .light Filter by
          Delivery
        %shipping-type-selector{results: "shippingTypes"}
    .row.filter-box.animate-show{"ng-show" => "filtersActive && totalActive() > 0"}
      .small-12.columns
        %a.button.secondary.small.expand{"ng-click" => "clearAll()"}
          %i.ofn-i_009-close
          Clear all filters


- content_for :header, 'Your visit request has not been made'

.Grid
  .Grid-2-3
    %p All the details you entered have been cleared to keep your information safe. This happens when a page has been left open for over 20 minutes.

    = link_to 'Start a new request', edit_prisoner_details_path, :class => 'button button-primary'

Update new request button on timeout page

- content_for :header, 'Your visit request has not been made'

.Grid
  .Grid-2-3
    %p All the details you entered have been cleared to keep your information safe. This happens when a page has been left open for over 20 minutes.

    = link_to 'Make a new visit request', edit_prisoner_details_path, :class => 'button button-primary'


- unless @invoice_sidebar
  - @invoice_sidebar = true

  - content_for :sidebar do
    .sub-tabs
      %h3 Filter
      %ul
        %li= link_to t('bookyt.all'), url_for(:by_state => 'all', :overdue => nil)
        - for state in Invoice::STATES
          %li= link_to t(state, :scope => 'invoice.state'), url_for(:by_state => state, :overdue => nil)
        %li= link_to t(:overdue, :scope => 'invoice.state'), url_for(:by_state => nil, :overdue => true)

Reword title of invoice filter.

- unless @invoice_sidebar
  - @invoice_sidebar = true

  - content_for :sidebar do
    .sub-tabs
      %h3 Rechnungsfilter
      %ul
        %li= link_to t('bookyt.all'), url_for(:by_state => 'all', :overdue => nil)
        - for state in Invoice::STATES
          %li= link_to t(state, :scope => 'invoice.state'), url_for(:by_state => state, :overdue => nil)
        %li= link_to t(:overdue, :scope => 'invoice.state'), url_for(:by_state => nil, :overdue => true)


.row
  .col-md-6
    - I18n.with_locale(I18n.default_locale) do
      = field_value_for(resource, attribute_name)
  .col-md-6
    - I18n.with_locale(locale) do
      = form.input_field attribute_name, class: 'form-control'

Remove truncate text for all default local fields

.row
  .col-md-6
    - I18n.with_locale(I18n.default_locale) do
      = value_for(resource, attribute_name)
  .col-md-6
    - I18n.with_locale(locale) do
      = form.input_field attribute_name, class: 'form-control'


!!!
%html{:lang => 'en'}
  %head
    %title TreeStats3
    %link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
    %link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
  %body
    %table
      %tbody
        %tr
          %td{:colspan => 2}
            %table
              %tbody
                %tr
                  %td#header{:colspan => 2}
                    %h1
                      %a{:href => "/"} TreeStats
                %tr
                  %td#search
                    = haml :_search
                  %td#download
                    Download:
                    %a{:href => "/download"} Latest Release

        %tr.line
          %td#nav
            = haml :nav
          %td#content
            = yield
        %tr
          %td#footer.center{:colspan => 2} This website created with love by Kolth.

Change title to TreeStats from TreeStats3

!!!
%html{:lang => 'en'}
  %head
    %title TreeStats
    %link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
    %link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
  %body
    %table
      %tbody
        %tr
          %td{:colspan => 2}
            %table
              %tbody
                %tr
                  %td#header{:colspan => 2}
                    %h1
                      %a{:href => "/"} TreeStats
                %tr
                  %td#search
                    = haml :_search
                  %td#download
                    Download:
                    %a{:href => "/download"} Latest Release

        %tr.line
          %td#nav
            = haml :nav
          %td#content
            = yield
        %tr
          %td#footer.center{:colspan => 2} This website created with love by Kolth.


= content_for :session do
  #session
    = render :partial => 'shared/session'
= content_for :title do
  Sequences
= content_for :nav do
  .breadcrumbs
    %ul
      %li= link_to "Home", root_path
      %li / All Sequences

%ul#new-menu
  %li#desc-toggle= toggle_all 'sequence descriptions'
  %li#collection_filter= collection_filter_tag @filter
.buttons-menu
  - if can? :create, Sequence
    %a{ :href => new_sequence_path }
      %button=t("NEW_SEQUENCE_BUTTON")

#official_listing_heading.pagination_heading
  %h1 Activity Sequences:
  = page_entries_info @sequences, :model => "Sequences"
  .pagination_info
    = will_paginate @official_activities
  %ul.quiet_list.official_listing
    - @sequences.each do |sequence|
      = render :partial => "index_item", :locals => {:sequence => sequence}
  .pagination_info
    = will_paginate @official_activities

Fix sequence index view template.

= content_for :session do
  #session
    = render :partial => 'shared/session'
= content_for :title do
  Sequences
= content_for :nav do
  .breadcrumbs
    %ul
      %li= link_to "Home", root_path
      %li / All Sequences

%ul#new-menu
  %li#desc-toggle= toggle_all 'sequence descriptions'
  %li#collection_filter= collection_filter_tag @filter
.buttons-menu
  - if can? :create, Sequence
    %a{ :href => new_sequence_path }
      %button=t("NEW_SEQUENCE_BUTTON")

#official_listing_heading.pagination_heading
  %h1 Activity Sequences:
  = page_entries_info @sequences, :model => "Sequences"
  .pagination_info
    = will_paginate @sequences
  %ul.quiet_list.official_listing
    - @sequences.each do |sequence|
      = render :partial => "index_item", :locals => {:sequence => sequence}
  .pagination_info
    = will_paginate @sequences


:ruby
  github_url = 'https://github.com'
  branch     = payload.ref.split('/', 3).last # refs/heads/:branch_name

%p
  %span= avatar_image_tag payload.sender.avatar_url
  %a{href: "#{github_url}/#{payload.pusher.name}"}= payload.pusher.name

  - if payload.forced && !payload.created # Somehow `payload.forced` is `true` on created
    force-pushed to
  - else
    pushed to

  %a{href: "#{payload.repository.url}/tree/#{branch}"}= branch
  at
  %a{href: payload.repository.url} #{payload.repository.owner.name}/#{payload.repository.name}

  = surround '(', ')' do
    %a{href: payload.compare} compare

- if payload.commits.present?
  %ul
    - payload.commits.each do |commit|
      %li
        - head, *tail = commit.message.lines

        %a{href: commit.url}<
          %tt= commit.id[0...7]
        = head
        = md tail.join

Use `sender` instead of `pusher`

:ruby
  branch = payload.ref.split('/', 3).last # refs/heads/:branch_name

%p
  %span= avatar_image_tag payload.sender.avatar_url
  %a{href: payload.sender.html_url}= payload.sender.login

  - if payload.forced && !payload.created # Somehow `payload.forced` is `true` on created
    force-pushed to
  - else
    pushed to

  %a{href: "#{payload.repository.url}/tree/#{branch}"}= branch
  at
  %a{href: payload.repository.url} #{payload.repository.owner.name}/#{payload.repository.name}

  = surround '(', ')' do
    %a{href: payload.compare} compare

- if payload.commits.present?
  %ul
    - payload.commits.each do |commit|
      %li
        - head, *tail = commit.message.lines

        %a{href: commit.url}<
          %tt= commit.id[0...7]
        = head
        = md tail.join


!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay{style: 'display: none'}
      %header
        %a.btn.btn-primary.close-overlay{href: "#"} Close
      %main
      %footer
        %a.btn.btn-primary.close-overlay{href: "#"} Close

    #nav-bar-container
      %nav#nav-bar
        %header
          = link_to root_path do
            %i.glyphicon.glyphicon-home
            Tahi
        %section
          %ul
            - if current_user
              %li.nav-bar-item= active_link_to 'Dashboard', root_path
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Admin', admin_users_path
          %ul
            - if current_user
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield :control_bar

    #tahi-container
      = yield

Hide flash markup when no flash present

!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay{style: 'display: none'}
      %header
        %a.btn.btn-primary.close-overlay{href: "#"} Close
      %main
      %footer
        %a.btn.btn-primary.close-overlay{href: "#"} Close

    #nav-bar-container
      %nav#nav-bar
        %header
          = link_to root_path do
            %i.glyphicon.glyphicon-home
            Tahi
        %section
          %ul
            - if current_user
              %li.nav-bar-item= active_link_to 'Dashboard', root_path
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Admin', admin_users_path
          %ul
            - if current_user
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield :control_bar

    #tahi-container
      - if flash.present?
        %p.notice= notice
        %p.alert= alert
      = yield


.list-row
  %div{style: "float: left; width: 50px; height: 50px;"}
    = link_to image_tag("icons/conversation.png", class: "img-rounded", style: "width: 100%;"), conversation_path(conversation)
  %div{style: "margin-left: 60px;"}
    - if opts[:in_search]
      .text-muted.small CONVERSATION
    .nowrap.text-ellipsis
      %span.h4= link_to conversation.title, conversation_path(conversation), class: "test-conversation-link"
    .nowrap.text-ellipsis.text-muted
      = sanitize(conversation.comments.first.body, tags: [])
    .nowrap
      - conversation.participants.limit(5).each do |user|
        = link_to image_tag(user.image.url(:thumb), class: "img-circle", style: "width: 20px;"), user_path(user)
      - if conversation.participants.length > 5
        = "+#{conversation.participants.length - 5}"

      - conversation.tag_list.each do |name|
        = link_to name, search_path(query: name), class: "label label-default"

Fix bug when displaying empty conversation

.list-row
  %div{style: "float: left; width: 50px; height: 50px;"}
    = link_to image_tag("icons/conversation.png", class: "img-rounded", style: "width: 100%;"), conversation_path(conversation)
  %div{style: "margin-left: 60px;"}
    - if opts[:in_search]
      .text-muted.small CONVERSATION
    .nowrap.text-ellipsis
      %span.h4= link_to conversation.title, conversation_path(conversation), class: "test-conversation-link"
    .nowrap.text-ellipsis.text-muted
      = sanitize(conversation.comments.first&.body, tags: [])
    .nowrap
      - conversation.participants.limit(5).each do |user|
        = link_to image_tag(user.image.url(:thumb), class: "img-circle", style: "width: 20px;"), user_path(user)
      - if conversation.participants.length > 5
        = "+#{conversation.participants.length - 5}"

      - conversation.tag_list.each do |name|
        = link_to name, search_path(query: name), class: "label label-default"


= contextual_links

%h1
  = t('crud.title.day.new', :day => @day.date)

= render 'complete_form'

Move content to same line as tag.

= contextual_links

%h1= t('crud.title.day.new', :day => @day.date)

= render 'complete_form'


- if params[:space_id]
  - page_title t('spaces.menu.users'), :in => @space.name
  - spaces_menu_at :users
  #user-list.content-block
    .content-block-header
      %h3= t('user.index.user_list.header_spaces', :count => @users.size)
    .content-block-middle
      - for user in @users
        = render :partial => 'users/detailed_user', :locals => { :user => user }

- elsif params[:institution_id]
  #user-list.content-block
    .content-block-header
      %h2= @institution.name
      %h3= t('user.index.user_list.header_institutions', :count => @users.size)

    .content-block-middle
      - for user in @users
        = render :partial => 'users/detailed_user_institution', :locals => { :user => user }

Add missing menu in space_users

- page_title t('spaces.menu.users'), :in => @space.name

- spaces_menu_at :users
= render :partial => 'spaces/menu'

- if params[:space_id]
  - page_title t('spaces.menu.users'), :in => @space.name
  - spaces_menu_at :users
  #user-list.content-block
    .content-block-header
      %h3= t('user.index.user_list.header_spaces', :count => @users.size)
    .content-block-middle
      - for user in @users
        = render :partial => 'users/detailed_user', :locals => { :user => user }

- elsif params[:institution_id]
  #user-list.content-block
    .content-block-header
      %h2= @institution.name
      %h3= t('user.index.user_list.header_institutions', :count => @users.size)

    .content-block-middle
      - for user in @users
        = render :partial => 'users/detailed_user_institution', :locals => { :user => user }


= form_for @player, url: (@player.new_record? ? admin_players_path : admin_player_path(@player)), html: {class: 'pure-form pure-form-aligned'} do |f|
  - if @player.errors.any?
    #error_explanation
      %h2= "#{pluralize(@player.errors.count, "error")} prohibited this player from being saved:"
      %ul
        - @player.errors.full_messages.each do |msg|
          %li= msg

  %fieldset
    .pure-control-group
      = f.label :name
      = f.text_field :name, required: true
    .pure-control-group
      = f.label :email
      = f.text_field :email, required: true
    .pure-controls
      = f.submit 'Save', class: 'pure-button pure-button-primary'

Modify admin/player form to register with a team.

= form_for @player, url: (@player.new_record? ? admin_players_path : admin_player_path(@player)), html: {class: 'pure-form pure-form-aligned'} do |f|
  - if @player.errors.any?
    #error_explanation
      %h2= "#{pluralize(@player.errors.count, "error")} prohibited this player from being saved:"
      %ul
        - @player.errors.full_messages.each do |msg|
          %li= msg

  %fieldset
    .pure-control-group
      = f.label :name
      = f.text_field :name, required: true
    .pure-control-group
      = f.label :email
      = f.text_field :email, required: true
    .pure-control-group
      = f.label :team
      = f.select :team_id, Team.pluck(:name, :id)
    .pure-controls
      = f.submit 'Save', class: 'pure-button pure-button-primary'


!!!
%html{:lang => 'en'}
  %head
    %title= [yield(:title), t('.title')].reject(&:blank?).join(' - ')
    = csrf_meta_tags
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload'
    %meta{:charset => 'utf-8'}/
    %meta{:content => 'width=device-width, initial-scale=1, shrink-to-fit=no', :name => 'viewport'}/
    %meta{:content => t('.description'), :name => 'description'}/
    %meta{:content => t('.author'), :name => 'author'}/
    %link{:href => '/favicon.ico', :rel => 'icon'}/

  %body
    = render '/layouts/top_navigation'
    .container-fluid
      .row
        %nav.col-sm-3.col-md-2.hidden-xs-down.bg-faded.sidebar
          = render '/layouts/side_navigation'
        %main.col-sm-9.offset-sm-3.col-md-10.offset-md-2.pt-3
          = render '/shared/filter_configurator'
          %h1= yield(:title).presence || t('.title')
          = yield

    = javascript_include_tag '//www.google.com/jsapi', 'chartkick'
    = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
    = yield :javascript

Hide filter for everything except lists of ships, combos, pilots

!!!
%html{:lang => 'en'}
  %head
    %title= [yield(:title), t('.title')].reject(&:blank?).join(' - ')
    = csrf_meta_tags
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload'
    %meta{:charset => 'utf-8'}/
    %meta{:content => 'width=device-width, initial-scale=1, shrink-to-fit=no', :name => 'viewport'}/
    %meta{:content => t('.description'), :name => 'description'}/
    %meta{:content => t('.author'), :name => 'author'}/
    %link{:href => '/favicon.ico', :rel => 'icon'}/

  %body
    = render '/layouts/top_navigation'
    .container-fluid
      .row
        %nav.col-sm-3.col-md-2.hidden-xs-down.bg-faded.sidebar
          = render '/layouts/side_navigation'
        %main.col-sm-9.offset-sm-3.col-md-10.offset-md-2.pt-3
          - if %w[ships pilots ship_combos].include?(params[:controller]) && params[:action] == 'index'
            = render '/shared/filter_configurator'
          %h1= yield(:title).presence || t('.title')
          = yield

    = javascript_include_tag '//www.google.com/jsapi', 'chartkick'
    = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
    = yield :javascript


!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:title) ? yield(:title) : "Flareteam"
    = csrf_meta_tags
    / Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
    = stylesheet_link_tag "application", :media => "all"
    %link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
    %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
    %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114")

  %body
    = render "shared/navbar"
    .container
      .content
        .row
          .span12
            = render "shared/messages", locals: { flash: flash, notice: notice }
            = yield

    %footer.footer
      .container
        %p.pull-right © Flareteam 2012
    /
      Javascripts
      \==================================================
    / Placed at the end of the document so the pages load faster
    = javascript_include_tag "application"

Convert to HAML comments that do not produce output

!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:title) ? yield(:title) : "Flareteam"
    = csrf_meta_tags
    -# Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
    = stylesheet_link_tag "application", :media => "all"
    %link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
    %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
    %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114")

  %body
    = render "shared/navbar"
    .container
      .content
        .row
          .span12
            = render "shared/messages", locals: { flash: flash, notice: notice }
            = yield

    %footer.footer
      .container
        %p.pull-right © Flareteam 2012
    -# Javascripts
    -# ==================================================
    -# Placed at the end of the document so the pages load faster
    = javascript_include_tag "application"


- provide(:title, generate_title('Sign Up'))
.container
  .row
    .col-sm-8.offset-sm-2
      .card.mt-3
        .card-body
          %h1= t('views.sessions.new')
          = bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
            = render 'devise/shared/error_messages', resource: resource
            = render 'layouts/messages'

            = f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
            = f.email_field :email, autofocus: false, label: t('views.settings.account.email')
            .alert.alert-danger
              We're currently experiencing issues with Outlook/Hotmail addresses, please don't use those!

            = f.password_field :password, autocomplete: :off, label: t('views.settings.account.password')
            = f.password_field :password_confirmation, autocomplete: :off, label: t('views.settings.account.password_confirm')

            - if APP_CONFIG.dig(:hcaptcha, :enabled)
              = hcaptcha_tags

            %p= raw t('views.sessions.info', terms: link_to(t('views.general.terms'), terms_path))
            = f.submit 'Sign up', class: 'btn btn-primary mb-3'

          = render 'devise/shared/links'
= render 'shared/links'

Update mail notice to mention people to look at their spam folder

- provide(:title, generate_title('Sign Up'))
.container
  .row
    .col-sm-8.offset-sm-2
      .card.mt-3
        .card-body
          %h1= t('views.sessions.new')
          = bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
            = render 'devise/shared/error_messages', resource: resource
            = render 'layouts/messages'

            = f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
            = f.email_field :email, autofocus: false, label: t('views.settings.account.email'),
              help: "Don't forget to check your spam folder in case our mail might have landed there!"

            = f.password_field :password, autocomplete: :off, label: t('views.settings.account.password')
            = f.password_field :password_confirmation, autocomplete: :off, label: t('views.settings.account.password_confirm')

            - if APP_CONFIG.dig(:hcaptcha, :enabled)
              = hcaptcha_tags

            %p= raw t('views.sessions.info', terms: link_to(t('views.general.terms'), terms_path))
            = f.submit 'Sign up', class: 'btn btn-primary mb-3'

          = render 'devise/shared/links'
= render 'shared/links'


!!! 5
%html
  %head
    %title Radvent
    %link{:href=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css", :rel=>"stylesheet"}
    %script{:src=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"}
    %link{:href=>"//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/flatly/bootstrap.min.css", :rel=>"stylesheet"}
    %link{:href=>"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css", :rel=>"stylesheet"}
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body
    = yield

Fix loading twitter bootstrap files at last

!!! 5
%html
  %head
    %title Radvent
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    %link{:href=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css", :rel=>"stylesheet"}
    %script{:src=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"}
    %link{:href=>"//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/flatly/bootstrap.min.css", :rel=>"stylesheet"}
    %link{:href=>"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css", :rel=>"stylesheet"}
  %body
    = yield


!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= content_for?(:title) ? yield(:title) : "My Application"
    %meta{:content => "#{content_for?(:description) ? yield(:description) : "My Application"}", :name => "description"}/
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    / Custom Fonts
    %link{:href => "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css", :rel => "stylesheet"}/
  %body
    %header
      = render 'layouts/navigation'
    = render 'layouts/messages'
    = yield
    = render 'layouts/footer'

Convert app layout to variable for meta title, so all pages can have their own way of showing tab names and titles for seo.

!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= @meta_title
    %meta{:content => "#{content_for?(:description) ? yield(:description) : "My Application"}", :name => "description"}/
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    / Custom Fonts
    %link{:href => "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css", :rel => "stylesheet"}/
  %body
    %header
      = render 'layouts/navigation'
    = render 'layouts/messages'
    = yield
    = render 'layouts/footer'


- content_for :lightboxes do
  = render :partial => 'shared/lightbox_report'
  = render :partial => 'shared/workgroup'

- if @portal_clazz.is_teacher?(current_visitor) || current_visitor.has_role?("admin")
  = render_portal_clazz_partial 'portal/clazzes/show'
  = render_portal_clazz_partial 'portal/offerings/list_for_clazz'
  = link_to 'Manage Student Roster', roster_portal_clazz_url(@portal_clazz), :class => "button pie", :id=>"btn_manage_student_roster"
  / all these br's are to keep a strange scroll bar from showing up
  %br
  %br

- elsif current_visitor.has_role?("manager", "researcher")
  = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- else
  = render_portal_clazz_partial 'portal/clazzes/show'
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @offerings }

Remove unused offering assignment in view.

- is_teacher = @portal_clazz.is_teacher?(current_visitor)
- can_manage = is_teacher || current_visitor.has_role?("manager", "researcher", "admin")
= render_portal_clazz_partial 'portal/clazzes/show'
- if can_manage
  %p
    = link_to 'Manage Student Roster',
    roster_portal_clazz_url(@portal_clazz),
    :class => "button pie",
    :id=>"btn_manage_student_roster"
  %p
    = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- elsif
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @offerings }


%article.file[file]
  %div
    .path= file.path
    .elapsed= file.elapsed
    .clearfix
  .percentage_img_container
    .percentage
      %img.percentage_img{src: asset_path('percentage.png'), 'data-width' => file.percent}/
  .clearfix

Add an alt on the image.

%article.file[file]
  %div
    .path= file.path
    .elapsed= file.elapsed
    .clearfix
  .percentage_img_container
    .percentage
      %img.percentage_img{src: asset_path('percentage.png'), alt: "#{file.percent}% of total time", 'data-width' => file.percent}/
  .clearfix


- breadcrumb :public_node, node

%h2
  =node.name

= render partial: 'templates/content_body', object: node.content_body

Remove heading from node home as it repeats heading in the banner

- breadcrumb :public_node, node

= render partial: 'templates/content_body', object: node.content_body


%tr{:id => "stash-#{i}"}
  %td.span5= path
  %td.span4= content_item['description'] || ''
  %td= content_item['owner'] || ''
  - if content_item['expire_at']
    %td= distance_of_time_in_words(Time.now, Time.parse(content_item['expire_at']))
  - else
    %td Never
  %td
    - if content_item['timestamp'].to_i
      = time_ago_in_words(Time.at(content_item['timestamp'].to_i)) + " ago"
    - else
      = 'Not set'
  %td
    %a.delete-stash{:key => path, :misc => "#stash-#{i}", :rel => "/stashes/delete_stash"} Delete

Add unique id's to stash rows

%tr{:id => "stash-#{i}"}
  %td.span5= path
  %td.span4= content_item['description'] || ''
  %td= content_item['owner'] || ''
  - if content_item['expire_at']
    %td= distance_of_time_in_words(Time.now, Time.parse(content_item['expire_at']))
  - else
    %td Never
  %td
    - if content_item['timestamp'].to_i
      = time_ago_in_words(Time.at(content_item['timestamp'].to_i)) + " ago"
    - else
      = 'Not set'
  %td{:id => "delete-#{path}"}
    %a.delete-stash{:id => path.gsub(/\//, "-"), :misc => "#stash-#{path}", :rel => "/stashes/delete_stash", :key => "#{path}"} Delete


.span6
  .well
    %h3
      =title
      %i.icon-flag.tip{title: tooltip_text}
    %dl
      -results.each do |result|
        -result.genes.each do |gene|
          %dt=link_to gene.long_name, gene_path(gene.name)
          %dd="For search term: #{result.search_term}"

Change long name to short name in search interaction no matching gene section

.span6
  .well
    %h3
      =title
      %i.icon-flag.tip{title: tooltip_text}
    %dl
      -results.each do |result|
        -result.genes.each do |gene|
          %dt=link_to gene.name, gene_path(gene.name)
          %dd="For search term: #{result.search_term}"


!!! 5
%html{ lang: 'en' }
  %head
    %title RubyBench - Long Running Ruby Benchmark
    = render 'layouts/typekit'
    = stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Montserrat:400,700'
    = stylesheet_link_tag 'application', media: 'all'
    = render 'layouts/ga' if Rails.env.production?
    = csrf_meta_tags

  %body
    = render 'layouts/top_nav'
    = yield

    %footer
      = render 'layouts/footer'
      = javascript_include_tag 'application'
      = yield :footer if content_for(:footer)

Add missing meta tag for bootstrap.

!!! 5
%html{ lang: 'en' }
  %head
    %title RubyBench - Long Running Ruby Benchmark
    %meta{ name: 'viewport', content: 'width=device-width, initial-scale-1' }
    = render 'layouts/typekit'
    = stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Montserrat:400,700'
    = stylesheet_link_tag 'application', media: 'all'
    = render 'layouts/ga' if Rails.env.production?
    = csrf_meta_tags

  %body
    = render 'layouts/top_nav'
    = yield

    %footer
      = render 'layouts/footer'
      = javascript_include_tag 'application'
      = yield :footer if content_for(:footer)


- @no_container = true
- page_title "Edit", @page.title.capitalize, "Wiki"
= render 'nav'

%div{ class: (container_class) }
  .top-area
    .nav-text
      %strong
        - if @page.persisted?
          = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
        - else
          = @page.title.capitalize
      %span.light
        ·
        Edit Page

    .nav-controls
      - if can?(current_user, :create_wiki, @project)
        = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
          New Page
      = render 'main_links'

  = render 'form'

Remove duplicate new page btn from edit wiki

- @no_container = true
- page_title "Edit", @page.title.capitalize, "Wiki"
= render 'nav'

%div{ class: (container_class) }
  .top-area
    .nav-text
      %strong
        - if @page.persisted?
          = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
        - else
          = @page.title.capitalize
      %span.light
        ·
        Edit Page

    .nav-controls
      = render 'main_links'

  = render 'form'


%div.flex
  %div.columns.three.text-center.checkout-tab.selected
    %span
      = t("split_checkout.your_details")
  %div.columns.three.text-center.checkout-tab
    %span
      = t("split_checkout.payment_method")
  %div.columns.three.text-center.checkout-tab
    %span
      = t("split_checkout.order_summary")

Add selected class on form tab depending on the current path

%div.flex
  %div.columns.three.text-center.checkout-tab{"class": ("selected" if current_page?(checkout_your_details_path))}
    %span
      = t("split_checkout.your_details")
  %div.columns.three.text-center.checkout-tab{"class": ("selected" if current_page?(checkout_payment_method_path))}
    %span
      = t("split_checkout.payment_method")
  %div.columns.three.text-center.checkout-tab{"class": ("selected" if current_page?(checkout_summary_path))}
    %span
      = t("split_checkout.order_summary")


- if results.empty?
  %p.no_results Report returned no results.
- else
  %table
    %thead
      %tr
        - results.columns.each do |column|
          %td= column
    %tbody
      - results.each do |row|
        - results.columns.each do |column|
          %td= row[column]

Use th, not td for headers

- if results.empty?
  %p.no_results Report returned no results.
- else
  %table
    %thead
      %tr
        - results.columns.each do |column|
          %th= column
    %tbody
      - results.each do |row|
        - results.columns.each do |column|
          %td= row[column]


%li.cf
  %a.job.track{ href: job_path(slug: opportunity.team.slug, job_id: opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id }.to_json }
    %h2= opportunity.title
    %h3= opportunity.opportunity_type.capitalize
    %p= opportunity.description
  .team.cf
    .details
      %a.team-name.track{ href: friendly_team_path(opportunity.team), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id}.to_json }
        %h4= opportunity.team.name
      %p.location= (params[:location] != 'Worldwide' && params[:location]) || opportunity.locations.first
      %p.tag-line= opportunity.team.hiring_tagline || opportunity.team.about
    .team-avatar= link_to image_tag(opportunity.team.avatar_url), friendly_team_path(opportunity.team)

Add remote tag in the opportunity partial

%li.cf
  %a.job.track{ href: job_path(slug: opportunity.team.slug, job_id: opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id }.to_json }
    %h2= opportunity.title
    %h3
      = opportunity.opportunity_type
      - if opportunity.remote?
        and remote
    %p= opportunity.description
  .team.cf
    .details
      %a.team-name.track{ href: friendly_team_path(opportunity.team), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id}.to_json }
        %h4= opportunity.team.name
      %p.location= (params[:location] != 'Worldwide' && params[:location]) || opportunity.locations.first
      %p.tag-line= opportunity.team.hiring_tagline || opportunity.team.about
    .team-avatar= link_to image_tag(opportunity.team.avatar_url), friendly_team_path(opportunity.team)


%ul{ style: 'list-style-type: none' }
  - if episode.has_audio?
    %li
      = link_to episode_path(episode, format: 'mp3'), class: 'tiny secondary button' do
        = t :audio, scope: :episodes
  - if episode.has_video?
    %li
      = link_to episode_path(episode, format: 'flv'), class: 'tiny secondary button' do
        = t :video, scope: :episodes
  - if episode.future?
    %li
      = link_to episode.eventbrite_url, class: 'tiny success button', target: '_blank' do
        = t :tickets, scope: :episodes
    %li
      = link_to episode.facebook_url, class: 'tiny button', target: '_blank' do
        = t :share, scope: :episodes

Use refile attachment url helper

%ul{ style: 'list-style-type: none' }
  - if episode.has_audio?
    %li
      = link_to attachment_url(episode, :audio_recording), class: 'tiny secondary button' do
        = t :audio, scope: :episodes
  - if episode.has_video?
    %li
      = link_to attachment_url(episode, :video_recording), class: 'tiny secondary button' do
        = t :video, scope: :episodes
  - if episode.future?
    %li
      = link_to episode.eventbrite_url, class: 'tiny success button', target: '_blank' do
        = t :tickets, scope: :episodes
    %li
      = link_to episode.facebook_url, class: 'tiny button', target: '_blank' do
        = t :share, scope: :episodes


%html
  %head
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    =# stylesheet_link_tag 'mailers/mailer'
    -# Include CSS inline
    %style= File.read(Rails.root.join('app/assets/stylesheets/mailers/mailer.css'))
  %body(leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0")
    %center
      %table(cellpadding="0" cellspacing="0" border="0" width="100%")
        %tbody
          %tr
            %td.header
              = link_to image_tag(asset_path('images/logo.png'), :alt => "Errbit"), root_url

          = yield

          %tr
            %td.footer
              Your loyal servant,
              = link_to 'Errbit', root_url

Fix asset pipeline call in mail

%html
  %head
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    =# stylesheet_link_tag 'mailers/mailer'
    -# Include CSS inline
    %style= File.read(Rails.root.join('app/assets/stylesheets/mailers/mailer.css'))
  %body(leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0")
    %center
      %table(cellpadding="0" cellspacing="0" border="0" width="100%")
        %tbody
          %tr
            %td.header
              = link_to image_tag(URI.join(root_url, ActionController::Base.helpers.asset_path("images/logo.png")).to_s, :alt => "Errbit"), root_url

          = yield

          %tr
            %td.footer
              Your loyal servant,
              = link_to 'Errbit', root_url


#header
  .logo
    %p
      = link_to "Spot.us - Community Funded Reporting", "/", :class => "logo-link", :title => "Spot.us - Community Funded Reporting"
      %strong
        Spot.Us is currently in a testing phase. Site is safe and secure, launching in full soon. Stay tuned!
  .nav-container
    %ul#main-nav
      %li.start_story= link_to "Start a Story", start_story_path
      %li.fund_story= link_to "Fund a Story", news_items_path
      %li.read_story= link_to "Read a Story", news_items_path
      %li.about_spotus= link_to "About", page_path('about')
  .clear

Revert "Desi - adding header thingy"


%h2 User Dashboard

.user-activities
  = render "user_activities"

Implement functionality to require users to sign in before saving an event

%h2 User Dashboard

.sort
  %button.sort{:href => "#"} Name
  %button.sort{:href => "#"} Date
  %button.sort{:href => "#"} Venue

.user-activities
  = render "user_activities"


- action_url ||= "form_field_changed"
- if @edit
  - url = url_for_only_path(:action => action_url, :id => (record.id || "new"))
#edit_email_div
  %h3
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _("Send an E-mail")
      .col-md-8
        = check_box_tag("send_email_cb",
                        "1",
                        @edit[:new][:send_email],
                        "data-miq_observe_checkbox" => {:url => url}.to_json)
    - if @edit[:new][:send_email]
      .form-group
        %label.control-label.col-md-2
          = _("From")
          %br
          = _("(leave blank for default)")
        .col-md-8
          = text_field_tag("from",
                           @edit[:new][:email][:from],
                           :maxlength         => ViewHelper::MAX_DESC_LEN,
                           :class             => "form-control",
                           "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
          = _("(Default: %{email_from})") % {:email_from => ::Settings.smtp.from}
  - if @edit[:new][:send_email]
    = render(:partial => "layouts/edit_to_email", :locals => {:action_url => action_url, :record => record})
  %hr

Add proper title for 'E-Mail after Running' when adding new schedule

- action_url ||= "form_field_changed"
- if @edit
  - url = url_for_only_path(:action => action_url, :id => (record.id || "new"))
#edit_email_div
  %h3
    - if x_active_accord == :schedules
      = _("E-Mail after Running")
    - else
      = _("E-mail")
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _("Send an E-mail")
      .col-md-8
        = check_box_tag("send_email_cb",
                        "1",
                        @edit[:new][:send_email],
                        "data-miq_observe_checkbox" => {:url => url}.to_json)
    - if @edit[:new][:send_email]
      .form-group
        %label.control-label.col-md-2
          = _("From")
          %br
          = _("(leave blank for default)")
        .col-md-8
          = text_field_tag("from",
                           @edit[:new][:email][:from],
                           :maxlength         => ViewHelper::MAX_DESC_LEN,
                           :class             => "form-control",
                           "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
          = _("(Default: %{email_from})") % {:email_from => ::Settings.smtp.from}
  - if @edit[:new][:send_email]
    = render(:partial => "layouts/edit_to_email", :locals => {:action_url => action_url, :record => record})
  %hr


!!!
%html
  %head
    %title= Setting.ctf_name
    = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:400,300'
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #layout
      %a#menuLink.menu-link{href: '#menu'}
      #menu
        .pure-menu.pure-menu-open
          %a.pure-menu-heading= Setting.ctf_name
          %ul
            %li
              %a Rules
            %li
              %a Challenges
            %li
              %a Ranking
          - if admin_signed_in?
            = link_to 'Admin', admin_path, class: 'pure-menu-heading'
      #main
        - [:notice, :alert].each do |klass|
          - if flash[klass].present?
            %div{class: "flash #{klass}"}
              = flash[klass]
        = yield

Add admin menu to main menu.

!!!
%html
  %head
    %title= Setting.ctf_name
    = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:400,300'
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #layout
      %a#menuLink.menu-link{href: '#menu'}
      #menu
        .pure-menu.pure-menu-open
          %a.pure-menu-heading= Setting.ctf_name
          %ul
            %li
              %a Rules
            %li
              %a Challenges
            %li
              %a Ranking
          - if admin_signed_in?
            = link_to 'Admin', admin_path, class: 'pure-menu-heading'
            %ul
              %li= link_to 'Challenges', admin_challenges_path
              %li= link_to 'Players', admin_players_path
              %li= link_to 'Teams', admin_teams_path
      #main
        - [:notice, :alert].each do |klass|
          - if flash[klass].present?
            %div{class: "flash #{klass}"}
              = flash[klass]
        = yield


-# navigation styled for Bootstrap 3.0

- search_query = content_for?(:search_query) ? yield(:search_query) : ''

%nav.navbar.navbar-default.navbar-fixed
  .container
    .navbar-header
      %button.navbar-toggle.float-left{ type: 'button', data: { target: '.navbar-collapse', toggle: 'collapse' } }
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar

      = link_to 'Panlexicon', root_path, class: 'navbar-brand hidden-xs'

    %form.navbar-form.navbar-right{ role: 'search', method: 'GET', action: '/' }
      .form-group
        %label.sr-only{ for: 'search' } Search
        %input#search.form-control{ name: 'q', value: search_query, placeholder: 'Search Panlexicon', type: 'text', autocapitalize: 'off' }
        %button.btn.btn-default.hidden-xs{ type: 'submit' } Search

    .collapse.navbar-collapse.navbar-left
      %p
        .row
          .col-xs-12.visible-xs-block
            Panlexicon is a unique thesaurus that provides a quicker
            and more intuitive process for finding the words you want.

Update autocapitalize attribute on search input for iOS 5.

-# navigation styled for Bootstrap 3.0

- search_query = content_for?(:search_query) ? yield(:search_query) : ''

%nav.navbar.navbar-default.navbar-fixed
  .container
    .navbar-header
      %button.navbar-toggle.float-left{ type: 'button', data: { target: '.navbar-collapse', toggle: 'collapse' } }
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar

      = link_to 'Panlexicon', root_path, class: 'navbar-brand hidden-xs'

    %form.navbar-form.navbar-right{ role: 'search', method: 'GET', action: '/' }
      .form-group
        %label.sr-only{ for: 'search' } Search
        %input#search.form-control{ name: 'q', value: search_query, placeholder: 'Search Panlexicon', type: 'text', autocapitalize: 'none' }
        %button.btn.btn-default.hidden-xs{ type: 'submit' } Search

    .collapse.navbar-collapse.navbar-left
      %p
        .row
          .col-xs-12.visible-xs-block
            Panlexicon is a unique thesaurus that provides a quicker
            and more intuitive process for finding the words you want.


!!!
%html.no-js{lang: 'en'}
  %head
    %meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
    %title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
    %meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    /[if lt IE 9]
      = javascript_include_tag 'ie', 'data-turbolinks-track' => true
    = javascript_include_tag 'head', 'data-turbolinks-track' => true
    = headjs_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    = yield :head
    = render 'layouts/airbrake'
  %body{class: "#{controller_name} #{action_name}"}
    = render 'layouts/navigation'
    .container
      .errors__container
        = render 'layouts/messages'
      = yield
      %footer.page__footer
        - if content_for? :footer
          = yield :footer
        - else
          = render 'layouts/footer'
    = render 'layouts/analytics'
    = render 'layouts/javascripts'

Add prefix to body classes

!!!
%html.no-js{lang: 'en'}
  %head
    %meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
    %title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
    %meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    /[if lt IE 9]
      = javascript_include_tag 'ie', 'data-turbolinks-track' => true
    = javascript_include_tag 'head', 'data-turbolinks-track' => true
    = headjs_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    = yield :head
    = render 'layouts/airbrake'
  %body{class: "controller__#{controller_name} action__#{action_name}"}
    = render 'layouts/navigation'
    .container
      .errors__container
        = render 'layouts/messages'
      = yield
      %footer.page__footer
        - if content_for? :footer
          = yield :footer
        - else
          = render 'layouts/footer'
    = render 'layouts/analytics'
    = render 'layouts/javascripts'


!!! 5
%html{:lang => "en"}

  %head
    %meta{:charset => "utf-8"}
    %title Title
    %link{:href => "http://fonts.googleapis.com/icon?family=Material+Icons", :rel => "stylesheet"}
    = stylesheet_link_tag  "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    %meta{:name => "description", :content => ""}
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
    %link{:href => "/favicon.ico", :rel => "shortcut icon"}

  %body
    .row
      = render "layouts/menu_top"

      #loading-indicator
        .preloader-wrapper.big.active
          .spinner-layer.spinner-blue-only
            .circle-clipper.left
              .circle
            .gap-patch
              .circle
            .circle-clipper.right
              .circle

      .container
        = yield

    %footer
      %span.flash-messages{data: {messages: flash.to_json}}

Add user state to body.

!!! 5
%html{:lang => "en"}

  %head
    %meta{:charset => "utf-8"}
    %title Title
    %link{:href => "http://fonts.googleapis.com/icon?family=Material+Icons", :rel => "stylesheet"}
    = stylesheet_link_tag  "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    %meta{:name => "description", :content => ""}
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
    %link{:href => "/favicon.ico", :rel => "shortcut icon"}

  %body{ class: (current_user ? 'is-loggedin' : 'is-guest') }
    .row
      = render "layouts/menu_top"

      #loading-indicator
        .preloader-wrapper.big.active
          .spinner-layer.spinner-blue-only
            .circle-clipper.left
              .circle
            .gap-patch
              .circle
            .circle-clipper.right
              .circle

      .container
        = yield

    %footer
      %span.flash-messages{data: {messages: flash.to_json}}


!!!
%html{:lang => "en", "ng-csp": "no-unsafe-eval" }
  %head{"data-hook" => "admin_inside_head"}
    = render :partial => 'spree/admin/shared/head'

  %body.admin
    - if content_for?(:main_ng_app_name)
      - if content_for?(:main_ng_ctrl_name)
        %div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe, "ng-controller" => yield(:main_ng_ctrl_name).strip.html_safe }
          = render :partial => 'spree/layouts/admin_body'
      - else
        %div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe }
          = render :partial => 'spree/layouts/admin_body'
    - else
      = render :partial => 'spree/layouts/admin_body'

Add `admin-v2` on admin body if `admin_style_v2` feature toggled on

!!!
%html{:lang => "en", "ng-csp": "no-unsafe-eval" }
  %head{"data-hook" => "admin_inside_head"}
    = render :partial => 'spree/admin/shared/head'

  %body.admin{ "class": ("admin-v2" if feature?(:admin_style_v2, spree_current_user)) }
    - if content_for?(:main_ng_app_name)
      - if content_for?(:main_ng_ctrl_name)
        %div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe, "ng-controller" => yield(:main_ng_ctrl_name).strip.html_safe }
          = render :partial => 'spree/layouts/admin_body'
      - else
        %div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe }
          = render :partial => 'spree/layouts/admin_body'
    - else
      = render :partial => 'spree/layouts/admin_body'


.section
  %h1 Latest Sermon
  %h3= @last_sermon.title
  %small= "#{@last_sermon.speaker} - #{@last_sermon.date_string} - #{@last_sermon.verses}"
  .sermon-audio-container
    = audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
  %hr
  %ul.list-inline
    %li
      =link_to "Direct Link", @last_sermon
    %li
      =link_to "All Sermons", "sermons"

Remove verse ref from homepage sermon summary

.section
  %h1 Latest Sermon
  %h3= @last_sermon.title
  %small= "#{@last_sermon.speaker} - #{@last_sermon.date_string}"
  .sermon-audio-container
    = audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
  %hr
  %ul.list-inline
    %li
      =link_to "Direct Link", @last_sermon
    %li
      =link_to "All Sermons", "sermons"


-if @fta_asset_class.name == "RevenueVehicle"
  %h2 Revenue Vehicles
  = render :partial => 'transit_assets/revenue_vehicle_index_table'
  = render :partial => 'transit_assets/rail_car_index_table'
  = render :partial => 'transit_assets/ferry_index_table'
  = render :partial => 'transit_assets/other_passenger_vehicle_index_table'
-elsif @fta_asset_class.name.in? ["Track", "Guideway", "Power & Signal"]
  %h2 Infrastructure
  = render :partial => 'transit_assets/track_index_table'
  = render :partial => 'transit_assets/guideway_index_table'
  = render :partial => 'transit_assets/power_signal_index_table'
-else
  =@fta_asset_class.name

Use codes and not names to reference FtaAssetClass

-if @fta_asset_class.code.in? ["bus", "rail_car", "ferry", "other_passenger_vehicle"]
  %h2 Revenue Vehicles
  = render :partial => 'transit_assets/revenue_vehicle_index_table'
  = render :partial => 'transit_assets/rail_car_index_table'
  = render :partial => 'transit_assets/ferry_index_table'
  = render :partial => 'transit_assets/other_passenger_vehicle_index_table'
-elsif @fta_asset_class.name.in? ["track", "guideway", "power_signal"]
  %h2 Infrastructure
  = render :partial => 'transit_assets/track_index_table'
  = render :partial => 'transit_assets/guideway_index_table'
  = render :partial => 'transit_assets/power_signal_index_table'
-else
  =@fta_asset_class.name


- selection = question.selections.where(user: current_user).first_or_initialize
= form_for [question, selection], role: 'form' do |f|
  - question.options.each do |option|
    .form-group.input-group
      %span.input-group-addon
        %input.checkbox{type: 'checkbox', name:'selection[option_ids][]', value: option.id, checked: selection.options.where(_id: option).exists?}
      %p.form-control.form-control-static
        = option.name

Add the count of options

- selection = question.selections.where(user: current_user).first_or_initialize
= form_for [question, selection], role: 'form' do |f|
  - question.options.each do |option|
    .form-group.input-group
      %span.input-group-addon
        %input.checkbox{type: 'checkbox', name:'selection[option_ids][]', value: option.id, checked: selection.options.where(_id: option).exists?}
      %p.form-control.form-control-static
        = option.name
      %span.input-group-addon
        %span.badge= question.selections.in(option_ids: option).size


- sub_header('Product Ranges')

= content do
  %table(cellpadding=0 cellspacing=0)
    %thead
      %tr
        %th.boolean Published
        %th Range
        %th Updated At
    %tbody
      - @product_ranges.each do |range|
        %tr
          %td.boolean
            %span.boolean.true
              %span Yes
          %td
            = link_to(range.name, path(range), :class => 'title')
          %td
            %span.time= range.updated_at

= footer do
  = new_button('Range', :product_range)

Add a placeholder for ranges.

- sub_header('Product Ranges')

- if @product_ranges.empty?
  = content do
    %p#placeholder
      There are no ranges yet; add a
      = link_to('new range', path(:new, :product_range))

- else
  = content do
    %table(cellpadding=0 cellspacing=0)
      %thead
        %tr
          %th.boolean Published
          %th Range
          %th Updated At
      %tbody
        - @product_ranges.each do |range|
          %tr
            %td.boolean
              %span.boolean.true
                %span Yes
            %td
              = link_to(range.name, path(range), :class => 'title')
            %td
              %span.time= range.updated_at

  = footer do
    = new_button('Range', :product_range)


%div.grid.grid-1-3
  %div.inner-block

    = link_to summary.person do
      = image_tag summary.person_image.medium, class: 'team-members'
      .person-name= summary.person_name

    %p= summary.role

Use four columns for group members

%div.grid.grid-1-4
  %div.inner-block

    = link_to summary.person do
      = image_tag summary.person_image.medium, class: 'team-members'
      .person-name= summary.person_name

    %p= summary.role


.login-box
  %h3.page-title Sign in
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?

  - if gitlab_config.signup_enabled
    %hr
    %div
      Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)

Add resend-confirmation-link to sign-in page

.login-box
  %h3.page-title Sign in
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?
  %hr

  - if gitlab_config.signup_enabled
    %p
      %span.light
        Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  %p
    %span.light Did not receive confirmation email?
    = link_to "Send again", new_confirmation_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)


- if @conference.nil? || @conference.short_title.nil?
  = link_to "OSEM", root_path, :class => 'brand'
- else
  = link_to @conference.title, root_path, :class => 'brand'
%ul.nav
  - if !@conference.nil? && @conference.registration_open?
    - if current_page?(register_conference_path(@conference.short_title))
      %li.active
        = link_to "Registration", "#"
    - else
      %li
        = link_to "Registration", register_conference_path(@conference.short_title)
  - if !@conference.nil?
    - if current_page?(conference_proposal_index_path(@conference.short_title))
      %li.active
        = link_to "My Proposals", "#"
    - else
      %li
        = link_to "My Proposals", conference_proposal_index_path(@conference.short_title)
%ul.nav.pull-right
  - if user_signed_in?
    %li
      = link_to('Sign Out', destroy_user_session_path, :method=>'delete')
  - else
    %li
      = link_to('Sign In', new_user_session_path)
  - if user_signed_in?
    %li
      = link_to('Edit account', edit_user_registration_path)

Add a link to the admin area if the logged-in user has the correct role

- if @conference.nil? || @conference.short_title.nil?
  = link_to "OSEM", root_path, :class => 'brand'
- else
  = link_to @conference.title, root_path, :class => 'brand'
%ul.nav
  - if !@conference.nil? && @conference.registration_open?
    - if current_page?(register_conference_path(@conference.short_title))
      %li.active
        = link_to "Registration", "#"
    - else
      %li
        = link_to "Registration", register_conference_path(@conference.short_title)
  - if !@conference.nil?
    - if current_page?(conference_proposal_index_path(@conference.short_title))
      %li.active
        = link_to "My Proposals", "#"
    - else
      %li
        = link_to "My Proposals", conference_proposal_index_path(@conference.short_title)
%ul.nav.pull-right
  - if user_signed_in?
    - if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
      %li
        = link_to "Admin Area", admin_conference_index_path
    %li
      = link_to('Sign Out', destroy_user_session_path, :method=>'delete')
  - else
    %li
      = link_to('Sign In', new_user_session_path)
  - if user_signed_in?
    %li
      = link_to('Edit account', edit_user_registration_path)


-# navigation styled for Bootstrap 3.0
%nav.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to 'Home', root_path, class: 'navbar-brand'
    .collapse.navbar-collapse
      %ul.nav.navbar-nav
        = render 'layouts/navigation_links'

Make nevbar to not be sticky

-# navigation styled for Bootstrap 3.0
%nav.navbar.navbar-default
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to 'Home', root_path, class: 'navbar-brand'
    .collapse.navbar-collapse
      %ul.nav.navbar-nav
        = render 'layouts/navigation_links'


!!!
%html
  %head
    %meta{:charset => 'UTF8'}
    %meta{:content => "text/html", "http-equiv" => "Content-Type"}/
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
    = render '/layouts/og_image'
    = favicon_link_tag "favicon.png"
    %title
      U.S. Go Congress
      = @year.year
      - unless controller_name == "home" and action_name == "index"
        = "- #{page_title}"

    = csrf_meta_tag
    = javascript_include_tag :application
    = stylesheet_link_tag asset_exists?("#{@year.year}/application") ? "#{@year.year}/application" : :application
    = stylesheet_link_tag '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/ui-lightness/jquery-ui.css'
    - if Rails.env.production?
      = render 'shared/google_analytics'

  %body{:class => "#{@bodyClassList} year#{@year.year}"}
    .body-container
      = render "#{@year.year}/layouts/header" rescue render '/layouts/header'
      = render "#{@year.year}/layouts/nav" rescue render '/layouts/nav'
      .content
        - if flash[:notice]
          .flash.flash-notice= notice
        - if flash[:alert]
          .flash.flash-alert= alert
        = yield
        .clear
      = yield :before_footer
      = render "#{@year.year}/layouts/footer" rescue render '/layouts/footer'

Change method of rendering year-specific stylesheets

!!!
%html
  %head
    %meta{:charset => 'UTF8'}
    %meta{:content => "text/html", "http-equiv" => "Content-Type"}/
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
    = render '/layouts/og_image'
    = favicon_link_tag "favicon.png"
    %title
      U.S. Go Congress
      = @year.year
      - unless controller_name == "home" and action_name == "index"
        = "- #{page_title}"

    = csrf_meta_tag
    = javascript_include_tag :application
    = stylesheet_link_tag "#{@year.year}/application" rescue stylesheet_link_tag :application
    = stylesheet_link_tag '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/ui-lightness/jquery-ui.css'
    - if Rails.env.production?
      = render 'shared/google_analytics'

  %body{:class => "#{@bodyClassList} year#{@year.year}"}
    .body-container
      = render "#{@year.year}/layouts/header" rescue render '/layouts/header'
      = render "#{@year.year}/layouts/nav" rescue render '/layouts/nav'
      .content
        - if flash[:notice]
          .flash.flash-notice= notice
        - if flash[:alert]
          .flash.flash-alert= alert
        = yield
        .clear
      = yield :before_footer
      = render "#{@year.year}/layouts/footer" rescue render '/layouts/footer'


!!! 5

%html
  %head
    %title CronChecker
    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    = csrf_meta_tags

  %body
    = render "shared/header"
    = render "shared/flash"
    = yield
    = render "shared/footer"

Add Google webmaster verification code

!!! 5

%html
  %head
    %title CronChecker
    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    = csrf_meta_tags
    %meta{name: "google-site-verification", content: "XsTtBFfW_5jcRrEfNL0lHtPU-_qaLzqRvfRrYklrFYw"}

  %body
    = render "shared/header"
    = render "shared/flash"
    = yield
    = render "shared/footer"


!!! Strict
%html{ html_attrs("en_us") }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }/
    %link{ :rel => "icon", :href => "/images/favicon.png", :type => "image/png" }/

    = stylesheet_link_tag "screen",                            :media => :screen
    = stylesheet_link_tag "/thickbox/thickbox",                :media => :screen
    = stylesheet_link_tag "/jquery-ui/jquery-ui-1.7.1.custom", :media => :screen

    = stylesheet_link_tag "print",  :media => :print

    = javascript_include_tag "jquery-1.4.3.min.js"
    = javascript_include_tag "jquery-ui-1.7.1.custom.min.js"
    = javascript_include_tag "jquery.form-2.18.js"
    = javascript_include_tag "thickbox-compressed.js"

    = yield :head

  %body{:id=> yield(:page_id) || 'body'}
    = yield

    %p.footer
      Powered by:
      %a{ :href => "http://wiki.tils.net/"}
        %strong tilswiki

Fix for version slider in jquery ui after moving it away

!!! Strict
%html{ html_attrs("en_us") }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }/
    %link{ :rel => "icon", :href => "/images/favicon.png", :type => "image/png" }/

    = stylesheet_link_tag "screen",                            :media => :screen
    = stylesheet_link_tag "/thickbox/thickbox",                :media => :screen
    = stylesheet_link_tag "/jquery-ui/jquery-ui-1.7.1.custom.css", :media => :screen

    = stylesheet_link_tag "print",  :media => :print

    = javascript_include_tag "jquery-1.4.3.min.js"
    = javascript_include_tag "jquery-ui-1.7.1.custom.min.js"
    = javascript_include_tag "jquery.form-2.18.js"
    = javascript_include_tag "thickbox-compressed.js"

    = yield :head

  %body{:id=> yield(:page_id) || 'body'}
    = yield

    %p.footer
      Powered by:
      %a{ :href => "http://wiki.tils.net/"}
        %strong tilswiki


%h2 Sign in

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

  %div
    = f.label :password
    %br
    = f.password_field :password, autocomplete: "off"

  - if devise_mapping.rememberable?
    %div
      = f.check_box :remember_me
      = f.label :remember_me

  %div= f.submit "Sign in"

= render "devise/shared/links"

Use copy and design from PHP

- content_for :title, 'Login to Public Whip'

%h1= yield :title

%p Enter your user name and password and we'll set a cookie so we know you're logged in.
%p
  Not got a login? #{link_to 'Register a new account', new_registration_path(resource_name) }.
  %br
  Lost your password? #{link_to 'Reset your password here', new_password_path(resource_name)}

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

  %div
    %b= f.label :password
    %br
    = f.password_field :password, autocomplete: "off"

  - if devise_mapping.rememberable?
    %div
      = f.check_box :remember_me
      = f.label :remember_me

  %div= f.submit "Login to Public Whip"


= render :partial => 'shared/views/ems_common/form'

Edit form for Middleware Provider

= form_for(@ems,
           :url    => ems_middleware_path(@ems),
           :method => :patch,
           :html   => {"ng-controller"   => "emsCommonFormController",
                       "name"            => "angularForm",
                       "ng-show"         => "afterGet",
                       "update-url"      => "#{ems_middleware_path(@ems)}",
                       "form-fields-url" => "/#{controller_name}/ems_middleware_form_fields/",
                       "novalidate"      => true}) do |f|
  %input{:type => 'hidden', :id => "form_id", :value => "##{f.options[:html][:id]}"}
  %input{:type => 'hidden', :id => "button_name", :name => "button", :value => "save"}
  %input{:type => 'hidden', :id => "cred_type", :name => "cred_type", :value => "default"}
  = render :partial => "form"

:javascript
  ManageIQ.angular.app.value('emsCommonFormId', '#{@ems.id || "new"}');
  miq_bootstrap($('#form_id').val());


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

Add class for host styling

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


%p#notice= notice
%h2 Désabonnement aux listes de diffusions

=form_tag(unsubscribe_token_path(@token.token), method: "post") do
  -if @has_account
    .row
      .l6.s12.col
        .info-block
          %b
            %i.zmdi.zmdi-info.icon-padding-list
            Vous pouvez gérer vos abonnement désabonnement directement depuis votre compte !
          %p Pour celà, il vous suffit de et de vous rendre dans l'onglet "#{link_to "Listes de diffusion", mailinglists_path}"

  .row
    .l6.s12.col
      .card
        .card-content
          %p
            Selectionnez les listes desquelles vous souhaitez vous désinscrire :
          %p
            =link_to "Tout cocher","#", class:'waves-effect waves-teal white blue-grey-text'
            =link_to "Tout décocher","#", class:'waves-effect waves-teal white blue-grey-text'
          #mailinglists
            -@mls.each do |ml|
              .input-field
                =check_box_tag "unsubscribe[#{ml.name}]"
                =label_tag "unsubscribe[#{ml.name}]", ml.name
        .card-action
          =submit_tag("Me désinscrire", class:'waves-effect waves-teal btn')

Add JS to select/unselect buttons

%p#notice= notice
%h2 Désabonnement aux listes de diffusions

=form_tag(unsubscribe_token_path(@token.token), method: "post") do
  -if @has_account
    .row
      .l6.s12.col
        .info-block
          %b
            %i.zmdi.zmdi-info.icon-padding-list
            Vous pouvez gérer vos abonnement désabonnement directement depuis votre compte !
          %p Pour celà, il vous suffit de et de vous rendre dans l'onglet "#{link_to "Listes de diffusion", mailinglists_path}"

  .row
    .l6.s12.col
      .card
        .card-content
          %p
            Selectionnez les listes desquelles vous souhaitez vous désinscrire :
          %p
            =link_to "Tout cocher","#", class:'waves-effect waves-teal white blue-grey-text', id: 'select-all'
            =link_to "Tout décocher","#", class:'waves-effect waves-teal white blue-grey-text', id: 'unselect-all'
          #mailinglists
            -@mls.each do |ml|
              .input-field
                =check_box_tag "unsubscribe[#{ml.name}]"
                =label_tag "unsubscribe[#{ml.name}]", ml.name
        .card-action
          =submit_tag("Me désinscrire", class:'waves-effect waves-teal btn')

:javascript
  $(document).ready(function() {
    $('#select-all').on('click',function(){
      $("input[id^='unsubscribe']").prop("checked",true)
    });
    $('#unselect-all').on('click',function(){
      $("input[id^='unsubscribe']").prop("checked",false)
    });
  });


---
priority: 0.3
layout: blog
---

- content_for(:title, "#{tagname.capitalize} : tous les articles")
- content_for(:description, "Liste des articles du blog contenant le mot-clef #{tagname.capitalize}")

%h2 Articles en rapport avec #{tagname.capitalize}

%ul.posts-listing
  - page_articles.each do |article|
    %li= link_to article.title, article.url

%h3 Autres tags

%ul.tags{style: "text-align: left; padding-top: 1em;"}
  %li
    %i.icon-tags
  - blog.tags.each do |tag, articles|
    %li= link_to tag.capitalize, tag_path(tag)

Remove current tag from list of all tags on tags pages

---
priority: 0.3
layout: blog
---

- content_for(:title, "#{tagname.capitalize} : tous les articles")
- content_for(:description, "Liste des articles du blog contenant le mot-clef #{tagname.capitalize}")

%h2 Articles en rapport avec #{tagname.capitalize}

%ul.posts-listing
  - page_articles.each do |article|
    %li= link_to article.title, article.url

%h3 Autres tags

%ul.tags{style: "text-align: left; padding-top: 1em;"}
  %li
    %i.icon-tags
  - blog.tags.each do |tag, articles|
    - if tag != tagname
      %li= link_to tag.capitalize, tag_path(tag)


.row
  .col-md-12{:style => 'height:200px;overflow-y:auto;'}
    - 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'

Fix documents partial so it does not overflow

.row
  .col-md-12{:style => 'height:180px;overflow-y:auto;'}
    - 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, :placeholder => 'Enter a brief description of the document...'
        = f.submit "Add document to project", :class => 'btn btn-primary'


- provide(:title, @song.title)
- provide(:description, @song.comment.presence || "京大アンプラグドの #{@song.live_title} で演奏された曲")
- provide(:og_type, 'music.song')
- provide(:og_image, @song.youtube_thumbnail('maxresdefault')) if @song.watchable?(current_user)
- content_for :additional_meta_fields do
  - @song.playings.each do |playing|
    %meta{ property: 'music:musician', content: user_url(playing.user) }
= render @song
- if @song.watchable?(current_user)
  :javascript
    $('.song-thumbnail a').click();

Improve the description of song

- provide(:title, @song.title)
- provide(:description, strip_tags(@song.comment.presence) || "京大アンプラグドで #{@song.live_title} に演奏された曲")
- provide(:og_type, 'music.song')
- provide(:og_image, @song.youtube_thumbnail('maxresdefault')) if @song.watchable?(current_user)
- content_for :additional_meta_fields do
  - @song.playings.each do |playing|
    %meta{ property: 'music:musician', content: user_url(playing.user) }
= render @song
- if @song.watchable?(current_user)
  :javascript
    $('.song-thumbnail a').click();


- page_title 'Badges'

.prepend-top-10
  .panel.panel-default
    .panel-heading
      %b Builds badge ·
      = @badge.to_html
    .panel-body
      .row
        .col-md-2.text-center
          Markdown
        .col-md-10.code.js-syntax-highlight
          = highlight('.md', @badge.to_markdown)
      .row
        %hr
      .row
        .col-md-2.text-center
          HTML
        .col-md-10.code.js-syntax-highlight
          = highlight('.html', @badge.to_html)

Add project header title in project badges view

- page_title 'Badges'
- badges_path = namespace_project_badges_path(@project.namespace, @project)
- header_title project_title(@project, 'Badges', badges_path)

.prepend-top-10
  .panel.panel-default
    .panel-heading
      %b Builds badge ·
      = @badge.to_html
    .panel-body
      .row
        .col-md-2.text-center
          Markdown
        .col-md-10.code.js-syntax-highlight
          = highlight('.md', @badge.to_markdown)
      .row
        %hr
      .row
        .col-md-2.text-center
          HTML
        .col-md-10.code.js-syntax-highlight
          = highlight('.html', @badge.to_html)


%tr[credit_invoice]
  %td= credit_invoice.value_date
  %td= link_to credit_invoice, credit_invoice, {'data-href-container' => 'tr'}
  %td= link_to credit_invoice.company, credit_invoice.company
  %td= credit_invoice.due_date
  %td.currency= currency_fmt(credit_invoice.amount)
  %td.currency= currency_fmt(credit_invoice.balance)
  %td.action-links
    = list_link_for(:edit, credit_invoice)

Add copy link to credit_invoice list.

%tr[credit_invoice]
  %td= credit_invoice.value_date
  %td= link_to credit_invoice, credit_invoice, {'data-href-container' => 'tr'}
  %td= link_to credit_invoice.company, credit_invoice.company
  %td= credit_invoice.due_date
  %td.currency= currency_fmt(credit_invoice.amount)
  %td.currency= currency_fmt(credit_invoice.balance)
  %td.action-links
    = list_link_for(:edit, credit_invoice)
    = list_link_for(:copy, credit_invoice)


= simple_form_for @booking_template do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :code
  .row-fluid
    .span6
      = f.association :debit_account, :as => :combobox, :collection => accounts_as_collection, :input_html => {:class => 'span6'}
    .span6
      = f.association :credit_account, :as => :combobox, :collection => accounts_as_collection, :input_html => {:class => 'span6'}
  .row-fluid
    .span6
      = f.input :amount
    .span6
      = f.input :amount_relates_to, :collection => amount_relations_as_collection
  .row-fluid
    .span12
      = f.input :tag_list, :input_html => {:class => 'select2-tags'}

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

  .form-actions
    = f.button :submit

Fix width of tag_list input in booking template form.

= simple_form_for @booking_template do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :code
  .row-fluid
    .span6
      = f.association :debit_account, :as => :combobox, :collection => accounts_as_collection, :input_html => {:class => 'span6'}
    .span6
      = f.association :credit_account, :as => :combobox, :collection => accounts_as_collection, :input_html => {:class => 'span6'}
  .row-fluid
    .span6
      = f.input :amount
    .span6
      = f.input :amount_relates_to, :collection => amount_relations_as_collection
  .row-fluid
    .span12
      = f.input :tag_list, :input_html => {:class => ['select2-tags', 'span12']}

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

  .form-actions
    = f.button :submit


= f.inputs t('title.line_items') do
  %table#line_items{'data-direct-account-id' => resource.direct_account.id}.nested-form-container
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody.sortable
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount

Add nested-form-container class in line_items/list_form.

= f.inputs t('title.line_items') do
  %table#line_items.nested-form-container{'data-direct-account-id' => resource.direct_account.id}
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody.sortable
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount


%a{href: user_path(user)}
  %li
    =image_tag Gravatar.new(user.email).image_url(:size => 40), class: "avatar"
    %span= format_user_name(user)

Use link helper instead of raw a tag

= link_to user_path(user) do
  %li
    =image_tag Gravatar.new(user.email).image_url(:size => 40), class: "avatar"
    %span= format_user_name(user)


.dashboard

  - if current_organisation
    .title
      %h1 #{current_organisation.name}'s Dashboard
    = render "dashboard/tabs", active: "Activities"

  .title
    %h2 Add/Join an Activity

  = simple_form_for @project do |f|
    = render 'error_messages', object: f.object
    = render "projects/fields/basic", f: f
    = render "projects/fields/advanced", f: f

    .wizard-button-wrapper
      = f.button :submit, 'Create activity'.html_safe, class: 'button-green'

Add notes about activity criteria to the standalone 'new activity form'

.dashboard

  - if current_organisation
    .title
      %h1 #{current_organisation.name}'s Dashboard
    = render "dashboard/tabs", active: "Activities"

  .title
    %h2 Add/Join an Activity

  .wizard-intro
    :markdown

      Please remember we are only interested in activities that are based in the EU and which cover all of the following features:

      * Focus on grass-roots or "bottom-up" communities of users
      * Use online/digital tools or methods in a disruptive way
      * Make a positive social impact
      * Create a "network effect" through collaboration online

  = simple_form_for @project do |f|
    = render 'error_messages', object: f.object
    = render "projects/fields/basic", f: f
    = render "projects/fields/advanced", f: f

    .wizard-button-wrapper
      = f.button :submit, 'Create activity'.html_safe, class: 'button-green'


.banner.banner-metrics
  .container
    %h3 This week at morph.io
    - cache 'vanity_stats', :expires_in => 1.hour do
      -# Commented out until collection of web pages stats is working again
      -# .metric-box.col-sm-4
      -#   %strong= number_with_delimiter(Morph::VanityStats.total_pages_scraped_in_last_week)
      -#   web pages scraped
      .metric-box.col-sm-6
        %strong= number_with_delimiter(Morph::VanityStats.total_database_rows_updated_in_last_week)
        rows of data collected
      .metric-box.col-sm-6
        %strong= number_with_delimiter(Morph::VanityStats.total_api_queries_in_last_week)
        downloads & API queries

Revert "Comment out statistic on web pages scraped on landing page because it's currently broken"

.banner.banner-metrics
  .container
    %h3 This week at morph.io
    - cache 'vanity_stats', :expires_in => 1.hour do
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_pages_scraped_in_last_week)
        web pages scraped
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_database_rows_updated_in_last_week)
        rows of data collected
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_api_queries_in_last_week)
        downloads & API queries


%head
  %meta{ :charset => 'utf-8' }

  -# Use the .htaccess and remove these lines to avoid edge case issues.
  -# More info: h5bp.com/b/378
  %meta{ 'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1' }

  -# Mobile viewport optimized: h5bp.com/viewport
  %meta{ :name => 'viewport', :content => 'width=device-width' }

  = display_meta_tags

  = csrf_meta_tag

  -# Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons

  = render 'stylesheets'

  -# More ideas for your <head> here: h5bp.com/d/head-Tips

  -# All JavaScript at the bottom, except polyfills
  -# Rails Helpers are not HTML5!!!
  = javascript_include_tag 'polyfills'

Add meta tag to prevent large font-size on small devices in landscape mode

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

  %meta{ 'http-equiv' => 'X-UA-Compatible', content: 'IE=edge,chrome=1' }

  %meta{ name: 'viewport', content: 'width=device-width' }
  %meta{ name: 'viewport', content: 'width=device-width', :'initial-scale' => '1.0', :'maximum-scale' => '1.0' }

  = display_meta_tags

  = csrf_meta_tag

  = render 'stylesheets'

  = javascript_include_tag 'polyfills'


%div{ class:"sidebar #{controller.controller_name}" }
  %span#sidebar-toggle
    %i.fa.fa-navicon
  .pusher
    #logo-cta
      %a{ href: "/" }
        / = image_tag 'brickhack.png', id: "logo", alt: "BrickHack", title: "BrickHack"
    - if user_signed_in?
      %div
        - if current_user.admin?
          = btn_link_to "Manage", manage_root_path
        - else
          = btn_link_to "Review", new_questionnaires_path
    - else
      %div
        = btn_link_to "Login", new_user_session_path
      %div
        = btn_link_to "Register", new_user_registration_path
    %nav
      %ul.nav-list
        %li
          %a.nav-link{ href:"/#home" } HOME
        %li
          %a.nav-link{ href:"/#about" } ABOUT
        %li
          %a.nav-link{ href:"/#faq" } FAQ
        %li
          %a.nav-link{ href:"/#schedule" } SCHEDULE
        %li
          %a.nav-link{ href:"/#sponsors" } SPONSORS
      .social-list
        %a.sm-link{ href:"https://www.facebook.com/brickhackrit", target: '_blank' }
          %span.fa.fa-facebook
        %a.sm-link{ href:"https://twitter.com/brickhackrit", target: '_blank' }
          %span.fa.fa-twitter
    - if user_signed_in?
      %div
        = btn_link_to "Sign Out", destroy_user_session_path, method: :delete
  %footer.footer
    Student run by
    %a.coderit-logo{ href:"http://coderit.org", target:'_blank' } CodeRIT

Remove non-standard links from sidebar

%div{ class:"sidebar #{controller.controller_name}" }
  %span#sidebar-toggle
    %i.fa.fa-navicon
  .pusher
    #logo-cta
      %a{ href: "/" }
        / = image_tag 'brickhack.png', id: "logo", alt: "BrickHack", title: "BrickHack"
    - if user_signed_in?
      %div
        - if current_user.admin?
          = btn_link_to "Manage", manage_root_path
        - else
          = btn_link_to "Review", new_questionnaires_path
    - else
      %div
        = btn_link_to "Login", new_user_session_path
      %div
        = btn_link_to "Register", new_user_registration_path
    - if user_signed_in?
      %div
        = btn_link_to "Sign Out", destroy_user_session_path, method: :delete


!!! 5

%html
  %head
    %title= content_for?(:title) ? yield(:title) : 'IMGSHR'

    %meta{charset: 'utf-8'}
    %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}

    = stylesheet_link_tag 'application', media: :all, data: { turbolinks_track: true, turbolinks_eval: false }
    = csrf_meta_tag

    = javascript_include_tag 'application', data_turbolinks_track: true

    = yield :auto_discovery

  %body{class: controller_class}
    - if Rails.env.development?
      .debug_params
        %pre= params

    .container
      %header.page-header
        = render 'shared/menu'
        %h1.text-muted= brand

      .row.flash-messages
        = render partial: 'shared/flash_messages'

      .row
        = yield

      = render partial: 'shared/footer'

    #modal_container

Enable SRI (for sprockets assets)

!!! 5

%html
  %head
    %title= content_for?(:title) ? yield(:title) : 'IMGSHR'

    %meta{charset: 'utf-8'}
    %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}

    = stylesheet_link_tag 'application',
      media: :all,
      data: { turbolinks_track: true, turbolinks_eval: false },
      integrity: true

    = csrf_meta_tag

    = javascript_include_tag 'application',
      data_turbolinks_track: true,
      integrity: true

    = yield :auto_discovery

  %body{class: controller_class}
    - if Rails.env.development?
      .debug_params
        %pre= params

    .container
      %header.page-header
        = render 'shared/menu'
        %h1.text-muted= brand

      .row.flash-messages
        = render partial: 'shared/flash_messages'

      .row
        = yield

      = render partial: 'shared/footer'

    #modal_container


%html
  %head
    %meta{ :charset => "utf-8" }/
    %meta{ 'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1' }/
    %meta{ :name => "viewport", :content => "width=device-width" }/
    %title #RubyFriends - Smile for the camera!
    = stylesheet_link_tag 'application'
    = csrf_meta_tag
    -# TODO - add google analytics
  %body
    #wrapper
      = render 'header'
      %section#main{role: 'main'}
        = yield
      =# render 'footer'
    = javascript_include_tag 'application'
    = yield :javascripts
    = render 'shared/ga'

Add meta tag for Atom feed

%html
  %head
    %meta{ :charset => "utf-8" }/
    %meta{ 'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1' }/
    %meta{ :name => "viewport", :content => "width=device-width" }/
    = auto_discovery_link_tag :atom, tweets_url(format: :atom), title: "#RubyFriends"
    %title #RubyFriends - Smile for the camera!
    = stylesheet_link_tag 'application'
    = csrf_meta_tag
    -# TODO - add google analytics
  %body
    #wrapper
      = render 'header'
      %section#main{role: 'main'}
        = yield
      =# render 'footer'
    = javascript_include_tag 'application'
    = yield :javascripts
    = render 'shared/ga'


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

Simplify meta description to "human services and other organizations"

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


%section.document-list
  %h3.document-list__heading.lmo-card-heading{translate: "document.list.title"}
  %p.lmo-hint-text.md-caption{ng-if: "!model.hasDocuments()", translate: "document.list.no_{{model.constructor.singular}}_documents"}
  .document-list__documents.md-block.lmo-flex{layout: "column"}
    .document-list__document.lmo-flex.lmo-flex__center{layout: "row", ng-repeat: "document in model.documents() track by document.id", layout: "row"}
      %i.mdi.lmo-margin-right{class: "mdi-{{document.icon}}", ng-style: "{color: document.color}"}>
      %a.lmo-pointer.lmo-relative.lmo-truncate.lmo-flex{href: "{{document.url}}", target: "_blank"}
        .document-list__title.lmo-truncate.lmo-flex__grow {{ document.title }}
          %md-tooltip{md-delay: "750", ng-if: "document.isAnImage()"}
            %img.document-list__tooltip{ng-src: "{{document.url}}", alt: "{{document.title}}"}
            .lmo-hidden .
      %md-button.md-button--tiny{ng-click: "edit(document)", ng-if: "canEditDocuments()"}
        %i.mdi.mdi-pencil

Add image previews for documents

%section.document-list
  %h3.document-list__heading.lmo-card-heading{translate: "document.list.title"}
  %p.lmo-hint-text.md-caption{ng-if: "!model.hasDocuments()", translate: "document.list.no_{{model.constructor.singular}}_documents"}
  .document-list__documents.md-block.lmo-flex{layout: "column"}
    .document-list__document.lmo-flex{layout: "column", ng-repeat: "document in model.documents() track by document.id"}
      .document-list__entry.lmo-flex.lmo-flex__center{layout: "row"}
        %i.mdi.lmo-margin-right{class: "mdi-{{document.icon}}", ng-style: "{color: document.color}"}>
        %a.lmo-pointer.lmo-relative.lmo-truncate.lmo-flex{href: "{{document.url}}", target: "_blank"}
          .document-list__title.lmo-truncate.lmo-flex__grow {{ document.title }}
        %md-button.md-button--tiny{ng-click: "edit(document)", ng-if: "canEditDocuments()"}
          %i.mdi.mdi-pencil
      %img.document-list__tooltip{ng-if: "document.isAnImage()", ng-src: "{{document.url}}", alt: "{{document.title}}"}