!!! 5
%html{:lang => "en"}
  %head
    %title Fishnet
    %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
    %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")
    %meta(name="description" content="Grid system based on the semantic.gs")
    %meta(name="author" content="Matthew Kitt")
    %meta(name="imagetoolbar" content="no")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %meta(name="apple-touch-fullscreen" content="YES")
    %meta(name="apple-mobile-web-app-capable" content="YES")
    %meta(name="apple-mobile-web-app-status-bar-style" content="black")

    %link(href="/assets/application.css" rel="stylesheet" type="text/css")

  %body(role="document")
    %section.page-info.fixed
      %span#page_dimensions Dimensions

    %section.container(role="main" aria-live="polite" aria-atomic="true")
      = yield

    %script(src="/assets/prettify.js" type="text/javascript" charset="utf-8")
    %script(src="/assets/application.js" type="text/javascript" charset="utf-8")

Add html5 shim for IE

!!! 5
%html{:lang => "en"}
  %head
    %title Fishnet
    %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
    %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")
    %meta(name="description" content="Grid system based on the semantic.gs")
    %meta(name="author" content="Matthew Kitt")
    %meta(name="imagetoolbar" content="no")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %meta(name="apple-touch-fullscreen" content="YES")
    %meta(name="apple-mobile-web-app-capable" content="YES")
    %meta(name="apple-mobile-web-app-status-bar-style" content="black")

    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    %link(href="/assets/application.css" rel="stylesheet" type="text/css")

  %body(role="document")
    %section.page-info.fixed
      %span#page_dimensions Dimensions

    %section.container(role="main" aria-live="polite" aria-atomic="true")
      = yield

    %script(src="/assets/prettify.js" type="text/javascript" charset="utf-8")
    %script(src="/assets/application.js" type="text/javascript" charset="utf-8")


- content_for :header do
  = render 'layouts/header-static'

#contactform.row
  %h2.twelve.columns Kontakt
  = render 'form'

  .four.columns
    %p
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.
      Lorem Ipsum dolor sit amet.

    %p
      Amet dolor sit Amet.

    %p
      Ernte teilen

c/o Simon Jockers

    %p
      Ueckermünder Str. 6

10439 Berlin

Add some basic content to the messages view.

- content_for :header do
  = render 'layouts/header-static'

#contactform.row
  %h2.twelve.columns Kontakt
  = render 'form'

  .four.columns

    %p
      Falls du Fragen und Feedback zu
      %em Ernte teilen
      hast, kannst du über dieses Formular Kontakt mit uns aufnehmen.

    %p
      %em Ernte teilen
      befindet sich momentan in einer frühen Testphase. Einige Funktionen und Inhalte stehen noch nicht zur Verfügung.

    %p
      %strong Ernte teilen

c/o Simon Jockers

    %p
      Ueckermünder Str. 6

10439 Berlin


.row
  .columns.large-7
    %h3
      Searching for:
      %q #{params[:q]}
    (Pro-tip: Use * to tell Sphinx to use wildcards so you can search partial strings instead of whole words)
.row
  .columns.large-10
    = render :partial => 'results', :collection => @results
.row
  .columns.large-8
  .columns.large-4
    = will_paginate @results

Adjust look of search tip

.row
  .columns.large-7
    %h3
      Searching for:
      %q #{params[:q]}
    %p (Pro-tip: Use <strong>*</strong> to tell Sphinx to use wildcards so you can search partial strings instead of whole words)
.row
  .columns.large-10
    = render :partial => 'results', :collection => @results
.row
  .columns.large-8
  .columns.large-4
    = will_paginate @results


-content_for :widget_title do
  %i.grcicon-program
  Programs using #{directive.meta_kind.to_s.titleize}
  %span=directive.programs.count

-content_for :widget_help, 'directive_programs'

-content_for :widget_id, 'directive_programs_widget'

%ul.tree-structure.simple
  -directive.programs.each do |program|
    %li.item-main
      %a{:href => flow_program_path(program)}
        .item-title
          .row-fluid
            .span12
              %span.title
                =program.title

Add tooltip to 'Programs using this directive' widget

-content_for :widget_title do
  %i.grcicon-program
  Programs using #{directive.meta_kind.to_s.titleize}
  %span=directive.programs.count

-content_for :widget_help, 'directive_programs'

-content_for :widget_id, 'directive_programs_widget'

%ul.tree-structure.simple
  -directive.programs.each do |program|
    %li.item-main
      %a{:href => flow_program_path(program), :data => { :'popover-href' => tooltip_flow_program_path(program), :'popover-trigger' => 'sticky-hover'}, :style => "display:block;" }
        .item-title
          .row-fluid
            .span12
              %span.title
                =program.title


#header
  #welcome
    - if current_user
      #{t :welcome},
      -# This span gets updated on the fly if user changes her name.
      %span#welcome_username= current_user.name
      %span> !

      = link_to(t(:quick_find), "#", :id => "jumper") << " |"
      = link_to(t(:profile), profile_path) << " |"
      - if current_user.admin?
        = link_to(t(:admin), admin_path) << " |"
      = link_to(t(:logout), logout_path, :method => :delete)
      = render "/layouts/jumpbox"
    - else
      = link_to(t(:login), login_path) << " |"
      = link_to(t(:sign_up), signup_path) << " |" if can_signup?
      = link_to(t(:about), "#", :title => t(:about_ffc), :onclick => "$('#about').dialog({ title: this.title, modal: true }); return false;")
  %h3
    = link_to("Strongarm Tech CRM", root_path)

Change header text per Todd

#header
  #welcome
    - if current_user
      #{t :welcome},
      -# This span gets updated on the fly if user changes her name.
      %span#welcome_username= current_user.name
      %span> !

      = link_to(t(:quick_find), "#", :id => "jumper") << " |"
      = link_to(t(:profile), profile_path) << " |"
      - if current_user.admin?
        = link_to(t(:admin), admin_path) << " |"
      = link_to(t(:logout), logout_path, :method => :delete)
      = render "/layouts/jumpbox"
    - else
      = link_to(t(:login), login_path) << " |"
      = link_to(t(:sign_up), signup_path) << " |" if can_signup?
      = link_to(t(:about), "#", :title => t(:about_ffc), :onclick => "$('#about').dialog({ title: this.title, modal: true }); return false;")
  %h3
    = link_to("StrongArm-CRM", root_path)


= form.inputs :name => record.class.human_attribute_name(field) do
  - if image_url = record.send("#{field}_import_url") || (record.send(field).file? && record.send(field).url(:medium))
    %li
      = image_tag image_url, :size => '220'

  = form.input "#{field}_import_url".to_sym, :label => "Import a #{record.class.human_attribute_name(field)} from a URL…"
  = form.input "#{field}".to_sym, :label => "…or upload one from your computer.", :hint => "Preferably 220px wide or larger"

Fix image import form partial to only display imported image if it exists.

-# Display the form fields for adding or importing a photo, and display a photo if associated.
-#
-# ARGUMENTS:
-# * form: The Rails HTML form instance.
-# * record: The ActiveRecord model instance.
-# * field: The String or Symbol name of the field containing the image, e.g. :logo.
= form.inputs :name => record.class.human_attribute_name(field) do
  - if image_url = record.send("#{field}_import_url").presence || (record.send(field).file? && record.send(field).url(:medium))
    %li
      = image_tag image_url, :size => '220'

  = form.input "#{field}_import_url".to_sym, :label => "Import a #{record.class.human_attribute_name(field)} from a URL…"
  = form.input "#{field}".to_sym, :label => "…or upload one from your computer.", :hint => "Preferably 220px wide or larger"


.navbar-static-top.footer
  .container
    .row
      .span2
        © Code.org, 2013
        %br/
        = form_tag(locale_url, method: :post, id: 'localeForm') do
          = hidden_field_tag :return_to, request.url
          = select_tag :locale, options_for_select(options_for_locale_select, locale), onchange: 'switchLocale();'
      .span10
        = link_to t('footer.feedback'), 'http://codeorg.uservoice.com/forums/228116-code-org-tutorials'
        = ' - '
        = link_to t('footer.translate'), 'http://eepurl.com/H3Xtr'
        %br/
        %br/
        = t('footer.help_from_html')
        %br/
        = t('footer.art_from_html')
        %br/
        = link_to t('footer.tos'), 'http://code.org/tos'
        - if current_user && current_user.admin?
          %br/
          Admin:
          = link_to "Games", games_path
          |
          = link_to "Concepts", concepts_path
          |
          = link_to "Videos", videos_path
          |
          = link_to "Recent Activity", all_usage_path

Revert "New translation help link"

.navbar-static-top.footer
  .container
    .row
      .span2
        © Code.org, 2013
        %br/
        = form_tag(locale_url, method: :post, id: 'localeForm') do
          = hidden_field_tag :return_to, request.url
          = select_tag :locale, options_for_select(options_for_locale_select, locale), onchange: 'switchLocale();'
      .span10
        = link_to t('footer.feedback'), 'http://codeorg.uservoice.com/forums/228116-code-org-tutorials'
        = ' - '
        = link_to t('footer.translate'), 'https://docs.google.com/forms/d/1v72iM0reILSCbyJo4870yYXzMKmSXd9IlOc5usL3xQo/viewform'
        %br/
        %br/
        = t('footer.help_from_html')
        %br/
        = t('footer.art_from_html')
        %br/
        = link_to t('footer.tos'), 'http://code.org/tos'
        - if current_user && current_user.admin?
          %br/
          Admin:
          = link_to "Games", games_path
          |
          = link_to "Concepts", concepts_path
          |
          = link_to "Videos", videos_path
          |
          = link_to "Recent Activity", all_usage_path


%header.navbar
  .container
    %h1 Aozorasearch 青空文庫検索

Hide Japanese in h1 for xs display


- @division.policies.order(:name).each do |policy|
  %p
    People who are
    - # TODO remove this downcase, it shouldn't be needed
    = link_to policy.name.downcase, policy
    - if policy.provisional?
      %em (provisional)
    would have voted '#{simple_vote_display @division.policy_vote(policy)}'

    - if @display == "policies" && user_signed_in?
      = button_to 'delete', destroy_policy_division_path(division_params(@division).merge(policy_id: policy)), method: :delete, class: 'btn btn-sm btn-link'

- if @display != "policies"
  = link_to("Edit related policies", division_with_policy_path(@division, nil), title: "Show or change the polices which vote on this division")

Add note to fix button position

- @division.policies.order(:name).each do |policy|
  %p
    People who are
    - # TODO remove this downcase, it shouldn't be needed
    = link_to policy.name.downcase, policy
    - if policy.provisional?
      %em (provisional)
    would have voted '#{simple_vote_display @division.policy_vote(policy)}'

    - if @display == "policies" && user_signed_in?
    - # FIXME This button is displaying on a newline and it shouldn't be
      = button_to 'delete', destroy_policy_division_path(division_params(@division).merge(policy_id: policy)), method: :delete, class: 'btn btn-sm btn-link'

- if @display != "policies"
  = link_to("Edit related policies", division_with_policy_path(@division, nil), title: "Show or change the polices which vote on this division")


- obj = @tag
- @tag ||= entrytag
- @entries ||= SemiStatic::Entry.for_documents_tag
- unless @tag.nil?
  .panel.list
    - if SemiStatic::Tag.use_sprites?
      .icon.sprite{:id => "sprite_#{@tag.position.to_s}"}
    - else
      .icon= image_tag(@tag.icon.url(:big)) if @tag.icon.present?
    %h1= link_to @tag.sidebar_title, feature_path(@tag.slug), :style => "color: #{@tag.colour};"
    .section
      - @entries.collect{|e| e.merged_main_entry}.uniq.each do |e|
        = render :partial => 'semi_static/tags/side_bar_entry', :locals => {:e => e}
