- clazz = teacher_clazz.clazz

%li
  %div.class_list_element
    %table
      %tr
        %td.class_list_element_container
          %table{:cellpadding => "0", :cellspacing => "0", :border => "0"}
            %tr
              %td{:style=>"width:50px;"}
                %input{:type => "checkbox", :id => "teacher_clazz[#{teacher_clazz.id}]", :name => "teacher_clazz[]", :value => teacher_clazz.id, :checked => active_selected}
                %input{:type => "hidden", :id => "teacher_clazz_position[#{teacher_clazz.id}]", :name => "teacher_clazz_position[]", :value => teacher_clazz.id}
              %td{:style=>"width:350px;"}
                - clazz_name = (clazz.name.length > 20)? clazz.name[0,20]+"..." : clazz.name
                %label{:for => "teacher_clazz[#{teacher_clazz.id}]", :title=> clazz.name} #{clazz_name}
              %td
                %a{ :id => "message",:href => "javascript:void(0)", :onclick => "showCopyClassPopup(#{clazz.id}, \"#{url_encode clazz.name}\", \"#{url_encode clazz.class_word}\", \"#{url_encode teacher_clazz.clazz.description}\")" } Copy Class

Update as per Noah's suggestion.

- clazz = teacher_clazz.clazz

%li
  %div.class_list_element
    %table
      %tr
        %td.class_list_element_container
          %table{:cellpadding => "0", :cellspacing => "0", :border => "0"}
            %tr
              %td{:style=>"width:50px;"}
                %input{:type => "checkbox", :id => "teacher_clazz[#{teacher_clazz.id}]", :name => "teacher_clazz[]", :value => teacher_clazz.id, :checked => active_selected}
                %input{:type => "hidden", :id => "teacher_clazz_position[#{teacher_clazz.id}]", :name => "teacher_clazz_position[]", :value => teacher_clazz.id}
              %td{:style=>"width:350px;"}
                %label{:for => "teacher_clazz[#{teacher_clazz.id}]", :title=> clazz.name} #{clazz.name.truncate(20)}
              %td
                %a{ :id => "message",:href => "javascript:void(0)", :onclick => "showCopyClassPopup(#{clazz.id}, \"#{url_encode clazz.name}\", \"#{url_encode clazz.class_word}\", \"#{url_encode teacher_clazz.clazz.description}\")" } Copy Class


= render :partial => "layouts/flash_msg"
- if @sb[:active_accord] == :schedules || params[:pressed] == "miq_report_schedule_add"
  - if @in_a_form
    = render :partial => 'schedule_form'
  - elsif @schedule
    = render :partial => 'show_schedule'
  - elsif @schedules && @view
    - if @view.table.data.empty?
      = render :partial => 'layouts/info_msg', :locals => {:message => _("No Schedules available.")}
    - else
      = render :partial => 'layouts/x_gtl'
  - else
    = render :partial => 'layouts/info_msg', :locals => {:message => _("Choose a Schedule to view from the menus on the left.")}

Remove duplicated flash message from reporting schedule page


- page_title "fluentd"

%div.row
  %div.col-lg-6
    %div.well
      %span= link_to icon("fa-cog") << t(".setup", target: "fluentd"), new_fluentd_path(variant: "fluentd_gem"), class: "btn btn-primary btn-lg"
  %div.col-lg-6
    %div.well
      %span
        = link_to icon("fa-cog") << t(".setup", target: "td-agent"), new_fluentd_path(variant: "td-agent"), class: "btn btn-lg #{has_td_agent_system? ? "btn-primary" : "btn-default disabled"}"
        - unless has_td_agent_system?
          = link_to t('.install_it', target: "td-agent"), "http://docs.treasuredata.com/articles/td-agent"

Fix translation on initial setup

- page_title "fluentd"

%div.row
  %div.col-lg-6
    %div.well
      %span= link_to icon("fa-cog") << t("terms.setup", target: "fluentd"), new_fluentd_path(variant: "fluentd_gem"), class: "btn btn-primary btn-lg"
  %div.col-lg-6
    %div.well
      %span
        = link_to icon("fa-cog") << t("terms.setup", target: "td-agent"), new_fluentd_path(variant: "td-agent"), class: "btn btn-lg #{has_td_agent_system? ? "btn-primary" : "btn-default disabled"}"
        - unless has_td_agent_system?
          = link_to t('terms.install_it', target: "td-agent"), "http://docs.treasuredata.com/articles/td-agent"


= simple_form_for([campaign, game, subject, comment]) do |f|
  = f.error_notification

  .form-inputs
    = f.input :content, label: false, placeholder: "Content", input_html: { style: 'min-height: 20em;' }

  .form-actions
    = f.button :submit, class: 'btn btn-success'

Modify comments form to fit posts and ideas

- form_vars = [campaign, game, subject, comment] if subject.is_a? Post
- form_vars = [campaign, subject, comment] if subject.is_a? Idea
= simple_form_for(form_vars) do |f|
  = f.error_notification

  .form-inputs
    = f.input :content, label: false, placeholder: "Content", input_html: { style: 'min-height: 20em;' }

  .form-actions
    = f.button :submit, class: 'btn btn-success'


- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_or_null_user.can_create?(Machine)
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "New Machine")
      - else
        = link_to signin_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "New Machine")

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine

Fix button for adding machines

- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_or_null_user.can_create?(Machine)
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: "Add a new Machine"
      - else
        = link_to signin_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: "Add a new Machine"

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine


.container
  %table
    %thead
      %tr
        %th.align-right #
        %th.align-left Name
        %th.align-right Duration
        %th.align-right Finished at
    %tbody
      - splits.each_with_index do |split, index|
        %tr
          %td.align-right= index + 1
          %td.align-left= split[:name].present? ? split[:name] : '-'
          %td.align-right
            - if split[:duration] > 0 && split[:duration] == split[:best].try(:[], :duration)
              .gold-split{title: "Gold"}
            = render partial: 'shared/time', locals: {time: split[:duration], show_milliseconds: @run.short?}
          %td.align-right= render partial: 'shared/time', locals: {time: split[:finish_time], show_milliseconds: @run.short?}

Fix some golds not showing as golds

.container
  %table
    %thead
      %tr
        %th.align-right #
        %th.align-left Name
        %th.align-right Duration
        %th.align-right Finished at
    %tbody
      - splits.each_with_index do |split, index|
        %tr
          %td.align-right= index + 1
          %td.align-left= split[:name].present? ? split[:name] : '-'
          %td.align-right
            - if split[:duration] > 0 && split[:duration].round(6) == split[:best].try(:[], :duration).try(:round, 6)
              .gold-split{title: "Gold"}
            = render partial: 'shared/time', locals: {time: split[:duration], show_milliseconds: @run.short?}
          %td.align-right= render partial: 'shared/time', locals: {time: split[:finish_time], show_milliseconds: @run.short?}


- breadcrumb('Manufacturers', :manufacturers)
- breadcrumb(@manufacturer.name, @manufacturer)

= record_name(@manufacturer.name, 'building')

= content(:class => 'inset') do
  %p TODO

= footer do
  = edit_button(@manufacturer)
  = delete_button(@manufacturer)

Add a basic view of manufacturer details

- breadcrumb('Manufacturers', :manufacturers)
- breadcrumb(@manufacturer.name, @manufacturer)

= record_name(@manufacturer.name, 'building')

= content(:class => 'inset') do
  %div.overview
    = column(4, :class => 'asset-preview') do
      %div.frame
        - if @manufacturer.images.empty?
          %span(class='no-preview image')
        - else
          = image_tag(@manufacturer.images.first.previews.url(:thumb), :class => @manufacturer.images.first.orientation)

    = column(8, :class => 'product-description') do
      %ul.key-value
        %li.desc
          %span.key Description
          %div.value
            = simple_format(@manufacturer.description)

        %li
          %span.key Created at
          %div.value= creation_time(@manufacturer)

        %li
          %span.key Updated at
          %div.value= update_time(@manufacturer)

= footer do
  = edit_button(@manufacturer)
  = delete_button(@manufacturer)


:javascript
  window.lp.fs.log(function(){
    return {
      url: window.location.href,
      referrer: document.referrer,
      viewport: document.documentElement.clientWidth,
      variant: window.lp.getCookie("_v"),
      schema: "0.1"
    };
  }());

Remove `schema` attribute from flamsteed log event

:javascript
  window.lp.fs.log(function(){
    return {
      url: window.location.href,
      referrer: document.referrer,
      viewport: document.documentElement.clientWidth,
      variant: window.lp.getCookie("_v")
    };
  }());


%h3= t(:routes_with_code)
=link_to t(:check_all), '', :id => 'assign-all-routes'
=link_to t(:uncheck_all), '', :id => 'unassign-all-routes'
%table.new-operator-routes
  %tr
    %th= t(:name)
    %th= t(:region)
    %th= t(:terminuses)
    %th= t(:search)
    %th= t(:assign_to_operator)
  - @routes.each do |route|
    - f.fields_for :route_operators, RouteOperator.new(:route => route) do |route_operator_fields|
      %tr
        %td= link_to route.name, main_url(location_path(route)), :target => '_blank'
        %td= route.region.name
        %td.route-terminuses= route.area
        %td= link_to t(:external_search), external_search_link("#{route.name} #{route.region.name}"), :target => '_blank'
        %td
          != route_operator_fields.hidden_field :route_id
          != route_operator_fields.check_box :_add, :class => 'assign-route'

Use area in external search

%h3= t(:routes_with_code)
=link_to t(:check_all), '', :id => 'assign-all-routes'
=link_to t(:uncheck_all), '', :id => 'unassign-all-routes'
%table.new-operator-routes
  %tr
    %th= t(:name)
    %th= t(:region)
    %th= t(:terminuses)
    %th= t(:search)
    %th= t(:assign_to_operator)
  - @routes.each do |route|
    - f.fields_for :route_operators, RouteOperator.new(:route => route) do |route_operator_fields|
      %tr
        %td= link_to route.name, main_url(location_path(route)), :target => '_blank'
        %td= route.region.name
        %td.route-terminuses= route.area
        %td= link_to t(:external_search), external_search_link("#{route.name} #{route.area}"), :target => '_blank'
        %td
          != route_operator_fields.hidden_field :route_id
          != route_operator_fields.check_box :_add, :class => 'assign-route'


.controls.sixteen.columns.alpha{ 'ng-hide' => 'RequestMonitor.loading || products.length == 0' }
  .ten.columns.alpha.index-controls
    .per-page{'ng-show' => '!RequestMonitor.loading && products.length > 0'}
      %input.per-page-select.ofn-select2{type: 'number', data: 'per_page_options', 'ng-model' => 'per_page', 'ng-change' => 'fetchResults()'}

      %span.per-page-feedback
        {{ 'spree.admin.orders.index.results_found' | t:{number: pagination.results} }}
        {{ 'spree.admin.orders.index.viewing' | t:{start: ((pagination.page -1) * pagination.per_page) +1, end: ((pagination.page -1) * pagination.per_page) + products.length} }}

  .six.columns.omega
    %columns-dropdown{ action: "#{controller_name}_#{action_name}" }

