= form_tag({}, :class => 'filterable-data') do

  - if content_for? filter_controls or content_for? form_header
    %div.controls
      %ul.filter-controls
        = yield filter_controls if content_for? filter_controls

      - if content_for? form_header
        %ul.actions
          = yield form_header

  %table.flat.checkbox_table{ 'data-none_selected' => t("default_none_selected_message"), 'data-confirm' => t("default_confirm_message") }
    %thead
      %tr
        - columns.each do |column|
          - if column[:name] == 'checkbox'
            %th{:class => column[:class]}= check_box_tag :select_all, true, false, :class => 'select_all'
          -else
            %th{:class => column[:class]}= column[:name]
      - if !rows.any?
        %tr
          %td{:colspan => columns.size}= t('search.no_results')
    = rows.collect {|row| capture_haml(row, &block)}.to_s.html_safe

  - if content_for? form_footer
    %fieldset.options
      = yield form_footer

- if rows.is_a?(WillPaginate::Collection)
  = render_pagination(rows)

Fix filter_table for Ruby 1.9

= form_tag({}, :class => 'filterable-data') do

  - if content_for? filter_controls or content_for? form_header
    %div.controls
      %ul.filter-controls
        = yield filter_controls if content_for? filter_controls

      - if content_for? form_header
        %ul.actions
          = yield form_header

  %table.flat.checkbox_table{ 'data-none_selected' => t("default_none_selected_message"), 'data-confirm' => t("default_confirm_message") }
    %thead
      %tr
        - columns.each do |column|
          - if column[:name] == 'checkbox'
            %th{:class => column[:class]}= check_box_tag :select_all, true, false, :class => 'select_all'
          -else
            %th{:class => column[:class]}= column[:name]
      - if !rows.any?
        %tr
          %td{:colspan => columns.size}= t('search.no_results')
    = rows.collect {|row| capture_haml(row, &block)}.join.html_safe

  - if content_for? form_footer
    %fieldset.options
      = yield form_footer

- if rows.is_a?(WillPaginate::Collection)
  = render_pagination(rows)


%li.commit.js-toggle-container
  .commit-row-title
    = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"

    %span.str-truncated
      = link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message"
      - if commit.description?
        %a.text-expander.js-toggle-button ...

    - if @path.present?
      = link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right"
    - else
      = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
    .notes_count
      - if @note_counts
        - note_count = @note_counts.fetch(commit.id, 0)
      - else
        - notes = project.notes.for_commit_id(commit.id)
        - note_count = notes.count

      - if note_count > 0
        %span.label.label-gray
          %i.icon-comment= note_count

  - if commit.description?
    .commit-row-description.js-toggle-content
      = simple_format(commit.description)

  .commit-row-info
    = commit_author_link(commit, avatar: true, size: 16)
    .committed_ago
      #{time_ago_with_tooltip(commit.committed_date)}

Check if blob is requested.

%li.commit.js-toggle-container
  .commit-row-title
    = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"

    %span.str-truncated
      = link_to_gfm commit.title, project_commit_path(project, commit.id), class: "commit-row-message"
      - if commit.description?
        %a.text-expander.js-toggle-button ...

    - if @repo.blob_at(commit.id, @path)
      = link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right"
    - else
      = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
    .notes_count
      - if @note_counts
        - note_count = @note_counts.fetch(commit.id, 0)
      - else
        - notes = project.notes.for_commit_id(commit.id)
        - note_count = notes.count

      - if note_count > 0
        %span.label.label-gray
          %i.icon-comment= note_count

  - if commit.description?
    .commit-row-description.js-toggle-content
      = simple_format(commit.description)

  .commit-row-info
    = commit_author_link(commit, avatar: true, size: 16)
    .committed_ago
      #{time_ago_with_tooltip(commit.committed_date)}


= render 'create_before_service_output', result: @result

%table.table.table-sm.table-striped.table-monospaced
  %tbody
    - @result.messages.each_with_index do |message, index|
      %tr
        %td= index + 1
        %td= message

= render 'create_after_service_output', result: @result

= bootstrap_button(to: new_resource_path, context: :success) do
  = fa_icon :back
  = t('.back')

Add newline at end of file.


!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
  %body{class: controller_path.gsub('/', '_')}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
          .account-menu
            %ul
              %li.name= current_user.name
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer

Add issues, threads, and user profile links to nav bar.

!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
  %body{class: controller_path.gsub('/', '_')}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
              %li= link_to t(".issues"), issues_path
              %li= link_to t(".threads"), threads_path
          .account-menu
            %ul
              %li.name= link_to current_user.name, user_profile_path(current_user)
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer


.modal.fade{id: "seat#{index}", "aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
          %span{"aria-hidden" => "true"} ×
        %h4#myModalLabel.modal-title
          Rząd: "#{row+1}", Miejsce: "#{index+1}"
      .modal-body
        = index
      .modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Close
        %button.btn.btn-primary{:type => "button"} Save changes
        %br

Add sample form for form_object

.modal.fade{id: "seat#{index}", "aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
          %span{"aria-hidden" => "true"} ×
        %h4#myModalLabel.modal-title
          Rząd: "#{row+1}", Miejsce: "#{index+1}"
      .modal-body
        = form_for reservation_form do |f|
          = f.select :ticket_id, options_from_collection_for_select(movie.tickets, :id, :ticket_type)
          = f.submit
      .modal-footer
        %button.btn.btn-default{"data-dismiss" => "modal", :type => "button"} Close
        %button.btn.btn-primary{:type => "button"} Save changes
        %br


!!! 5
%html
  %head
    %title= t("meta.title")
    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
    %meta{:description => "#{t('meta.description')}" }
    = csrf_meta_tag

    /[if lte IE 8]
      = stylesheet_link_tag 'ie'

    = stylesheet_link_tag 'application'
    = stylesheet_link_tag 'form_only'
    = javascript_include_tag 'application'
    = javascript_include_tag "i18n/#{ I18n.locale }"

    = yield :head

    - if ipad?
      %meta{:name=>"viewport", :content=>"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"}

  %body#form-only{ class: I18n.locale }
    %header#top
      %a{ href: root_path }
        %img(src="/assets/header/logo400-blue@2x.png" width="400" height="49" alt="Energy Transition Model")

    #content
      = content_for?(:content) ? yield(:content) : yield

    :javascript
      I18n.defaultLocale = "#{I18n.default_locale}";
      I18n.locale = "#{I18n.locale}";

    = yield :scripts

Fix deprecation message in form_only layout

!!! 5
%html
  %head
    %title= t("meta.title")
    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
    %meta{:description => "#{t('meta.description')}" }
    = csrf_meta_tag

    /[if lte IE 8]
      = stylesheet_link_tag 'ie'

    = stylesheet_link_tag 'application'
    = stylesheet_link_tag 'form_only'
    = javascript_include_tag 'application'
    = javascript_include_tag "i18n/#{ I18n.locale }", skip_pipeline: true

    = yield :head

    - if ipad?
      %meta{:name=>"viewport", :content=>"width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"}

  %body#form-only{ class: I18n.locale }
    %header#top
      %a{ href: root_path }
        %img(src="/assets/header/logo400-blue@2x.png" width="400" height="49" alt="Energy Transition Model")

    #content
      = content_for?(:content) ? yield(:content) : yield

    :javascript
      I18n.defaultLocale = "#{I18n.default_locale}";
      I18n.locale = "#{I18n.locale}";

    = yield :scripts


.page-title Route #{@route.number} Bus Stops

.container
  - @collection.each do |direction, bsrs|
    = direction + 'bound'
    - bsrs.each do |bus_stop_route|
      .row
        .col-sm-1=bus_stop_route.sequence
        .col-sm-7
          =link_to edit_bus_stop_path(bus_stop_route.bus_stop.hastus_id) do
            -bus_stop_route.bus_stop.name
        .col-sm-1
          = bus_stop_route.bus_stop.hastus_id

Remove bound from the view

.page-title Route #{@route.number} Bus Stops

.container
  - @collection.each do |direction, bsrs|
    = direction
    - bsrs.each do |bus_stop_route|
      .row
        .col-sm-1=bus_stop_route.sequence
        .col-sm-7
          =link_to edit_bus_stop_path(bus_stop_route.bus_stop.hastus_id) do
            -bus_stop_route.bus_stop.name
        .col-sm-1
          = bus_stop_route.bus_stop.hastus_id


.Grid
  .Grid-2-3

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

    - if Date.today < Date.parse('2014-10-30')
      #latest-change.notice
        %h1 Staff update: visit processing times can now be tailored
        %p It's now possible to change the turnaround time for processing visit requests, so that visitors have a realistic idea of when they'll get confirmation of their visit.
        %p
          %a(href="/staff/changes") Read more about recent updates

Update processing form notice for canned responses

.Grid
  .Grid-2-3

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

    - if Date.today < Date.parse('2014-12-11')
      #latest-change.notice
        %h1 Staff update: new visit request processing form
        %p A new format will be released for the request processing form. We are hoping this will make it easier and quicker to process requests and also help address the issue of emails being blocked by junk filters.
        %p
          %a(href="/staff/changes") Read more about recent updates


.row.empty-state.labels
  .col-12
    .svg-content
      = image_tag 'illustrations/labels.svg'
  .col-12
    .text-content
      %h4= _("Labels can be applied to issues and merge requests to categorize them.")
      %p= _("You can also star a label to make it a priority label.")
      .text-center
        - if can?(current_user, :admin_label, @project)
          = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success', title: _('New label'), id: 'new_label_link'
          = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link'
        - if can?(current_user, :admin_label, @group)
          = link_to _('New label'), new_group_label_path(@group), class: 'btn btn-success', title: _('New label'), id: 'new_label_link'

Fix e2e create merge request test

.row.empty-state.labels
  .col-12
    .svg-content
      = image_tag 'illustrations/labels.svg'
  .col-12
    .text-content
      %h4= _("Labels can be applied to issues and merge requests to categorize them.")
      %p= _("You can also star a label to make it a priority label.")
      .text-center
        - if can?(current_user, :admin_label, @project)
          = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success qa-label-create-new', title: _('New label'), id: 'new_label_link'
          = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link'
        - if can?(current_user, :admin_label, @group)
          = link_to _('New label'), new_group_label_path(@group), class: 'btn btn-success', title: _('New label'), id: 'new_label_link'


%p
  Bonjour,

%p
  L'utilisateur
  = @invite.email_sender
  souhaite que vous participiez à l'élaboration d'un dossier sur demarches-simplifiees.fr.

%p
  Cette plateforme permet à ses utilisateurs d'établir des dossiers 100 % en ligne et de dialoguer avec plusieurs interlocuteurs privilégiés avant d'instruire un dépot.

%p
  Afin de répondre à cette invitation, merci de vous inscrire avec l'adresse email
  = @invite.email
  sur
  - url_for_link = invite_url(@invite, params: { email: @invite.email })
  = link_to url_for_link, url_for_link

= render partial: "layouts/mailers/signature"

Improve the copy of the invite guest email

%p
  Bonjour,

%p
  L'utilisateur
  = @invite.email_sender
  souhaite que vous participiez à l'élaboration d'un dossier pour la démarche
  %strong= @invite.dossier.procedure.libelle
  sur demarches-simplifiees.fr.

%p
  Cette plateforme permet à ses utilisateurs d'établir des dossiers 100 % en ligne et de dialoguer avec plusieurs interlocuteurs privilégiés avant d'instruire un dépot.

%p
  Afin de répondre à cette invitation, merci de vous inscrire avec l'adresse email
  = @invite.email
  sur
  - url_for_link = invite_url(@invite, params: { email: @invite.email })
  = link_to url_for_link, url_for_link

= render partial: "layouts/mailers/signature"


- page_title t("Conferences")

.row
  .large-12.columns.show-for-medium-up.show-for-landscape
    %ul.breadcrumbs
      %li
        = link_to t("home"), root_path
      %li.current
        = t("conference.list")
.row
  .large-12.columns
    %h1.subheader
      = t("conference.list")
    %hr

    .columns
      .large-block-grid-4
        - unless @conferences.count.zero?
          - @conferences.each do |conference|
            - unless conference.active
              .panel.radius.expand
                -# = image_tag("http://placehold.it/230x320")
                %h4
                  = link_to conference.title, conference_path(conference)
                %p
                  = conference.events.where(accepted: true, subclass: 0).count
                  = conference.events.where(accepted: true, subclass: 1).count
        - else
          .row
            .large-12.columns
              .alert-box.radius
                %i.fa.fa-warning.pull-left.fa-2x
                = t("warning.no_conferences")

Add a better conferences index style

- page_title t("Conferences")

.row
  .large-12.columns.show-for-medium-up.show-for-landscape
    %ul.breadcrumbs
      %li
        = link_to t("home"), root_path
      %li.current
        = t("conference.list")
.row
  .large-12.columns
    %h1.subheader
      = t("conference.list")
    %hr

    %p |
      A continuación se muestran todas las anteriores ediciones.
      Pulsa sobre un año y se mostrarán las ediciones para ese año.
    -# .large-block-grid-4
    - unless @conferences.count.zero?
      %dl.accordion{"data-accordion" => ""}
        - @conferences.map{|conference| conference.start_date.year}.uniq.each do |year|
          -#     -# - unless conference.active
          %dd.accordion-navigation
            %a.subheader{href: "#panel-#{year}"}
              %b
                = year
            .content{id: "panel-#{year}"}
              %dl
                - @conferences.select{|conference| !conference.active and conference.start_date.year.eql? year }.map do |conference|
                  %dt
                    = link_to conference.title, conference_path(conference)
                  %dd
                    -# = @conference_events_counter(conference, "talk")
                    // TODO: use to_sentence instead and localize
                    = "Hubo " + conference.events.where(accepted: true, subclass: "talk").count.to_s + " charlas y " + conference.events.where(accepted: true, subclass: "workshop").count.to_s + " talleres."

    - else
      .row
        .large-12.columns
          .alert-box.radius
            %i.fa.fa-warning.pull-left.fa-2x
            = t("warning.no_conferences")


%article#contribute-box
	%div.close-button
	%div
		%h1 Want to help make this better?
		%p
			This project is open source, meaning you can contribute! Development is taking place on GitHub.com.
		%p
			= link_to "Visit project on GitHub", "https://github.com/codeforamerica/human_services_finder", :target=>"_blank"
			%br
			= link_to "File a bug/suggestion", "https://github.com/codeforamerica/human_services_finder/issues", :target=>"_blank"

Update _contributie partial for dC

%article#contribute-box
	%div.close-button
	%div
		%h1 Want to help make this better?
		%p
			This project is open source, meaning you can contribute! Development is taking place on GitHub.com.
		%p
			= link_to "Visit project on GitHub", "https://github.com/codefordc/open211", :target=>"_blank"
			%br
			= link_to "File a bug/suggestion", "https://github.com/codefordc/open211/issues", :target=>"_blank"


%fieldset
  %legend.panel-legend Project
  = format_field("Project",  link_to(ali.capital_project.project_number, ali.capital_project))
  = format_field("Fiscal Year", ali.capital_project.fiscal_year)

%fieldset
  %legend.panel-legend Details
  = format_field("Name", ali.name)
  = format_field("Scope", ali.team_ali_code)

%fieldset
  %legend.panel-legend Costs
  = format_field("Original Cost", format_as_currency(ali.total_original_cost))
  = format_field("Funds Required", format_as_currency(ali.anticipated_cost))
  = format_field("Estimated. Cost", format_as_currency(ali.estimated_cost))
  = format_field("Cost Difference", format_as_currency(ali.cost_difference))

%fieldset
  %legend.panel-legend Funding Summary
  = format_field("State",   format_as_currency(ali.state_funds))
  = format_field("Federal", format_as_currency(ali.federal_funds))
  = format_field("Local",   format_as_currency(ali.local_funds))
  = format_field("Total",   format_as_currency(ali.total_funds))
  = format_field("Difference", format_as_currency(ali.funding_difference))

Tweak the ALI summary view

%fieldset
  %legend.panel-legend Project
  = format_field("Project",  link_to(ali.capital_project.project_number, ali.capital_project))
  = format_field("Fiscal Year", ali.capital_project.fiscal_year)

%fieldset
  %legend.panel-legend Details
  = format_field("Name", ali.name)
  = format_field("Scope", ali.team_ali_code)

%fieldset
  %legend.panel-legend Costs
  = format_field("Original Cost", format_as_currency(ali.total_original_cost))
  = format_field("Estimated. Cost", format_as_currency(ali.estimated_cost))
  = format_field("Funds Required", format_as_currency(ali.anticipated_cost))
  = format_field("Cost Difference", format_as_currency(ali.cost_difference))

%fieldset
  %legend.panel-legend Funding Summary
  = format_field("State",   format_as_currency(ali.state_funds))
  = format_field("Federal", format_as_currency(ali.federal_funds))
  = format_field("Local",   format_as_currency(ali.local_funds))
  = format_field("Total",   format_as_currency(ali.total_funds))
  = format_field("Funding Shortfall", format_as_currency(ali.funding_difference))


- content_for :title, t('.title')
- content_for :page_icon, t('.icon')

%ul#sites
  - user.sites.sort.each do |site|
    %li= link_to(site.host, "http://#{site.host}")

Remove sorting from sites in view

- content_for :title, t('.title')
- content_for :page_icon, t('.icon')

%ul#sites
  - user.sites.each do |site|
    %li= link_to(site.host, "http://#{site.host}")


- content_for :header_tags do
  = javascript_include_tag 'application_public', integrity: true, crossorigin: 'anonymous'

- content_for :content do
  .container= yield
  .footer
    %span.domain= link_to site_hostname, root_path
    %span.powered-by
      = t('generic.powered_by', link: link_to('Mastodon', 'https://github.com/sinsoku/mastodon')).html_safe

= render template: "layouts/application"

Revert to the original link

- content_for :header_tags do
  = javascript_include_tag 'application_public', integrity: true, crossorigin: 'anonymous'

- content_for :content do
  .container= yield
  .footer
    %span.domain= link_to site_hostname, root_path
    %span.powered-by
      = t('generic.powered_by', link: link_to('Mastodon', 'https://github.com/tootsuite/mastodon')).html_safe

= render template: "layouts/application"


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

Fix styling for pitch partial

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


= render :layout => "page" do
  .repo-info
    .explanation
      %p
        This page shows an
        %strong evaluation
        of the project's documentation.

      - if @project.language?(:javascript)
        .javascript-beta-hint
          %strong JavaScript support
          is still young. Please
          = link_to "report any mistakes", github_issue_url(:project => @project)
          Inch makes!

      %p
        Each class, module, method, etc. is given a grade based on how complete the docs are.
      %p
        The bar above shows the distribution of these grades.
      - if @project.documentation_url
        %p
          = link_to icon(:search) + ' Read the docs', @project.documentation_url, :target => '_blank', :class => 'btn btn-primary'

    .table-responsive
      - @collection.each do |grade_list|
        = render "shared/grade_list_table", :grade_list => grade_list

  = render "about_footer"

Move javascript beta hint one last time

= render :layout => "page" do
  .repo-info
    .explanation
      %p
        This page shows an
        %strong evaluation
        of the project's documentation.

      %p
        Each class, module, method, etc. is given a grade based on how complete the docs are.
      %p
        The bar above shows the distribution of these grades.
      - if @project.documentation_url
        %p
          = link_to icon(:search) + ' Read the docs', @project.documentation_url, :target => '_blank', :class => 'btn btn-primary'

    - if @project.language?(:javascript)
      .javascript-beta-hint
        %strong JavaScript support
        is still young. Please
        = link_to "report any mistakes", github_issue_url(:project => @project)
        Inch makes!
    .table-responsive
      - @collection.each do |grade_list|
        = render "shared/grade_list_table", :grade_list => grade_list

  = render "about_footer"


%fieldset
  %legend.fieldset-legend Speaker Information
  = f.simple_fields_for :speakers, f.object.speakers do |speaker_fields|
    - speaker = speaker_fields.object.decorate

    %p This information is not visible during the review process. Name and bio will be used publicly in the program if this proposal is selected.

    = speaker_fields.input :name, disabled: true, tooltip: ["right", "Edit your profile to update"]

    = speaker_fields.input :bio, disabled: speaker.user!=current_user, maxlength: :lookup, input_html: { value: speaker.bio, rows: 4 }, hint: "Your bio should be short, no longer than 500 characters. It's related to why you're speaking about this topic."#, popover_icon: { content: bio_tooltip }

    %p
    = speaker_fields.input :first_time_speaker, as: :select

    %p
    = speaker_fields.input :age_range, collection: Speaker::AGE_RANGES, label: "How old are you?"

    %p
    = speaker_fields.input :pronouns, collection: Speaker::GENDER_PRONOUNS, label: "What are your pronouns?"

    %p
    = speaker_fields.input :ethnicity, collection: Speaker::RACIAL_CATEGORIES, label: "What is your ethnicity?"

Add additional context for why we ask the demos

%fieldset
  %legend.fieldset-legend Speaker Information
  = f.simple_fields_for :speakers, f.object.speakers do |speaker_fields|
    - speaker = speaker_fields.object.decorate

    %p This information is not visible during the review process. Name and bio will be used publicly in the program if this proposal is selected.

    = speaker_fields.input :name, disabled: true, tooltip: ["right", "Edit your profile to update"]

    = speaker_fields.input :bio, disabled: speaker.user!=current_user, maxlength: :lookup, input_html: { value: speaker.bio, rows: 4 }, hint: "Your bio should be short, no longer than 500 characters. It's related to why you're speaking about this topic."#, popover_icon: { content: bio_tooltip }

    %p
      These demographic fields are optional and are intended to help us achieve a better understanding of our speaker demographic as we aim to diversify our program. These details will not be shared with the program committee and will only be available to us after talks are selected.

    %p
    = speaker_fields.input :first_time_speaker, as: :select

    %p
    = speaker_fields.input :age_range, collection: Speaker::AGE_RANGES, label: "How old are you?"

    %p
    = speaker_fields.input :pronouns, collection: Speaker::GENDER_PRONOUNS, label: "What are your pronouns?"

    %p
    = speaker_fields.input :ethnicity, collection: Speaker::RACIAL_CATEGORIES, label: "What is your ethnicity?"


-# Accessory for pending resources on the admin page
-# Includes additional info and buttons to approve, edit, and reject
= button_to('Approve',
            { :action => 'modify_status',
              :controller => 'resources',
              :decision =>"Approved",
              :id => resource.id },
            :class => 'btn btn-success')

= button_to(resource_path(resource),
            :class => 'btn btn-danger',
            :method => :delete,
            :data => { :confirm => "Are you sure? Deleting this category is permanent" }) do
  %span.fa.fa-lg.fa-trash-o
  Reject

Add Categories and Edit button to _pending_actions

-# Accessory for pending resources on the admin page
-# Includes additional info and buttons to approve, edit, and reject
.row.resource-categories
  %p
    This resource appears in these categories:
    = resource.category.pluck(:category_name).join(", ")

.row
  = button_to({ :action => 'modify_status',
                :controller => 'resources',
                :decision =>"Approved",
                :id => resource.id },
              :class => 'btn btn-success') do
    %span.fa.fa-lg.fa-check
    Approve

.row
  = button_to(edit_resource_path(resource),
              :class => 'btn btn-default',
              :method => 'get') do
    %span.fa.fa-lg.fa-pencil
    Edit

.row
  = button_to(resource_path(resource),
              :class => 'btn btn-danger',
              :method => :delete,
              :data => { :confirm => "Are you sure? Deleting this category is permanent" }) do
    %span.fa.fa-lg.fa-trash-o
    Reject


!!!
%html
  %head
    %title= content_for(:title)
    = stylesheet_link_tag "https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css"
    = stylesheet_link_tag "https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaid.forest.css"
    = javascript_include_tag "https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaidAPI.min.js"
    = javascript_include_tag "localdoc/bundle"

    = csrf_meta_tags

  %body
    = yield

Make sure d3's unicode chars are interpreted correctly

!!!
%html
  %head
    %title= content_for(:title)
    %meta{"http-equiv" => "content-type", "content" => "text/html; charset=UTF8"}
    = stylesheet_link_tag "https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css"
    = stylesheet_link_tag "https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaid.forest.css"
    = javascript_include_tag "https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaidAPI.min.js"
    = javascript_include_tag "localdoc/bundle"

    = csrf_meta_tags

  %body
    = yield


= offering.runnable.name
= link_to 'run as learner', portal_offering_url(offering, :format => :jnlp)
= otml_link_for(offering.runnable)
= run_link_for(offering.runnable)

Remove extra links which would be confusing for students / teachers.

%h4= offering.runnable.name
.tiny= offering.description
= link_to 'run investigation', portal_offering_url(offering, :format => :jnlp)


-# See config/browser.rb
- if !browser.modern?
  #support-navigator-banner.row
    .col-xs-12
      = browser.name
      = browser.version
      \-
      Attention, votre navigateur est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
      %br/
      %br/
      Nous vous recommendons fortement de
      %a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
      \.

Improve the outdated browser message

-# See config/browser.rb
- if !browser.modern?
  #support-navigator-banner.row
    .col-xs-12
      Attention, votre navigateur (#{browser.name} #{browser.version}) est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
      %br/
      %br/
      Nous vous recommendons fortement de
      %a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
      \.


.visualization-graph-legend.panel.panel-default{:class => ("collapsed" if defined? edit)}
  .panel-heading
    = t '.show'
    %button.visualization-graph-legend-collapse-btn{ type: "button" }
      %i.glyphicon.glyphicon-triangle-top
  .panel-body
    .visualization-graph-legend-size
      %p.visualization-graph-legend-title{ data: {'node-type': t('common.type'), relations: t('common.number_of_relations')} }
      %ul
        %li.visualization-graph-legend-lg
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
        %li.visualization-graph-legend-md
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
        %li.visualization-graph-legend-sm
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
    .visualization-graph-legend-color
      %p.visualization-graph-legend-title{ data: {'node-type': t('common.type'), relations: t('common.number_of_relations')} }
      %ul
    %button.visualization-graph-legend-collapse-btn{ type: "button", title: t('.hide'), data: {toggle: "tooltip", placement: "top"} }
      %i.glyphicon.glyphicon-triangle-bottom

Set visualization-graph-legend collapsed by default

.visualization-graph-legend.panel.panel-default.collapsed
  .panel-heading
    = t '.show'
    %button.visualization-graph-legend-collapse-btn{ type: "button" }
      %i.glyphicon.glyphicon-triangle-top
  .panel-body
    .visualization-graph-legend-size
      %p.visualization-graph-legend-title{ data: {'node-type': t('common.type'), relations: t('common.number_of_relations')} }
      %ul
        %li.visualization-graph-legend-lg
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
        %li.visualization-graph-legend-md
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
        %li.visualization-graph-legend-sm
          %span.visualization-graph-legend-circle
          %span.visualization-graph-legend-size-amount
    .visualization-graph-legend-color
      %p.visualization-graph-legend-title{ data: {'node-type': t('common.type'), relations: t('common.number_of_relations')} }
      %ul
    %button.visualization-graph-legend-collapse-btn{ type: "button", title: t('.hide'), data: {toggle: "tooltip", placement: "top"} }
      %i.glyphicon.glyphicon-triangle-bottom


.well

  .container
    .row
      .col-md-1
      .col-md-10.table-margin
        %h4= "Campaign #{idea.campaign}"
      .col-md-1
    .row
      .col-md-1
      .col-md-10
        %h2= idea.title
      .col-md-1
    .row
      .col-md-1
      .col-md-10
        .jumbotron
          = idea.description.html_safe
      .col-md-1
    .row
      .col-md-1
      .col-md-10
        =link_to campaign_ideas_path(campaign), class: 'btn btn-default' do
          %span.glyphicon.glyphicon-chevron-left

          Back
      .col-md-1

Change idea show to match post show and comments

.panel.panel-default{ id: "idea-#{idea.id}" }
  .panel-heading
    %span
      = idea.created_at.strftime('%d.%m.%Y')
    = link_to idea.user.name, user_path(idea.user)

    .pull-right
      - if policy(idea).edit?
        = link_to 'Edit', edit_campaign_idea_path(campaign, idea), class: 'btn-sm btn-primary'
      - if policy(idea).destroy?
        = link_to 'Destroy', campaign_idea_path(campaign, idea), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn-sm btn-danger'
  .panel-body
    %strong= idea.title
    .content
      = simple_format idea.description.html_safe
    - if idea.comments.any?
      .comments
        - idea.comments.each do |comment|
          .well.well-sm
            = comment.content
            .author.pull-right
              = link_to comment.user.name, user_path(comment.user)
  .panel-footer
    - if policy(idea).comment?
      = link_to new_campaign_idea_comment_path(campaign, idea), class: 'btn-sm btn-info' do
        %i.glyphicon.glyphicon-comment


%h2 Producers
%p Our producers make all the delicious food you can shop for on the Open Food Network.
%a.close-reveal-modal{"ng-click" => "cancel()"} ×

Add producers icon to modal

%h2
  %i.ofn-i_036-producers
  Producers
%p Our producers make all the delicious food you can shop for on the Open Food Network.
%a.close-reveal-modal{"ng-click" => "cancel()"} ×


%ul.container_16
  - unless @current_user.nil?
    %li
      = link_to t(:logout), logout_url
  %li
    %a{ :href => ""}
      = t(:configure)
  %li
    %a{ :href => ""}
      = t(:about)
  %li Copyright © 2010 Red Hat, Inc.

Remove the unused links in the footer

%ul.container_16
  - unless @current_user.nil?
    %li
      = link_to t(:logout), logout_url
  %li Copyright © 2010 Red Hat, Inc.


.row
  = render partial: 'shared/components/filter_controls'
  .small-12.medium-6.columns.text-right

.row.animate-show{"ng-show" => "filtersActive"}
  .small-12.columns
    .row.filter-box
      .small-12.columns
        %h5.tdhead
          .light Filter by
          Type
        %ul.small-block-grid-2.medium-block-grid-4.large-block-grid-6
          %taxon-selector{objects: "Enterprises.producers | searchEnterprises:query ",
            results: "activeTaxons"}

Add clear filters feature to Producers page

.row
  = render partial: 'shared/components/filter_controls'
  .small-12.medium-6.columns.text-right

.row.animate-show{"ng-show" => "filtersActive"}
  .small-12.columns
    .row.filter-box
      .small-12.columns
        %h5.tdhead
          .light Filter by
          Type
        %ul.small-block-grid-2.medium-block-grid-4.large-block-grid-6
          %taxon-selector{objects: "Enterprises.producers | searchEnterprises:query ",
            results: "activeTaxons"}
    = render partial: 'shared/components/filter_box'


-#
  Parameters:
    widget -- MiqWidget object
.mc{:id => "dd_w#{widget.id}_box",
:style => @sb[:dashboards][@sb[:active_db]][:minimized].include?(widget.id) ? 'display: none;' : ''}
- if widget.contents_for_user(current_user).contents.blank?
  .blank-slate-pf{:style => "padding: 10px"}
    .blank-slate-pf-icon
      %i.fa.fa-cog
      %h1= _('No report data found.')
- else
  = widget.contents_for_user(current_user).contents.html_safe

Fix HAML indentation for Report Widget fragment


%h1= t ".title", name: @tag.name

%h2= t ".issues"
.results
  - if @issues.count == 0
    %p= t ".no_results_found"
  - else
    %ol
      - @issues.each do |i|
        %li= link_to i.title, issue_path(i)
%h2= t ".threads"
.results
  - if @threads.count == 0
    %p= t ".no_results_found"
  - else
    %ol
      - @threads.each do |t|
        %li= link_to t.title, thread_path(t)
%h2= t ".library_items"
.results
  - if @library_items.count == 0
    %p= t ".no_results_found"
  - else
    %ol
      - @library_items.each do |item|
        %li= link_to item.title, item.component

Use the thread compact partial for displaying the list of threads.

%h1= t ".title", name: @tag.name

%h2= t ".issues"
.results
  - if @issues.count == 0
    %p= t ".no_results_found"
  - else
    %ol
      - @issues.each do |i|
        %li= link_to i.title, issue_path(i)
%h2= t ".threads"
.results
  - if @threads.count == 0
    %p= t ".no_results_found"
  - else
    %ul.thread-list
      = render partial: "message_threads/compact", collection: @threads, as: :thread
%h2= t ".library_items"
.results
  - if @library_items.count == 0
    %p= t ".no_results_found"
  - else
    %ol
      - @library_items.each do |item|
        %li= link_to item.title, item.component


%h2= 'Template: ' + @template.name
%br
= link_to '+ Create new template instance', new_character_path(template_id: @template.id)
%br
%br
= render partial: 'single', locals: {title: 'Characters', template: @template}

Hide New Instance on not-your-template pages

%h2= 'Template: ' + @template.name
%br
- if @template.user_id == current_user.id
    = link_to '+ Create new template instance', new_character_path(template_id: @template.id)
    %br
%br
= render partial: 'single', locals: {title: 'Characters', template: @template}


.edit-quiz

  = link_to "back", admin_quizzes_path, :class => "back-button"

  %h1 Editing Post

  = render :partial => "form"

Fix incorrect header – editing quiz, not post

.edit-quiz

  = link_to "back", admin_quizzes_path, :class => "back-button"

  %h1 Editing Quiz

  = render :partial => "form"


- prefixed_sub_header('Album', @asset_group.name)

= content(:class => 'inset') do
  = render :partial => 'islay/admin/assets/grid', :locals => {:assets => @asset_group.assets}

= footer do
  = new_button('Asset', :asset)
  = edit_button(@asset_group)
  = delete_button(@asset_group)

Add a placeholder for albums.

- prefixed_sub_header('Album', @asset_group.name)

= content(:class => 'inset') do
  - if @asset_group.assets.empty?
    %p#placeholder
      This album has no assets; add a #{link_to('new asset', path(:new, :asset, :to => @asset_group))}
  - else
    = render :partial => 'islay/admin/assets/grid', :locals => {:assets => @asset_group.assets}

= footer do
  = new_button('Asset', :asset)
  = edit_button(@asset_group)
  = delete_button(@asset_group)


= f.inputs t('title.line_items') do
  %table#line_items
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount

Add .sortable to line_items list form.

= f.inputs t('title.line_items') do
  %table#line_items
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody.sortable
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount


= simple_form_for [:admin, @user] do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  = f.input :email
  .field
  - if current_user.is_super_user?
    = f.input :is_admin
  .field
  - if current_user.is_super_user?
    = f.input :is_super_user
  = f.button :submit, :class => 'btn btn-primary', :value => 'Save'

Fix for bug: SuperUser should not be able to untick themselves as a SuperUser

= simple_form_for [:admin, @user] do |f|
  - if @user.errors.any?
    #error_explanation
      %h2
        = pluralize(@user.errors.count, "error")
        prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  = f.input :email
  .field
  - if current_user.is_super_user?
    = f.input :is_admin
  .field
  - if current_user.is_super_user? && current_user != @user
    = f.input :is_super_user
  = f.button :submit, :class => 'btn btn-primary', :value => 'Save'


!!!
%html
  %head
    - title = @title ? @title : "Loomio"
    %title= title
    <!--[if lt IE 9]><script type="text/javascript" src="/assets/lib/excanvas.js"></script><![endif]-->
    = stylesheet_link_tag    "frontpage"
    = csrf_meta_tags
    = render 'social_metadata', description: @meta_description, title: @meta_title

  %body{class: "#{controller_name} #{action_name}"}
    .container.home-flash
      = render 'flash_messages', :flash => flash
    = render "marketing_header"
    = yield
  = javascript_include_tag "frontpage"

Add Google Analytics tracking code to public-facing site

!!!
%html
  %head
    - title = @title ? @title : "Loomio"
    %title= title
    <!--[if lt IE 9]><script type="text/javascript" src="/assets/lib/excanvas.js"></script><![endif]-->
    = stylesheet_link_tag    "frontpage"
    = csrf_meta_tags
    = render 'social_metadata', description: @meta_description, title: @meta_title
    = render 'google_analytics'

  %body{class: "#{controller_name} #{action_name}"}
    .container.home-flash
      = render 'flash_messages', :flash => flash
    = render "marketing_header"
    = yield
  = javascript_include_tag "frontpage"


= partial :article, :locals => {:post => @entry}
%ul.comments
  - @entry.comments.reverse.each do |comment|
    %li.comment{:id => "comment-#{comment.id}"}
      .body= hbr comment.body
      .footer
        .name= link_to_unless comment.homepage.blank?, comment.name, comment.homepage
        .created_at= l comment.created_at.to_time
= comment_form

Replace link_to_unless to link_to. Because link_to_unless removed from Lokka.

= partial :article, :locals => {:post => @entry}
%ul.comments
  - @entry.comments.reverse.each do |comment|
    %li.comment{:id => "comment-#{comment.id}"}
      .body= hbr comment.body
      .footer
        .name= link_to comment.name, comment.homepage, :if => !comment.homepage.blank?
        .created_at= l comment.created_at.to_time
= comment_form


#nav-menu.navbar.navbar-inverse.navbar-fixed-top
  .navbar-inner
    .container
      %a.brand{:href => root_path} CF Storm
      %ul.nav
        %li.dropdown
          %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
            #current-space
              = space_human_name(@space)
              %strong.caret

          %ul#space-menu.dropdown-menu
            - @spaces.each do |space|
              %li
                %a{:href => space_path(space), :id => "space-#{space.guid}"}= space_human_name(space)
            %li.divider
            %li
              %a{:tabindex => "-1", :href => new_path(:spaces) } Create Space
        %li
          %a.avatar-button{:href => '#'}
            %img#user-avatar{:src => user_avatar_path(current_user),
              :title => "You are logged in as #{current_user.email}"}
        %li
          %a{:href => '/sessions/delete'} Logout

Move gravatar img to the right and created a dropdown menue for user actions

#nav-menu.navbar.navbar-inverse.navbar-fixed-top
  .navbar-inner
    .container
      %a.brand{:href => root_path} CF Storm
      %ul.nav
        %li.active.dropdown
          %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
            #current-space
              = space_human_name(@space)
              %strong.caret

          %ul#space-menu.dropdown-menu
            - @spaces.each do |space|
              %li
                %a{:href => space_path(space), :id => "space-#{space.guid}"}= space_human_name(space)
            %li.divider
            %li
              %a{:tabindex => "-1", :href => new_path(:spaces) } Create Space
      %ul.nav.pull-right
        %li
          %img#user-avatar{:src => user_avatar_path(current_user)}
        %li.dropdown
          %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
            #{current_user.email}
            %strong.caret
          %ul.dropdown-menu
            %li
              %a{:href => "#"} Profile
            %li.divider
            %li
              %a{:href => '/sessions/delete'} Logout


- if can? :create, Asset
  = render :partial => 'quick_link', :locals => {:action_title => 'New Asset', :action_path => new_asset_inventory_index_path, :action_icon => 'fa fa-plus'}
= render :partial => 'quick_link', :locals => {:action_title => 'Assets', :action_path => new_search_path(:search_type => SearchesController::ASSET_SEARCH_TYPE), :action_icon => 'fa fa-search'}

Fix the quicklinks for expenditures

- if can? :create, Expenditure
  = render :partial => 'quick_link', :locals => {:action_title => 'New Expense', :action_path => new_expenditure_path, :action_icon => 'fa fa-plus'}


.four.columns
  .row.sidebar

    %h5
      = _('About collaborators')

    %hr

    %p
      = _('Collaborators act as teachers in your classroom.')
      = _('They can build and edit content pages just as you.')

    %p
      = _('This page also includes the full list of your current classroom collaborators.')

Update collaborators sidebar help string.

.four.columns
  .row.sidebar

    %h5
      = _('About collaborators')

    %hr

    %p
      = _('Collaborators act as teachers in your classroom.')
      = _('They can build and edit content pages just as you.')
    %p
      = _('They can not add members, collaborators or change classroom settings or customize it.')

    %p
      = _('This page also includes the full list of your current classroom collaborators.')


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

Fix issue with property injection

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


= render "missing_documentation"

Add Ruby instructions for using PhantomJS with Poltergeist

:markdown
  The [Poltergeist](https://github.com/teampoltergeist/poltergeist) Gem provides a PhantomJS driver for [Capybara](https://github.com/jnicklas/capybara).

  To install it, add `poltergeist` to your scraper Gemfile:
:coderay
  #!ruby
  gem "poltergeist"

:markdown
  Then in your scraper configure Capybara to use it as your default driver:
:coderay
  #!ruby
  require 'capybara/poltergeist'
  Capybara.default_driver = :poltergeist


%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;
  }

  path {
    fill: none;
  }

  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 query param to popchart.js to it refreshes

%h2.title Player Counts

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

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

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

  path {
    fill: none;
  }

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


- content_for :title, 'Basic Ruby'

%h1.basic-ruby Basic Ruby

.learn-programming
  learn programming with lots of examples and lots of practice

%br(clear='all')

%h2.choice
  %a(href='#' onclick="document.getElementById('about-text').style.display = (document.getElementById('about-text').style.display === 'block') ? 'none' : 'block'; return false;")
    Learn about the project

#about-text(style='display:none')
  = render 'about_text'

%h2.choice
  %a(href='/1') Lesson 1: Catching Typos

= render 'mailchimp'

Rename Unit on home page

- content_for :title, 'Basic Ruby'

%h1.basic-ruby Basic Ruby

.learn-programming
  learn programming with lots of examples and lots of practice

%br(clear='all')

%h2.choice
  %a(href='#' onclick="document.getElementById('about-text').style.display = (document.getElementById('about-text').style.display === 'block') ? 'none' : 'block'; return false;")
    Learn about the project

#about-text(style='display:none')
  = render 'about_text'

%h2.choice
  %a(href='/1') Unit 1 — Output

= render 'mailchimp'


!!!
%html
  %head
    %title Tucker Family Farm
    = csrf_meta_tags
    = action_cable_meta_tag
    = favicon_link_tag 'tucker_farm_favicon.png'
    = favicon_link_tag 'tucker_farm_apple_icon.png', rel: 'apple-touch-icon', type: 'image/png'

    = stylesheet_link_tag    'application', media: 'all'
    = stylesheet_link_tag    '//cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.3.2/css/simple-line-icons.min.css'
    = javascript_include_tag 'application'

  %body
    #preloader
      #status
        .status-mes

    = render 'layouts/header'
    = yield
    = render 'layouts/footer'

Remove unnecessary CDN url for simple line icons

!!!
%html
  %head
    %title Tucker Family Farm
    = csrf_meta_tags
    = action_cable_meta_tag
    = favicon_link_tag 'tucker_farm_favicon.png'
    = favicon_link_tag 'tucker_farm_apple_icon.png', rel: 'apple-touch-icon', type: 'image/png'

    = stylesheet_link_tag    'application', media: 'all'
    = javascript_include_tag 'application'

  %body
    #preloader
      #status
        .status-mes

    = render 'layouts/header'
    = yield
    = render 'layouts/footer'


%h3= t('selection')

.row
  .col-sm-5.sortableHospitals
    - @hospitals.each do |hospital|
      .selection.bordered-well{ 'data-hospital-id': hospital.id }
        = hospital.name
        %span.pull-right.icon.icon--trash.removeHospital{ 'aria-hidden': 'true', style: 'color:#757575', title: t('remove_from_comparison'), 'data-hospital-id': hospital.id }

  .col-sm-7.sortableCodes
    - @codes.each do |code|
      .selection.bordered{ 'data-code': code.code }
        = code.code_display + ' '
        %span.small{style: "color:#757575" }= code.text locale
        %span.pull-right.icon.icon--trash.removeCode{ 'aria-hidden': 'true', style: 'color:#757575', title: t('remove_from_comparison'), 'data-code': code.code }

Replace trash with removal icon.

%h3= t('selection')

.row
  .col-sm-5.sortableHospitals
    - @hospitals.each do |hospital|
      .selection.bordered-well{ 'data-hospital-id': hospital.id }
        = hospital.name
        %span.pull-right.removeHospital{ 'aria-hidden': 'true', style: 'color:#757575', title: t('remove_from_comparison'), 'data-hospital-id': hospital.id }= fa_icon('remove')

  .col-sm-7.sortableCodes
    - @codes.each do |code|
      .selection.bordered{ 'data-code': code.code }
        = code.code_display + ' '
        %span.small{style: "color:#757575" }= code.text locale
        %span.pull-right.removeCode{ 'aria-hidden': 'true', style: 'color:#757575', title: t('remove_from_comparison'), 'data-code': code.code }= fa_icon('remove')


= field_set do
  = f.input :active
  = f.input :country
  = f.input :amount, as: :string, input_html: { pattern: "[0-9]+([\.][0-9]+)?" }
  = f.input :name
  = f.input :nature
  = f.referenced_association :collect_account, source: { scope: :collected_vat}, new: { number: Account.find_or_import_from_nomenclature(:collected_vat).number }
  = f.referenced_association :deduction_account, source: { scope: :deductible_vat }, new: { number: Account.find_or_import_from_nomenclature(:deductible_vat).number }
  = f.referenced_association :fixed_asset_collect_account, source: { scope: { of_usage: :collected_vat }}, new: { number: Account.find_or_import_from_nomenclature(:collected_vat).number }
  = f.referenced_association :fixed_asset_deduction_account, source: { scope: { of_usage: :deductible_vat }}, new: { number: Account.find_or_import_from_nomenclature(:deductible_vat).number }

  = f.input :intracommunity
  = f.referenced_association :intracommunity_payable_account, source: { scope: { of_usage: :vat }}, new: { number: Account.find_or_import_from_nomenclature(:vat).number }

Put correct filter for unroll in tax form (deductible_asset_vat)

= field_set do
  = f.input :active
  = f.input :country
  = f.input :amount, as: :string, input_html: { pattern: "[0-9]+([\.][0-9]+)?" }
  = f.input :name
  = f.input :nature
  = f.referenced_association :collect_account, source: { scope: :collected_vat}, new: { number: Account.find_or_import_from_nomenclature(:collected_vat).number }
  = f.referenced_association :deduction_account, source: { scope: :deductible_vat }, new: { number: Account.find_or_import_from_nomenclature(:deductible_vat).number }
  = f.referenced_association :fixed_asset_collect_account, source: { scope: { of_usage: :collected_vat }}, new: { number: Account.find_or_import_from_nomenclature(:collected_vat).number }
  = f.referenced_association :fixed_asset_deduction_account, source: { scope: { of_usage: :deductible_asset_vat }}, new: { number: Account.find_or_import_from_nomenclature(:deductible_asset_vat).number }

  = f.input :intracommunity
  = f.referenced_association :intracommunity_payable_account, source: { scope: { of_usage: :vat }}, new: { number: Account.find_or_import_from_nomenclature(:vat).number }


%nav.navbar.navbar-default.navbar-fixed-top
	.container
		.navbar-header
			%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			= link_to image_tag('BitParrot_logo_GrayFont.png', width: 150, height: 50, align: 'left', style: 'margin: 0px 0px 10px 0px'), root_path
			= link_to 'Home', root_path, class: 'navbar-brand', style: 'margin: 0px 0px 0px 15px'
			= link_to 'About', about_path, class: 'navbar-brand'
			= link_to 'FAQ', faq_path, class: 'navbar-brand'
			-#= link_to 'Sign In', new_user_session_path, class: 'navbar-brand'
			-#= link_to 'Sign Up', new_user_registration_path, class: 'navbar-brand'
		.collapse.navbar-collapse
			%ul.nav.navbar-nav
				= render 'layouts/navigation_links'

Add Python tab to nav

%nav.navbar.navbar-default.navbar-fixed-top
	.container
		.navbar-header
			%button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
				%span.sr-only Toggle navigation
				%span.icon-bar
				%span.icon-bar
				%span.icon-bar
			= link_to image_tag('BitParrot_logo_GrayFont.png', width: 150, height: 50, align: 'left', style: 'margin: 0px 0px 10px 0px'), root_path
			= link_to 'Home', root_path, class: 'navbar-brand', style: 'margin: 0px 0px 0px 15px'
			= link_to 'Python', root_path, class: 'navbar-brand', style: 'margin: 0px 0px 0px 15px'
			= link_to 'About', about_path, class: 'navbar-brand'
			= link_to 'FAQ', faq_path, class: 'navbar-brand'
			-#= link_to 'Sign In', new_user_session_path, class: 'navbar-brand'
			-#= link_to 'Sign Up', new_user_registration_path, class: 'navbar-brand'
		.collapse.navbar-collapse
			%ul.nav.navbar-nav
				= render 'layouts/navigation_links'


!!! 5
%html
  %head
    %title= "Hydra Attribute v#{HydraAttribute::VERSION}"
    = stylesheet_link_tag    'application', media: 'all'
    = javascript_include_tag 'application'
    = csrf_meta_tags

  %body
    .container
      .row= render 'navbar'
      .row= render 'flash_messages'
      .row= yield

Add Fork Me on Github badge

!!! 5
%html
  %head
    %title= "Hydra Attribute v#{HydraAttribute::VERSION}"
    = stylesheet_link_tag    'application', media: 'all'
    = javascript_include_tag 'application'
    = csrf_meta_tags

  %body
    %a{href: 'https://github.com/kostyantyn/hydra_attribute-demo'}
      %img{style: 'position: absolute; top: 0; right: 0; border: 0; z-index:1;', src: 'https://github-camo.global.ssl.fastly.net/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67', alt: 'Fork me on GitHub', 'data-canonical-src' => 'https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png'}

    .container
      .row= render 'navbar'
      .row= render 'flash_messages'
      .row= yield


.banner-search.banner
  .container
    %h1.label-heading
      %small.pre-heading Find data and code you can use
      Search over #{pluralize(floor_to_hundreds(Scraper.count), "scraper")}
    = render partial: "search_form"

- if current_user.scrapers.empty?
  .banner-add-scraper.banner
    .container
      %h2 Unlock the data you need
      = link_to "Create your first scraper", new_scraper_path, class: "btn btn-primary btn-lg"

.container
  = render "broken_scrapers"

  .row
    .col-md-6
      %h2 Recent New Users
      %p
        = link_to users_path do
          See more of the #{pluralize(User.count, "user")}…
      %ul.list-unstyled
        - User.all.order(created_at: :desc).limit(10).each do |user|
          %li
            = owner_image(user, 20)
            = link_to user.nickname, user
            - if user.name
              —
              = user.name
      %h2 Organizations with Scrapers
      %ul.list-unstyled
        - Organization.all_with_scrapers.each do |org|
          %li
            = owner_image(org, 20)
            = link_to org.nickname, org
            - if org.name
              —
              = org.name
    .col-md-6
      %h2 Recently Active Scrapers
      %p
        = link_to scrapers_path do
          See more of the #{pluralize(Scraper.count, "scraper")}…
      .list-group= sync partial: "scraper", collection: Scraper.order(:updated_at => :desc).limit(10)

Remove 'Recently active scrapers' list from landing page


.container-fluid.container-pf-nav-pf-vertical.container-pf-nav-pf-vertical-with-sub-menus{:style => "overflow: hidden !important; height: 100%;"}
  #breadcrumbs
    = render :partial => "layouts/breadcrumbs"
  .row.max-height
    .col-md-12.max-height
      - if !@in_a_form && taskbar_in_header?
        .row.toolbar-pf#toolbar
          .col-sm-12
            = miq_toolbar toolbar_from_hash
      .row#main-content.miq-layout-center_div_no_listnav{:class => @lastaction == "show_dashboard" || @layout == "monitor_alerts_overview" ? 'miq-body' : ''}
        .col-md-12
          .row
            .col-md-7
              - if layout_uses_tabs?
                = render :partial => 'layouts/tabs'
            .col-md-5
              - if show_search?
                %br
                = render :partial => 'layouts/searchbar'
        .col-md-12
          = yield
      .row#paging_div{:style => (layout_uses_paging? && !@in_a_form) || saved_report_paging? ? '' : 'display: none'}
        - if saved_report_paging?
          = render(:partial => 'layouts/saved_report_paging_bar',
                     :locals  => {:pages => @sb[:pages]})

Fix BG color of form that is opened from dashboard

.container-fluid.container-pf-nav-pf-vertical.container-pf-nav-pf-vertical-with-sub-menus{:style => "overflow: hidden !important; height: 100%;"}
  #breadcrumbs
    = render :partial => "layouts/breadcrumbs"
  .row.max-height
    .col-md-12.max-height
      - if !@in_a_form && taskbar_in_header?
        .row.toolbar-pf#toolbar
          .col-sm-12
            = miq_toolbar toolbar_from_hash
      .row#main-content.miq-layout-center_div_no_listnav{:class => (@lastaction == "show_dashboard" || @layout == "monitor_alerts_overview") && !@in_a_form ? 'miq-body' : ''}
        .col-md-12
          .row
            .col-md-7
              - if layout_uses_tabs?
                = render :partial => 'layouts/tabs'
            .col-md-5
              - if show_search?
                %br
                = render :partial => 'layouts/searchbar'
        .col-md-12
          = yield
      .row#paging_div{:style => (layout_uses_paging? && !@in_a_form) || saved_report_paging? ? '' : 'display: none'}
        - if saved_report_paging?
          = render(:partial => 'layouts/saved_report_paging_bar',
                     :locals  => {:pages => @sb[:pages]})


%p.details
  #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request:

%p
  .branch
    = merge_path_description(@merge_request, 'to')
  .author
    Author #{@merge_request.author_name}
  .assignee
    = assignees_label(@merge_request)
  .approvers
    = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter

- if @merge_request.description
  %div
    = markdown(@merge_request.description, pipeline: :email, author: @merge_request.author)

Update author prefix on merge request notification

%p.details
  #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request:

%p
  .branch
    = merge_path_description(@merge_request, 'to')
  .author
    Author: #{@merge_request.author_name}
  .assignee
    = assignees_label(@merge_request)
  .approvers
    = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter

- if @merge_request.description
  %div
    = markdown(@merge_request.description, pipeline: :email, author: @merge_request.author)


= semantic_form_for resource do |f|
  = f.semantic_errors

  = f.inputs t('form.person.address') do
    = render 'vcards/form', :f => f

  = f.inputs t_model(PhoneNumber) do
    = link_to t_action(:more), [:new_phone_number, resource.persisted? ? resource : controller_name], :remote => true, :class => 'icon-add-text', :style => 'float: right'
    .nested-form.list.contacts
      = f.fields_for :vcard do |vcard|
        - vcard.object.contacts.build_defaults
        - vcard.fields_for :contacts do |contact|
          = render 'phone_numbers/form', :item => contact

  = f.buttons do
    = f.commit_button

Use two column forms for people vcard/phone numbers.

= semantic_form_for resource do |f|
  = f.semantic_errors

  .row
    .span8
      = f.inputs t('form.person.address') do
        = render 'vcards/form', :f => f

    .span8
      = f.inputs t_model(PhoneNumber) do
        = link_to t_action(:more), [:new_phone_number, resource.persisted? ? resource : controller_name], :remote => true, :class => 'icon-add-text', :style => 'float: right'
        .nested-form.list.contacts
          = f.fields_for :vcard do |vcard|
            - vcard.object.contacts.build_defaults
            - vcard.fields_for :contacts do |contact|
              = render 'phone_numbers/form', :item => contact

  = f.buttons do
    = f.commit_button


- thing ||= @thing

= form_for thing do |f|
  = f.text_field :name, placeholder: 'Name'
  = f.number_field :quantity, placeholder: 'Quantity'
  = f.submit

Switch view to bootstrap form gem

- thing ||= @thing

= bootstrap_form_for thing do |f|
  = f.alert_message 'Please fix the issues below.'
  = f.text_field :name, placeholder: 'Name', required: true
  = f.number_field :quantity, placeholder: 'Quantity', required: true
  = f.submit


%p.slead
  Should you ever lose your phone, each of these recovery codes can be used one
  time each to regain access to your account. Please save them in a safe place, or you
  %b will
  lose access to your account.

.codes.card
  %ul
    - @codes.each do |code|
      %li
        %span.monospace= code

.d-flex
  = link_to 'Proceed', profile_account_path, class: 'btn btn-success append-right-10'
  = link_to 'Download codes', "data:text/plain;charset=utf-8,#{URI.encode(@codes.join("\n"))}", download: "gitlab-recovery-codes.txt", class: 'btn btn-default'

Fix haml-lint error in 2FA codes partial

%p.slead
  Should you ever lose your phone, each of these recovery codes can be used one
  time each to regain access to your account. Please save them in a safe place, or you
  %b will
  lose access to your account.

.codes.card
  %ul
    - @codes.each do |code|
      %li
        %span.monospace= code

.d-flex
  = link_to 'Proceed', profile_account_path, class: 'btn btn-success append-right-10'
  = link_to 'Download codes', "data:text/plain;charset=utf-8,#{CGI.escape(@codes.join("\n"))}", download: "gitlab-recovery-codes.txt", class: 'btn btn-default'


:markdown
  The `scraperwiki` Rubygem makes it easy to store data in an SQLite database.
  When you create a new scraper via morph.io we include a version of the Gem that writes data to the correct database name in the default Gemfile:

:coderay
  #!ruby
  # Gemfile
  gem "scraperwiki", git: "https://github.com/openaustralia/scraperwiki-ruby.git", branch: "morph_defaults"

:markdown
  To save data all you need to do is call the [`ScraperWiki.save_sqlite` method](https://github.com/openaustralia/scraperwiki-ruby#scraperwikisave_sqliteunique_keys-data-table_name--swdataverbose).
  Creating the database and setting up tables is done automagically by the library:

:coderay
  #!ruby
  ScraperWiki.save_sqlite([:name], {name: "susan", occupation: "software developer"})

Remove the Gemfile contents from example

:markdown
  The `scraperwiki` Rubygem makes it easy to store data in an SQLite database.
  When you create a new scraper via morph.io we include a version of the Gem that writes data to the correct database name in the default Gemfile.

  To save data all you need to do is call the [`ScraperWiki.save_sqlite` method](https://github.com/openaustralia/scraperwiki-ruby#scraperwikisave_sqliteunique_keys-data-table_name--swdataverbose).
  Creating the database and setting up tables is done automagically by the library:

:coderay
  #!ruby
  ScraperWiki.save_sqlite([:name], {name: "susan", occupation: "software developer"})


= semantic_form_for @activity do |f|
  = f.inputs do
    = f.input :project, :as => :combobox
    = f.input :person, :as => :combobox
  = f.inputs do
    = f.input :date, :as => :date_field, :required => true
    = f.input :duration_from, :as => :hour_field
    = f.input :duration_to, :as => :hour_field
    = f.input :hours
    = f.input :minutes
  = f.inputs do
    = f.input :comment
  = f.buttons do
    = f.commit_button

Add some empty lines to activities/form.


%h1
  = t('words_overview')
.row
  / this if for later you will cann select, what category you want to see, but need js or that
  .col-lg-12
    - categories_array = Category.all.map { |category| category.name_de}
    = select_tag :category_name_de, options_for_select(categories_array), {:onchange => 'this.form.submit()'}

.row
  .col-lg-12
    -for w in @word
      -if (w.name locale).to_s.empty? == false
        .panel.panel-default
          .panel-heading
            = w.name locale
            .btn.btn-default.btn-xs.pull-right
              = link_to t('show'), word_path(w), :method => :get
            .btn.btn-default.btn-xs.pull-right
              =link_to t('edit'), edit_word_path(w)
            .btn.btn-default.btn-xs.pull-right
              = link_to t('delete'), w, method: :delete, data: { confirm: t('confirmation_question') }
          .panel-body
            = w.description locale

Set a 'todo' for later

%h1
  = t('words_overview')
.row
  / this if for later you will cann select, what category you want to see, but need js or that
  .col-lg-12
    - categories_array = Category.all.map { |category| category.name_de}
    = select_tag :category_name_de, options_for_select(categories_array), {:onchange => 'this.form.submit()'}

.row
  .col-lg-12
    -for w in @word
      -if (w.name locale).to_s.empty? == false
        .panel.panel-default
          .panel-heading
            = w.name locale
            .btn.btn-default.btn-xs.pull-right
              = link_to t('show'), word_path(w), :method => :get
            .btn.btn-default.btn-xs.pull-right
              =link_to t('edit'), edit_word_path(w)
              / todo use ajax to remove word from DB
            .btn.btn-default.btn-xs.pull-right
              = link_to t('delete'), w, method: :delete, data: { confirm: t('confirmation_question') }
          .panel-body
            = w.description locale


.entry-title
  = link_to zine_path zine, rel: 'bookmark' do
    %h3.title
      = zine.title
    - if zine.subtitle.present?
      %h4.subtitle
        = zine.subtitle

Add rel tag as attribute on href

.entry-title
  = link_to zine_path(zine), :rel => 'bookmark' do
    %h3.title
      = zine.title
    - if zine.subtitle.present?
      %h4.subtitle
        = zine.subtitle


!!! XML
%rss{"version" => '2.0',
     "xmlns:content" => 'http://purl.org/rss/1.0/modules/content/',
     "xmlns:atom" => 'http://www.w3.org/2005/Atom'}
  %channel
    %title #{@page.metadata.title}
    %link #{@base_url}/blog
    %atom:link{href: "#{@base_url}/rss", rel: 'self', type: 'application/rss+xml'}/
    %description #{@page.metadata.description}
    %language en-gb
    %lastBuildDate #{settings.articles.values.first.metadata.date.rfc822}
    %docs http://cyber.law.harvard.edu/rss/rss.html
    - settings.articles.each do |article_name, article|
      %item
        %title #{article.metadata.title}
        %description #{article.metadata.summary}
        %pubDate #{article.metadata.date.rfc822}
        %guid{isPermaLink: 'true'} #{@base_url}/blog/#{article.metadata.shortname}
        %content:encoded <![CDATA[#{Kramdown::Document.new(article.content, :absolute_urls => true, :base_url => base_url(), :smart_quotes => ['apos','apos','quot','quot']).to_html }]]>

Disable CodeRay line numbers in RSS feed.

!!! XML
%rss{"version" => '2.0',
     "xmlns:content" => 'http://purl.org/rss/1.0/modules/content/',
     "xmlns:atom" => 'http://www.w3.org/2005/Atom'}
  %channel
    %title #{@page.metadata.title}
    %link #{@base_url}/blog
    %atom:link{href: "#{@base_url}/rss", rel: 'self', type: 'application/rss+xml'}/
    %description #{@page.metadata.description}
    %language en-gb
    %lastBuildDate #{settings.articles.values.first.metadata.date.rfc822}
    %docs http://cyber.law.harvard.edu/rss/rss.html
    - settings.articles.each do |article_name, article|
      %item
        %title #{article.metadata.title}
        %description #{article.metadata.summary}
        %pubDate #{article.metadata.date.rfc822}
        %guid{isPermaLink: 'true'} #{@base_url}/blog/#{article.metadata.shortname}
        %content:encoded <![CDATA[#{Kramdown::Document.new(article.content, :absolute_urls => true, :base_url => base_url(), :smart_quotes => ['apos','apos','quot','quot'], :coderay_line_numbers => nil).to_html }]]>


%html
  %body
    = yield

Use Rails 5 default mailer layout template

!!!
%html
  %head
    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
    :css
      /* Email styles need to be inline */
  %body
    = yield


= semantic_form_for @location do |f|
  = f.inputs do
    = f.input :category
    = f.input :loc_json, as: :hidden
    .map
      = f.semantic_errors :location
      = render partial: "shared/edit_map", locals: {thing: @location}
  = f.buttons

Rearrange new user location page.

= semantic_form_for @location do |f|
  = f.inputs do
    = f.input :loc_json, as: :hidden
    .map
      = f.semantic_errors :location
      = render partial: "shared/edit_map", locals: {thing: @location}
    = f.input :category
  = f.buttons


.row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring
  .col-lg-3
    %h4.prepend-top-0
      Metrics
    %p
      Metrics are automatically configured and monitored
      based on a library of metrics from popular exporters.
      More information

  .col-lg-9
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          Monitored
          %span.badge-count.js-monitored-count 0
      .panel-body
        .empty-metrics
          = custom_icon('icon_empty_metrics')
          %p No metrics are being monitored. To start monitoring, deploy to an environment.
          = link_to project_environments_path(@project), title: 'View environments', class: 'btn btn-success' do
            View environments

Add Prometheus Metrics Bundle, panel for Missing environment variables

- content_for :page_specific_javascripts do
  = webpack_bundle_tag('prometheus_metrics')

.row.prepend-top-default.append-bottom-default.prometheus-metrics-monitoring.js-prometheus-metrics-monitoring
  .col-lg-3
    %h4.prepend-top-0
      Metrics
    %p
      Metrics are automatically configured and monitored
      based on a library of metrics from popular exporters.
      More information

  .col-lg-9
    .panel.panel-default.js-panel-monitored-metrics{ data: { "active-metrics" => "#{namespace_project_prometheus_active_metrics_path(@project.namespace, @project)}.json" } }
      .panel-heading
        %h3.panel-title
          Monitored
          %span.badge-count.js-monitored-count 0
      .panel-body
        .loading-metrics.js-loading-metrics
          = icon('spinner spin 3x')
          %p Finding and configuring metrics...
        .empty-metrics.hidden.js-empty-metrics
          = custom_icon('icon_empty_metrics')
          %p No metrics are being monitored. To start monitoring, deploy to an environment.
          = link_to project_environments_path(@project), title: 'View environments', class: 'btn btn-success' do
            View environments
        %ul.metrics-list.hidden.js-metrics-list

    .panel.panel-default.js-panel-missing-env-vars
      .panel-heading
        %h3.panel-title
          = icon('caret-right lg', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel')
          Missing environment variable(s)
          %span.badge-count.js-env-var-count 0
      .panel-body.hidden
        .empty-metrics
          %p Nothing to show here at the moment


!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    = javascript_include_tag "application"
    = csrf_meta_tags
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
  %body{class: controller_path.gsub('/', '_')}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
              %li= link_to t(".issues"), issues_path
              %li= link_to t(".threads"), threads_path
          .account-menu
            %ul
              %li.name= link_to current_user.name, user_profile_path(current_user)
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer

Move the OpenLayers inclusion higher than the application javascripts, so we can override things

!!!
%html
  %head
    %title Cyclekit
    = stylesheet_link_tag    "application"
    %script(src="/openlayers/OpenLayers.js" type="text/javascript")
    = javascript_include_tag "application"
    = csrf_meta_tags
  %body{class: controller_path.gsub('/', '_')}
    %header.top
      .inner
        %h1= link_to t(".title"), root_path
    %nav.bar
      .inner
        - if current_user
          .main-menu
            %ul
              %li= link_to t(".dashboard"), dashboard_path
              - if permitted_to? :manage, :admin_groups
                %li= link_to t(".admin"), admin_groups_path
              %li= link_to t(".issues"), issues_path
              %li= link_to t(".threads"), threads_path
          .account-menu
            %ul
              %li.name= link_to current_user.name, user_profile_path(current_user)
              %li.sign-out= link_to "Sign out", destroy_user_session_path, method: "delete"
        - else
          .public-menu
          .account-menu
            %ul
              %li= link_to "Sign up", new_user_registration_path
              %li= link_to "Sign in", new_user_session_path
    .flash-container
      - [:alert, :notice].each do |type|
        - if flash.key? type
          .flash{class: type}
            = flash[type]
    .content-container
      .content
        = yield
    %footer


%tr
  %td
    = link_to project_commits_path(@project, :ref => branch.name) do
      %strong= branch.name
      - if branch.name == @project.root_ref
        %span.label default
  %td
    = link_to project_commits_path(@project, branch.commit.id) do
      %code= branch.commit.id.to_s[0..10]

    = image_tag gravatar_icon(Commit.new(branch.commit).author_email), :class => "", :width => 16
    = truncate(Commit.new(branch.commit).safe_message, :length => 40)
  %td
    %span.update-author.right
      = time_ago_in_words(branch.commit.committed_date)
      ago
  %td
    - if can? current_user, :download_code, @project
      = link_to "Download", archive_project_repository_path(@project, :ref => branch.name), :class => "visible_link download_repo_link"

Fix broken commit link in branches page

%tr
  %td
    = link_to project_commits_path(@project, :ref => branch.name) do
      %strong= branch.name
      - if branch.name == @project.root_ref
        %span.label default
  %td
    = link_to project_commit_path(@project, branch.commit.id) do
      %code= branch.commit.id.to_s[0..10]

    = image_tag gravatar_icon(Commit.new(branch.commit).author_email), :class => "", :width => 16
    = truncate(Commit.new(branch.commit).safe_message, :length => 40)
  %td
    %span.update-author.right
      = time_ago_in_words(branch.commit.committed_date)
      ago
  %td
    - if can? current_user, :download_code, @project
      = link_to "Download", archive_project_repository_path(@project, :ref => branch.name), :class => "visible_link download_repo_link"


= semantic_form_for parent? ? [parent, resource] : resource do |f|
  = f.semantic_errors

  = f.input :title
  = f.input :file, :as => :file
  = f.input :code, :as => :select, :collection => Attachment.codes
  - if parent?
    - if parent
      - f.object.object = parent
      = f.input :object_id, :as => :hidden
      = f.input :object_type, :as => :hidden
    - else
      = f.input :object, :collection => parent_class.all

  = f.buttons do
    = f.commit_button

Add missing inputs container to attachments form.

= semantic_form_for parent? ? [parent, resource] : resource do |f|
  = f.semantic_errors

  = f.inputs do
    = f.input :title
    = f.input :file, :as => :file
    = f.input :code, :as => :select, :collection => Attachment.codes
    - if parent?
      - if parent
        - f.object.object = parent
        = f.input :object_id, :as => :hidden
        = f.input :object_type, :as => :hidden
      - else
        = f.input :object, :collection => parent_class.all

  = f.buttons do
    = f.commit_button


.move-right
  .blue-box
    %h2.takepart Sign up for the beta
    %p.whenready We'll email you when we're ready.

    %form{:action => "/",
          :method => "POST",
          :onsubmit => 'if (this.email.value == "Email address") { this.email.style.background = "red"; return false; }'}
      %fieldset#actualform
        %ul
          %li
            %input#email{:name => "email",
                         :onblur => "if (this.value == '') { this.value = 'Email address'};",
                         :onfocus => "this.style.background = 'white'; if (this.value == 'Email address') { this.value=''};",
                         :type => "text",
                         :value => "Email address"}
          %li
            %input#contact{:checked => "checked",
                           :name => "contact",
                           :type => "checkbox",
                           :value => "true"}
          %li
            %div
              %div
                %label#contact-label{:for => "contact"} May we contact you to ask about your platform, stack, test suite, etc?
      %fieldset
        %input.call_to_action{:type => "submit",
                              :value => "Get Notified"}

Use Rails form helpers in the form, which makes the CSRF checking work.

.move-right
  .blue-box
    %h2.takepart Sign up for the beta
    %p.whenready We'll email you when we're ready.

    = form_tag("/", :onsubmit => 'if (this.email.value == "Email address") { this.email.style.background = "red"; return false; }') do
      %fieldset#actualform
        %ul
          %li
            = text_field_tag(:email, 'Email address',
                              :onblur => "if (this.value == '') { this.value = 'Email address'};",
                              :onfocus =>  "this.style.background = 'white'; if (this.value == 'Email address') { this.value=''};")
          %li
            = check_box_tag(:contact, 'true', true)
          %li
            %div
              %div
                = label_tag(:contact, "May we contact you to ask about your platform, stack, test suite, etc?", {:id => "contact-label"})
      %fieldset
        = submit_tag("Get Notified", :class => :call_to_action)


= 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
          %li Tiffany Carlos
  .columns.small-12.large-12
    .panel
      %h3.subheader
        September 2014 Graduates
        %ul
          %li Lindsay Fox
          %li Jacqui Nelson
          %li Natasha Joseph

Add my team members' names to graduate list 2014


%nav{class: "navbar navbar-fixed-top"}
  .container
    .navbar-header
      %a.navbar-brand{href: "/"}
        bio
        %strong
          boxes
    %div{id: "navbar"}
      %ul{class: "nav navbar-nav navbar-right"}
        %li
          %a{href: "/getting-started/" }
            Getting Started
        %li
          %a{href: "/contribute/how-to-contribute/" }
            Contribute

Add links to tools in navbar

%nav{class: "navbar navbar-fixed-top"}
  .container
    .navbar-header
      %a.navbar-brand{href: "/"}
        bio
        %strong
          boxes
    %div{id: "navbar"}
      %ul{class: "nav navbar-nav navbar-right"}
        %li
          %a{href: "/getting-started/" }
            Getting Started
        %li
          %a{href: "#", class:"dropdown-toggle",
            "data-toggle": "dropdown",
            role: "button",
            "aria-expanded": "false"}
            Tools
            %span.caret
          %ul{class: "dropdown-menu", role: "menu"}
            %li
              %a{href: "/validate-input/"}
                Input Validator
            %li
              %a{href: "/validator/short-read-assembler/"}
                Assembler Validator
        %li
          %a{href: "/contribute/how-to-contribute/" }
            Contribute


= collection_placeholder bookings, message: 'This customer has no bookings yet' do
  %table.table.table-striped
    %tbody
      = render partial: 'row', collection: bookings, as: :booking
    %tfooter
      %tr
        %td
          %strong Total
        %td
          - total_dives = bookings.size
          %strong= total_dives
          = 'dive'.pluralize(total_dives)
        %td
          - night_dives = bookings.joins{event}.merge(Event.night_dives).size
          %strong= night_dives
          = 'night dive'.pluralize(night_dives)
        %td
          - boat_dives = bookings.joins{event}.merge(Event.boat_dives).size
          %strong= boat_dives
          = 'boat dive'.pluralize(boat_dives)

Add column in bookings table footer

= collection_placeholder bookings, message: 'This customer has no bookings yet' do
  %table.table.table-striped
    %tbody
      = render partial: 'row', collection: bookings, as: :booking
    %tfooter
      %tr
        %td
          %strong Total
        %td
          - total_dives = bookings.size
          %strong= total_dives
          = 'dive'.pluralize(total_dives)
        %td
          - night_dives = bookings.joins{event}.merge(Event.night_dives).size
          %strong= night_dives
          = 'night dive'.pluralize(night_dives)
        %td
          - boat_dives = bookings.joins{event}.merge(Event.boat_dives).size
          %strong= boat_dives
          = 'boat dive'.pluralize(boat_dives)
        %td


!!!
%head
  %title Serveme
  = stylesheet_link_tag    "application", :media => "all"
  = javascript_include_tag "application"
  = csrf_meta_tags
  = render 'shared/google_analytics'
%body

  = render 'shared/navigation'

  = render 'shared/fork_me_on_github'

  .container-fluid

    .alert.alert-error
      Due to a problem with the reservation system's connection to steam, you might not be able to log in :(

    = render 'shared/nag_message' if current_user

    = render 'shared/flash'

    = yield

  = render 'shared/timezone'

Revert "steam login failure notice"

!!!
%head
  %title Serveme
  = stylesheet_link_tag    "application", :media => "all"
  = javascript_include_tag "application"
  = csrf_meta_tags
  = render 'shared/google_analytics'
%body

  = render 'shared/navigation'

  = render 'shared/fork_me_on_github'

  .container-fluid

    = render 'shared/nag_message' if current_user

    = render 'shared/flash'

    = yield

  = render 'shared/timezone'


- content_for :title, "Inbox"
- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Messages', notifications_path

- if @notifications.empty?
  .alert.alert-success{role: "alert"} You have no messages.
- else
  = paginate @notifications, theme: 'twitter-bootstrap-3'

  - @notifications.each do |n|
    .card.message
      .card-body
        .row
          .col-6.col-md-9
            %h3= link_to  n.subject, notification_path(n)
            %p
              - if n.read
                = icon 'far', 'envelope-open'
              - else
                = icon 'far', 'envelope'
                %strong unread
              = n.created_at
          .col-6.col-md-3.text-right
            = link_to n.sender do
              %h3
                = render 'members/tiny', member: n.sender
                = n.sender
            = render 'members/follow_buttons', member: n.sender
      .card-footer
        = link_to 'Read', n, class: 'btn btn-primary'
        = link_to 'Reply', reply_link(n), class: 'btn btn-secondary'
        = link_to n, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-danger btn-xs' do
          = delete_icon
          = t('buttons.delete')
  = paginate @notifications

Remove unnecesary theme param from pagination

- content_for :title, "Inbox"
- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Messages', notifications_path

- if @notifications.empty?
  .alert.alert-success{role: "alert"} You have no messages.
- else
  = paginate @notifications

  - @notifications.each do |n|
    .card.message
      .card-body
        .row
          .col-6.col-md-9
            %h3= link_to  n.subject, notification_path(n)
            %p
              - if n.read
                = icon 'far', 'envelope-open'
              - else
                = icon 'far', 'envelope'
                %strong unread
              = n.created_at
          .col-6.col-md-3.text-right
            = link_to n.sender do
              %h3
                = render 'members/tiny', member: n.sender
                = n.sender
            = render 'members/follow_buttons', member: n.sender
      .card-footer
        = link_to 'Read', n, class: 'btn btn-primary'
        = link_to 'Reply', reply_link(n), class: 'btn btn-secondary'
        = link_to n, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-danger btn-xs' do
          = delete_icon
          = t('buttons.delete')
  = paginate @notifications


%div.jumbotron
  %div.container
    %h4
      Optumm

%div.container
  %div.row
    %div.col-md-12
      %iframe{:src=>"https://www.mapbox.com/bites/00011/", :frameborder=>"no", :width=>"100%", :height=>"400"}
  %div.row
    %div.col-md-12
      Our aim is to improve the cycling experience.  First in Glasgow, then the world!

  %div.row
    %div.col-md-12
      %a{ :href => "/poll", :title => "Help Us Out!"} Help Us Out

Make the homepage more start-up-y

%div.jumbotron{style: 'padding: 28px;'}
  %div.row
    %div.col-md-6.col-sm-offset-3
      %h1
        Optumm

%div.container
  %div.row
    %div.col-md-6
      %iframe{:src=>"https://www.mapbox.com/bites/00011/", :frameborder=>"no", :width=>"100%", :height=>"300"}
    %div.col-md-6
      %iframe{:src=>"//www.youtube.com/embed/mrNSAqiO0SY?autoplay=1&controls=0&showinfo=0&rel=0&hd=1", width: '100%', height: '300', frameborder: "0"}
  %div.row
    %div.col-md-6.col-sm-offset-3
      %h3
        %span.glyphicon.glyphicon-map-marker
        Our aim is to improve your cycling experience.
      %h5.text-center
        First in Glasgow, then in the wider world!

  %hr
  %div.row
    %div.col-md-6
      %h4
        %span.glyphicon.glyphicon-link
        How can I help?
      Let us know what you'd like to see in our app, with this
      %a{ :href => "/poll", :title => "Help Us Out!"}
        quick questionnaire!
      %br
      We value your honest feedback, throughout the development process.

    %div.col-md-6
      %h4
        %span.glyphicon.glyphicon-eye-open
        Looking for goodies to play with?
      An online smart-map for orientation when out-and-about is available
      %a{href: 'http://include.cat:8008'}
        here.
      %br
      Find a quick route to important resources, including public toilets and bike-racks!


= inject_enterprises

%shop.darkswarm
  - content_for :order_cycle_form do

    %div{"ng-controller" => "OrderCycleChangeCtrl"}
      %closing{"ng-if" => "OrderCycle.selected()"}
        Next order closing
        %strong {{ OrderCycle.orders_close_at() | date_in_words }}

      %span Ready for

      / Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate

      %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
              "ng-change" => "changeOrderCycle()",
              "ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
              "popover-placement" => "bottom", "popover" => "When do you want to get your order?", "popover-trigger" => "openTrigger"}

  = render partial: "shopping_shared/details"

  .row
    = render partial: "shop/products/form"

= render partial: "shared/footer"

Change the language and layout of order cycle popover

= inject_enterprises

%shop.darkswarm
  - content_for :order_cycle_form do

    %div{"ng-controller" => "OrderCycleChangeCtrl"}
      %closing{"ng-if" => "OrderCycle.selected()"}
        Next order closing
        %strong {{ OrderCycle.orders_close_at() | date_in_words }}

      %span Ready for

      / Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate

      %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
              "ng-change" => "changeOrderCycle()",
              "ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
              "popover-placement" => "left", "popover" => "Choose when you want your order:", "popover-trigger" => "openTrigger"}

  = render partial: "shopping_shared/details"

  .row
    = render partial: "shop/products/form"

= render partial: "shared/footer"


.page-header
  %h1= @app.name

%h2 How to send mail via Cuttlefish for #{@app.name}

%p
  Simple send smtp email in the normal way from your application with the following details
  %table.table.table-condensed
    %tr
      %td Host
      %td
        %strong= Rails.configuration.cuttlefish_domain
      %td
    %tr
      %td Port
      %td
        %strong= Rails.configuration.cuttlefish_smtp_port
      %td
    %tr
      %td Username
      %td
        %strong= @app.smtp_username
      %td
    %tr
      %td Password
      %td
        %strong= @app.smtp_password
      %td
        - unless @app.smtp_password_locked?
          = button_to "Keep this password", lock_password_app_path(@app), class: "btn btn-mini btn-primary"
          = button_to "Give me a new password", new_password_app_path(@app), class: "btn btn-mini"
    %tr
      %td Authentication
      %td
        %strong plain
      %td
%p Specific instructions for different languages and frameworks coming soon.

%p
  So far #{@app.name} has sent #{pluralize(@app.emails.count, 'email')}.
%hr
%h3 Remove this App

%p
  Here lies danger. Removing the app from Cuttlefish is permanent and can not be undone!
%p
  = button_to "Remove App", @app, :confirm => "Are you sure?", :method => :delete, :class => "btn btn-danger"

Remove ability from the ui to change password

.page-header
  %h1= @app.name

%h2 How to send mail via Cuttlefish for #{@app.name}

%p
  Simple send smtp email in the normal way from your application with the following details
  %table.table.table-condensed
    %tr
      %td Host
      %td
        %strong= Rails.configuration.cuttlefish_domain
    %tr
      %td Port
      %td
        %strong= Rails.configuration.cuttlefish_smtp_port
    %tr
      %td Username
      %td
        %strong= @app.smtp_username
    %tr
      %td Password
      %td
        %strong= @app.smtp_password
    %tr
      %td Authentication
      %td
        %strong plain
%p Specific instructions for different languages and frameworks coming soon.

%p
  So far #{@app.name} has sent #{pluralize(@app.emails.count, 'email')}.
%hr
%h3 Remove this App

%p
  Here lies danger. Removing the app from Cuttlefish is permanent and can not be undone!
%p
  = button_to "Remove App", @app, :confirm => "Are you sure?", :method => :delete, :class => "btn btn-danger"


=content_for :h1 do
  #type Catalog
  #name
    =@catalog.title
    -if user_signed_in?
      %span.action
        =link_to image_tag("fassets_core/edit.png"), edit_catalog_path(@catalog)
#sidebar.fassets_core
  -if user_signed_in?
    .collapsible
      %h2.title Add Facet
      =form_for [@catalog, Facet.new], :url => catalog_facets_path(@catalog, Facet.new) do |f|
        =render :partial => "facets/form", :object => f
        =submit_tag "Create"
  %ul#facets{"data-update-url" => sort_catalog_facets_url(@catalog)}
    =render :partial => "facet", :collection => @catalog.facets.all(:order => "position ASC")

#catalog_main
  -if @filter.empty?
    %h2 Assets
  -else
    %h2
      Filtered Assets
    #filter
      %ul
        =render :partial => "filter_item", :collection => Label.in(@filter)
        %li{:style => "clear:both"}=link_to "clear filter", catalog_path(@catalog), :class => "icon remove"
  %ul#assets
    =render :partial => "shared/asset", :collection => @assets, :locals => {:tp => nil}

Change facet list from unordered to ordered

=content_for :h1 do
  #type Catalog
  #name
    =@catalog.title
    -if user_signed_in?
      %span.action
        =link_to image_tag("fassets_core/edit.png"), edit_catalog_path(@catalog)
#sidebar.fassets_core
  -if user_signed_in?
    .collapsible
      %h2.title Add Facet
      =form_for [@catalog, Facet.new], :url => catalog_facets_path(@catalog, Facet.new) do |f|
        =render :partial => "facets/form", :object => f
        =submit_tag "Create"
  %ol#facets{"data-update-url" => sort_catalog_facets_url(@catalog)}
    =render :partial => "facet", :collection => @catalog.facets.all(:order => "position ASC")

#catalog_main
  -if @filter.empty?
    %h2 Assets
  -else
    %h2
      Filtered Assets
    #filter
      %ul
        =render :partial => "filter_item", :collection => Label.in(@filter)
        %li{:style => "clear:both"}=link_to "clear filter", catalog_path(@catalog), :class => "icon remove"
  %ul#assets
    =render :partial => "shared/asset", :collection => @assets, :locals => {:tp => nil}