- unless obj.nil?
  = render :partial => 'semi_static/site/search' if obj.side_bar_search
  = render :partial => 'semi_static/site/social' if obj.side_bar_social
  = render :partial => 'semi_static/site/gallery' if obj.kind_of?(SemiStatic::Entry) && obj.side_bar_gallery
  = render :partial => 'semi_static/tags/news' if obj.side_bar_news

Remove old icon code from Documents

- obj = @tag
- @tag ||= entrytag
- @entries ||= SemiStatic::Entry.for_documents_tag
- unless @tag.nil?
  .panel.list
    %h1= link_to @tag.sidebar_title, feature_path(@tag.slug), :style => "color: #{@tag.colour};"
    .section
      - @entries.collect{|e| e.merged_main_entry}.uniq.each do |e|
        = render :partial => 'semi_static/tags/side_bar_entry', :locals => {:e => e}
- unless obj.nil?
  = render :partial => 'semi_static/site/search' if obj.side_bar_search
  = render :partial => 'semi_static/site/social' if obj.side_bar_social
  = render :partial => 'semi_static/site/gallery' if obj.kind_of?(SemiStatic::Entry) && obj.side_bar_gallery
  = render :partial => 'semi_static/tags/news' if obj.side_bar_news


%p
  Use the following scale to determine the correct rating for the asset. You
  can enter fractional values such as 4.5 or 2.75 .

%dl.dl-horizontal
  - ConditionType.all.reverse.each do |x|
    - if x.name != "Unknown"
      %dt{:style => 'width:60px;margin-bottom:10px;'}= "#{x.rating_ceiling}"
      %dd{:style => 'margin-left:80px;;margin-bottom:5px;'}= "#{x.name} - #{x.description}"

%p
  Note that the FTA ranks any asset with a condition rating &lt 2.5 as in need of replacement.

Fix condition update event notes formatting.

%p
  Use the following scale to determine the correct rating for the asset. You
  can enter fractional values such as 4.5 or 2.75 .

%dl.dl-horizontal
  - condition_types = ConditionType.all.reverse
  - condition_types.each_with_index do |type, index|
    - if type.name != "Unknown"
      %dt{:style => 'width:80px;margin-bottom:10px;'}= "#{sprintf("%#.2f", condition_types[index + 1].rating_ceiling + 0.01)} - #{sprintf("%#.2f", type.rating_ceiling)}"
      %dd{:style => 'margin-left:100px;;margin-bottom:5px;'}= "#{type.name} - #{type.description}"

%p
  Note that the FTA ranks any asset with a condition rating &lt 2.5 as in need of replacement.


%li.nav-item.dropdown{:class => get_nav_link_class('capital_projects')}
  = link_to capital_projects_path, :class => "dropdown-toggle", :data => {"toggle" => "dropdown"} do
    %i.fa.fa-bank.fa-2x
    %br
    = " Capital Projects"
    %b.caret
  %ul.dropdown-menu
    %li.text-left.dropdown-submenu
      = link_to capital_projects_path do
        %i.fa.fa-usd.fa-fw
        = " Capital Needs Lists"
      %ul.dropdown-menu
        - CapitalProjectType.all.each do |x|
          %li
            = link_to x.name.pluralize(2), capital_projects_path(:project_type_id => x)

    %li.divider
    %li.text-left
      = link_to new_search_path do
        %i.fa.fa-search.fa-fw
        = " Search Captial Projects"
    - if can? :create, CapitalProject
      %li.divider
      %li.text-left
        = link_to new_capital_project_path do
          %i.fa.fa-plus.fa-fw
          = " New Capital Project"
      %li.divider
      %li.text-left
        = link_to builder_capital_projects_path do
          %i.fa.fa-cogs.fa-fw
          = " Build/Update SOGR Projects"

Add all as a secltor for capital projects

%li.nav-item.dropdown{:class => get_nav_link_class('capital_projects')}
  = link_to capital_projects_path, :class => "dropdown-toggle", :data => {"toggle" => "dropdown"} do
    %i.fa.fa-bank.fa-2x
    %br
    = " Capital Projects"
    %b.caret
  %ul.dropdown-menu
    %li.text-left.dropdown-submenu
      = link_to capital_projects_path do
        %i.fa.fa-usd.fa-fw
        = " Capital Needs Lists"
      %ul.dropdown-menu
        %li
          = link_to "All", capital_projects_path
        %li.divider
        - CapitalProjectType.all.each do |x|
          %li
            = link_to x.name.pluralize(2), capital_projects_path(:project_type_id => x)

    %li.divider
    %li.text-left
      = link_to new_search_path do
        %i.fa.fa-search.fa-fw
        = " Search Captial Projects"
    - if can? :create, CapitalProject
      %li.divider
      %li.text-left
        = link_to new_capital_project_path do
          %i.fa.fa-plus.fa-fw
          = " New Capital Project"
      %li.divider
      %li.text-left
        = link_to builder_capital_projects_path do
          %i.fa.fa-cogs.fa-fw
          = " Build/Update SOGR Projects"


= form_for @input do |f|
  -if @input.errors.any?
    #error_explanation
      %h2= "#{pluralize(@input.errors.count, "error")} prohibited this input from being saved:"
      %ul
        - @input.errors.full_messages.each do |msg|
          %li= msg

  .actions
    = f.submit 'Save'

Fix url for new input form for now

= form_for @input, :url => api_v1_inputs_path do |f|
  -if @input.errors.any?
    #error_explanation
      %h2= "#{pluralize(@input.errors.count, "error")} prohibited this input from being saved:"
      %ul
        - @input.errors.full_messages.each do |msg|
          %li= msg

  .actions
    = f.submit 'Save'


%html
  %head
    %meta{ charset: "utf-8" }
    %title Skillshare.im - #{yield(:title).presence || "Sharing Between Effective Altruists" }
    = favicon_link_tag "favicon.ico"

    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    %link{ rel: "stylesheet", href: "http://fonts.googleapis.com/css?family=Droid+Serif:400,700|Oregano" }

    = javascript_include_tag "application", "data-turbolinks-track" => true
    %script{ src: "//platform.twitter.com/widgets.js" }
    = javascript_include_tag "facebook_like"

    = auto_discovery_link_tag(:atom, proposals_atom_url(format: "atom"))
    = csrf_meta_tags

    - if content_for? :for_head
      = yield :for_head

  %body
    %div#fb-root

    %div#feedback
      %a{href: "mailto:#{ENV['SUPPORT_EMAIL']}?subject=Skillshare.im feedback", target: "_blank"} feedback

    #wrap
      = render "shared/header"

      .container
        - flash.each do |name, msg|
          %div{ class: alert_type(name) }= msg

      .container
        = yield

    = render "shared/footer"

    %footer
      = render "layouts/analytics_tracking"

      = yield :footer

    - unless signed_in?
      %div#dialog{title: "Sign in or sign up"}
        = render "shared/sign_in"

Use https to serve fonts.

%html
  %head
    %meta{ charset: "utf-8" }
    %title Skillshare.im - #{yield(:title).presence || "Sharing Between Effective Altruists" }
    = favicon_link_tag "favicon.ico"

    = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
    %link{ rel: "stylesheet", href: "https://fonts.googleapis.com/css?family=Droid+Serif:400,700|Oregano" }

    = javascript_include_tag "application", "data-turbolinks-track" => true
    %script{ src: "//platform.twitter.com/widgets.js" }
    = javascript_include_tag "facebook_like"

    = auto_discovery_link_tag(:atom, proposals_atom_url(format: "atom"))
    = csrf_meta_tags

    - if content_for? :for_head
      = yield :for_head

  %body
    %div#fb-root

    %div#feedback
      %a{href: "mailto:#{ENV['SUPPORT_EMAIL']}?subject=Skillshare.im feedback", target: "_blank"} feedback

    #wrap
      = render "shared/header"

      .container
        - flash.each do |name, msg|
          %div{ class: alert_type(name) }= msg

      .container
        = yield

    = render "shared/footer"

    %footer
      = render "layouts/analytics_tracking"

      = yield :footer

    - unless signed_in?
      %div#dialog{title: "Sign in or sign up"}
        = render "shared/sign_in"


.content-main-header
  %h1 Propose Research Question

.content-container
  .content-header
    %p.lead
      Once you submit, the question will have to be accepted before it will appear on the Research Topics page. This process is generally very quick, and you should see your topic appear within 24 hours.
  .content-body
    = render "research_topics/form", research_topic: @research_topic
  .content-footer
    %p
      If you have any questions, please email us at
      = link_to 'support@myapnea.org', "mailto:#{ENV['pprn_support_email']}"

Tweak language at top of research topics new page

.content-main-header
  %h1 Propose Research Question

.content-container
  .content-header
    %p.lead
      All submitted questions are reviewed by the MyApnea.Org team before being added to the Research Topics page. We will contact you if we have questions about your submitted research topic. Thanks for your contribution!
  .content-body
    = render "research_topics/form", research_topic: @research_topic
  .content-footer
    %p
      If you have any questions, please email us at
      = link_to 'support@myapnea.org', "mailto:#{ENV['pprn_support_email']}"


= form_tag root_path do
  = render "pages/root_page/country_select"
  = render "pages/root_page/year_select"

  %p Scaling attribute
  %select(name="scaling_attribute")
    %option(value="number_of_residences") Number of residences

  %p Scale to…
  %input(type="text" name="scaling_value")

  #submit
    = render "pages/root_page/start_button"

Add a sizing hint to the scaled scenario form

= form_tag root_path do
  = render "pages/root_page/country_select"
  = render "pages/root_page/year_select"

  %p Scaling attribute
  %select(name="scaling_attribute")
    %option(value="number_of_residences") Number of residences

  %p Scale to…
  %input(type="text" name="scaling_value" placeholder="e.g. 1000, 250000, ...")

  #submit
    = render "pages/root_page/start_button"


.container
  %h1
    Thanks for signing up!
  %h3
    Please verify your email
  %p
    We sent an email to
    %strong.stolen-color
      = @user.email
    with a confirmation link in it. Follow the link in the email to finish signing up!
  .alert.alert-info
    %p
      We know email verification is annoying, but email is how we connect you to the bikes you own.
    %p
      We just want to make sure the right person is claiming the right bikes.

:plain

Remove unnecessary text (for @moleon)

.container
  %h1
    Thanks for signing up!
  %h3
    Please verify your email
  %p
    We sent an email to
    %strong.stolen-color
      = @user.email
    with a confirmation link in it. Follow the link in the email to finish signing up!

:plain


- margin = size / 20
- offset = 1 + size / 20
.stars{style: "height: #{size}px; width: #{5 * (size + 1)}px"}
    .stars-inner
        - 5.times do
            .stars-bg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px"}

    .stars-inner{style: "left: #{offset}px; top: #{offset}px;"}
        %nobr
            - 5.times do |i|
                - part = score - i
                - if part >= 1
                    .stars-fg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px;"}
                - elsif part > 0
                    .stars-fg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px; width: #{0.94 * part * size}px"}

Increase width of map ratings star area

- margin = size / 20
- offset = 1 + size / 20
.stars{style: "height: #{size}px; width: #{5 * (size + 2)}px"}
    .stars-inner
        - 5.times do
            .stars-bg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px"}

    .stars-inner{style: "left: #{offset}px; top: #{offset}px;"}
        %nobr
            - 5.times do |i|
                - part = score - i
                - if part >= 1
                    .stars-fg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px;"}
                - elsif part > 0
                    .stars-fg.fa.fa-star{style: "font-size: #{size}px; margin: #{margin}px; width: #{0.94 * part * size}px"}