Hide search in dropdown for per_page options

.controls.sixteen.columns.alpha{ 'ng-hide' => 'RequestMonitor.loading || products.length == 0' }
  .ten.columns.alpha.index-controls
    .per-page{'ng-show' => '!RequestMonitor.loading && products.length > 0'}
      %input.per-page-select.ofn-select2{type: 'number', data: 'per_page_options', 'min-search' => 999, 'ng-model' => 'per_page', 'ng-change' => 'fetchResults()'}

      %span.per-page-feedback
        {{ 'spree.admin.orders.index.results_found' | t:{number: pagination.results} }}
        {{ 'spree.admin.orders.index.viewing' | t:{start: ((pagination.page -1) * pagination.per_page) +1, end: ((pagination.page -1) * pagination.per_page) + products.length} }}

  .six.columns.omega
    %columns-dropdown{ action: "#{controller_name}_#{action_name}" }


%select{  name:"champs['#{champ.id}']",
          id: "champs_#{champ.id}" }
  - champ.drop_down_list.options.each do |option|
    - if (option=~ /^--.*--$/).nil?
      - if champ.value == option
        %option{selected:''}
          = option
      - else
        %option
          = option
    -else
      %option{disabled:''}
        = option

Fix bug select options blank

%select{  name:"champs['#{champ.id}']",
          id: "champs_#{champ.id}" }
  - unless champ.drop_down_list.blank?
    - champ.drop_down_list.options.each do |option|
      - if (option=~ /^--.*--$/).nil?
        - if champ.value == option
          %option{selected:''}
            = option
        - else
          %option
            = option
      -else
        %option{disabled:''}
          = option