%h2.title Player Counts

%script{:src => '/js/d3.min.js'}
%script{:src => "/js/popchart.js"}

:css
  svg {
    background-color: black;
    border: 2px solid #AF7A30;
  }

  text {
    fill: white;
    font-weight: normal;
    font-size: 10px;
  }

  .x.axis line {
    stroke: white;
  }

  .axis label {
    fill: #CCC;
  }

  .x.axis .minor {
    stroke-opacity: 1;
  }

  .x.axis path {
    fill: none;
    stroke: white;
  }

  .y.axis line, .y.axis path {
    fill: none;
    stroke: white;
  }

:javascript
  d3.json("/player_counts.json", function(error, json) {
    popchart.add("#content", json);
  });

Add explanation for the graph

%h2.title Player Counts

%p Mean, minimum, and maximum player counts by date.

%script{:src => '/js/d3.min.js'}
%script{:src => "/js/popchart.js"}

:css
  svg {
    background-color: black;
    border: 2px solid #AF7A30;
  }

  text {
    fill: white;
    font-weight: normal;
    font-size: 10px;
  }

  .x.axis line {
    stroke: white;
  }

  .axis label {
    fill: #CCC;
  }

  .x.axis .minor {
    stroke-opacity: 1;
  }

  .x.axis path {
    fill: none;
    stroke: white;
  }

  .y.axis line, .y.axis path {
    fill: none;
    stroke: white;
  }

:javascript
  d3.json("/player_counts.json", function(error, json) {
    popchart.add("#content", json);
  });


= contextual_links

= boot_page_title

%table.table.table-bordered.table-striped.collection
  %thead
    %tr
      %th= t_attr :code
      %th= t_attr :title
      %th.right= t_attr :amount
  %tbody
    - for template in @salary_booking_templates
      - amount = template.line_items.where(:date => @duration).sum(&:accounted_amount)
      - next if amount == 0
      %tr
        %td= template.code
        %td= template.title
        %td.currency= currency_fmt(amount)

- content_for :sidebar do
  - filters = (1..12).map do |month|
    - value = Date.new(Date.today.year, month, 1).to_s(:db)
    - { :value => value, :title => t('date.month_names')[month] }
  = boot_nav_filter(:date, filters)

Use .each instead of for.

= contextual_links

= boot_page_title

%table.table.table-bordered.table-striped.collection
  %thead
    %tr
      %th= t_attr :code
      %th= t_attr :title
      %th.right= t_attr :amount
  %tbody
    - @salary_booking_templates.each do |template|
      - amount = template.line_items.where(:date => @duration).sum(&:accounted_amount)
      - next if amount == 0
      %tr
        %td= template.code
        %td= template.title
        %td.currency= currency_fmt(amount)

- content_for :sidebar do
  - filters = (1..12).map do |month|
    - value = Date.new(Date.today.year, month, 1).to_s(:db)
    - { :value => value, :title => t('date.month_names')[month] }
  = boot_nav_filter(:date, filters)


-# The inline navigation for wide screens
.wv--split--right.nav--inline.nav--secondary.wv--block
  - properties[:items].each do |n|
    - active = n[:title] == properties[:section_name] || (n[:slug].end_with? properties[:section_name].downcase.strip.gsub(' ', '-'))
    %a.nav__item.nav__item--secondary.js-nav-item{:class=>(active ? 'current' : ''), :href=> n[:slug]}<
      = n[:title]

-# The select navigation for small screens
.wv--split--right.nav--inline.nav--secondary.wv--hidden.nav--secondary__dropdown
  = ui_component('navigation/dropdown', properties: { action: "/redirector", dropdown: {name: 'url', options: subnav_options(properties[:responsive_items] || properties[:items]), selected: properties[:section_name], placeholder: properties[:responsive_placeholder], class: 'js-responsive-nav', data: { form_submit: "true" }} })

Allow to specify action in secondary nav for mobile

-# The inline navigation for wide screens
.wv--split--right.nav--inline.nav--secondary.wv--block
  - properties[:items].each do |n|
    - active = n[:title] == properties[:section_name] || (n[:slug].end_with? properties[:section_name].downcase.strip.gsub(' ', '-'))
    %a.nav__item.nav__item--secondary.js-nav-item{:class=>(active ? 'current' : ''), :href=> n[:slug]}<
      = n[:title]

-# The select navigation for small screens
.wv--split--right.nav--inline.nav--secondary.wv--hidden.nav--secondary__dropdown
  = ui_component('navigation/dropdown', properties: { action: (properties[:action] || "/redirector"), dropdown: {name: 'url', options: subnav_options(properties[:responsive_items] || properties[:items]), selected: properties[:section_name], placeholder: properties[:responsive_placeholder], class: 'js-responsive-nav', data: { form_submit: "true" }} })


= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
  = form_errors(@group)

  %fieldset
    = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group

    .form-group.row
      .offset-sm-2.col-sm-10
        = render 'shared/allow_request_access', form: f

    .form-group.row
      %label.col-form-label.col-sm-2
        = s_('GroupSettings|Share with group lock')
      .col-sm-10
        .form-check
          = f.label :share_with_group_lock do
            = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group)
            %strong
              - group_link = link_to @group.name, group_path(@group)
              = s_('GroupSettings|Prevent sharing a project within %{group} with other groups').html_safe % { group: group_link }
            %br
            %span.descr= share_with_group_lock_help_text(@group)

    = render 'group_admin_settings', f: f

    = render_if_exists 'member_lock_setting', f: f, group: @group

  = f.submit 'Save group', class: 'btn btn-success'

Use full path to group settings partials

= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
  = form_errors(@group)

  %fieldset
    = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group

    .form-group.row
      .offset-sm-2.col-sm-10
        = render 'shared/allow_request_access', form: f

    .form-group.row
      %label.col-form-label.col-sm-2
        = s_('GroupSettings|Share with group lock')
      .col-sm-10
        .form-check
          = f.label :share_with_group_lock do
            = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group)
            %strong
              - group_link = link_to @group.name, group_path(@group)
              = s_('GroupSettings|Prevent sharing a project within %{group} with other groups').html_safe % { group: group_link }
            %br
            %span.descr= share_with_group_lock_help_text(@group)

    = render 'groups/group_admin_settings', f: f

    = render_if_exists 'groups/member_lock_setting', f: f, group: @group

  = f.submit 'Save group', class: 'btn btn-success'


.map-container{style: "margin: -30px -30px 20px -30px;"}
	#map-canvas{style: "width: 100%; height: 350px;"}

#charts

	#searches_chart{style: "width: 100%; height: 300px;"}
		%center
			The dashboards are loading
			%br/
			= image_tag('dashboard-loader.gif')
	#grades_chart{style: "width: 100%; height: 300px;"}
	#preferences_chart{style: "width: 100%; height: 300px;"}

Add a loader gif for every dashboard

.map-container{style: "margin: -30px -30px 20px -30px;"}
	#map-canvas{style: "width: 100%; height: 350px;"}
		%div{style: "text-align: center; margin-top: 200px;"}
			The dashboards are loading
			%br/
			= image_tag('dashboard-loader.gif')

#searches_chart{style: "width: 100%; height: 300px;"}
	%center
		The dashboards are loading
		%br/
		= image_tag('dashboard-loader.gif')

#grades_chart{style: "width: 100%; height: 300px;"}
	%center
		The dashboards are loading
		%br/
		= image_tag('dashboard-loader.gif')

#preferences_chart{style: "width: 100%; height: 300px;"}
	%center
		The dashboards are loading
		%br/
		= image_tag('dashboard-loader.gif')


$('aside.right-sidebar').parent().html("#{escape_javascript(render 'shared/issuable/sidebar', issuable: @issue)}");
$('aside.right-sidebar').effect('highlight')
new Issue();

Fix sidebar replacement for issues & MRs

$('aside.right-sidebar')[0].outerHTML = "#{escape_javascript(render 'shared/issuable/sidebar', issuable: @issue)}");
$('aside.right-sidebar').effect('highlight')
new Issue();


{% include whisper %}

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

%meta{ 'http-equiv' => 'x-ua-compatible', content: 'IE=edge' }/

%meta{ name: 'description', content: '{{ page.meta_description }}' }/
%meta{ name: 'keywords', content: '{{ page.meta_keywords }}' }/
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1' }/

{% csrf_meta %}

Use site data as fallback (metatags).

{% include whisper %}

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

%meta{ 'http-equiv' => 'x-ua-compatible', content: 'IE=edge' }/

%meta{ name: 'description', content: '{{ page.meta_description | default: site.meta_description }}' }/
%meta{ name: 'keywords', content: '{{ page.meta_keywords | default: site.meta_keywords }}' }/
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1' }/

{% csrf_meta %}


.row.links{'data-hook' => "cart_buttons"}
  .columns.large-8{"data-hook" => ""}
    %a.button.large.secondary{href: current_shop_products_path}
      = t :orders_edit_continue
  .columns.large-4.text-right
    %a#checkout-link.button.large.primary{href: main_app.checkout_path}
      = t :orders_edit_checkout

Align buttons left and right on cart page

.row.links{'data-hook' => "cart_buttons"}
  %a.button.large.secondary{href: current_shop_products_path}
    = t :orders_edit_continue
  %a#checkout-link.button.large.primary.right{href: main_app.checkout_path}
    = t :orders_edit_checkout


- content_for :sub_menu do
  %ul#sub_nav.inline-menu
    = tab :products, match_path: '/products'
    = tab :option_types, match_path: '/option_types'
    = tab :properties
    = tab :prototypes

Remove menu entry option types because this page is not really usable

- content_for :sub_menu do
  %ul#sub_nav.inline-menu
    = tab :products, match_path: '/products'
    = tab :properties
    = tab :prototypes


= link_to planting do
  - if planting.crop.svg_icon.present?
    = image_tag crop_url(planting.crop, format: :svg), alt: planting.crop.name, class: 'img-icon'
  = planting.crop

Remove broken image from planting reminder

= link_to planting_url(planting) do
  = planting.crop


.container
  %h1.label-heading
    Search
  = render partial: "search_form"
  - if @q
    - if @all_scrapers.total_count.zero? && @owners.empty?
      %h2 No results found
      %p
        Sorry, we couldn't find any scrapers or users relevant to your search term
        %strong “#{@q}”.
      %p
        Suggestions:
      %ul
        %li check the spelling
        %li try some more general or alternate terms
      %p You could also try browsing all #{link_to "scrapers", scrapers_path} or #{link_to "users", users_path}.
    - else
      .search-results.row
        .col-xs-12
          = render partial: "search_type_nav"

        - if @type != "users" && !@all_scrapers.total_count.zero?
          %aside.col-xs-12.col-md-3
            = render partial: "scraper_search_filter_controls"

        - if (@type == "users" && @owners.total_count.zero?) || (@type != "users" && @scrapers.total_count.zero?)
          = render partial: "no_results_of_type_notice"
        - else
          - if @type == "users"
            .col-xs-12
              = render partial: "search_results_list", locals: {results: @owners}
          - else
            .col-xs-12.col-md-9
              = render partial: "search_results_list", locals: {results: @scrapers}

Split out into logic for owners and scrapers results

.container
  %h1.label-heading
    Search
  = render partial: "search_form"
  - if @q
    - if @all_scrapers.total_count.zero? && @owners.empty?
      %h2 No results found
      %p
        Sorry, we couldn't find any scrapers or users relevant to your search term
        %strong “#{@q}”.
      %p
        Suggestions:
      %ul
        %li check the spelling
        %li try some more general or alternate terms
      %p You could also try browsing all #{link_to "scrapers", scrapers_path} or #{link_to "users", users_path}.
    - else
      .search-results.row
        .col-xs-12
          = render partial: "search_type_nav"

        - if @type == "users"
          - if @owners.total_count.zero?
            = render partial: "no_results_of_type_notice"
          - else
            .col-xs-12
              = render partial: "search_results_list", locals: {results: @owners}
        - else
          - if !@all_scrapers.total_count.zero?
            %aside.col-xs-12.col-md-3
              = render partial: "scraper_search_filter_controls"

          - if @scrapers.total_count.zero?
            = render partial: "no_results_of_type_notice"
          - else
            .col-xs-12.col-md-9
              = render partial: "search_results_list", locals: {results: @scrapers}


%div{ class: card_classes(properties.merge({ kind: 'sponsored' })).push("card--sponsored--#{properties[:format]} js-card-sponsored").join(" ") }
  .card__mask
    .card__content
      = ui_component("ads/#{properties[:partial_type]}", properties[:properties])

  .tag--horizontal.tag--horizontal--left
    = properties[:label]

Fix properties not being passed from ad card to sub-component

%div{ class: card_classes(properties.merge({ kind: 'sponsored' })).push("card--sponsored--#{properties[:format]} js-card-sponsored").join(" ") }
  .card__mask
    .card__content
      = ui_component("ads/#{properties[:partial_type]}", properties: properties[:properties])

  .tag--horizontal.tag--horizontal--left
    = properties[:label]


%h2= Settings.front_page_note_prompt
= create_event_form Note do |f|
  = hidden_field_tag :redirect_to, person_view_url(@topic, View.for_user.where(:name => "all").first, :anchor => "current_time_break")
  = f.text_field :body, :class => "span9", :style => "margin-left:10px"
  = submit_tag "Post", :class => "btn btn-primary span1"

Update to home page add note form

%h2= Settings.front_page_note_prompt
= create_event_form Note do |f|
  = hidden_field_tag :redirect_to, person_view_url(@topic, View.for_user.where(:name => "all").first, :anchor => "current_time_break")
  .input-append<
    = f.text_field :body, :class => "span9", :style => "margin-left:10px"
    = submit_tag "Post", :class => "btn btn-primary span1"


#preload.spinner
#preload.spinner-dark
#preload.preload-up
#preload.preload-down
#preload.preload-up-color
#preload.preload-down-color

Put preloads inside a div to clean up source code.

.preloads
  #preload.spinner
  #preload.spinner-dark
  #preload.preload-up
  #preload.preload-down
  #preload.preload-up-color
  #preload.preload-down-color


- if @project.errors.any?
  .alert.alert-danger.alert-dismissable
    %button.close{'type' => 'button', 'data-dismiss' => 'alert', 'aria-hidden' => 'true'} ×
    %strong
      = pluralize @project.errors.count, 'error'
      prohibited this album from being saved:
    %ul
      - @project.errors.full_messages.each do |msg|
        %li= msg

Fix word in Project errors partial

- if @project.errors.any?
  .alert.alert-danger.alert-dismissable
    %button.close{'type' => 'button', 'data-dismiss' => 'alert', 'aria-hidden' => 'true'} ×
    %strong
      = pluralize @project.errors.count, 'error'
      prohibited this project from being saved:
    %ul
      - @project.errors.full_messages.each do |msg|
        %li= msg


%h1
  Add a new friend to
  %i= @group.name

= form_for Request.new do |f|
  = f.error_messages

  Enter a Diaspora URL, Diaspora username, or random email address:
  = f.text_field :destination_url
  = f.hidden_field :group_id, :value => @group.id
  = f.submit

Add example to request partial

%h1
  Add a new friend to
  %i= @group.name

= form_for Request.new do |f|
  = f.error_messages

  Enter a Diaspora URL, Diaspora username, or random email address:
  %p
    = f.label :destination_url, "Your Diaspora URL is: #{current_user.username}@#{request.host}"
    = f.text_field :destination_url
  = f.hidden_field :group_id, :value => @group.id
  = f.submit


%section.subscribers
  %h2= t ".subscribers"
  - if group
    %dl
      %dt.title= t ".owner"
      %dd.title= link_to_profile group
  %ul.following-thread
    - subscribers.each do |sub|
      %li
        = link_to user_profile_path(sub) do
          = image_tag sub.profile.picture_thumbnail.url, class: "thumb"
          %p= sub.name

Add guard to check for existence of profile picture.

%section.subscribers
  %h2= t ".subscribers"
  - if group
    %dl
      %dt.title= t ".owner"
      %dd.title= link_to_profile group
  %ul.following-thread
    - subscribers.each do |sub|
      %li
        = link_to user_profile_path(sub) do
          - if sub.profile.picture
            = image_tag sub.profile.picture_thumbnail.url, class: "thumb"
          %p= sub.name


.modal.fade#modal-passwd{ aria: { hidden: true, labelledby: 'modal-passwd-label' }, role: :dialog, tabindex: -1 }
  .modal-dialog
    .modal-content
      .modal-header
        %h5.modal-title#modal-passwd-label= t(".title")
        %button.close{ data: { dismiss: :modal }, type: :button }
          %span{ aria: { hidden: true } } ×
          %span.sr-only= t("voc.close")
      .modal-body
        = f.password_field :current_password, autocomplete: :off
      .modal-footer
        %button.btn.btn-default{ data: { dismiss: :modal }, type: :button }= t("voc.cancel")
        = f.primary

Fix HAML lint in password modal

.modal.fade#modal-passwd{ aria: { hidden: true, labelledby: "modal-passwd-label" }, role: :dialog, tabindex: -1 }
  .modal-dialog
    .modal-content
      .modal-header
        %h5.modal-title#modal-passwd-label= t(".title")
        %button.close{ data: { dismiss: :modal }, type: :button }
          %span{ aria: { hidden: true } } ×
          %span.sr-only= t("voc.close")
      .modal-body
        = f.password_field :current_password, autocomplete: :off
      .modal-footer
        %button.btn.btn-default{ data: { dismiss: :modal }, type: :button }= t("voc.cancel")
        = f.primary


.card.userbox
  %img.userbox__header{ src: current_user.profile_header.url(:mobile) }
  .card-body
    %img.userbox__avatar{ src: current_user.profile_picture.url(:small) }
    .profile__name
      - unless current_user.display_name.blank?
        .profile__display-name
          = current_user.display_name
      .profile__screen-name
        = current_user.screen_name
- unless @list.nil?
  .card
    .card-header= t('views.list.members')
    .card-body
      - if @list.members.empty?
        %p.text-muted No members yet.
      - @list.members.each do |member|
        %a{ href: show_user_profile_path(member.user.screen_name), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top } }
          %img.avatar-xs{ src: member.user.profile_picture.url(:medium) }

= render 'shared/links'

Update usage of `display_name` in shared sidebar

.card.userbox
  %img.userbox__header{ src: current_user.profile_header.url(:mobile) }
  .card-body
    %img.userbox__avatar{ src: current_user.profile_picture.url(:small) }
    .profile__name
      - unless current_user.profile.display_name.blank?
        .profile__display-name
          = current_user.profile.display_name
      .profile__screen-name
        = current_user.screen_name
- unless @list.nil?
  .card
    .card-header= t('views.list.members')
    .card-body
      - if @list.members.empty?
        %p.text-muted No members yet.
      - @list.members.each do |member|
        %a{ href: show_user_profile_path(member.user.screen_name), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top } }
          %img.avatar-xs{ src: member.user.profile_picture.url(:medium) }

= render 'shared/links'


%h1 Fork Scraperwiki scraper

%p This is where you can pick a Scraperwiki scraper, optionally choose a name for it on GitHub and fork away!

= semantic_form_for :scraper, url: scraperwiki_forks_path do |f|
  = f.inputs do
    = f.input :scraperwiki_url, hint: "The full URL for the ScraperWiki Classic scraper that you want to fork to here", input_html: {placeholder: "https://classic.scraperwiki.com/scrapers/city_of_sydney_development_applications/", class: "span6"}
    = f.input :name, hint: "Name to give the scraper here and on GitHub", input_html: {placeholder: "my-scraper"}
  = f.actions do
    = f.action :submit, label: "Fork Scraperwiki scraper"

Add little warning about only using Ruby scrapers

%h1 Fork Scraperwiki scraper

%p This is where you can pick a Scraperwiki scraper, optionally choose a name for it on GitHub and fork away!

.alert.alert-warning
  Note that things are currently restricted to Ruby scrapers

= semantic_form_for :scraper, url: scraperwiki_forks_path do |f|
  = f.inputs do
    = f.input :scraperwiki_url, hint: "The full URL for the ScraperWiki Classic scraper that you want to fork to here", input_html: {placeholder: "https://classic.scraperwiki.com/scrapers/city_of_sydney_development_applications/", class: "span6"}
    = f.input :name, hint: "Name to give the scraper here and on GitHub", input_html: {placeholder: "my-scraper"}
  = f.actions do
    = f.action :submit, label: "Fork Scraperwiki scraper"


%p
  Something happened on '#{payload.kind}' at
  = link_to_post(payload.team, payload.post)
  Chek it out (\( ⁰⊖⁰)/)

Fix typo, thanks to @eitoball

%p
  Something happened on '#{payload.kind}' at
  = link_to_post(payload.team, payload.post)
  Check it out (\( ⁰⊖⁰)/)


.grid_24
  .idea_author
    %img{ src: "", width: 48, height: 48 }
    - if @article.author
      %span= @article.author.name
    - else
      %span= No author
.idea.grid_24
  .grid_16.alpha
    %span.sans_serif= finnishTime(@article.created_at)

    %h1= @article.title
    .idea_summary
      = markdown(@article.ingress) if @article.ingress
    .idea_body
      = markdown(@article.body) if @article.body

    - if @article.author == current_citizen
      = link_to I18n.t("articles.links.edit_article"), edit_article_path(@article)

Correct edit article link in /articles/show page.

.grid_24
  .idea_author
    %img{ src: "", width: 48, height: 48 }
    - if @article.author
      %span= @article.author.name
    - else
      %span= No author
.idea.grid_24
  .grid_16.alpha
    %span.sans_serif= finnishTime(@article.created_at)

    %h1= @article.title
    .idea_summary
      = markdown(@article.ingress) if @article.ingress
    .idea_body
      = markdown(@article.body) if @article.body

    - if @article.author == current_citizen
      = link_to I18n.t("articles.links.edit_article"), edit_admin_idea_article_path(@article.idea, @article)


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

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

Use a full path when recursively calling a partial.

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

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


!!!
%html(id="adminsimple_#{Adminsimple.configuration.themes[0]}")
  %head
    %title= t('adminsimple.site_name')
    %meta{ charset: "UTF-8" }
    %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0" }
    = csrf_meta_tags
    :javascript
      if(typeof Storage !== undefined && localStorage.theme) {document.querySelector('html').setAttribute('id', "adminsimple_" + localStorage.theme);}
    = stylesheet_link_tag 'adminsimple'
    = stylesheet_link_tag Adminsimple.configuration.app_css_overrides if Adminsimple.configuration.app_css_overrides

  %body{class: @body_class}
    = render partial: "/adminsimple/layout/navbar"
    - Adminsimple.configuration.layout.each do |partial|
      = render partial: "/adminsimple/layout/#{partial}"
    = javascript_include_tag "#{Adminsimple.configuration.app_js_overrides ? Adminsimple.configuration.app_js_overrides : 'adminsimple'}"