.ui-box
  .title
    Projects (#{projects.count})
    - if can? current_user, :manage_group, @group
      %span.pull-right
        = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
          %i.icon-plus
          New project
  %ul.well-list
    - if projects.blank?
      %p.nothing_here_message This groups has no projects yet
    - projects.each do |project|
      %li.project-row
        = link_to project_path(project), class: dom_class(project) do
          .dash-project-access-icon
            = visibility_level_icon(project.visibility_level)
          %span.project-name
            = truncate(project.name, length: 25)
          %span.arrow
            %i.icon-angle-right
          %span.last-activity
            %span Last activity:
            %span.date= project_last_activity(project)

Hide last activity from group projects list


%table.table.table-striped.esr_files.collection
  %thead
    %tr
      %th= t_attr :updated_at, EsrFile
      %th.right= t_attr :bookings, EsrFile
      %th.right= t_attr :invalid_bookings, EsrFile
      %th.right= t_attr :missing_bookings, EsrFile
      %th.right= t_attr :total_amount, EsrFile
      %th.action-links
  %tbody
    = render @esr_files

  %tfoot
    %tr#invoices_list_footer
      %th{:colspan => 5}= will_paginate @esr_files, :params => {:query => params[:query]}

Drop pagination footer from esr_files/list.


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

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

Change header to say strongarm

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

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


%h1 Listing questions

%table
  %thead
    %tr
      %th User
      %th
      %th
      %th

  %tbody
    - @questions.each do |question|
      %tr
        %td= get_user(question.user_id).username
        %td= question.all_lectures
        %td= link_to 'Show', question
        %td= link_to 'Edit', edit_question_path(question)
        %td= link_to 'Destroy', question, :method => :delete, :data => { :confirm => 'Are you sure?' }
        %td= question.all_topics

%br

- if is_instructor?
  = link_to 'New Multiple Choice Questions', new_question_path
  \|
  = link_to 'New Short Answer Question', short_question_path

Clean up question display table

%h1 Listing questions

%table
  %thead
    %tr
      %th Creator
      %th Lectures
      %th Actions
      %th Topics

  %tbody
    - @questions.each do |question|
      %tr
        %td= get_user(question.user_id).username
        %td= question.all_lectures
        %td
          = link_to 'Show', question
          \-
          = link_to 'Edit', edit_question_path(question)
          \-
          = link_to 'Destroy', question, :method => :delete, :data => { :confirm => 'Are you sure?' }
        %td= question.all_topics

%br

- if is_instructor?
  = link_to 'New Multiple Choice Questions', new_question_path
  \|
  = link_to 'New Short Answer Question', short_question_path


%h1
  Listing petitions

%table.table.table-striped.table-condensed
  %tr
    %th.span3
      Title
    %th.span7
      Description
    %th.span1
    %th.span1
    - if current_user && (current_user.is_super_user || current_user.is_admin)
      %th.span2
        Petition to Send

  - @petitions.each do |petition|
    %tr
      %td
        #{petition.title}
      %td
        = simple_format(petition.description)
      %td.calign
        = link_to('Show', petition)
      %td.calign
        = link_to('Edit', edit_petition_path(petition))
      - if current_user && (current_user.is_super_user || current_user.is_admin)
        %td.calign
          =check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true

= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')

Change Petition to Send label to Petition to Feature

%h1
  Listing petitions

%table.table.table-striped.table-condensed
  %tr
    %th.span3
      Title
    %th.span7
      Description
    %th.span1
    %th.span1
    - if current_user && (current_user.is_super_user || current_user.is_admin)
      %th.span2
        Feature this Petition

  - @petitions.each do |petition|
    %tr
      %td
        #{petition.title}
      %td
        = simple_format(petition.description)
      %td.calign
        = link_to('Show', petition)
      %td.calign
        = link_to('Edit', edit_petition_path(petition))
      - if current_user && (current_user.is_super_user || current_user.is_admin)
        %td.calign
          =check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true

= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')


%li{ ng: { class: "{active: selector.active}" } }
  %a{ ng: { transclude: true, class: "{active: selector.active}" } }

Add tooltip with value for selectors

%li{ ng: { class: "{active: selector.active}" } }
  %a{ "tooltip" => "{{selector.object.value}}", "tooltip-placement" => "bottom",
    ng: { transclude: true, class: "{active: selector.active, 'has-tip': selector.object.value}" } }


%h2(data-mercury='simple')><
  = render_region :header do
    Header
%section.container
  = render_region :content, tag: :article do
    Add content here

Add ids to default template in install generator

%h2#header(data-mercury='simple')><
  = render_region :header do
    Header
%section#content.container
  = render_region :content, tag: :article do
    Add content here


%li#home.trail= link_to 'Home', home_path
%li.trail= link_to 'About', about_path
- if current_user.has_role?('admin', 'manager', 'researcher', 'author', 'member') || current_user.portal_teacher
  %li.trail=link_to(top_level_container_name.humanize.pluralize, investigations_path)
- if current_user.has_role?('admin') || current_user.portal_teacher
  %li.trail= link_to "#{ResourcePage.display_name.pluralize}", resource_pages_path
- if current_user.portal_teacher
  %li.trail= link_to 'Browse Instructional Materials' , "/search"
- if current_user.has_role?('guest')
  %li.trail= link_to "Unit Previews", preview_list_link
  %li.trail= link_to 'Browse Instructional Materials' , "/search"

Remove links from top menu

%li#home.trail= link_to 'Home', home_path
%li.trail= link_to 'About', about_path
- if current_user.portal_teacher
  %li.trail= link_to 'Browse Instructional Materials' , "/search"
- if current_user.has_role?('guest')
  %li.trail= link_to "Unit Previews", preview_list_link
  %li.trail= link_to 'Browse Instructional Materials' , "/search"


- content_for :injection_data do
  = inject_current_order_cycle

- unless no_open_order_cycles?
  %ordercycle{"ng-controller" => "OrderCycleCtrl"}
    %form.custom
      = yield :order_cycle_form

Add ng-cloak to ordercycle box to improve appearance whilst page loads

- content_for :injection_data do
  = inject_current_order_cycle

- unless no_open_order_cycles?
  %ordercycle{"ng-controller" => "OrderCycleCtrl", "ng-cloak" => true}
    %form.custom
      = yield :order_cycle_form


%section#contact
  .container
    .row
      .col-lg-12.text-center
        %h2.section-heading Contact Us
        %h3.section-subheading.text-muted Any question? Do you want to become a member? Ask us!
    .row
      .col-lg-12.text-center
        %ul.list-inline.social-buttons
          %li
            %a{:href => "mailto:info@rubybelgium.be", :title => "info [at] rubybelgium [dot] be"}
              %i.fa.fa-envelope
          %li
            %a{:href => "http://rubyburgers.herokuapp.com/", :title => "chat rooms"}
              %i.fa.fa-slack
          %li
            %a{:href => "https://twitter.com/brug_be/", :title => "@brug_be"}
              %i.fa.fa-twitter

Use the new Twitter handle in contact section

%section#contact
  .container
    .row
      .col-lg-12.text-center
        %h2.section-heading Contact Us
        %h3.section-subheading.text-muted Any question? Do you want to become a member? Ask us!
    .row
      .col-lg-12.text-center
        %ul.list-inline.social-buttons
          %li
            %a{:href => "mailto:info@rubybelgium.be", :title => "info [at] rubybelgium [dot] be"}
              %i.fa.fa-envelope
          %li
            %a{:href => "http://rubyburgers.herokuapp.com/", :title => "chat rooms"}
              %i.fa.fa-slack
          %li
            %a{:href => "https://twitter.com/rubybelgium/", :title => "@rubybelgium"}
              %i.fa.fa-twitter


:ruby
  rep = CapitalPlanSummaryReport.new
  results = rep.get_data(@organization_list, {})
  if highlight_years.nil?
    highlight_years = []
  end

#plan-summary
  .row
    - results[:data].each do |row|
      - highlight = highlight_years.include? row[0]
      = render :partial => 'capital_projects/capital_plan_summary_detail', :locals => {:year => row[0], :num_replace => row[1], :num_rehab => row[2], :num_remove => row[3], :cost => row[4], :highlight => highlight}

Fix HAML issue because HAML is not ruby -- just pretends to be most of the time

:ruby
  rep = CapitalPlanSummaryReport.new
  results = rep.get_data(@organization_list, {})
  if ! defined? highlight_years
    highlight_years = []
  end

#plan-summary
  .row
    - results[:data].each do |row|
      - highlight = highlight_years.include? row[0]
      = render :partial => 'capital_projects/capital_plan_summary_detail', :locals => {:year => row[0], :num_replace => row[1], :num_rehab => row[2], :num_remove => row[3], :cost => row[4], :highlight => highlight}


%aside.who-am-i.yes
	%h1{title: 'Away from the keyboard, what defines me, in a nutshell?'}
		Caesium, abridged

	%ul
		%li Cyclist
		%li Dog Owner
		%li Low Carb, High Fat
		%li Scuba Diver
		%li{title: 'Born in York'} Yorkshireman

.md
	%h1 cae.me.uk

	%p
		Hi. You've reached Chris (Caesium) Elsworth's personal website.

	%p
		I'm a programmer based in Solihull, currently contracting for
		%a{href: '//en.wikipedia.org/wiki/BBC_Research_%26_Development'}
			BBC Research & Development,
		with a history in ISP sysadmin at
		%a{href: '//en.wikipedia.org/wiki/Demon_Internet'}
			Demon Internet.

	%p
		I mostly use Ruby and C, and there's a couple of iOS apps with
		my name on them.

		Recently I'm also developing an interest in microprocessor
		(Atmel AVR and Espressif ESP8266) programming and the electronics
		associated with such things.

		My
		%a{href: '/p/cv'} CV
		has a more complete listing of what I've done and where I've been.

	%p
		You can find me on Freenode IRC as Caesium. You will not find me on
		Facebook, Twitter, or other social media; their privacy policies
		are invariably appalling.

Remove Abridged box, didn't like it. Some rewriting.

.md
	%h1 cae.me.uk

	%figure{class: 'right'}
		%img{src: '/images/photos/IMG_1794.jpg', style: 'width: 120px', alt: 'Caesium, May 2016'}
		%figcaption
			Yep, that's me.

	%p
		Hi. I'm Chris (Caesium) Elsworth.

	%p
		I'm a programmer and sysadmin based in Solihull, currently
		contracting for
		%a{href: '//en.wikipedia.org/wiki/BBC_Research_%26_Development'}
			BBC Research & Development.

		Since you're here, you're probably either looking for
		%a{href: '/p/cv'} my CV
		or some more
		%a{href: '/p/caesium:irl'} personal details about me.

	%p
		I mostly use Ruby and C, and there's a couple of iOS apps with
		my name on them.

		Recently I'm also developing an interest in microprocessor
		(Atmel AVR and Espressif ESP8266) programming and the electronics
		associated with such things.

	%p
		You can find me on Freenode IRC as Caesium. You will not find me on
		Facebook, Twitter, or other social media; their privacy policies
		are invariably appalling.


.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-xs-12
      %h2
        %small.pre-heading Recent new users
        Welcome to morph.io
      %ul.owner-list-simple.list-unstyled.list-inline
        - User.where.not(name: nil).order(created_at: :desc).limit(8).each do |user|
          %li.owner-item= link_to owner_image(user, 60), user
      %p= link_to "See more of the #{pluralize(User.count, "user")}…", users_path

Add class for styling new users block

.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
    .new-users-block.col-xs-12
      %h2
        %small.pre-heading Recent new users
        Welcome to morph.io
      %ul.owner-list-simple.list-unstyled.list-inline
        - User.where.not(name: nil).order(created_at: :desc).limit(8).each do |user|
          %li.owner-item= link_to owner_image(user, 60), user
      %p= link_to "See more of the #{pluralize(User.count, "user")}…", users_path


- if pitch.editable_by?(current_user) || pitch.featureable_by?(current_user) || pitch.postable_by?(current_user) || (pitch.story && pitch.fact_checker == current_user) || (pitch.fully_funded? && current_user == pitch.user)
  .block-spacer-negative
- if pitch.editable_by?(current_user)
  .centered= link_to image_tag("edit_this_pitch_b.png"), edit_pitch_path(pitch)
- if pitch.featureable_by?(current_user)
  - if pitch.featured?
    .centered= link_to image_tag('un-feature.gif'), unfeature_pitch_path(pitch), :method => :put
  - else
    .centered= link_to image_tag('feature_this_pitch.png'), feature_pitch_path(pitch), :method => :put
- if pitch.postable_by?(current_user)
  = link_to image_tag('make_blog_post.gif'), new_pitch_post_path(pitch)
- if pitch.story && pitch.fact_checker == current_user
  = link_to image_tag('go_to_story.gif'), story_path(pitch.story)
- if pitch.fully_funded? && current_user == pitch.user
  = link_to image_tag('report.gif'), edit_story_path(pitch.story)

Remove excessive logic in action buttons partial

- if pitch.editable_by?(current_user) || pitch.featureable_by?(current_user) || pitch.postable_by?(current_user)
  .block-spacer-negative
- if pitch.editable_by?(current_user)
  .centered= link_to image_tag("edit_this_pitch_b.png"), edit_pitch_path(pitch)
- if pitch.featureable_by?(current_user)
  - if pitch.featured?
    .centered= link_to image_tag('un-feature.gif'), unfeature_pitch_path(pitch), :method => :put
  - else
    .centered= link_to image_tag('feature_this_pitch.png'), feature_pitch_path(pitch), :method => :put
- if pitch.postable_by?(current_user)
  = link_to image_tag('make_blog_post.gif'), new_pitch_post_path(pitch)
- if pitch.story && pitch.fact_checker == current_user
  = link_to image_tag('go_to_story.gif'), story_path(pitch.story)
- if pitch.fully_funded? && current_user == pitch.user
  = link_to image_tag('report.gif'), edit_story_path(pitch.story)


- breadcrumb_title "Clusters"
- page_title "Clusters"

.clusters-container
  - if @clusters.empty? && (@scope.nil? || @scope == 'all')
    = render "empty_state"
  - elsif @clusters.empty? && (!@scope.nil? || @scope != 'all')
    = render "tabs"
    .prepend-top-20.text-center
      = s_("ClusterIntegration|There are no clusters to show")
  - else
    = render "tabs"
    .ci-table.js-clusters-list
      .gl-responsive-table-row.table-row-header{ role: "row" }
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Cluster")
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Environment pattern")
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Project namespace")
        .table-section.section-10{ role: "rowheader" }
      - @clusters.each do |cluster|
        = render "cluster", cluster: cluster
    = paginate @clusters, theme: "gitlab"

Fix Cluster index view @scope logic

- breadcrumb_title "Clusters"
- page_title "Clusters"

.clusters-container
  - if !@clusters.empty?
    = render "tabs"
    .ci-table.js-clusters-list
      .gl-responsive-table-row.table-row-header{ role: "row" }
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Cluster")
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Environment pattern")
        .table-section.section-30{ role: "rowheader" }
          = s_("ClusterIntegration|Project namespace")
        .table-section.section-10{ role: "rowheader" }
      - @clusters.each do |cluster|
        = render "cluster", cluster: cluster
    = paginate @clusters, theme: "gitlab"
  - elsif @scope == :all
    = render "empty_state"
  - else
    = render "tabs"
    .prepend-top-20.text-center
      = s_("ClusterIntegration|There are no clusters to show")


%li.card.list-item.article.has-signal{ class: ('has-article-footer' unless article.tags.empty? )}
  = article.signal
  = link_to article.title, article, class: 'article-title'
  - unless article.tags.empty?
        .article-footer
                %ul.list.list--inline.list--inline--xs{ 'data-ui-component' => 'tag-list' }
        - article.tags.each do |t|
          %li.list-item= link_to t.name, tag_path(t), class: 'label label--link'

Fix indentation bug within articles


%table.list.employment_list
  %tr
    %th= t_attr :employer
    %th= t_attr :employee
    %th= t_attr :duration
    %th.action-links

  = render @employments

  %tr
    %th{:colspan => "5", :style => "text-align: right"}= will_paginate @employments

Add class to t_attr calls in employment list to make it work when included as partial.

%table.list.employment_list
  %tr
    %th= t_attr :employer, Employment
    %th= t_attr :employee, Employment
    %th= t_attr :duration, Employment
    %th.action-links

  = render @employments

  %tr
    %th{:colspan => "5", :style => "text-align: right"}= will_paginate @employments


- unless planting.finished?
  // Finish times
  - if planting.finish_is_predicatable?
    - if planting.super_late?
      %span.badge.badge-super-late= t('.super_late')
      = render 'shared/buttons/finish_planting', planting: planting
    - elsif planting.late?
      %span.badge.badge-late= t('.late_finishing')
    - else
      %span.badge
        = days_from_now_to_finished(planting)
        = t('.days_until_finished')

  // Harvest times
  - unless planting.super_late?
    - if planting.harvest_time?
      %span.badge.badge-harvest= t('.harvesting_now')
    - elsif planting.before_harvest_time?
      %span.badge
        = days_from_now_to_first_harvest(planting)
        = t('.days_until_harvest')

Use new finish button on planting badges

- unless planting.finished?
  // Finish times
  - if planting.finish_is_predicatable?
    - if planting.super_late?
      %span.badge.badge-super-late= t('.super_late')
      = planting_finish_button(planting)
    - elsif planting.late?
      %span.badge.badge-late= t('.late_finishing')
    - else
      %span.badge
        = days_from_now_to_finished(planting)
        = t('.days_until_finished')

  // Harvest times
  - unless planting.super_late?
    - if planting.harvest_time?
      %span.badge.badge-harvest= t('.harvesting_now')
    - elsif planting.before_harvest_time?
      %span.badge
        = days_from_now_to_first_harvest(planting)
        = t('.days_until_harvest')


%ul.footer-links
  %li.hidden-xs
    %strong
      = t('footer.powered_by')
      = link_to t('footer.churchio_onebody'), 'http://church.io/', rel: 'nofollow'
  %li= link_to t('footer.help'), page_for_public_path('help')
  %li= link_to t('footer.privacy_policy'), page_for_public_path('help/privacy_policy')

Replace onebody URL with ours

%ul.footer-links
  %li.hidden-xs
    %strong
      = t('footer.powered_by')
      = link_to t('footer.churchio_onebody'), 'http://nerdnorth.com/justin-marty/', rel: 'nofollow'
  %li= link_to t('footer.help'), page_for_public_path('help')
  %li= link_to t('footer.privacy_policy'), page_for_public_path('help/privacy_policy')


%ul
  %li
    = link_to_google "Pronunciation", "#{entry} pronunciation"
  %li
    = link_to_google "Google", "%22#{entry}%22"
  %li
    = link_to "Wiktionary", "http://en.wiktionary.org/wiki/#{entry.gsub(/ /, '_')}", target: '_blank'
  %li
    = link_to_google "NYT", "#{entry}+site%3Anytimes.com"

Add a link to Macmillan dictionary site for pronunciation

%ul
  %li
    = link_to "Pronunciation", "http://www.macmillandictionary.com/pronunciation/american/#{entry}", target: '_blank'
  %li
    = link_to "Wiktionary", "http://en.wiktionary.org/wiki/#{entry.gsub(/ /, '_')}", target: '_blank'
  %li
    = link_to_google "Google", "%22#{entry}%22"
  %li
    = link_to_google "NYT", "#{entry}+site%3Anytimes.com"


#navigation{:align=>"left"}
#subtabs
    %ul
        %li
            %a{:href=>"#summary"}Summary
        %li
            %a{:href=>"#sensors"}Sensors
        %li
            %a{:href=>"#effectors"}Effectors
        %li
            %a{:href=>"#activity"}Activity
        %li
            %a{:href=>"#location"}Location
    #summary
        #summary-basic-info
        #summary-status
        #summary-groups
        #summary-activity
    #sensors
        .sensor-table
            %table{:id=>"sensor-data", :class=>"tab-content-table"}
    #effectors
        %g:render{:template=>"detail-tabs/effectors"}
    #location
        %g:render{:template=>"detail-tabs/location"}
    #activity
        %g:render{:template=>"detail-tabs/activity"}
    %p{:class=>"bottom-filler"}
#status Last update: No data yet.

Copy Paste, forgot to commit .haml change

#navigation{:align=>"left"}
#subtabs
    %ul
        %li
            %a{:href=>"#summary"}Summary
        %li
            %a{:href=>"#sensors"}Sensors
        %li
            %a{:href=>"#effectors"}Effectors
        %li
            %a{:href=>"#activity"}Activity
        %li
            %a{:href=>"#location"}Location
    #summary
        #summary-basic-info
        #summary-status
        #summary-groups
        #summary-activity
    #sensors{:tabindex=>"1"}
        .sensor-table
            %table{:id=>"sensor-data", :class=>"tab-content-table"}
    #effectors{:tabindex=>"2"}
        %g:render{:template=>"detail-tabs/effectors"}
    #location{:tabindex=>"3"}
        %g:render{:template=>"detail-tabs/location"}
    #activity{:tabindex=>"4"}
        %g:render{:template=>"detail-tabs/activity"}
    %p{:class=>"bottom-filler"}
#status Last update: No data yet.


#beta

  .row
    .small-12.columns.text-center
      %h2 S'cuse us
      %h5 while we get (more) awesome
      %p Open Food Network (beta) is a new service that’s being built right now! Our food producers are currently based around Melbourne and Victoria, and we hope to expand OFN nationally very soon.
      %p Want to help? Or find out when OFN is coming to you?
      %strong We’d love to hear from you:
      %p
        %a{title:'Food buyers', href: '/food-buyers'} Food buyers
        |
        %a{title:'Food producers & farmers', href: '/food-producers'} Food producers & farmers

Add email link with reverse

#beta

  .row
    .small-12.columns.text-center
      %h2 S'cuse us
      %h5 while we get (more) awesome
      %p Open Food Network (beta) is a new service that’s being built right now! Our food producers are currently based around Melbourne and Victoria, and we hope to expand OFN nationally very soon.
      %p Want to help? Or find out when OFN is coming to you?
      %strong We’d love to hear from you:
      %p
        %a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true}  Food buyers
        |
        %a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true}  Food producers & farmers