Add a content_for block for head elements

!!!
%html(id="adminsimple_#{Adminsimple.configuration.themes[0]}")
  %head
    %title= t('adminsimple.site_name')
    %meta{ charset: "UTF-8" }
    %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0" }
    = content_for :head
    = csrf_meta_tags
    :javascript
      if(typeof Storage !== undefined && localStorage.theme) {document.querySelector('html').setAttribute('id', "adminsimple_" + localStorage.theme);}
    = stylesheet_link_tag 'adminsimple'
    = stylesheet_link_tag Adminsimple.configuration.app_css_overrides if Adminsimple.configuration.app_css_overrides

  %body{class: @body_class}
    = render partial: "/adminsimple/layout/navbar"
    - Adminsimple.configuration.layout.each do |partial|
      = render partial: "/adminsimple/layout/#{partial}"
    = javascript_include_tag "#{Adminsimple.configuration.app_js_overrides ? Adminsimple.configuration.app_js_overrides : 'adminsimple'}"


- if convention
  = cache [current_user, convention, current_pending_order, assumed_identity_from_profile, :v2, NavigationBarPresenter::VERSION] do
    %nav.navbar.navbar-fixed-top.navbar-expand-md.mb-4{class: navbar_classes, role: "navigation"}
      .container
        %button.navbar-toggler.navbar-toggler-right{type: "button", "data-toggle" => "collapse", "data-target" => "#navbarSupportedContent", "aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation"}
          %span.navbar-toggler-icon
        = root_navigation_menus
- else
  %nav.navbar.navbar-fixed-top.navbar-expand-md.mb-4{class: navbar_classes, role: "navigation"}
    .container
      %button.navbar-toggler.navbar-toggler-right{type: "button", "data-toggle" => "collapse", "data-target" => "#navbarSupportedContent", "aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation"}
        %span.navbar-toggler-icon
      = root_navigation_menus

- unless browser.bot?
  %noscript#no-javascript-warning
    .container
      .alert.alert-danger
        %h2.mb-4 JavaScript disabled

        .d-flex.align-items-center
          .h1.m-0.mr-4
            %i.fa.fa-exclamation-triangle
          .flex-grow-1
            %p
              Your web browser has JavaScript disabled.  This site is written mostly in JavaScript,
              and will not work without it.  Please enable JavaScript in your browser's settings (or
              disable your JavaScript-blocking browser extension for this site).

        .text-right
          %a.btn.btn-primary{href: '.'} Reload page

Stop caching the nav bar, it's causing more problems than it's solving


- distributor = @order.andand.distributor || current_distributor

%navigation
  %distributor.details.row
    .small-12.medium-12.large-8.columns
      #distributor_title
        - if distributor.logo?
          %img.left{src: distributor.logo.url(:thumb)}
        %h3
          = distributor.name
        %location= distributor.address.city

    = yield :ordercycle_sidebar

Use the first view component DistributorTitleComponent for a shopfront

- distributor = @order.andand.distributor || current_distributor

%navigation
  %distributor.details.row
    .small-12.medium-12.large-8.columns
      #distributor_title
        - if distributor.logo?
          %img.left{src: distributor.logo.url(:thumb)}
        = render DistributorTitleComponent.new(name: distributor.name)
        %location= distributor.address.city

    = yield :ordercycle_sidebar


= form_for(@page, :action => action) do
  = error_messages_for(@page)
  - if @page.new_record?
    = fieldset(:legend => "Localization") do
      %div.fieldset
        - unless @dialects.empty?
          = select(:dialect_id, :collection => @dialects, :value_method => "id", :text_method => "name", :include_blank => true, :label => "Dialect")
        - unless @locales.empty?
          = select(:locale_id, :collection => @locales, :value_method => "id", :text_method => "name", :include_blank => true, :label => "Locale")

  = fieldset(:legend => "General") do
    %div.fieldset
      = text_field(:name, :label => "Name")
      = text_field(:slug, :label => "Slug")
      - unless @layouts.empty?
        = select(:layout_id, :collection => @layouts, :value_method => "id", :text_method => "name", :label => "Layout")
      - unless @types.empty?
        = select(:page_type_id, :collection => @types, :value_method => "id", :text_method => "name", :label => "Type")
      - unless @pages.empty?
        = select(:parent_id, :collection => @pages, :value_method => "id", :text_method => "name", :label => "Parent page", :include_blank => true)
      = check_box(:home)
      %label{:for => "page_home", :class => "checkbox"} Set as homepage

  %p.controls
    = submit("Save")
    or
    = link_to("Cancel", slice_url(:pages))

Tidy up the form for pages.

= form_for(@page, :action => action) do
  = error_messages_for(@page)

  = fieldset(:legend => "General") do
    %div.fieldset
      = text_field(:name, :label => "Name")
      = text_field(:slug, :label => "Slug")
      - unless @pages.empty?
        = select(:parent_id, :collection => @pages, :value_method => "id", :text_method => "name", :label => "Parent page", :include_blank => true)
      = check_box(:home)
      %label{:for => "page_home", :class => "checkbox"} Set as homepage

  = fieldset(:legend => "Templates") do
    %div.fieldset
      - unless @types.empty?
        = select(:page_type_id, :collection => @types, :value_method => "id", :text_method => "name", :label => "Type")
      - unless @layouts.empty?
        = select(:layout_id, :collection => @layouts, :value_method => "id", :text_method => "name", :label => "Layout")

  %p.controls
    = submit("Save")
    or
    = link_to("Cancel", slice_url(:pages))


- content_for :page_actions do
  = render 'admin/shared/user_guide_link'

%div{ 'ng-app' => 'ofn.admin' }
  %h1{ :style => 'margin-bottom: 30px' }
    = t "dashbord"

  - if @enterprises.unconfirmed.any?

    = render partial: "unconfirmed"

    %hr

  - if @enterprises.empty?

    = render partial: "enterprises"

  - else

    - if can? :admin, Spree::Product
      = render partial: "products"

      %div.two.columns

    - if can? :admin, OrderCycle
      = render partial: "order_cycles"

    = render partial: "enterprises"

Fix mistyped translation key for 'dashboard'

- content_for :page_actions do
  = render 'admin/shared/user_guide_link'

%div{ 'ng-app' => 'ofn.admin' }
  %h1{ :style => 'margin-bottom: 30px' }
    = t 'dashboard'

  - if @enterprises.unconfirmed.any?

    = render partial: "unconfirmed"

    %hr

  - if @enterprises.empty?

    = render partial: "enterprises"

  - else

    - if can? :admin, Spree::Product
      = render partial: "products"

      %div.two.columns

    - if can? :admin, OrderCycle
      = render partial: "order_cycles"

    = render partial: "enterprises"


%p
  %em Custom Standard
  is a custom rotating Constructed format modeled after Standard. It consists of some of the most recently finished custom sets.

%p
  To play, join #custom-standard on the Custom Magic Discord server.

%p
  You can explore past Custom Standards with queries like "f:cs time:setcode", or "f:cs time:date", for example:

%ul
  = search_help "f:cs time:ayr", "Custom Standard when Aenyr was added (the first Custom Standard format)"
  = search_help "f:cs time:ldo", "Custom Standard when Lorado was added (the second Custom Standard format)"

Add link to format intro document to Custom Standard page

%p
  %em Custom Standard
  is a custom rotating Constructed format modeled after Standard. It consists of some of the most recently finished custom sets.

%p
  %a{href: "https://tinyurl.com/ya8jyepe"} What is Custom Standard?

%p
  To play, join #custom-standard on the Custom Magic Discord server.

%p
  You can explore past Custom Standards with queries like "f:cs time:setcode", or "f:cs time:date", for example:

%ul
  = search_help "f:cs time:ayr", "Custom Standard when Aenyr was added (the first Custom Standard format)"
  = search_help "f:cs time:ldo", "Custom Standard when Lorado was added (the second Custom Standard format)"


= simple_form_for [:admin, @announcement], defaults: {wrapper_tag: :li} do |f|

  %fieldset.inputs
    %ol
      = f.input :expires_on

  %h2 English

  %fieldset.inputs
    %ol
      = f.input :content_en, as: :text, input_html: {rows: 6}

  %h2 Croatian

  %fieldset.inputs
    %ol
      = f.input :content_hr, as: :text, input_html: {rows: 6}

  %fieldset.actions
    %ol
      %li= f.button :submit
      %li.cancel= link_to "Cancel", collection_path

Fix error with editing announements

= simple_form_for [:admin, @announcement.object], defaults: {wrapper_tag: :li} do |f|

  %fieldset.inputs
    %ol
      = f.input :expires_on

  %h2 English

  %fieldset.inputs
    %ol
      = f.input :content_en, as: :text, input_html: {rows: 6}

  %h2 Croatian

  %fieldset.inputs
    %ol
      = f.input :content_hr, as: :text, input_html: {rows: 6}

  %fieldset.actions
    %ol
      %li= f.button :submit
      %li.cancel= link_to "Cancel", collection_path


-provide :left_column do
  .past
    %h2 Past Workshops
    =render "lessons/past_lessons", :lessons => @past_lessons
  - if current_user
    = render :partial => "polls/poll", :locals => {poll: current_user.next_unanswered_poll, previous_poll: nil}

.announce
  -# RailsSchool SF is taking July off
  - if current_school.name == "San Francisco"
    %h2 Summer Break
    = "RailsSchool is taking July 2014 off as NoiseBridge upgrades its facility. We'll be back in August!"

  - if @future_lessons.present?
    = render "lessons/announce", :lesson => @future_lessons.first, :main_page => true

.future-events
  %h2 Upcoming Free Workshops

  =render "lessons/future_lessons", :lessons => @future_lessons

=render :partial => "home/slogan"

-provide :right_column do
  =render :partial => "lessons/calendar"

Revert "announce the july haitus"

-provide :left_column do
  .past
    %h2 Past Workshops
    =render "lessons/past_lessons", :lessons => @past_lessons
  - if current_user
    = render :partial => "polls/poll", :locals => {poll: current_user.next_unanswered_poll, previous_poll: nil}

.announce
  - if @future_lessons.present?
    = render "lessons/announce", :lesson => @future_lessons.first, :main_page => true

.future-events
  %h2 Upcoming Free Workshops
  =render "lessons/future_lessons", :lessons => @future_lessons

=render :partial => "home/slogan"

-provide :right_column do
  =render :partial => "lessons/calendar"


:markdown
  # Webhooks

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

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

  ## Payloads

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

Use more common language so it's clearer and consistent

:markdown
  # Webhooks

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

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

  ## Payloads

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


- if builds.blank?
  %li
    .nothing-here-block No builds to show
- else
  .table-holder
    %table.table.builds
      %thead
        %tr
          %th Status
          %th Commit
          - if admin
            %th Project
            %th Runner
          %th Stage
          %th Name
          %th
          %th
          - unless admin
            - if project.build_coverage_enabled?
              %th Coverage

      - if admin
        - builds.each do |build|
          = render "admin/builds/build", build: build
      - else
        = render builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled?

  = paginate builds, theme: 'gitlab'

Improve code in table partial

- if builds.blank?
  %li
    .nothing-here-block No builds to show
- else
  .table-holder
    %table.table.builds
      %thead
        %tr
          %th Status
          %th Commit
          - if admin
            %th Project
            %th Runner
          %th Stage
          %th Name
          %th
          %th
            - unless admin
              - if project.build_coverage_enabled?
                Coverage
          %th

      - if admin
        - builds.each do |build|
          = render "admin/builds/build", build: build
      - else
        = render builds, commit_sha: true, ref: true, stage: true, allow_retry: true, coverage: project.build_coverage_enabled?

  = paginate builds, theme: 'gitlab'


.nested-fields
  %tr.determination-form-fields
    %td
      Fees
    %td
      %span.currency-symbol
      = claim.fees_total
    %td
      %div.pound-wrapper
        %div.pound-sign.bold-xsmall
          £
        = f.text_field :fees, value: number_with_precision(f.object.fees, precision: 2), class: 'js-fees', size: 10, maxlength: 8
      = validation_error_message(f.object, :fees)
  %tr.determination-form-fields
    %td
      Expenses
    %td
      = claim.expenses_total
    %td
      %div.pound-wrapper
        %div.pound-sign.bold-xsmall
          £
        = f.text_field :expenses, value: number_with_precision(f.object.expenses, precision: 2), class: 'js-expenses', size: 10, maxlength: 8
      = validation_error_message(f.object, :expenses)
  %tr.determination-form-fields
    %td
      Total
    %td
      = claim.total
    %td
      %span.js-total-determination
        = number_to_currency(f.object.total)

Remove unnecessary padding thanks to nested fields


#fieldset
  %h3
    = title
  %table.table.table-bordered.table-striped.table-hover.table-summary-screen
    %thead
      %tr
        - headers.each do |h|
          %th
            = h(h)
    %tbody
      - value.each do |row|
        - if row[:link]
          - if row[:explorer]
            - click = row[:link]
          - else
            - click = "DoNav('#{row[:link]}');"
          %tr{:onclick => click}
            - col_order.each do |col|
              %td{:title => _("View the table")}
                = row[col.to_sym]
        - else
          %tr.no-hover
            - col_order.each do |col|
              %td
                = row[col.to_sym]

Make Rubocop happy about an assignment in a condition.

#fieldset
  %h3
    = title
  %table.table.table-bordered.table-striped.table-hover.table-summary-screen
    %thead
      %tr
        - headers.each do |h|
          %th
            = h(h)
    %tbody
      - value.each do |row|
        - if row[:link]
          - click = row[:explorer] ? row[:link] : "DoNav('#{row[:link]}');"
          %tr{:onclick => click}
            - col_order.each do |col|
              %td{:title => _("View the table")}
                = row[col.to_sym]
        - else
          %tr.no-hover
            - col_order.each do |col|
              %td
                = row[col.to_sym]


.modal-header
  %a.close{ :href => '#', :'data-dismiss' => 'modal' } x
  %h1=yield_content!(:modal_title) || " ".html_safe

.modal-body.cleanlabels.compact-rows
  =yield

.modal-footer
  .row-fluid
    %nav.fltlft.txtlft.span3
      %input.btn-large.btn-info{:type => 'reset', :value => 'Cancel'}
      %input.btn-large.btn-warning.disabled{:type => 'submit', :value => 'Delete', :disabled => 'disabled'}
    .toolbar-widget.span6.disabled
      %a.btn{:href => "#comingsoonModal"}
        %i.gcmsicon-arrowleft-black
      %span.btnwell Showing Most Recent of N Revisions
      %a.btn{:href => "#comingsoonModal"}
        %i.gcmsicon-arrowright-black
    %nav.fltrt.txtrt.span3
      %input.btn-large.btn-warning{:type => 'submit', :value => 'Save'}
      %input.btn-large.btn-success.disabled{:type => 'submit', :value => 'Approve', :disabled => 'disabled'}

Add optional help icon to form modals; change buttons to match design

.modal-header
  %nav
    -help_path = yield_content!(:modal_help)
    -if !help_path.blank?
      %a.widgetbtn{ :href => "/help/#{help_path}", :'data-toggle' => 'modal-ajax', :title => "Help - What is this?"}
        %i.gcmsicon-questionmark-grey
    %a.widgetbtn{ :'data-dismiss' => 'modal', :href => '#'}
      %i.gcmsicon-x-grey
  %h1=yield_content!(:modal_title) || " ".html_safe

.modal-body.cleanlabels.compact-rows
  =yield

.modal-footer
  .row-fluid
    %nav.fltlft.txtlft.span3
      %input.btn-large.btn-info{:type => 'reset', :value => 'Cancel'}
      %input.btn-large.btn-warning.disabled{:type => 'submit', :value => 'Delete', :disabled => 'disabled'}
    .toolbar-widget.span6.disabled
      %a.btn{:href => "#comingsoonModal"}
        %i.gcmsicon-arrowleft-black
      %span.btnwell Showing Most Recent of N Revisions
      %a.btn{:href => "#comingsoonModal"}
        %i.gcmsicon-arrowright-black
    %nav.fltrt.txtrt.span3
      %input.btn-large.btn-warning{:type => 'submit', :value => 'Save'}
      %input.btn-large.btn-success.disabled{:type => 'submit', :value => 'Approve', :disabled => 'disabled'}


%table.table
  %thead
    %tr
      %th Name
      %th Description
      %th Created by
      %th Opens At
      %th Closes At
      %th Actions

  %tbody
    - if swarms && swarms.any?
      - for swarm in swarms
        %tr
          %td= link_to swarm.name, swarm
          %td= swarm.description
          %td= link_to swarm.creator.name, user_path(swarm.creator) if swarm.creator
          %td= swarm.opens_at
          %td= swarm.closes_at
          %td
            - if swarm.owners.include?(@current_user)
              = link_to "Delete", delete_swarm_path(swarm)
              |
            = link_to "JSON", swarm_path(swarm, :format => 'json')

Remove actions column from tables.

%table.table
  %thead
    %tr
      %th Name
      %th Description
      %th Created by
      %th Opens At
      %th Closes At

  %tbody
    - if swarms && swarms.any?
      - for swarm in swarms
        %tr
          %td= link_to swarm.name, swarm
          %td= swarm.description
          %td= link_to swarm.creator.name, user_path(swarm.creator) if swarm.creator
          %td= swarm.opens_at
          %td= swarm.closes_at


!!! Strict
%html{:lang => "pl_PL", "xml:lang" => "pl_PL", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %title Plan PWR
    %meta{"http-equiv" => 'content-type', "content" => 'text/html; charset=utf-8'}
    :css
      html,body,div,span,h1,h2,h3,h4,h5,h6,p,a,strong,ul,li,fieldset,form,label {
        background:transparent;
        border:0;
        font-size:100%;
        margin:0;
        padding:0;
        vertical-align:baseline;
      }

      body {
        color:#222;
        font-family:'lucida grande', 'Segoe UI', arial, verdana, 'lucida sans unicode', tahoma, sans-serif;
        font-size:10px;
      }
      #{@schedule_css}
      #schedule a { display: none; }
      #copy {
        position: absolute;
        bottom: 5px;
        right: 10px;
        text-align: right;
      }
      #wrapper { width: 1007px; position: relative; }
  %body
    #wrapper
      = render :partial => "schedules/schedule.html"
      #copy
        Plan wygenerowany przez
        = link_to Epure::Config::URL
        \| Tymon Tobolski
        = "(#{link_to "http://teamon.eu"})".html_safe
        2010-2012

Update year in generated HTML

!!! Strict
%html{:lang => "pl_PL", "xml:lang" => "pl_PL", :xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %title Plan PWR
    %meta{"http-equiv" => 'content-type', "content" => 'text/html; charset=utf-8'}
    :css
      html,body,div,span,h1,h2,h3,h4,h5,h6,p,a,strong,ul,li,fieldset,form,label {
        background:transparent;
        border:0;
        font-size:100%;
        margin:0;
        padding:0;
        vertical-align:baseline;
      }

      body {
        color:#222;
        font-family:'lucida grande', 'Segoe UI', arial, verdana, 'lucida sans unicode', tahoma, sans-serif;
        font-size:10px;
      }
      #{@schedule_css}
      #schedule a { display: none; }
      #copy {
        position: absolute;
        bottom: 5px;
        right: 10px;
        text-align: right;
      }
      #wrapper { width: 1007px; position: relative; }
  %body
    #wrapper
      = render :partial => "schedules/schedule.html"
      #copy
        Plan wygenerowany przez
        = link_to Epure::Config::URL
        \| Tymon Tobolski
        = "(#{link_to "http://teamon.eu"})".html_safe
        2010-2014


%h3.page-title
  = @user.name
  - if @user.blocked?
    %span.cred (Blocked)
  - if @user.internal?
    %span.cred (Internal)
  - if @user.admin
    %span.cred (Admin)

  .float-right
    - if impersonation_enabled? && @user != current_user && @user.can?(:log_in)
      = link_to 'Impersonate', impersonate_admin_user_path(@user), method: :post, class: "btn btn-nr btn-grouped btn-info"
    = link_to edit_admin_user_path(@user), class: "btn btn-nr btn-grouped" do
      %i.fa.fa-pencil-square-o
      Edit
%hr
%ul.nav-links.nav.nav-tabs
  = nav_link(path: 'users#show') do
    = link_to "Account", admin_user_path(@user)
  = nav_link(path: 'users#projects') do
    = link_to "Groups and projects", projects_admin_user_path(@user)
  = nav_link(path: 'users#keys') do
    = link_to "SSH keys", keys_admin_user_path(@user)
  = nav_link(controller: :identities) do
    = link_to "Identities", admin_user_identities_path(@user)
  = nav_link(controller: :impersonation_tokens) do
    = link_to "Impersonation Tokens", admin_user_impersonation_tokens_path(@user)
.append-bottom-default

Resolve CE/EE diffs in admin users head

%h3.page-title
  = @user.name
  - if @user.blocked?
    %span.cred (Blocked)
  - if @user.internal?
    %span.cred (Internal)
  - if @user.admin
    %span.cred (Admin)
  = render_if_exists 'admin/users/audtior_user_badge'

  .float-right
    - if impersonation_enabled? && @user != current_user && @user.can?(:log_in)
      = link_to 'Impersonate', impersonate_admin_user_path(@user), method: :post, class: "btn btn-nr btn-grouped btn-info"
    = link_to edit_admin_user_path(@user), class: "btn btn-nr btn-grouped" do
      %i.fa.fa-pencil-square-o
      Edit
%hr
%ul.nav-links.nav.nav-tabs
  = nav_link(path: 'users#show') do
    = link_to "Account", admin_user_path(@user)
  = nav_link(path: 'users#projects') do
    = link_to "Groups and projects", projects_admin_user_path(@user)
  = nav_link(path: 'users#keys') do
    = link_to "SSH keys", keys_admin_user_path(@user)
  = nav_link(controller: :identities) do
    = link_to "Identities", admin_user_identities_path(@user)
  = nav_link(controller: :impersonation_tokens) do
    = link_to "Impersonation Tokens", admin_user_impersonation_tokens_path(@user)
.append-bottom-default


= render "shared/navigation"

.row
  .columns.small-12.large-12
    %a{name:"graduates"}
    %h2.nav_section.columns.small-12{:'data-magellan-destination'=>"graduates"} Rails Girls NOLA Graduates
  .columns.small-12.large-12
    .panel
      %h3.subheader
        February 2014 Graduates
        %ul
          %li Sami DeVille
          %li Aaron Matys
          %li Elizabeth Wotawa
          %li Anabelle Franz
          %li Federico Lertora
          %li Alicia Steadman
          %li Deborah Anderson
          %li Adele Tiblier
          %li Jenny Velasquez
          %li Carrington Roaf
          %li Natasha Salas
          %li Alba Huddleston
          %li Libby Favrot
          %li Danielle Tanguis
          %li Michelle calabro
          %li Tanvi Shah
          %li Vachelle Manly
          %li Julia Ballard
  .columns.small-12.large-12
    .panel
      %h3.subheader
        September 2014 Graduates
        %ul
          %li Jacqui Nelson