%nav#qnav.navbar.navbar-default.qnav.hidden-xs.qnav2{role: "navigation"}
  .container-fluid.featurenav
    %ul.nav.nav-pills.nav-justified
      %li{class: ("active" if current_page.url == "/features/gitlab-geo/")}
        %a{href: "/features/gitlab-geo"}
          GitLab Geo
      %li{class: ("active" if current_page.url == "/features/premium-support/")}
        %a{href: "/features/premium-support"}
          Premium Support
      %li{class: ("active" if current_page.url == "/features/file-locking/")}
        %a{href: "/features/file-locking"}
          File Locking

Add link to Time Tracking page

%nav#qnav.navbar.navbar-default.qnav.hidden-xs.qnav2{role: "navigation"}
  .container-fluid.featurenav
    %ul.nav.nav-pills.nav-justified
      %li{class: ("active" if current_page.url == "/features/gitlab-geo/")}
        %a{href: "/features/gitlab-geo"}
          GitLab Geo
      %li{class: ("active" if current_page.url == "/features/premium-support/")}
        %a{href: "/features/premium-support"}
          Premium Support
      %li{class: ("active" if current_page.url == "/features/file-locking/")}
        %a{href: "/features/file-locking"}
          File Locking
      %li{class: ("active" if current_page.url == "/features/time-tracking/")}
        %a{href: "/features/time-tracking"}
          Time Tracking


= bootstrap_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
  .form-group
    = f.email_field :email
  .form-group
    = f.password_field :password
    - if devise_mapping.recoverable? && controller_name != 'passwords'
      = link_to "Forgot your password?", new_password_path(resource_name)
      %br/
  - if devise_mapping.rememberable?
    .form-group
      = f.check_box :remember_me
  %div
    = f.submit "Sign in"

Add required attributes to email/password on login form.

= bootstrap_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
  .form-group
    = f.email_field :email, :required => true
  .form-group
    = f.password_field :password, :required => true
    - if devise_mapping.recoverable? && controller_name != 'passwords'
      = link_to "Forgot your password?", new_password_path(resource_name)
      %br/
  - if devise_mapping.rememberable?
    .form-group
      = f.check_box :remember_me
  %div
    = f.submit "Sign in"


.landing-container
  .home-page-content
    %h3 Finish Signing Up
    %p
      To complete your registration please answer the questions in the dialog to the right.
  .signup-box
    = render partial: "home/signup"

Use popup for oauth user type selection.

.landing-container
:javascript
  Portal.openSignupModal();


- if @email.admin_email
  - set_meta_tags nofollow: true

%div.row
  %div.col-md-8
    = link_to newsletter_path(@newsletter) do
      %h1
        #{@newsletter.name}
    %div
      %p
        Sent #{@email.created_at}
  %div.col-md-4
    %p
      = link_to 'More from the Newsletter', newsletter_path(@newsletter), class: 'btn btn-default'

%div.row
  %div.col-md-12
    %h2
      = @email.subject
%div.row.col-md-12
- if @email.raw_html && !@email.raw_html.empty?
  = raw @email.raw_html.html_safe
- else
  = raw @email.body.html_safe

- if !@related_emails.empty?
  %div.row
    %div.col-md-12
      %h3
        Related Emails
  %div.row.col-md-12
    - @related_emails.each do |email|
      %p
        = link_to email.subject, email

- if !@links .empty?
  %div.row
    %div.col-md-12
      %h3
        = link_to 'View the Links', link_path(@email)

Save the links on the page

- if @email.admin_email
  - set_meta_tags nofollow: true

%div.row
  %div.col-md-8
    = link_to newsletter_path(@newsletter) do
      %h1
        #{@newsletter.name}
    %div
      %p
        Sent #{@email.created_at}
  %div.col-md-4
    %p
      = link_to 'More from the Newsletter', newsletter_path(@newsletter), class: 'btn btn-default'
    - if !@links .empty?
      %p
        = link_to 'View the Links', link_path(@email), class: 'btn btn-default'

%div.row
  %div.col-md-12
    %h2
      = @email.subject
%div.row.col-md-12
- if @email.raw_html && !@email.raw_html.empty?
  = raw @email.raw_html.html_safe
- else
  = raw @email.body.html_safe

- if !@related_emails.empty?
  %div.row
    %div.col-md-12
      %h3
        Related Emails
  %div.row.col-md-12
    - @related_emails.each do |email|
      %p
        = link_to email.subject, email


= simple_form_for([campaign, item]) do |f|
  = f.error_notification

  .form-inputs
    = f.input :name
    = f.input :price
    = f.input :sold
    = f.association :campaign
    = f.association :hero

  .form-actions
    = f.button :submit

Remove campaign from item form

= simple_form_for([campaign, item]) do |f|
  = f.error_notification

  .form-inputs
    = f.input :name
    = f.input :price
    = f.input :sold
    = f.association :hero

  .form-actions
    = f.button :submit


.row
  - Plan.featured_plans.each do |plan|
    - unless Owner.supporters(plan).empty?
      .col-md-6
        %h2
          %small.pre-heading Supporters of morph.io
          = link_to plan.name.pluralize, new_supporter_path
        %ul.owner-list-simple.list-unstyled.list-inline
          - Owner.supporters(plan).each do |owner|
            %li.owner-item= link_to owner_image(owner, 60), owner
.row
  .col-xs-12
    %p= link_to "See more of the #{pluralize(User.all_supporters.count, "supporter")}…", supporters_path

Fix up supporter count on landing page

.row
  - Plan.featured_plans.each do |plan|
    - unless Owner.supporters(plan).empty?
      .col-md-6
        %h2
          %small.pre-heading Supporters of morph.io
          = link_to plan.name.pluralize, new_supporter_path
        %ul.owner-list-simple.list-unstyled.list-inline
          - Owner.supporters(plan).each do |owner|
            %li.owner-item= link_to owner_image(owner, 60), owner
.row
  .col-xs-12
    %p= link_to "See more of the #{pluralize(Owner.all_supporters.count, "supporter")}…", supporters_path


%h4.has-conflicts
  = icon("exclamation-triangle")
  This merge request contains merge conflicts

%p
  Please resolve these conflicts or
  - if @merge_request.can_be_merged_via_command_line_by?(current_user)
    #{link_to "merge this request manually", "#modal_merge_info", class: "how_to_merge_link vlink", "data-toggle" => "modal"}.
  - else
    ask someone with write access to this repository to merge this request manually.

Make resolve these conflicts text a link to conflicts tab.

%h4.has-conflicts
  = icon("exclamation-triangle")
  This merge request contains merge conflicts

%p
  Please
  = link_to conflicts_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) do
    resolve these conflicts
  or
  - if @merge_request.can_be_merged_via_command_line_by?(current_user)
    #{link_to "merge this request manually", "#modal_merge_info", class: "how_to_merge_link vlink", "data-toggle" => "modal"}.
  - else
    ask someone with write access to this repository to merge this request manually.


.content.footer-pad{ "darker-background" => true, "ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id == null" }
  .select-oc-message
    = t '.select_oc_html'

Fix misplaced paragraph in shop tab

.content.footer-pad{ "darker-background" => true, "ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id == null" }
  .row
    .small-12.columns
      .select-oc-message
        = t '.select_oc_html'


- runtimeDiv = "output-#{embeddable.id}"
= content_for :external_scripts do
  %script{src:embeddable.url}
.question-bd{style: "display:none;"}
  .question-txt
    != embeddable.url
  .output{id:runtimeDiv}

:javascript
  // Begin script for #{embeddable.name}
  $(document).ready( function() {
    env = {
      name: '#{embeddable.name}',
      scriptLabel: '#{embeddable.label}',
      scriptUrl: '#{embeddable.url}',
      embeddableId: '#{embeddable.id}',
      config: '#{escape_javascript(embeddable.configuration)}',
      div: $('#{runtimeDiv}')
    }
    ExternalScripts.init('#{embeddable.label}', env);
  });

Simplify show partial for embeddable plugins.

= render :partial => 'plugins/show',locals: {plugin: embeddable.plugin }


%p{:align => "center", :style => "font-size: 89%"}
  Sort by:
  - if @sort == "name"
    %b Name
  - else
    = link_to "Name", division_path(params.merge(sort: "name"), false)
  -# For senate hide this to match php app
  -# This isn't actually desired so change this
  - if @house == "representatives"
    |
    - if @sort == "constituency"
      %b Constituency
    - else
      = link_to "Constituency", division_path(params.merge(sort: "constituency"), false)
  |
  - if @sort.nil?
    %b Party
  - else
    = link_to "Party", division_path(params.merge(sort: nil), false)
  |
  - if @sort == "vote"
    %b Vote
  - else
    = link_to "Vote", division_path(params.merge(sort: "vote"), false)

Sort links don't pass on dmp value

%p{:align => "center", :style => "font-size: 89%"}
  Sort by:
  - if @sort == "name"
    %b Name
  - else
    = link_to "Name", division_path(params.merge(sort: "name", dmp: nil), false)
  -# For senate hide this to match php app
  -# This isn't actually desired so change this
  - if @house == "representatives"
    |
    - if @sort == "constituency"
      %b Constituency
    - else
      = link_to "Constituency", division_path(params.merge(sort: "constituency", dmp: nil), false)
  |
  - if @sort.nil?
    %b Party
  - else
    = link_to "Party", division_path(params.merge(sort: nil, dmp: nil), false)
  |
  - if @sort == "vote"
    %b Vote
  - else
    = link_to "Vote", division_path(params.merge(sort: "vote", dmp: nil), false)


!!! 5
%HTML{lang: "en"}

  %link{rel: "stylesheet", href: "/stylesheets/stylesheet.css" }

  %script{src: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"}

  %meta{name: "viewport", content: "width=device-width, initial-scale=1"}

  %body
    .container
      .banner
        .content
          %img{src: "https://raw.githubusercontent.com/bioboxes/logo/0c6bfccd2440ccf06356243ba71b32588ad40617/logo_dark.png", class: 'img-responsive', alt: "Bioboxes Logo"}
      .main
        .content
          = yield

Use S3 image of logo

!!! 5
%HTML{lang: "en"}

  %link{rel: "stylesheet", href: "/stylesheets/stylesheet.css" }

  %script{src: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"}

  %meta{name: "viewport", content: "width=device-width, initial-scale=1"}

  %body
    .container
      .banner
        .content
          %img{src: "https://s3-us-west-1.amazonaws.com/bioboxes-images/logo/0.1.1/logo_horizontal_dark.png", class: 'img-responsive', alt: "Bioboxes Logo"}
      .main
        .content
          = yield


= field_set do
  = f.input :name
  = f.input :url
  = f.input :base_variant, collection: MapBackgrounds::Layer.items
  = f.input :enabled
  = f.input :by_default

Update form with new model

= field_set do
  = f.input :name
  = f.input :url
  = f.input :attribution
  = f.input :min_zoom
  = f.input :max_zoom
  = f.input :subdomains
  = f.input :enabled
  = f.input :by_default


.highlight{"ng-class" => "{'has_shopfront' : enterprise.has_shopfront}"}
  .highlight-top.row
    .small-12.medium-7.large-8.columns
    %h3{"ng-if" => "enterprise.has_shopfront"}
      %a{"bo-href" => "enterprise.path", "ofn-empties-cart" => "enterprise", bindonce: true}
        %i{"ng-class" => "enterprise.icon_font"}
        %span {{ enterprise.name }}
    %h3{"ng-if" => "!enterprise.has_shopfront"}
      %i{"ng-class" => "enterprise.icon_font"}
      %span {{ enterprise.name }}
    .small-12.medium-5.large-4.columns.text-right.small-only-text-left
      %p {{ [enterprise.address.city, enterprise.address.state_name] | printArray}}

Return template markup which was accidentally removed in Rafs merge

.highlight{"ng-class" => "{'has_shopfront' : enterprise.has_shopfront}"}
  .highlight-top.row
    .small-12.medium-7.large-8.columns
      %h3{"ng-if" => "enterprise.has_shopfront"}
        %a{"bo-href" => "enterprise.path", "ofn-empties-cart" => "enterprise", bindonce: true}
          %i{"ng-class" => "enterprise.icon_font"}
          %span {{ enterprise.name }}
      %h3{"ng-if" => "!enterprise.has_shopfront"}
        %i{"ng-class" => "enterprise.icon_font"}
        %span {{ enterprise.name }}
    .small-12.medium-5.large-4.columns.text-right.small-only-text-left
      %p {{ [enterprise.address.city, enterprise.address.state_name] | printArray}}
  %img.hero-img{"ng-src" => "{{enterprise.promo_image}}"}


= form_tag update_maximum_concurrent_scrapers_admin_site_settings_path, method: :post do
  %div
    = label_tag 'Maximum concurrent scrapers'
    = number_field_tag 'maximum_concurrent_scrapers', SiteSetting.maximum_concurrent_scrapers
  %div.buttons
    = submit_tag 'Update'

Add a little helper text to say how much memory each scraper could use

= form_tag update_maximum_concurrent_scrapers_admin_site_settings_path, method: :post do
  %div
    = label_tag 'Maximum concurrent scrapers'
    = number_field_tag 'maximum_concurrent_scrapers', SiteSetting.maximum_concurrent_scrapers
  %p
    Each running scraper will use up to
    = number_to_human_size Morph::DockerRunner.memory_limit
    of memory. Ensure that the total can't use up the whole available memory
    of the server.

  %div.buttons
    = submit_tag 'Update'


%span.timestamp
  = activity.created_at.to_s(:pretty)
%p{ :class => activity.key.parameterize }

  - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug))

  - if activity.trackable and activity.trackable.user == p[:current_user]
    - name = _('you')
  - else
    - name = activity.trackable.user.name

  - if activity.owner == p[:current_user]
    = _('You added %s to %s members.' % [name, classroom_link])
  - else
    = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link])
%hr

Use cached parameter instead of calling the deleted object.

%span.timestamp
  = activity.created_at.to_s(:pretty)
%p{ :class => activity.key.parameterize }

  - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug))

  - if activity.trackable and activity.trackable.user == p[:current_user]
    - name = _('you')
  - else
    - name = activity.parameters[:user_name]

  - if activity.owner == p[:current_user]
    = _('You added %s to %s members.' % [name, classroom_link])
  - else
    = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link])
%hr