Add name to graduates list

= render "shared/navigation"

.row
  .columns.small-12.large-12
    %a{name:"graduates"}
    %h2.nav_section.columns.small-12{:'data-magellan-destination'=>"graduates"} Rails Girls NOLA Graduates
  .columns.small-12.large-12
    .panel
      %h3.subheader
        February 2014 Graduates
        %ul
          %li Sami DeVille
          %li Aaron Matys
          %li Elizabeth Wotawa
          %li Anabelle Franz
          %li Federico Lertora
          %li Alicia Steadman
          %li Deborah Anderson
          %li Adele Tiblier
          %li Jenny Velasquez
          %li Carrington Roaf
          %li Natasha Salas
          %li Alba Huddleston
          %li Libby Favrot
          %li Danielle Tanguis
          %li Michelle calabro
          %li Tanvi Shah
          %li Vachelle Manly
          %li Julia Ballard
  .columns.small-12.large-12
    .panel
      %h3.subheader
        September 2014 Graduates
        %ul
          %li Jacqui Nelson
          %li
            %a {"href" => "https://twitter.com/smalicegreen"} Alice Green


.announcement__container
  - @active_announcements.each do |announcement|
    .alert.announcement.alert-info.alert-dismissable.d-none{ data: { 'announcement-id': announcement.id } }
      .container
        %button.close{ type: :button, data: { dismiss: :alert } }
          %span{ aria: { hidden: true} } ×
        %p
          = announcement.content
          - if announcement.link_present?
            %a.alert-link{ href: announcement.link_href }= announcement.link_text

Fix lint violation on announcements partial

.announcement__container
  - @active_announcements.each do |announcement|
    .alert.announcement.alert-info.alert-dismissable.d-none{ data: { 'announcement-id': announcement.id } }
      .container
        %button.close{ type: :button, data: { dismiss: :alert } }
          %span{ aria: { hidden: true } } ×
        %p
          = announcement.content
          - if announcement.link_present?
            %a.alert-link{ href: announcement.link_href }= announcement.link_text


.container
  %h1 All Supporters

  = paginate @users
  = render @users
  = paginate @users

Split people out into supporter levels and remove pagination

.container
  %h1 All Supporters

  .row
    - Plan.all_plans.each do |plan|
      - unless Owner.supporters(plan).empty?
        .col-xs-12
          %h2
            = link_to plan.name.pluralize, new_supporter_path
          = render Owner.supporters(plan)


- zero_balance_row = @dates.select{|date| account.saldo(@date) != 0.0}.empty?

%tr[account]{:class => (zero_balance_row ? 'zero-balance' : '')}
  %td= account.code
  %td= account.title

  - for @date in @dates
    %td.right
      = link_to currency_fmt(account.saldo(@date)), account_path(account, :by_value_period => @date.respond_to?(:first) ? {:from => @date.first.to_s(:db), :to => @date.last.to_s(:db)} : {:to => @date.to_s(:db)}), 'data-href-container' => 'tr'

Fix balance/profit sheet account hiding (for zero accounts).

- zero_balance_row = @dates.all? {|date| account.saldo(date) == 0.0}

%tr[account]{:class => (zero_balance_row ? 'zero-balance' : '')}
  %td= account.code
  %td= account.title

  - for date in @dates
    %td.right
      = link_to currency_fmt(account.saldo(date)), account_path(account, :by_value_period => date.respond_to?(:first) ? {:from => date.first.to_s(:db), :to => date.last.to_s(:db)} : {:to => date.to_s(:db)}), 'data-href-container' => 'tr'


%p
  %em Custom Standard
  is a custom rotating Constructed format modeled after Standard. It consists of some of the most recently finished custom sets.

%p
  %a{href: "https://tinyurl.com/ya8jyepe"} What is Custom Standard?

%p
  To play, join #custom-standard on the Custom Magic Discord server.

%p
  You can explore past Custom Standards with queries like "f:cs time:setcode", or "f:cs time:date", for example:

%ul
  = search_help "f:cs time:ayr", "Custom Standard when Aenyr was added (the first Custom Standard format)"
  = search_help "f:cs time:ldo", "Custom Standard when Lorado was added (the second Custom Standard format)"

Update Custom Standard description and invite link

%p
  %em Custom Standard
  is a custom rotating Constructed format modeled after Standard. It consists of 5 to 7 custom sets which are rotated in based on the results of a community vote.

%p
  %a{href: "https://tinyurl.com/ya8jyepe"} What is Custom Standard?

%p
  To play, join the Custom Standard Discord server.

%p
  You can explore past Custom Standards with queries like "f:cs time:setcode", or "f:cs time:date", for example:

%ul
  = search_help "f:cs time:ayr", "Custom Standard when Aenyr was added (the first Custom Standard format)"
  = search_help "f:cs time:ldo", "Custom Standard when Lorado was added (the second Custom Standard format)"


:ruby
  funding_line_items = funding_source.funding_line_items.where('organization_id in (?)', @organization_list)

- if funding_line_items.empty?
  %p There are no appropriations for this fund.
-else
  - if funding_source.federal?
    = render :partial => 'federal_appropriations_table', :locals => {:funding_line_items => funding_line_items}
  - else
    = render :partial => 'state_appropriations_table', :locals => {:funding_line_items => funding_line_items}

:javascript
  $('.popup-details').popover({
    trigger: 'hover',
    container: 'body',
    placement: 'left',
    animation: 'true',
    html: 'true'
  });

Fix 500 erroir in funding sources searcher where a patial is not found

:ruby
  funding_line_items = funding_source.funding_line_items.where('organization_id in (?)', @organization_list)

- if funding_line_items.empty?
  %p There are no appropriations for this fund.
-else
  - if funding_source.federal?
    = render :partial => 'funding_sources/federal_appropriations_table', :locals => {:funding_line_items => funding_line_items}
  - else
    = render :partial => 'funding_sources/state_appropriations_table', :locals => {:funding_line_items => funding_line_items}

:javascript
  $('.popup-details').popover({
    trigger: 'hover',
    container: 'body',
    placement: 'left',
    animation: 'true',
    html: 'true'
  });


%p To your Gemfile add

%pre
  :preserve
    gem 'rest-client'
    gem 'json'

%p
  Then run bundle install. Use the following code snippet to get data
  from the API.

- block = capture do
  %pre
    :preserve
      # Get data from the morph.io api
      require 'rest-client'
      require 'json'

      # We're always asking for json because it's the easiest to deal with
      morph_api_url = '#{api_root}[full_name]/data.json'

      # Keep this key secret!
      morph_api_key = '[api_key]'

      result = RestClient.get morph_api_url, params:
        {
          key: morph_api_key,
          query: %q[[query]]
        }

      p JSON.parse(result)

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

Use coderay on ruby example

%p To your Gemfile add

:coderay
  #!ruby
  gem 'rest-client'
  gem 'json'

%p
  Then run bundle install. Use the following code snippet to get data
  from the API.

- block = capture do
  :coderay
    #!ruby
    # Get data from the morph.io api
    require 'rest-client'
    require 'json'

    # We're always asking for json because it's the easiest to deal with
    morph_api_url = '#{api_root}[full_name]/data.json'

    # Keep this key secret!
    morph_api_key = '[api_key]'

    result = RestClient.get morph_api_url, params:
      {
        key: morph_api_key,
        query: %q[[query]]
      }

    p JSON.parse(result)

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


%tr.tag
  %td
    = escape_once(tag.name)
    = clipboard_button(clipboard_text: "docker pull #{tag.path}")
  %td
    - if layer = tag.layers.first
      %span.has-tooltip(title="#{layer.revision}")
        = layer.short_revision
    - else
      \-
  %td
    = number_to_human_size(tag.total_size)
    ·
    = pluralize(tag.layers.size, "layer")
  %td
    = time_ago_in_words(tag.created_at)
  - if can?(current_user, :update_container_image, @project)
    %td.content
      .controls.hidden-xs.pull-right
        = link_to namespace_project_container_registry_path(@project.namespace, @project, tag.name), class: 'btn btn-remove has-tooltip', title: "Remove", data: { confirm: "Are you sure?" }, method: :delete do
          = icon("trash cred")

Improve design of the feature

%tr.tag
  %td
    = escape_once(tag.name)
    = clipboard_button(clipboard_text: "docker pull #{tag.path}")
  %td
    - if layer = tag.layers.first
      %span.has-tooltip{ title: "#{layer.revision}" }
        = layer.short_revision
    - else
      \-
  %td
    = number_to_human_size(tag.total_size)
    ·
    = pluralize(tag.layers.size, "layer")
  %td
    = time_ago_in_words(tag.created_at)
  - if can?(current_user, :update_container_image, @project)
    %td.content
      .controls.hidden-xs.pull-right
        = link_to namespace_project_container_registry_path(@project.namespace, @project, tag.name), class: 'btn btn-remove has-tooltip', title: "Remove", data: { confirm: "Are you sure?" }, method: :delete do
          = icon("trash cred")


= link_to 'Change', '#', class: 'btn btn-primary btn-xs', data: { toggle: 'modal', target: "#participant-change-role-#{participant.id}" }
%div{ id: "participant-change-role-#{participant.id}", class: 'modal fade' }
  .modal-dialog
    .modal-content
      = form_for participant, url: organizer_event_participant_path(participant.event, participant), html: { role: 'form' } do |f|
        .modal-header
          %h3 Change participant role
        .modal-body
          = f.label :notifications
          = f.check_box :notifications, input_html: {checked: true}, class: "checkbox"
          = f.label "Check to Receive Comment Notification Emails"
        -#.modal-footer
        -#  %button.btn.btn-default{'data-dismiss' => "modal"} Cancel
        -#  %button.pull-right.btn.btn-primary{:type => "submit"} Save

Make change comment notification button as link

= link_to 'Change', '#', class: 'btn btn-link btn-xs', data: { toggle: 'modal', target: "#participant-change-role-#{participant.id}" }
%div{ id: "participant-change-role-#{participant.id}", class: 'modal fade' }
  .modal-dialog
    .modal-content
      = form_for participant, url: organizer_event_participant_path(participant.event, participant), html: { role: 'form' } do |f|
        .modal-header
          %h3 Change participant role
        .modal-body
          = f.label :notifications
          = f.check_box :notifications, input_html: {checked: true}, class: "checkbox"
          = f.label "Check to Receive Comment Notification Emails"
        -#.modal-footer
        -#  %button.btn.btn-default{'data-dismiss' => "modal"} Cancel
        -#  %button.pull-right.btn.btn-primary{:type => "submit"} Save


%label.c-input.c-checkbox
  = check_box_tag "#{@resource.model.model_name.param_key}[#{attribute.name}]"
  %span.c-indicator
  = @resource.model.human_attribute_name(attribute.name)

Add hidden field for boolean form partial with default value

%label.c-input.c-checkbox
  = hidden_field_tag "#{@resource.model.model_name.param_key}[#{attribute.name}]", 0
  = check_box_tag "#{@resource.model.model_name.param_key}[#{attribute.name}]", 1,
    entry.send(attribute.key)
  %span.c-indicator
  = @resource.model.human_attribute_name(attribute.name)


- spec    = Gem.loaded_specs[name]
- version = spec.full_gem_path.match(/-([a-f0-9]+)$/)[1]
- commit  = Git.open(spec.full_gem_path).gcommit(version)

%tr.gem-info
  %td== #{ name.titleize } Info
  %td
    %a.compare{ href: "https://github.com/quintel/#{ name }/compare/#{ version }..master" }<
      Compare with HEAD
    %a{ href: "https://github.com/quintel/#{ name }/commit/#{ version }" }<
      %span.version<= version
      —
      = commit.message.split("\n").first
    %span.date{ title: commit.date }
      == (committed #{ time_ago_in_words(commit.date) } ago)

Fix "compare to HEAD" link

- spec    = Gem.loaded_specs[name]
- version = spec.full_gem_path.match(/-([a-f0-9]+)$/)[1]
- commit  = Git.open(spec.full_gem_path).gcommit(version)

%tr.gem-info
  %td== #{ name.titleize } Info
  %td
    %a.compare{ href: "https://github.com/quintel/#{ name }/compare/#{ version }...master" }<
      Compare with HEAD
    %a{ href: "https://github.com/quintel/#{ name }/commit/#{ version }" }<
      %span.version<= version
      —
      = commit.message.split("\n").first
    %span.date{ title: commit.date }
      == (committed #{ time_ago_in_words(commit.date) } ago)


.landing-container

:javascript
  //
  // Would be nice to redirect to:
  // #{session[:omniauth_origin]}
  // but this is cleared out after logout.
  //
  if (!Portal.currentUser.isAnonymous) {
    PortalPages.renderSignupModal({omniauth: true});
  } else {
    window.location.href = "/";
  }

Add omniauth_origin to registration wizard for redirect when dismissing.

.landing-container

:javascript
  //
  // Would be nice to redirect to:
  // #{session[:omniauth_origin]}
  // but this is cleared out after logout.
  //
  if (!Portal.currentUser.isAnonymous) {
    PortalPages.renderSignupModal(
        {
            omniauth: true,
            omniauth_origin: "#{session[:omniauth_origin]}"
        }
    );
  } else {
    window.location.href = "/";
  }


- if order.payment.present?
  .effective-order-payment-details
    %h4 Payment Details

    - if order.purchased?
      %p This order was purchased with the following details:
    - elsif order.declined?
      %p This order was declined with the following details:

    = tableize_hash(order.payment, class: 'table')

Clean up Payment Details to follow Order receipt format

- if order.payment.present?
  .effective-order-payment-details
    = tableize_hash(order.payment, {class: 'table', title: 'Payment Details'})


- like = quote.likes.select {|v| v.user == current_user}.first
- cache_if like, ['v2', like] do
  = link_to quote_vote_path(quote, score: 'up'), data: { toggle: "button" }, class: "btn up tip #{'active' if like}", remote: true, method: :post, id: dom_id(quote, :vote_up), title: t('.like') do
    %i.icon-thumbs-up
    - if quote.likes.size > 0
      = pluralize quote.likes.size, t('.like')
    - else
      = t('.like')

%span.recent_likes
  - quote.recent_likes.each do |like|
    = user_avatar(like.user, size: '24x24', class: 'img-rounded user_avatar', no_link: true)
  = '...' if quote.likes.size > 4

Remove tooltip of like button

- like = quote.likes.select {|v| v.user == current_user}.first
- cache_if like, ['v2', like] do
  = link_to quote_vote_path(quote, score: 'up'), data: { toggle: "button" }, class: "btn up #{'active' if like}", remote: true, method: :post, id: dom_id(quote, :vote_up), title: t('.like') do
    %i.icon-thumbs-up
    - if quote.likes.size > 0
      = pluralize quote.likes.size, t('.like')
    - else
      = t('.like')

%span.recent_likes
  - quote.recent_likes.each do |like|
    = user_avatar(like.user, size: '24x24', class: 'img-rounded user_avatar', no_link: true)
  = '...' if quote.likes.size > 4


- content_for :page_title do
  = t('admin.action_logs.title')

- content_for :header_tags do
  = javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'

= form_tag admin_action_logs_url, method: 'GET', class: 'simple_form' do
  = hidden_field_tag :target_account_id, params[:target_account_id] if params[:target_account_id].present?

  .filters
    .filter-subset.filter-subset--with-select
      %strong= t('admin.action_logs.filter_by_user')
      .input.select.optional
        = select_tag :account_id, options_from_collection_for_select(Account.joins(:user).merge(User.staff), :id, :username, params[:account_id]), prompt: I18n.t('admin.accounts.moderation.all')

    .filter-subset.filter-subset--with-select
      %strong= t('admin.action_logs.filter_by_action')
      .input.select.optional
        = select_tag :action_type, options_for_select(Admin::ActionLogFilter::ACTION_TYPE_MAP.keys.map { |key| [I18n.t("admin.action_logs.action_types.#{key}"), key]}, params[:action_type]), prompt: I18n.t('admin.accounts.moderation.all')

- if @action_logs.empty?
  %div.muted-hint.center-text
    = t 'admin.action_logs.empty'
- else
  .announcements-list
    = render @action_logs

= paginate @action_logs

Fix admin audit log crash due to glitch-soc theming changes

- content_for :page_title do
  = t('admin.action_logs.title')

= form_tag admin_action_logs_url, method: 'GET', class: 'simple_form' do
  = hidden_field_tag :target_account_id, params[:target_account_id] if params[:target_account_id].present?

  .filters
    .filter-subset.filter-subset--with-select
      %strong= t('admin.action_logs.filter_by_user')
      .input.select.optional
        = select_tag :account_id, options_from_collection_for_select(Account.joins(:user).merge(User.staff), :id, :username, params[:account_id]), prompt: I18n.t('admin.accounts.moderation.all')

    .filter-subset.filter-subset--with-select
      %strong= t('admin.action_logs.filter_by_action')
      .input.select.optional
        = select_tag :action_type, options_for_select(Admin::ActionLogFilter::ACTION_TYPE_MAP.keys.map { |key| [I18n.t("admin.action_logs.action_types.#{key}"), key]}, params[:action_type]), prompt: I18n.t('admin.accounts.moderation.all')

- if @action_logs.empty?
  %div.muted-hint.center-text
    = t 'admin.action_logs.empty'
- else
  .announcements-list
    = render @action_logs

= paginate @action_logs


- unless field.multiple?
  = form.select field.method_name, field.enum, { include_blank: true }.reverse_merge({ selected: field.form_value }), field.html_attributes.reverse_merge({ data: { enumeration: true }, placeholder: t('admin.misc.search') })
- else
  :ruby
    js_data = {
      xhr: false,
      sortable: false,
      cacheAll: true,
      regional: {
        chooseAll: t("admin.misc.chose_all"),
        clearAll: t("admin.misc.clear_all"),
        search: t("admin.misc.search"),
        up: t("admin.misc.up"),
        down: t("admin.misc.down")
      }
    }
  = form.select field.method_name, field.enum, { selected: field.form_value, object: form.object }, field.html_attributes.reverse_merge({data: { filteringmultiselect: true, options: js_data.to_json }, multiple: true})

Update translations in enumeration form

- unless field.multiple?
  = form.select field.method_name, field.enum, { include_blank: true }.reverse_merge({ selected: field.form_value }), field.html_attributes.reverse_merge({ data: { enumeration: true }, placeholder: t('admin.misc.search') })
- else
  :ruby
    js_data = {
      xhr: false,
      sortable: false,
      cacheAll: true,
      regional: {
        add: t("admin.misc.add_new"),
        chooseAll: t("admin.misc.chose_all"),
        clearAll: t("admin.misc.clear_all"),
        down: t("admin.misc.down"),
        remove: t("admin.misc.remove"),
        search: t("admin.misc.search"),
        up: t("admin.misc.up")
      }
    }
  = form.select field.method_name, field.enum, { selected: field.form_value, object: form.object }, field.html_attributes.reverse_merge({data: { filteringmultiselect: true, options: js_data.to_json }, multiple: true})


%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      Changes are shown from the version in the first field to the version in the second field.

    %br

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

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

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

  disableButtonIfEmptyField('#to', '.commits-compare-btn');

Add placeholders from and to

%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      Changes are shown from the version in the first field to the version in the second field.

    %br

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], placeholder: "from", class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], placeholder: "to", class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

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

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

  disableButtonIfEmptyField('#to', '.commits-compare-btn');


= hidden_field(:user, :has_cohorts_in_form, :value => true)
%fieldset
  %legend
    Cohorts
  %ul.options-list
    - projects = projects.sort_by &:name
    - projects.each do |p|
      - p.cohorts.each_with_index do |c, i|
        %li
          = check_box_tag "user[cohort_ids][]", c.id, @user.portal_teacher.cohorts.include?(c)
          %label
            = c.fullname

Disable cohort checkboxes for users who aren't authorized.

= hidden_field(:user, :has_cohorts_in_form, :value => true)
%fieldset
  %legend
    Cohorts
  %ul.options-list
    - projects = projects.sort_by &:name
    - projects.each do |p|
      - p.cohorts.each_with_index do |c, i|
        %li
          = check_box_tag "user[cohort_ids][]", c.id, @user.portal_teacher.cohorts.include?(c), disabled: !policy(@current_user).add_teachers_to_cohorts?
          %label
            = c.fullname


- width ||= 320
.facepile
  %iframe{src: "https://www.facebook.com/plugins/facepile.php?app_id=#{StarterKit::AuthConfig.providers.facebook.key}&width=#{width}&max_rows=4&size=medium",
    scrolling: 'no',
    frameborder: '0',
    style: "border:none; overflow:hidden; width:#{width}px; height: 90px",
    allowTransparency: 'true'}

Set facepile default width to auth form width

- width ||= 420
.facepile
  %iframe{src: "https://www.facebook.com/plugins/facepile.php?app_id=#{StarterKit::AuthConfig.providers.facebook.key}&width=#{width}&max_rows=4&size=medium",
    scrolling: 'no',
    frameborder: '0',
    style: "border:none; overflow:hidden; width:#{width}px; height: 90px",
    allowTransparency: 'true'}


%input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
%br
.form-actions
  %button.btn.btn-primary{type: "submit", name: "_save", :'data-disable-with' => t("admin.form.save")}
    %i.icon-white.icon-ok
    = t("admin.form.save")
  %span.extra_buttons
    - if authorized? :new, @abstract_model
      %button.btn.btn-info{type: "submit", name: "_add_another", :'data-disable-with' => t("admin.form.save_and_add_another")}
        = t("admin.form.save_and_add_another")
    - if authorized? :edit, @abstract_model
      %button.btn.btn-info{type: "submit", name: "_add_edit", :'data-disable-with' => t("admin.form.save_and_edit")}
        = t("admin.form.save_and_edit")
    %button.btn{type: "submit", name: "_continue", :'data-disable-with' => t("admin.form.cancel")}
      %i.icon-remove
      = t("admin.form.cancel")

Update for the deprecated form-actions class to fix submit buttons partial

%input{type: :hidden, name: 'return_to', value: (params[:return_to].presence || request.referer)}
%br

.form-group
  .col-sm-offset-2.col-sm-10
    %button.btn.btn-primary{type: "submit", name: "_save", :'data-disable-with' => t("admin.form.save")}
      %i.icon-white.icon-ok
      = t("admin.form.save")
    %span.extra_buttons
      - if authorized? :new, @abstract_model
        %button.btn.btn-info{type: "submit", name: "_add_another", :'data-disable-with' => t("admin.form.save_and_add_another")}
          = t("admin.form.save_and_add_another")
      - if authorized? :edit, @abstract_model
        %button.btn.btn-info{type: "submit", name: "_add_edit", :'data-disable-with' => t("admin.form.save_and_edit")}
          = t("admin.form.save_and_edit")
      %button.btn{type: "submit", name: "_continue", :'data-disable-with' => t("admin.form.cancel")}
        %i.icon-remove
        = t("admin.form.cancel")