- diff = note.diff
- if diff
  .diff-file
    .diff-header
      - if diff.deleted_file
        %span= diff.old_path
      - else
        %span= diff.new_path
        - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
          %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
      %br/
    .diff-content
      %table
        - note.truncated_diff_lines.each do |line|
          - line_code = generate_line_code(note.file_path, line)
          %tr.line_holder{ id: line_code }
            - if line.type == "match"
              %td.old_line= "..."
              %td.new_line= "..."
              %td.line_content.matched= line.text
            - else
              %td.old_line{class: line.type == "new" ? "new" : "old"}
                = raw(line.type == "new" ? " " : line.old_pos)
              %td.new_line{class: line.type == "new" ? "new" : "old"}
                = raw(line.type == "old" ? " " : line.new_pos)
              %td.line_content{class: "noteable_line #{line.type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line.text)

              - if line_code == note.line_code
                = render "projects/notes/diff_notes_with_reply", notes: discussion_notes

Fix diff header in discussion blocks

- diff = note.diff
- if diff
  .diff-file
    .diff-header
      %span
        - if diff.deleted_file
          = diff.old_path
        - else
          = diff.new_path
          - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
            %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
    .diff-content
      %table
        - note.truncated_diff_lines.each do |line|
          - line_code = generate_line_code(note.file_path, line)
          %tr.line_holder{ id: line_code }
            - if line.type == "match"
              %td.old_line= "..."
              %td.new_line= "..."
              %td.line_content.matched= line.text
            - else
              %td.old_line{class: line.type == "new" ? "new" : "old"}
                = raw(line.type == "new" ? " " : line.old_pos)
              %td.new_line{class: line.type == "new" ? "new" : "old"}
                = raw(line.type == "old" ? " " : line.new_pos)
              %td.line_content{class: "noteable_line #{line.type} #{line_code}", "line_code" => line_code}= raw diff_line_content(line.text)

              - if line_code == note.line_code
                = render "projects/notes/diff_notes_with_reply", notes: discussion_notes


.video-part
  %h4= part.title

  %ul.fa-ul
    - data.training_videos["part-#{part.number}"].each do |key, video|
      %li
        %i.fa-li.fa.fa-play-circle-o
        = link_to video.title.to_s,
          "/training/videos/part-#{part.number}/#{key}"

Add id selector for easier testing.

.video-part{ id: "part-#{part.number}" }
  %h4= part.title

  %ul.fa-ul
    - data.training_videos["part-#{part.number}"].each do |key, video|
      %li
        %i.fa-li.fa.fa-play-circle-o
        = link_to video.title.to_s,
          "/training/videos/part-#{part.number}/#{key}"


- if show_auto_devops_implicitly_enabled_banner?(project)
  .auto-devops-implicitly-enabled-banner.alert.alert-warning
    - more_information_link = link_to _('More information'), 'https://docs.gitlab.com/ee/topics/autodevops/', class: 'alert-link'
    - auto_devops_message = s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found. %{more_information_link}") % { more_information_link: more_information_link }
    = auto_devops_message.html_safe
    .alert-link-group
      = link_to _('Settings'), project_settings_ci_cd_path(project), class: 'alert-link'
      |
      = link_to _('Dismiss'), '#', class: 'hide-auto-devops-implicitly-enabled-banner alert-link', data: { project_id: project.id }

Change auto devops banner link path

- if show_auto_devops_implicitly_enabled_banner?(project)
  .auto-devops-implicitly-enabled-banner.alert.alert-warning
    - more_information_link = link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank', class: 'alert-link'
    - auto_devops_message = s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found. %{more_information_link}") % { more_information_link: more_information_link }
    = auto_devops_message.html_safe
    .alert-link-group
      = link_to _('Settings'), project_settings_ci_cd_path(project), class: 'alert-link'
      |
      = link_to _('Dismiss'), '#', class: 'hide-auto-devops-implicitly-enabled-banner alert-link', data: { project_id: project.id }


Add bootstrap-style links to admin sidebar

.container-fluid
  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      = link_to 'Ideas', admin_ideas_path


#new-deadline-message.pane
  = semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
    = f.inputs do
      = f.input :all_day, input_html: {class: "all-day"}
      = f.input :deadline, as: :date_picker, label: t("deadline_date")
      = f.input :title
    = f.actions do
      = f.action :submit, label: t(".submit"), button_html: message_button_html

Stop autocomplete on deadline input

#new-deadline-message.pane
  = semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
    = f.inputs do
      = f.input :all_day, input_html: {class: "all-day"}
      = f.input :deadline, as: :date_picker, label: t("deadline_date"), input_html: { autocomplete: :off }
      = f.input :title
    = f.actions do
      = f.action :submit, label: t(".submit"), button_html: message_button_html


- if current_user
  = link_to toggle_star_namespace_project_path(@project.namespace, @project), class: 'btn star-btn toggle-star has-tooltip', method: :post, remote: true, title: "Star project" do
    - if current_user.starred?(@project)
      = icon('star fw')
      %span.starred Unstar
    - else
      = icon('star-o fw')
      %span Star
  %div.count-with-arrow
    %span.arrow
    %span.count.star-count
      = @project.star_count

- else
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: 'You must sign in to star a project' do
    = icon('star fw')
    Star
  %div.count-with-arrow
    %span.arrow
    %span.count
      = @project.star_count

Fix project star tooltip in to show actual message.

- if current_user
  = link_to toggle_star_namespace_project_path(@project.namespace, @project), { class: 'btn star-btn toggle-star has-tooltip', method: :post, remote: true, title: current_user.starred?(@project) ? 'Unstar project' : 'Star project' } do
    - if current_user.starred?(@project)
      = icon('star fw')
      %span.starred Unstar
    - else
      = icon('star-o fw')
      %span Star
  %div.count-with-arrow
    %span.arrow
    %span.count.star-count
      = @project.star_count

- else
  = link_to new_user_session_path, class: 'btn has-tooltip star-btn', title: 'You must sign in to star a project' do
    = icon('star fw')
    Star
  %div.count-with-arrow
    %span.arrow
    %span.count
      = @project.star_count


%p
  %strong #{@note.author_name}
  left next message:

%cite{style: 'color: #666'}
  = markdown(@note.note)

Improve message in email notifications

%p
  %strong #{@note.author_name}
  wrote:

%cite{style: 'color: #666'}
  = markdown(@note.note)


%OTQuestion{:local_id => ot_local_id_for(open_response)}
  %prompt
    %OTCompoundDoc
      %bodyText= open_response.prompt
  %input
    %OTText{ :local_id => ot_local_id_for(open_response, :response), :rows => '2', :columns => '40' }
      %text= h(open_response.default_response)

Put response in a table, also changed the font size.

%OTQuestion{:local_id => ot_local_id_for(open_response)}
  %prompt
    %OTCompoundDoc
      %bodyText= open_response.prompt
  %input
    %OTCompoundDoc
      %bodyText
        %table{:width => '90%'}
          %tr
            %td{:width => '5%'}
            %td
              %object{:refid => ot_refid_for(open_response, :response)}

%OTText{ :local_id => ot_local_id_for(open_response, :response), :rows => '2', :columns => '35', :fontSize => '12'}
  %text= h(open_response.default_response)


%main.container
  %h1 Who profits from WestConnex?
  %p.lede
    These #{@contractors.count} companies have been contracted by the NSW Government.
    So far, their #{pluralize(Contract.count, "contracts")} are worth #{number_to_currency(Contract.sum(:value), precision: 0)}.
  %ul.contractors
    = render @contractors
%section.history#history
  %div.container
    %h2 Recent changes
    %ul.updates-list
      - @last_two_weeks.each do |day|
        - if !@contractor_history.where("created_at::timestamp::date = ?", day).empty?
          %li
            %h3= day.strftime("%b %-d")
            = new_contractors_sentence(@contractor_history.where("created_at::timestamp::date = ?", day))
            %p
              New contracts
              = link_to "WestConnex - Site Survey for Sydney Gateway, Stage 2", ""
              and
              = link_to "WestConnex - Stage 2, Construction Power Supply Study & Design", ""
              added.

Use linking method in static prototype

%main.container
  %h1 Who profits from WestConnex?
  %p.lede
    These #{@contractors.count} companies have been contracted by the NSW Government.
    So far, their #{pluralize(Contract.count, "contracts")} are worth #{number_to_currency(Contract.sum(:value), precision: 0)}.
  %ul.contractors
    = render @contractors
%section.history#history
  %div.container
    %h2 Recent changes
    %ul.updates-list
      - @last_two_weeks.each do |day|
        - if !@contractor_history.where("created_at::timestamp::date = ?", day).empty?
          %li
            %h3= day.strftime("%b %-d")
            = new_contractors_sentence(@contractor_history.where("created_at::timestamp::date = ?", day))
            %p
              New contracts
              = link_to_contract_by_id(88)
              and
              = link_to_contract_by_id(87)
              added.


= simple_form_for(@map_upload, :html => { :class => 'form-inline' }) do |f|

  = f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'

  %button.btn.btn-primary{:type => :submit}
    Upload

Disable turbo on map uploads

= simple_form_for(@map_upload, :html => { :class => 'form-inline' }, data: { turbo: false} ) do |f|

  = f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'

  %button.btn.btn-primary{:type => :submit}
    Upload


- if (template = template_for_current_view)
  = render(template, :lead => @lead)
- else

  -# default view

  = styles_for :task

  = render :partial => 'layouts/title_bar', :locals => {:lead => @lead, :edit => false}
  %div#edit_lead
    = render(:partial => "edit", :locals => {:edit => false})

  = render "comments/new", :commentable => @lead
  = render :partial => "shared/timeline", :collection => @timeline

  = hook(:show_lead_bottom, self, {entity: @lead}) do

    = render :partial => "tasks/tasks", :locals => {:object => @lead}

    = render :partial => "versions/versions", :locals => {:object => @lead}

    = load_select_popups_for(@lead, :tasks)

Comment out logic that currently not understandable code in leads/show

-#- edit = @edit || false
-#
-#- if (template = template_for_current_view)
-#  = template
-#  = render(template, :lead => @lead)
-#- else

-# default view

= styles_for :task

= render :partial => 'layouts/title_bar', :locals => {:lead => @lead, :edit => edit}
%div#edit_lead
  = render(:partial => "edit", :locals => {:edit => edit})

= render "comments/new", :commentable => @lead
= render :partial => "shared/timeline", :collection => @timeline

= hook(:show_lead_bottom, self, {entity: @lead}) do

  = render :partial => "tasks/tasks", :locals => {:object => @lead}

  = render :partial => "versions/versions", :locals => {:object => @lead}

  = load_select_popups_for(@lead, :tasks)


- content_for :nav do
  = link_to @note, method: :delete do
    %i.material-icons clear
  = link_to edit_note_path(@note), class: "toggle-preview" do
    %i.material-icons mode_edit

.js-task-list-container#note
  = markdown @note
  = render "form", note: @note, hidden: true

Add confirmation message on deleting

- content_for :nav do
  = link_to @note, method: :delete,
      data: { confirm: "This note will be deleted. Are you sure?" } do
    %i.material-icons clear
  = link_to edit_note_path(@note), class: "toggle-preview" do
    %i.material-icons mode_edit

.js-task-list-container#note
  = markdown @note
  = render "form", note: @note, hidden: true


= title @user.name

%h2 Radars

%ul
- @user.radars.each do |radar|
  %li
    =link_to radar.name, radar
    (#{pluralize(radar.blips.count, 'blip')})

Use email in page title since name may be nil

= title @user.email

%h2 Radars

%ul
- @user.radars.each do |radar|
  %li
    =link_to radar.name, radar
    (#{pluralize(radar.blips.count, 'blip')})


- provide :title, @url.title

= render 'shared/breadcrumbs',
  crumbs: [[@url.project.name, @url.project],
           [@url.title]]

.page-header
  %h1
    = yield :title
    %small
      = link_to @url, method: :delete, title: 'Delete',
                      data: { confirm: 'Are you sure?' } do
        %span.glyphicon.glyphicon-remove<>

%table.table.table-vertical
  %tr
    %th
      URL
    %td
      = link_to @url.simplified_address, @url.address

.button-group
  = link_to snapshots_path(url: @url.id),
            method: :post,
            title:  'Create new snapshots for this URL',
            class:  'btn btn-info' do
    %span.glyphicon.glyphicon-camera
    Create new snapshots

- @url.snapshots.includes(:viewport).group_by(&:viewport).each do |viewport, snapshots|
  .panel.panel-default{ id: "viewport-#{viewport.id}" }
    .panel-heading
      %h3.panel-title= viewport
    .panel-body.snapshots
      = render snapshots

Move URL from table to header for URL show

- provide :title, @url.title

= render 'shared/breadcrumbs',
  crumbs: [[@url.project.name, @url.project],
           [@url.title]]

.page-header
  %h1
    = yield :title
    %small
      = link_to @url, method: :delete, title: 'Delete',
                      data: { confirm: 'Are you sure?' } do
        %span.glyphicon.glyphicon-remove<>
  %p
    = link_to @url.simplified_address, @url.address

.button-group
  = link_to snapshots_path(url: @url.id),
            method: :post,
            title:  'Create new snapshots for this URL',
            class:  'btn btn-info' do
    %span.glyphicon.glyphicon-camera
    Create new snapshots

- @url.snapshots.includes(:viewport).group_by(&:viewport).each do |viewport, snapshots|
  .panel.panel-default{ id: "viewport-#{viewport.id}" }
    .panel-heading
      %h3.panel-title= viewport
    .panel-body.snapshots
      = render snapshots


-#%ul#geeks
-#  - each geek in geeks
-#    %li
-#      %img{ src: "/images/geeks/" + geek.name + ".png", alt: geek.name, title: geek.name }
-#      %a= geek.name

#map

Remove dead code in views.


- if items
  - p "XXXX #{items.inspect}"
  #table_div
    %table.table.table-bordered.table-striped
      %thead
        %tr
          %th{:colspan => "2", :align => "left"}
            = title
      - items.each do |item|
        - if item[:value].kind_of?(Array)
          - item[:value].each_with_index do |subitem, i|
            %tr
              - if i == 0
                %td.label{:rowspan => item[:value].length}
                  = item[:label]
              %td
                %img{:src => "/images/icons/new/#{subitem[:image]}.png"}
                = "#{subitem[:label]}: #{subitem[:value].collect { |t| h(t) }.join(" <b>|</b> ")}".html_safe
        - else
          %tr
            %td.label
              = item[:label]
            %td
              - if item[:image]
                %img{:src => "/images/icons/new/#{item[:image]}.png"}
                = item[:value]

Remove accidentally committed debug logging

- if items
  #table_div
    %table.table.table-bordered.table-striped
      %thead
        %tr
          %th{:colspan => "2", :align => "left"}
            = title
      - items.each do |item|
        - if item[:value].kind_of?(Array)
          - item[:value].each_with_index do |subitem, i|
            %tr
              - if i == 0
                %td.label{:rowspan => item[:value].length}
                  = item[:label]
              %td
                %img{:src => "/images/icons/new/#{subitem[:image]}.png"}
                = "#{subitem[:label]}: #{subitem[:value].collect { |t| h(t) }.join(" <b>|</b> ")}".html_safe
        - else
          %tr
            %td.label
              = item[:label]
            %td
              - if item[:image]
                %img{:src => "/images/icons/new/#{item[:image]}.png"}
                = item[:value]


.block#block-tables
  .content
    %h2.title= "Environment #{h @environment.name}"
    .inner
      = partial("navigation", :active => "show")
      .content
        .inner
          .left
            %h3 Name
            = @environment.name
          .left
            %h3 Description
            = @environment.description
          .left
            %h3 Cookbook Version Constraints
            %table.table
              %tr
                %th.first Name
                %th.last Version Constraints
              - if @environment.cookbook_versions.empty?
                %tr
                  %td{:colspan => 2} This environment does not include any cookbook version constraints.
              - else
                - @environment.cookbook_versions.each do |name, versions|
                  %tr
                    %td= name
                    %td= versions
          .left
            %h3 Attributes
            = build_tree('attrs', @environment.attributes)

Sort cookbooks by name in environment show

.block#block-tables
  .content
    %h2.title= "Environment #{h @environment.name}"
    .inner
      = partial("navigation", :active => "show")
      .content
        .inner
          .left
            %h3 Name
            = @environment.name
          .left
            %h3 Description
            = @environment.description
          .left
            %h3 Cookbook Version Constraints
            %table.table
              %tr
                %th.first Name
                %th.last Version Constraints
              - if @environment.cookbook_versions.empty?
                %tr
                  %td{:colspan => 2} This environment does not include any cookbook version constraints.
              - else
                - @environment.cookbook_versions.keys.sort.each do |name|
                  - versions = @environment.cookbook_versions[name]
                  %tr
                    %td= name
                    %td= versions
          .left
            %h3 Attributes
            = build_tree('attrs', @environment.attributes)


!!!
%html
  %head
    %title= Settings.app_name
    = stylesheet_link_tag 'canvas_assets', media: 'all'
    = javascript_include_tag 'canvas_assets'
    / = javascript_include_tag 'home/custom.js.coffee'
    = csrf_meta_tags
    %meta{name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1"}
  %body.pull_top
    = render partial: 'layouts/home_header'
    = yield

Remove unnecessary code from canvas theme layout

!!!
%html
  %head
    %title= Settings.app_name
    = stylesheet_link_tag 'canvas_assets', media: 'all'
    = javascript_include_tag 'canvas_assets'
    = csrf_meta_tags
    %meta{name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1"}
  %body.pull_top
    = render partial: 'layouts/home_header'
    = yield


.row.white-back
  %a#from-scratch{ href: new_admin_procedure_path, class: 'btn-sm btn-primary' }
    Créer une nouvelle démarche de zéro

.row.white-back
  %h2
    Créer une nouvelle démarche à partir d'une démarche existante

  .section.section-label
    Pour rechercher dans cette liste, utilisez la fonction "Recherche" de votre navigateur (CTRL+F ou command+F)
    %br
    %br
    - @grouped_procedures.each do |_, procedures|
      %b
        = procedures.first.organisation_name
      %table{ style: 'margin-bottom: 40px;' }
        - procedures.sort_by(&:id).each do |procedure|
          %tr{ style: 'height: 36px;' }
            %td{ style: 'width: 750px;' }
              = procedure.libelle
            %td{ style: 'padding-right: 10px; padding-left: 10px; width: 60px;' }
              = link_to('Consulter', apercu_procedure_path(id: procedure.id), target: "_blank")
            %td
              = link_to('Cloner', admin_procedure_clone_path(procedure.id, from_new_from_existing: true), 'data-method' => :put, class: 'btn-sm btn-primary clone-btn')
            %td{ style: 'padding-left: 10px;' }
              = link_to('Contacter', "mailto:#{procedure.administrateur.email}")

Make a démarches library title bigger

.row.white-back
  %a#from-scratch{ href: new_admin_procedure_path, class: 'btn-sm btn-primary' }
    Créer une nouvelle démarche de zéro

.row.white-back
  %h3
    Créer une nouvelle démarche à partir d'une démarche existante

  .section.section-label
    Pour rechercher dans cette liste, utilisez la fonction "Recherche" de votre navigateur (CTRL+F ou command+F)
    %br
    %br
    - @grouped_procedures.each do |_, procedures|
      %b
        = procedures.first.organisation_name
      %table{ style: 'margin-bottom: 40px;' }
        - procedures.sort_by(&:id).each do |procedure|
          %tr{ style: 'height: 36px;' }
            %td{ style: 'width: 750px;' }
              = procedure.libelle
            %td{ style: 'padding-right: 10px; padding-left: 10px; width: 60px;' }
              = link_to('Consulter', apercu_procedure_path(id: procedure.id), target: "_blank")
            %td
              = link_to('Cloner', admin_procedure_clone_path(procedure.id, from_new_from_existing: true), 'data-method' => :put, class: 'btn-sm btn-primary clone-btn')
            %td{ style: 'padding-left: 10px;' }
              = link_to('Contacter', "mailto:#{procedure.administrateur.email}")


= kujaku do |k|
  - k.text
  - k.helper :journal_period_crit, label: :invoice_period.tl
  - k.choice :to_reconcile, :accepted, :reconcile, name: :reconciliation_state
  - k.choice :all, :unpaid, name: :nature
  - responsibles = User.where(id: PurchaseInvoice.select(:responsible_id).distinct)
  - supplier_payment_modes = OutgoingPaymentMode.where(id: Entity.select(:supplier_payment_mode_id).distinct)
  - if responsibles.any?
    - k.helper do
      %label= PurchaseInvoice.human_attribute_name(:responsible)
      = select_tag(:responsible_id, options_for_select([[]] +  responsibles.map{|u| [u.label, u.id]}, params[:responsible_id].to_i))
  - if supplier_payment_modes.any?
    - k.helper do
      %label= :supplier_payment_mode.tl
      = select_tag(:payment_mode_id, options_for_select([[]] +  supplier_payment_modes.map{|u| [u.name, u.id]}, params[:payment_mode_id].to_i))
- main_toolbar do |t|
  = t.new params: { redirect: nil }
= main_list

Change state label in invoice research filters

= kujaku do |k|
  - k.text
  - k.helper :journal_period_crit, label: :invoice_period.tl
  - k.choice :all, :to_reconcile, :accepted, :reconcile, name: :reconciliation_state
  - k.choice :all, :unpaid, name: :nature, label: :element_status.tl
  - responsibles = User.where(id: PurchaseInvoice.select(:responsible_id).distinct)
  - supplier_payment_modes = OutgoingPaymentMode.where(id: Entity.select(:supplier_payment_mode_id).distinct)
  - if responsibles.any?
    - k.helper do
      %label= PurchaseInvoice.human_attribute_name(:responsible)
      = select_tag(:responsible_id, options_for_select([[]] +  responsibles.map{|u| [u.label, u.id]}, params[:responsible_id].to_i))
  - if supplier_payment_modes.any?
    - k.helper do
      %label= :supplier_payment_mode.tl
      = select_tag(:payment_mode_id, options_for_select([[]] +  supplier_payment_modes.map{|u| [u.name, u.id]}, params[:payment_mode_id].to_i))
- main_toolbar do |t|
  = t.new params: { redirect: nil }
= main_list


- content_for :navbar_hanuman do
  active
- content_for :navbar_hanuman_answer_types do
  active
- content_for :title do
  Answer Types

.panel
  .panel-heading
    %h3.panel-title Answer Types
    = link_to new_answer_type_path, class: "btn btn-primary panel-title-button-right" do
      %span.glyphicon.glyphicon-plus
      New Answer Type
  .panel-body
    .table-responsive
      %table.table.table-striped.table-hover
        %thead
          %tr
            %th Name
            %th Status
            %th
            %th

        %tbody
          - @answer_types.each do |answer_type|
            %tr
              %td= link_to answer_type.name, answer_type
              %td= link_to answer_type.status, answer_type
              %td
                = link_to edit_answer_type_path(answer_type) do
                  %span.glyphicon.glyphicon-pencil
              %td
                = link_to answer_type, data: {confirm: "Are you sure you want to delete this Answer Type?"}, method: :delete do
                  %span.glyphicon.glyphicon-trash

Add new fields to AnswerType INDEX

- content_for :navbar_hanuman do
  active
- content_for :navbar_hanuman_answer_types do
  active
- content_for :title do
  Answer Types

.panel
  .panel-heading
    %h3.panel-title Answer Types
    = link_to new_answer_type_path, class: "btn btn-primary panel-title-button-right" do
      %span.glyphicon.glyphicon-plus
      New Answer Type
  .panel-body
    .table-responsive
      %table.table.table-striped.table-hover
        %thead
          %tr
            %th Name
            %th Descriptive Name
            %th Has Answer Choices
            %th External Data Source
            %th Status
            %th
            %th

        %tbody
          - @answer_types.each do |answer_type|
            %tr
              %td= link_to answer_type.name, answer_type
              %td= link_to answer_type.descriptive_name, answer_type unless answer_type.descriptive_name.blank?
              %td= link_to answer_type.has_answer_choices, answer_type unless answer_type.has_answer_choices.blank?
              %td= link_to answer_type.external_data_source, answer_type unless answer_type.external_data_source.blank?
              %td= link_to answer_type.status, answer_type
              %td
                = link_to edit_answer_type_path(answer_type) do
                  %span.glyphicon.glyphicon-pencil
              %td
                = link_to answer_type, data: {confirm: "Are you sure you want to delete this Answer Type?"}, method: :delete do
                  %span.glyphicon.glyphicon-trash


.jumbotron
    %h1 404
    %p …this isn't the web page you're looking for.

Fix haml syntax error for not found view


- unless current_user.anonymous?
  %h3 Classes and Offerings:
  = render :partial => 'portal/clazzes/list_for_student', :locals => { :portal_student => portal_student }

  %p
    %h3 Enter a new class word to join another class:
    = render :partial => 'portal/students/register', :locals => { :portal_student => portal_student }

Include partials for the workgroup and student reporting here too.

- content_for :lightboxes do
  = render :partial => 'shared/lightbox_report'
  = render :partial => 'shared/workgroup'
- unless current_user.anonymous?
  %h3 Classes and Offerings:
  = render :partial => 'portal/clazzes/list_for_student', :locals => { :portal_student => portal_student }

  %p
    %h3 Enter a new class word to join another class:
    = render :partial => 'portal/students/register', :locals => { :portal_student => portal_student }


.row.white-back
  %h2
    Créer une nouvelle procédure à partir d'une procédure existante

  .section.section-label
    Pour rechercher dans cette liste, utilisez la fonction "Recherche" de votre navigateur (CTRL+F ou command+F)
    %br
    %br
    - @grouped_procedures.each do |_, procedures|
      %b
        = procedures.first.organisation
      %table{ style: 'margin-bottom: 40px;' }
        - procedures.sort_by(&:id).each do |procedure|
          %tr{ style: 'height: 36px;' }
            %td{ style: 'width: 750px;' }
              = procedure.libelle
            %td{ style: 'padding-right: 10px; padding-left: 10px; width: 60px;' }
              - if !procedure.archivee?
                = link_to('Tester', commencer_path(procedure_path: procedure.path), target: "_blank")
            %td
              = link_to('Cloner', admin_procedure_clone_path(procedure.id, from_new_from_existing: true), 'data-method' => :put, class: 'btn-sm btn-primary clone-btn')

Improve the wording on the “New from existing” page

.row.white-back
  %h2
    Créer une nouvelle procédure à partir d'une procédure existante

  .section.section-label
    Pour rechercher dans cette liste, utilisez la fonction "Recherche" de votre navigateur (CTRL+F ou command+F)
    %br
    %br
    - @grouped_procedures.each do |_, procedures|
      %b
        = procedures.first.organisation
      %table{ style: 'margin-bottom: 40px;' }
        - procedures.sort_by(&:id).each do |procedure|
          %tr{ style: 'height: 36px;' }
            %td{ style: 'width: 750px;' }
              = procedure.libelle
            %td{ style: 'padding-right: 10px; padding-left: 10px; width: 60px;' }
              - if !procedure.archivee?
                = link_to('Consulter', commencer_path(procedure_path: procedure.path), target: "_blank")
            %td
              = link_to('Cloner', admin_procedure_clone_path(procedure.id, from_new_from_existing: true), 'data-method' => :put, class: 'btn-sm btn-primary clone-btn')


.row
  .col-md-1
  .col-md-10.image-container.box-container
    .description.medium-text
      %p
        The best and the worst thing about travel is that takes you to most amazing places in the world where you can spend hours and not care about anything in the world, but also you know that you have to leave this place as much as you wish you did not have to. Also it provides you with endless memories.
      %p
        As much as travelling is fun, not all of us can do it all the time. But guess what reading somebody else's travel stories are fun too.
      %p
        So the idea is to share the story of that happy place of yours with fellow enthusiasts. It could be anyplace you have travelled or came across by chance. All you need is a good quality picture and a story.
  .col-md-1

Fix typo in about view

.row
  .col-md-1
  .col-md-10.image-container.box-container
    .description.medium-text
      %p
        The best and the worst thing about travel is that it takes you to most amazing places in the world where you can spend hours and not care about anything in the world, but also you know that you have to leave this place as much as you wish you did not have to. Also it provides you with endless memories.
      %p
        As much as travelling is fun, not all of us can do it all the time. But guess what reading somebody else's travel stories are fun too.
      %p
        So the idea is to share the story of that happy place of yours with fellow enthusiasts. It could be anyplace you have travelled or came across by chance. All you need is a good quality picture and a story.
  .col-md-1


- content_for :page_title do
  %h1
    = @enterprise.name
    %span.small
      (
      = enterprise_type_name(@enterprise)
      )

- content_for :page_actions do
  :javascript
    function toggleType(){
      $("#type_selection").slideToggle()
    }
  #type_button
    %button#toggle_type{ onClick: 'toggleType()' } Change type

#type_selection{ hidden: true }
  = render partial: "change_type_form"

#message
  Message bar

.row
  .alpha.seven.columns
    See your profile live on the Open Food Network map.
    %br/
    -# Can we pass an anchor here to zoom to our enterprise?
    = link_to "#{@enterprise.name} live", main_app.map_path

  .two.columns

  .seven.columns.omega
    Change or tweak any of the details of your profile
    %br/
    = link_to "Manage #{@enterprise.name}", main_app.edit_admin_enterprise_path(@enterprise)

.row
  .alpha.seven.columns
    - if can? :admin, Spree::Product
      Add and manage products
      %br/
      = link_to "Manage products", bulk_edit_admin_products_path

  .two.columns

  .seven.columns.omega
    - if can? :admin, OrderCycle
      Add and manage order cycles
      %br/
      = link_to "Manage order cycles", main_app.admin_order_cycles_path

Add down chevron to change type button on single ent dash

- content_for :page_title do
  %h1
    = @enterprise.name
    %span.small
      (
      = enterprise_type_name(@enterprise)
      )

- content_for :page_actions do
  :javascript
    function toggleType(){
      $("#type_selection").slideToggle()
    }
  #type_button
    %button#toggle_type{ onClick: 'toggleType()' }
      Change type
      %i.icon-chevron-down

#type_selection{ hidden: true }
  = render partial: "change_type_form"

#message
  Message bar

.row
  .alpha.seven.columns
    See your profile live on the Open Food Network map.
    %br/
    -# Can we pass an anchor here to zoom to our enterprise?
    = link_to "#{@enterprise.name} live", main_app.map_path

  .two.columns

  .seven.columns.omega
    Change or tweak any of the details of your profile
    %br/
    = link_to "Manage #{@enterprise.name}", main_app.edit_admin_enterprise_path(@enterprise)

.row
  .alpha.seven.columns
    - if can? :admin, Spree::Product
      Add and manage products
      %br/
      = link_to "Manage products", bulk_edit_admin_products_path

  .two.columns

  .seven.columns.omega
    - if can? :admin, OrderCycle
      Add and manage order cycles
      %br/
      = link_to "Manage order cycles", main_app.admin_order_cycles_path


#resolve_form_div
  #form_div
    = render :partial => "layouts/flash_msg"
    - if @resolve[:instance_names]
      = render(:partial => "layouts/ae_resolve_options",
        :locals         => {:resolve => @resolve,
          :form_action               => "ae_resolve",
          :ae_sim_form               => true})

Add .scrollable class to left_div on automate/simulation

#resolve_form_div
  #form_div
    = render :partial => "layouts/flash_msg"
    - if @resolve[:instance_names]
      = render(:partial => "layouts/ae_resolve_options",
        :locals         => {:resolve => @resolve,
          :form_action               => "ae_resolve",
          :ae_sim_form               => true})
:javascript
  $('#left_div').addClass('scrollable');


%ul.wizard-progress
  - if action_name == 'new'
    %li{ class: "current" }
      = t("admin.order_cycles.wizard_progress.edit")
    %li
      = t("admin.order_cycles.wizard_progress.incoming")
    %li
      = t("admin.order_cycles.wizard_progress.outgoing")
  - else
    %li{ class: "#{'current' if action_name == 'edit'}" }
      %a{href: "#{main_app.edit_admin_order_cycle_path(@order_cycle)}"}
        = t("admin.order_cycles.wizard_progress.edit")
    %li{ class: "#{'current' if action_name == 'incoming'}" }
      %a{href: "#{main_app.admin_order_cycle_incoming_path(@order_cycle)}"}
        = t("admin.order_cycles.wizard_progress.incoming")
    %li{ class: "#{'current' if action_name == 'outgoing'}" }
      %a{href: "#{main_app.admin_order_cycle_outgoing_path(@order_cycle)}"}
        = t("admin.order_cycles.wizard_progress.outgoing")

Make view a bit simpler by removing unnecessary string interpolation

%ul.wizard-progress
  - if action_name == 'new'
    %li{ class: "current" }
      = t("admin.order_cycles.wizard_progress.edit")
    %li
      = t("admin.order_cycles.wizard_progress.incoming")
    %li
      = t("admin.order_cycles.wizard_progress.outgoing")
  - else
    %li{ class: "#{'current' if action_name == 'edit'}" }
      %a{ href: main_app.edit_admin_order_cycle_path(@order_cycle) }
        = t("admin.order_cycles.wizard_progress.edit")
    %li{ class: "#{'current' if action_name == 'incoming'}" }
      %a{ href: main_app.admin_order_cycle_incoming_path(@order_cycle) }
        = t("admin.order_cycles.wizard_progress.incoming")
    %li{ class: "#{'current' if action_name == 'outgoing'}" }
      %a{ href: main_app.admin_order_cycle_outgoing_path(@order_cycle) }
        = t("admin.order_cycles.wizard_progress.outgoing")


%p= t('accounts.verify_who_you_are')

.box
  .box-body
    %p= link_to " #{t('accounts.verify_by_email')}".html_safe, new_account_path(email: true), class: 'btn btn-success'
    %p= t('accounts.verify_by_email_message')

.box
  .box-body
    %p= link_to " #{t('accounts.verify_by_phone')}".html_safe, new_account_path(phone: true), class: 'btn btn-warning'
    %p= t('accounts.verify_by_phone_message')

.box
  .box-body
    %p= link_to_phone(Setting.get(:contact, :community_office_phone), label: " #{t('accounts.call_office', phone: Setting.get(:contact, :community_office_phone))}".html_safe, class: 'btn btn-info')
    %p= t('accounts.call_office_message').html_safe

Remove verify account by phone as an option

%p= t('accounts.verify_who_you_are')

.box
  .box-body
    %p= link_to " #{t('accounts.verify_by_email')}".html_safe, new_account_path(email: true), class: 'btn btn-success'
    %p= t('accounts.verify_by_email_message')

.box
  .box-body
    %p= link_to_phone(Setting.get(:contact, :community_office_phone), label: " #{t('accounts.call_office', phone: Setting.get(:contact, :community_office_phone))}".html_safe, class: 'btn btn-info')
    %p= t('accounts.call_office_message').html_safe


= bootstrap_form_for [:editor, @post], layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10' do |f|
  = f.text_field :title
  = f.text_area :body, data: {upload_path: editor_images_url}
  = f.collection_select :category_id, current_site.categories, :id, :name
  = f.collection_select :author_id, current_site.authors, :id, :name
  = f.file_field :thumbnail
  - if @post.thumbnail.present?
    = f.form_group do
      = image_tag @post.thumbnail_url, height: 80
  = f.datetime_local_field :published_at

  = f.form_group do
    = f.submit

Allow to clear post's author

= bootstrap_form_for [:editor, @post], layout: :horizontal, label_col: 'col-sm-2', control_col: 'col-sm-10' do |f|
  = f.text_field :title
  = f.text_area :body, data: {upload_path: editor_images_url}
  = f.collection_select :category_id, current_site.categories, :id, :name
  = f.collection_select :author_id, current_site.authors, :id, :name, include_blank: true
  = f.file_field :thumbnail
  - if @post.thumbnail.present?
    = f.form_group do
      = image_tag @post.thumbnail_url, height: 80
  = f.datetime_local_field :published_at

  = f.form_group do
    = f.submit


- cache "member_thumbnail_#{member.id}" do
  .row
    .member-thumbnail.thumbnail
      .col-md-3
        = render :partial => "members/image_with_popover", :locals => { :member => member }
      .col-md-9
        %p
          = link_to member.login_name, member
          - if ! member.location.blank?
            %small
              %br/
              %i= member.location
          - if ! member.plantings.empty?
            %small
              %br/
              Recently planted:
              != member.plantings.first(3).map{|p| link_to p.crop_name, p }.join(", ")

Remove an extra class on member thumbs

- cache "member_thumbnail_#{member.id}" do
  .row
    .member-thumbnail
      .col-md-3
        = render :partial => "members/image_with_popover", :locals => { :member => member }
      .col-md-9
        %p
          = link_to member.login_name, member
          - if ! member.location.blank?
            %small
              %br/
              %i= member.location
          - if ! member.plantings.empty?
            %small
              %br/
              Recently planted:
              != member.plantings.first(3).map{|p| link_to p.crop_name, p }.join(", ")


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

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

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

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

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

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

Add translations for sign up

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

            = f.text_field :screen_name, autofocus: true
            = f.email_field :email, autofocus: false
            = f.password_field :password, autocomplete: :off
            = f.password_field :password_confirmation, autocomplete: :off

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

            %p= raw t(".info", terms: link_to(t("voc.terms"), terms_path))
            = f.primary

          = render "devise/shared/links"
= render "shared/links"


- content_for :title, 'Login to Public Whip'

%h1= yield :title

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

= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .form-group
    = f.label :email
    = f.email_field :email, autofocus: true, class: "form-control"

  .form-group
    = f.label :password
    = f.password_field :password, autocomplete: "off", class: "form-control"

  - if devise_mapping.rememberable?
    .checkbox
      %label
        = f.check_box :remember_me
        Remember me

  = f.submit "Login to Public Whip", class: "btn btn-default"

Remove text about cookies and stuff

- content_for :title, 'Login to Public Whip'

%h1= yield :title

%p
  Not got a login? #{link_to 'Register a new account', new_registration_path(resource_name) }.
  %br
  Lost your password? #{link_to 'Reset your password here', new_password_path(resource_name)}

= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .form-group
    = f.label :email
    = f.email_field :email, autofocus: true, class: "form-control"

  .form-group
    = f.label :password
    = f.password_field :password, autocomplete: "off", class: "form-control"

  - if devise_mapping.rememberable?
    .checkbox
      %label
        = f.check_box :remember_me
        Remember me

  = f.submit "Login to Public Whip", class: "btn btn-default"