!!! 5
%html
  %head
    %title Project October
    = stylesheet_link_tag    "application", :media => "all"
    / Intentionally block page load to get the fonts
    = javascript_include_tag '//use.typekit.net/vxb6zze.js'
    :javascript
      try{Typekit.load();}catch(e){}
    = csrf_meta_tags
  %body
    .container#logobar
      .row
        .span12
          = image_tag 'logo_small.png', :width => '200', :alt => 'October'
          - if signed_in?
            = link_to 'Logout', destroy_user_session_url, :class => 'btn', :method => 'delete', :style => 'float: right'
          - else
            = link_to 'Login', new_user_session_url, :class => 'btn', :style => 'float: right'
          = text_field_tag :search, '', :placeholder => "search", :style => 'float: right'
        - if flash[:notice]
          .alert.alert-info= flash[:notice]
        - if flash[:alert]
          .alert= flash[:alert]
    .container#articles
      = yield
    = javascript_include_tag "application"
    = yield :javascripts

Make the logo a link to /

!!! 5
%html
  %head
    %title Project October
    = stylesheet_link_tag    "application", :media => "all"
    / Intentionally block page load to get the fonts
    = javascript_include_tag '//use.typekit.net/vxb6zze.js'
    :javascript
      try{Typekit.load();}catch(e){}
    = csrf_meta_tags
  %body
    .container#logobar
      .row
        .span12
          = link_to root_url do
            = image_tag 'logo_small.png', :width => '200', :alt => 'October'
          - if signed_in?
            = link_to 'Logout', destroy_user_session_url, :class => 'btn', :method => 'delete', :style => 'float: right'
          - else
            = link_to 'Login', new_user_session_url, :class => 'btn', :style => 'float: right'
          = text_field_tag :search, '', :placeholder => "search", :style => 'float: right'
        - if flash[:notice]
          .alert.alert-info= flash[:notice]
        - if flash[:alert]
          .alert= flash[:alert]
    .container#articles
      = yield
    = javascript_include_tag "application"
    = yield :javascripts


%h2 #{@user.name}

= render 'shared/script_levels', { script: @script, user: @user, level: nil }

- @concept_progress.each_pair do |concept, counts|
  %h4= concept.name
  .progress-outer
    .progress-inner{ style: "width:#{(100 * counts[:current]/counts[:max]).to_i}%" }
  - if counts[:trophy]
    = image_tag counts[:trophy].trophy.image_name
  <!-- #{counts} -->
  %br/

Make trophy page slightly less awful

%h2 #{@user.name}

= render 'shared/script_levels', { script: @script, user: @user, level: nil }

%table
  - @concept_progress.each_pair do |concept, counts|
    %tr
      %td{ height:"150px"}
        %h4= concept.description
        .progress-outer
          .progress-inner{ style: "width:#{(100 * counts[:current]/counts[:max]).to_i}%" }
      %td
        - if counts[:trophy]
          = image_tag counts[:trophy].trophy.image_name
        <!-- #{counts} -->


= content_for :banner_image do
  -if banner_event
    .banner.ribbon-image-wrapper
      - cache cache_key_for_banner_event(banner_event) do
        = link_to banner_event, id: 'banner-image-link' do
          - if banner_event.is_a?(Event)
            = render 'events/corner_ribbon', event: banner_event
          - else
            .ribbon-long-wrapper
              .ribbon.blue
                = t('layouts.application.menu.blog')
          = background_image_helper "banner-image", banner_event.image_or_default, size: :large do
            - if banner_event.is_a?(Event)
              .container
                .image-text{ class: banner_event.banner_alignment }
                  .wrapper
                    .font-elem.date{ style: "color: #{banner_event.primary_color}" }
                      = l banner_event.start_time, format: :short_date
                  .wrapper
                    .front-elem.where{ style: "color: #{banner_event.primary_color}" }
                      = "%s @ %s" % [t_event_type(banner_event), banner_event.area_title]
                  .wrapper
                    .front-elem.title{ style: "color: #{banner_event.secondary_color}" }
                      = banner_event.title

Use // instead of @ in event banner

= content_for :banner_image do
  -if banner_event
    .banner.ribbon-image-wrapper
      - cache cache_key_for_banner_event(banner_event) do
        = link_to banner_event, id: 'banner-image-link' do
          - if banner_event.is_a?(Event)
            = render 'events/corner_ribbon', event: banner_event
          - else
            .ribbon-long-wrapper
              .ribbon.blue
                = t('layouts.application.menu.blog')
          = background_image_helper "banner-image", banner_event.image_or_default, size: :large do
            - if banner_event.is_a?(Event)
              .container
                .image-text{ class: banner_event.banner_alignment }
                  .wrapper
                    .font-elem.date{ style: "color: #{banner_event.primary_color}" }
                      = l banner_event.start_time, format: :short_date
                  .wrapper
                    .front-elem.where{ style: "color: #{banner_event.primary_color}" }
                      // Just using a double forward slash creates too much space between them, so
                      // we tighten the two forward slashes and must therefore split up the string
                      = t_event_type(banner_event)
                      %span.some{ style: 'letter-spacing: -15px; margin-right: 10px;' } //
                      = banner_event.area_title
                  .wrapper
                    .front-elem.title{ style: "color: #{banner_event.secondary_color}" }
                      = banner_event.title


.row.results_summary
  .col-12
    - if @cards.present?
      #{pluralize(@cards.count, "card")} unimplemented cards
    - else
      All cards are implemented!
- @cards.each do |card, printings|
  .row.card_row
    .col-8.cardinfo
      %h3.card_title
        = link_to_card(card) do
          = card.name
        - legality = @ech.legality(card)
        - if legality.start_with? "restricted"
          = " "
          %i{class: "legality-restricted"} restricted in ECH
        - elsif legality.start_with? "banned"
          = " "
          %i{class: "legality-banned"} banned in ECH
    .col-2.cardinfo
      - votes = @exh.legality(card).split("-")[1].to_i
      = link_to({controller: "exh", action: "vote", name: card.name}, class: "legality-banned") do
        %i{class: (signed_in? && exh_card(card).voters.include?(current_user)) ? "voted" : ""}
          = "#{votes} vote#{votes == 1 ? "" : "s"}"
    .d-none.d-md-block.col-2
      = render 'card/printings_short', card: card, printings: printings_view(card, printings)

Fix grammar of total unimplemented cards

.row.results_summary
  .col-12
    - if @cards.present?
      = pluralize(@cards.count, "unimplemented card")
    - else
      All cards are implemented!
- @cards.each do |card, printings|
  .row.card_row
    .col-8.cardinfo
      %h3.card_title
        = link_to_card(card) do
          = card.name
        - legality = @ech.legality(card)
        - if legality.start_with? "restricted"
          = " "
          %i{class: "legality-restricted"} restricted in ECH
        - elsif legality.start_with? "banned"
          = " "
          %i{class: "legality-banned"} banned in ECH
    .col-2.cardinfo
      - votes = @exh.legality(card).split("-")[1].to_i
      = link_to({controller: "exh", action: "vote", name: card.name}, class: "legality-banned") do
        %i{class: (signed_in? && exh_card(card).voters.include?(current_user)) ? "voted" : ""}
          = "#{votes} vote#{votes == 1 ? "" : "s"}"
    .d-none.d-md-block.col-2
      = render 'card/printings_short', card: card, printings: printings_view(card, printings)


%pre
  %code
    :preserve

      # Require the hoptoad_notifier gem in you App.
      # --------------------------------------------
      #
      # Rails 3 - In your Gemfile
      #  gem 'hoptoad_notifier'
      #
      # Rails 2 - In environment.rb
      #  config.gem 'hoptoad_notifier'
      #
      # Then add the following to config/initializers/errbit.rb
      # -------------------------------------------------------
      HoptoadNotifier.configure do |config|
         config.api_key = '#{app.api_key}'
         config.host    = '#{request.host}'
         config.port    = #{request.port}
      end
      #
      # Testing
      # -------
      #
      # Rails 2 - you'll need to vendor hoptoad_notifier to get the rake tasks
      #  rake gems:unpack GEM=hoptoad_notifier
      #
      # Run:
      #  rake hoptoad:test
      #  refresh this page

Add config.secure to install instructions

%pre
  %code
    :preserve

      # Require the hoptoad_notifier gem in you App.
      # --------------------------------------------
      #
      # Rails 3 - In your Gemfile
      #  gem 'hoptoad_notifier'
      #
      # Rails 2 - In environment.rb
      #  config.gem 'hoptoad_notifier'
      #
      # Then add the following to config/initializers/errbit.rb
      # -------------------------------------------------------
      HoptoadNotifier.configure do |config|
        config.api_key = '#{app.api_key}'
        config.host    = '#{request.host}'
        config.port    = #{request.port}
        config.secure  = config.port == 443
      end
      #
      # Testing
      # -------
      #
      # Rails 2 - you'll need to vendor hoptoad_notifier to get the rake tasks
      #  rake gems:unpack GEM=hoptoad_notifier
      #
      # Run:
      #  rake hoptoad:test
      #  refresh this page


= render "missing_documentation"

Add perl documentation for storing data

:markdown
  The `Database::DumpTruck` Perl module makes it easy to store data in an SQLite database.

  To save data all you need to do is use the [`Database::DumpTruck` module](http://search.cpan.org/dist/Database-DumpTruck/lib/Database/DumpTruck.pm).

:coderay
  #!perl
  use Database::DumpTruck;

  # Open a database handle
  my $dt = Database::DumpTruck->new({dbname => 'data.sqlite', table => 'data'});

  #insert content
  $dt->insert({
    name => 'Susan',
    occupation => 'software developer'
  });

  #create index
  $dt->create_index(['name']);

  #update content. You can use upsert when storing new data too.
  $dt->upsert({
    name => 'Susan',
    occupation => 'product owner'
  });


- preview.wikify_body
%ul
  %li#comment_new.comment.score1
    %h2
      = preview.title
    %p
      = posted_by(preview)
      Évalué à
      %span.score= preview.score
    %figure.image
      = avatar_url(current_user)
    .content
      = sanitize(preview.body)
    %footer

- if preview.parent.try(:user_id) == current_account.user_id
  = image_tag "dessins/geekscottes_005.png", :alt => "Autosatisfaction récursive", :title => "Autosatisfaction récursive - © Johann 'nojhan' Dréo : 2005-03-25 - Licence CC By-Sa 2.5"

Fix inconsistent HTML on comments preview

- preview.wikify_body
%ul
  %li#comment_new.comment.score1
    %h2
      = preview.title
    %p.meta
      = posted_by(preview)
      Évalué à
      %span.score= preview.score
    %figure.image
      = avatar_url(current_user)
    .content
      = sanitize(preview.body)
    %footer.actions

- if preview.parent.try(:user_id) == current_account.user_id
  = image_tag "dessins/geekscottes_005.png", :alt => "Autosatisfaction récursive", :title => "Autosatisfaction récursive - © Johann 'nojhan' Dréo : 2005-03-25 - Licence CC By-Sa 2.5"


- tl_json ||= nil
%script{:type => "text/javascript"}
  - if tl_json
    var json = JSON.parse('#{tl_json}'.replace(/"/g, '"'));
    var start, end;
    if (!ManageIQ.calendar.calDateFrom || !ManageIQ.calendar.calDateTo) {
    // set timeline to start one week ago and end today
    end = new Date();
    start = new Date(end - 24 * 60 * 60 * 1000 * 7);
    } else {
    start = new Date(ManageIQ.calendar.calDateFrom);
    end = new Date(ManageIQ.calendar.calDateTo);
    }
    ManageIQ.Timeline.load(json, start, end);

Fix javascript parse error on a timeline screen

- tl_json ||= nil
%script{:type => "text/javascript"}
  - if tl_json
    var json = JSON.parse('#{tl_json}'.replace(/"/g, '"'));
    var start, end;
    if (!ManageIQ.calendar.calDateFrom || !ManageIQ.calendar.calDateTo) {
    end = new Date();
    start = new Date(end - 24 * 60 * 60 * 1000 * 7);
    } else {
    start = new Date(ManageIQ.calendar.calDateFrom);
    end = new Date(ManageIQ.calendar.calDateTo);
    }
    ManageIQ.Timeline.load(json, start, end);


%h1
  Dashboard

.row
  .col-md-4
    .well
      .text-center
        .number
          {{statistics.skin_count}}
        Skins

    .well
      .page-header
        Last recorded
      %table.table-condensed
        %tr(ng-repeat="skin in statistics.skins")
          %td
            %span.glyphicon.glyphicon-time
            {{skin.updated_at | date: "yyyy-MM-dd"}}
          %td
            %span.glyphicon.glyphicon-link
            {{skin.token}}
          %td
            {{skin.last_property.key}}

    .well
      .page-header
        Suspicious activities
      %table.table-condensed
        %tr
          %td
            ABCDE
          %td
            has been registered too far from collecting area
        %tr
          %td
            ERXDF
          %td
            checkin interval too short
        %tr
          %td
            PWORD
          %td
            suspicious size for cattled pythons

  .col-md-8
    #map-canvas

Use real tokens in fake data. Need at least 4 skins in db

%h1
  Dashboard

.row
  .col-md-4
    .well
      .text-center
        .number
          {{statistics.skin_count}}
        Skins

    .well
      .page-header
        Last recorded
      %table.table-condensed
        %tr(ng-repeat="skin in statistics.skins")
          %td
            %span.glyphicon.glyphicon-time
            {{skin.updated_at | date: "yyyy-MM-dd"}}
          %td
            %span.glyphicon.glyphicon-link
            {{skin.token}}
          %td
            {{skin.last_property.key}}

    .well
      .page-header
        Suspicious activities
      %table.table-condensed
        %tr
          %td
            {{statistics.skins[0].token}}
          %td
            has been registered too far from collecting area
        %tr
          %td
            {{statistics.skins[2].token}}
          %td
            checkin interval too short
        %tr
          %td
            {{statistics.skins[4].token}}
          %td
            suspicious size for cattled pythons

  .col-md-8
    #map-canvas


= simple_form_for @project do |f|
  = f.input :name, :input_html => { :class => "flip" }
  = f.input :human_start, :label => "Start date", :input_html => { :class => "datepicker flip" }, :required => true
  = f.input :human_end, :label => "End date", :input_html => { :class => "datepicker flip" }, :required => true
  = f.label :active, "Status"
  = f.check_box :active
  = f.label :active, (@project.active? ? "Working" : "On hold" ), :class => (@project.active? ? "green" : "red" ) + " toggle"
  = f.association :users, :as => :check_boxes, :label => "People", :input_html => { :class => "person" }, :wrapper_html => { :class => "person" }
  = f.button :submit, :class => "button"

Tweak the project edit page some more.

= simple_form_for @project do |f|
  = f.input :name, :input_html => { :class => "flip" }
  = f.input :human_start, :label => "Start date", :input_html => { :class => "datepicker flip" }, :required => true
  = f.input :human_end, :label => "End date", :input_html => { :class => "datepicker flip" }, :required => true
  .input.optional
    = f.label :status, "Status"
    = f.check_box :active
    = f.label :active, (@project.active? ? "Working" : "On hold" ), :class => (@project.active? ? "green" : "red" ) + " toggle"
  = f.association :users, :as => :check_boxes, :label => "People", :input_html => { :class => "person" }, :wrapper_html => { :class => "person" }
  = f.button :submit, :class => "button"


%p
  Competitors under the age of 10 may elect to race some races on a 16", 20", or 24" wheel size.

%p
  If you choose the 24" wheel size, you may be racing against older competitors (up to the age of 12)

%p
  If you choose the 16" or 24" wheel size, you will be racing against similarly-aged kids, on the same wheel size.

- if Event.where(accepts_wheel_size_override: true).any?
  %fieldset.data_block
    %legend Non-Track Wheel Sizes
    = link_to "Set Other Wheel Sizes", registrant_competition_wheel_sizes_path(@registrant), class: "fancybox"

%fieldset.data_block
  %legend Track Racing Wheel Sie
  = form_for(@registrant, url: wizard_path, method: :put) do |f|
    = render partial: "shared/error_messages", object: @registrant
    .data_block
      = f.label :wheel_size_id, t(".default_wheel_size")
      = f.collection_select :wheel_size_id, WheelSize.all, :id, :description, {}, title: t(".default_wheel_size_description"), class: "wheel_size_choices"
    = render partial: "/registrants/form_actions", locals: {f: f}

Update wheel size selection text

- if @registrant.age <= 6
  %p
    Competitors age six or younger may elect to race some races on a 16", 20", or 24" wheel size.

  %p
    If you choose the 20" or 24" wheel size, you may be racing against older competitors (up to the age of 12).

- else
  %p
    Competitors under the age of 10 may elect to race some races on a 20" or 24" wheel size. You must be age six or younger to choose a 16" wheel.

  %p
    If you choose the 24" wheel size, you may be racing against older competitors (up to the age of 12)

- if Event.where(accepts_wheel_size_override: true).any?
  %fieldset.data_block
    %legend Non-Track Wheel Sizes
    = link_to "Set Other Wheel Sizes", registrant_competition_wheel_sizes_path(@registrant), class: "fancybox"

%fieldset.data_block
  %legend Track Racing Wheel Sie
  = form_for(@registrant, url: wizard_path, method: :put) do |f|
    = render partial: "shared/error_messages", object: @registrant
    .data_block
      = f.label :wheel_size_id, t(".default_wheel_size")
      = f.collection_select :wheel_size_id, WheelSize.all, :id, :description, {}, title: t(".default_wheel_size_description"), class: "wheel_size_choices"
    = render partial: "/registrants/form_actions", locals: {f: f}


%div{role:'presentation',style:'height: 63px'}

- if @content_kind == :ontologies
  = render partial: '/shared/user_ontologies'
- if @content_kind == :symbols
  = render partial: '/shared/user_ontologies'
- if @content_kind == :logics
  = render partial: '/shared/user_repositories'
- if @content_kind == :repositories
  = render partial: '/shared/user_repositories'
- if @content_kind == :users
  = render partial: '/shared/user_teams'
- if @content_kind == :teams
  = render partial: '/shared/user_teams'
- if @content_kind == :jobs
  = render partial: '/shared/user_teams'

Remove user teams from the contextual view

%div{role:'presentation',style:'height: 63px'}

- if @content_kind == :ontologies
  = render partial: '/shared/user_ontologies'
- if @content_kind == :symbols
  = render partial: '/shared/user_ontologies'
- if @content_kind == :logics
  = render partial: '/shared/user_ontologies'
- if @content_kind == :repositories
  = render partial: '/shared/user_repositories'


-load humanize

.log<
  .summary{id:"{{log.id}}"}
    .time.pull-right
      {{log.created_on|date:"M j, Y g:i:s a"}}

    .request-time.pull-right
      Request time:
      %span.request-time-value
        {{ log.request_time|default:"0"|intcomma }}ms

    -if log.response_status
      %span.status-code
        {{ log.response_status }}
    %span.url
      %span.method= log.method
      -if log.method == 'GET'
        {{ log.get_url_host }}
      -else
        {{ log.url }}
  .details.hide
    %pre.prettyprint.request<
      :plain
        {{ log.get_request_formatted|default:"" }}
    %pre.prettyprint.response<
      :plain
        {{log.get_response_formatted}}

Hide invalid channel log request time

-load humanize

.log<
  .summary{id:"{{log.id}}"}
    .time.pull-right
      {{log.created_on|date:"M j, Y g:i:s a"}}

    .request-time.pull-right
      -if log.request_time
        Request time:
        %span.request-time-value
          {{ log.request_time|default:"0"|intcomma }}ms

    -if log.response_status
      %span.status-code
        {{ log.response_status }}
    %span.url
      %span.method= log.method
      -if log.method == 'GET'
        {{ log.get_url_host }}
      -else
        {{ log.url }}
  .details.hide
    %pre.prettyprint.request<
      :plain
        {{ log.get_request_formatted|default:"" }}
    %pre.prettyprint.response<
      :plain
        {{log.get_response_formatted}}


- content_for :page_title do
  = t(:listing_reports)

.columns.twelve
  %table.index
    %thead
      %tr
        %th= t(:name)
        %th= t(:description)
    %tbody
      - @reports.each do |report_type, report_subtypes|
        %tr
          %td
            = I18n.t(:name, scope: [:admin, :reports, report_type])
          %td
            - if report_subtypes.empty?
              - name = I18n.t(:name, scope: [:admin, :reports, report_type])
              - url = main_app.admin_report_url(report_type: report_type)
              = link_to name, url
            = render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }

Format reports as list, even if only one sub-type available

- content_for :page_title do
  = t(:listing_reports)

.columns.twelve
  %table.index
    %thead
      %tr
        %th= t(:name)
        %th= t(:description)
    %tbody
      - @reports.each do |report_type, report_subtypes|
        %tr
          %td
            = I18n.t(:name, scope: [:admin, :reports, report_type])
          %td
            - if report_subtypes.empty?
              %ul{style: "margin-left: 12pt"}
                %li
                  - name = I18n.t(:name, scope: [:admin, :reports, report_type])
                  - url = main_app.admin_report_url(report_type: report_type)
                  = link_to name, url
            = render partial: "report_subtype", locals: { report_subtypes: report_subtypes, report_type: report_type }


= semantic_form_for @bank_account do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :code, :input_html => {:size => 6}
    = f.input :pc_id, :input_html => {:size => 6}
    = f.input :esr_id, :input_html => {:size => 6}
    = f.input :title
    = f.input :account_type, :as => :combobox, :collection => options_from_collection_for_select(AccountType.all, :id, :title, @bank_account.account_type_id)
  = f.buttons do
    = f.commit_button

Add combobox for Bank to BankAccount form.

= semantic_form_for @bank_account do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :code, :input_html => {:size => 6}
    = f.input :pc_id, :input_html => {:size => 6}
    = f.input :esr_id, :input_html => {:size => 6}
    = f.input :title
    = f.input :account_type, :as => :combobox, :collection => options_from_collection_for_select(AccountType.all, :id, :title, @bank_account.account_type_id)
    = f.input :bank, :as => :combobox
  = f.buttons do
    = f.commit_button


- if @current_project.organization.is_admin?(current_user)
  %h2= t('.title', :project => h(@current_project))
  %p= t('.explain_admin_html', :organization => h(@current_project.organization))
  %p= link_to t('.join'), join_project_path(@current_project)

- elsif @current_project.public
  %h2= t('.title', :project => h(@current_project))
  %p= t('.explain_public_html', :organization => h(@current_project.organization))
  %p= link_to t('.join'), join_project_path(@current_project)

- else
  %p= t('.not_allowed')

- content_for :column do
  = " "

Fix the non-htmlsafe content on the not in project sidebar

- if @current_project.organization.is_admin?(current_user)
  %h2= t('.title', :project => h(@current_project))
  %p= t('.explain_admin_html', :organization => h(@current_project.organization))
  %p= link_to t('.join'), join_project_path(@current_project)

- elsif @current_project.public
  %h2= t('.title', :project => h(@current_project))
  %p= t('.explain_public_html', :organization => h(@current_project.organization))
  %p= link_to t('.join'), join_project_path(@current_project)

- else
  %p= t('.not_allowed')

- content_for :column do
  = " ".html_safe


.well
  .row
    .col-md-4
      = link_to image_tag(crop_image_path(crop),
                          alt: '',
                          class: 'img crop-image'),
                          crop
    .col-md-8
      %h3{ style: 'padding-top: 0px; margin-top: 0px' }
        = link_to crop, crop

      %p
        %b Scientific name:
        = crop.default_scientific_name

      - if crop.annual? && crop.median_lifespan.present?
        %p
          Median Lifespan
          %b= crop.median_lifespan
          days
      - unless crop.median_days_to_first_harvest.nil?
        %p
          First harvest expected
          %b= crop.median_days_to_first_harvest
          days after planting

      - if crop.annual? && crop.median_days_to_last_harvest.present?
        %p
          Last harvest expected
          %b= crop.median_days_to_last_harvest
          days after planting

      - if can? :create, Planting
        = link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
      - if can? :create, Seed
        = link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'

Tidy columns on crops index card

.well
  .row
    .col
      = link_to image_tag(crop_image_path(crop),
                          alt: '',
                          class: 'img crop-image'),
                          crop
    .col
      %h3{ style: 'padding-top: 0px; margin-top: 0px' }
        = link_to crop, crop

      %p
        %b Scientific name:
        = crop.default_scientific_name

      - if crop.annual? && crop.median_lifespan.present?
        %p
          Median Lifespan
          %b= crop.median_lifespan
          days
      - unless crop.median_days_to_first_harvest.nil?
        %p
          First harvest expected
          %b= crop.median_days_to_first_harvest
          days after planting

      - if crop.annual? && crop.median_days_to_last_harvest.present?
        %p
          Last harvest expected
          %b= crop.median_days_to_last_harvest
          days after planting

      - if can? :create, Planting
        = link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
      - if can? :create, Seed
        = link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'


%br/

.row#footer
  .col-md-2.small
    = link_to 'FAQs', main_app.faqs_path
    %br/
    = link_to "Team", main_app.team_path
    %br/
    = link_to 'Privacy Policy', main_app.privacy_path
    %br/

  .col-md-10.small
    .row
      .col-md-6= link_to image_tag('myapnea/icons/ASAA.png'), 'http://www.sleepapnea.org/'
      .col-md-6= link_to image_tag('myapnea/icons/pcornet.png'), 'http://www.pcornet.org/'
      //.col-md-4= link_to image_tag('myapnea/icons/brigham.png'), 'http://www.brighamandwomens.org/'

Add Brigham logo back to footer

%br/

.row#footer
  .col-md-2.small
    = link_to 'FAQs', main_app.faqs_path
    %br/
    = link_to "Team", main_app.team_path
    %br/
    = link_to 'Privacy Policy', main_app.privacy_path
    %br/

  .col-md-10.small
    .row
      .col-md-4= link_to image_tag('myapnea/icons/ASAA.png'), 'http://www.sleepapnea.org/'
      .col-md-4= link_to image_tag('myapnea/icons/pcornet.png'), 'http://www.pcornet.org/'
      .col-md-4= link_to image_tag('myapnea/icons/brigham.png'), 'http://www.brighamandwomens.org/'


- page_title "Find File", @ref

.file-finder-holder.tree-holder.clearfix.js-file-finder{ 'data-file-find-url': "#{escape_javascript(project_files_path(@project, @ref, @options.merge(format: :json)))}", 'data-find-tree-url': escape_javascript(project_tree_path(@project, @ref)), 'data-blob-url-template': escape_javascript(project_blob_path(@project, @id || @commit.id)) }
  .nav-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'find_file', path: @path
    %ul.breadcrumb.repo-breadcrumb
      %li.breadcrumb-item
        = link_to project_tree_path(@project, @ref) do
          = @project.path
      %li.file-finder.breadcrumb-item
        %input#file_find.form-control.file-finder-input{ type: "text", placeholder: _('Find by path'), autocomplete: 'off' }

  .tree-content-holder
    .table-holder
      %table.table.files-slider{ class: "table_#{@hex_path} tree-table table-striped" }
        %tbody
      = spinner nil, true

Remove striped table styling of Find files view

- page_title "Find File", @ref

.file-finder-holder.tree-holder.clearfix.js-file-finder{ 'data-file-find-url': "#{escape_javascript(project_files_path(@project, @ref, @options.merge(format: :json)))}", 'data-find-tree-url': escape_javascript(project_tree_path(@project, @ref)), 'data-blob-url-template': escape_javascript(project_blob_path(@project, @id || @commit.id)) }
  .nav-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'find_file', path: @path
    %ul.breadcrumb.repo-breadcrumb
      %li.breadcrumb-item
        = link_to project_tree_path(@project, @ref) do
          = @project.path
      %li.file-finder.breadcrumb-item
        %input#file_find.form-control.file-finder-input{ type: "text", placeholder: _('Find by path'), autocomplete: 'off' }

  .tree-content-holder
    .table-holder
      %table.table.files-slider{ class: "table_#{@hex_path} tree-table" }
        %tbody
      = spinner nil, true


#sidebar
  .widget
    %h3.ribbon Buscador
    = form_tag search_path(what: 'posts'), method: 'get' do
      = text_field_tag :q, params[:q], placeholder: 'Ingresá el texto que buscás'
      = submit_tag "Buscar", class: 'btn default'
  -if user_signed_in?
    .widget
      %h3.ribbon= current_user.alias
      %ul
        = render 'layouts/menus/user_items'
  .widget
    = render 'layouts/banners/b160x600'
  - cache [:archive, Post.last_updated], :expires_in => 2.days do
    .widget
      = render 'layouts/widgets/daily_archive'
    .widget
      = render 'layouts/widgets/monthly_archive'
  %h3.ribbon Seguí a Venganzas del Pasado
  .widget
    = render 'layouts/widgets/facebook'
  .widget
    = render 'layouts/widgets/twitter'

Add placeholders for FB & TW in development

#sidebar
  .widget
    %h3.ribbon Buscador
    = form_tag search_path(what: 'posts'), method: 'get' do
      = text_field_tag :q, params[:q], placeholder: 'Ingresá el texto que buscás'
      = submit_tag "Buscar", class: 'btn default'
  -if user_signed_in?
    .widget
      %h3.ribbon= current_user.alias
      %ul
        = render 'layouts/menus/user_items'
  .widget
    = render 'layouts/banners/b160x600'
  - cache [:archive, Post.last_updated], :expires_in => 2.days do
    .widget
      = render 'layouts/widgets/daily_archive'
    .widget
      = render 'layouts/widgets/monthly_archive'
  %h3.ribbon Seguí a Venganzas del Pasado
  .widget
    - if Rails.env.production?
      = render 'layouts/widgets/facebook'
    - else
      = image_tag('http://placehold.it/220x440/')
  .widget
    - if Rails.env.production?
      = render 'layouts/widgets/twitter'
    - else
      = image_tag('http://placehold.it/220x440/')


%header
  %h1= t ".title"
%section
  .tasks
    = link_to t(".new_group"), new_admin_group_path
  %table
    %thead
      %th= t ".name"
    %tbody
      - @groups.each do |group|
        %tr
          %td= link_to group.name, group
          %td= mail_to group.email
          %td.actions
            = link_to t(".edit"), [:edit, :admin, group]
            = link_to t(".members"), [group, :members]

Add a link to edit the group profile from the admin page

%header
  %h1= t ".title"
%section
  .tasks
    = link_to t(".new_group"), new_admin_group_path
  %table
    %thead
      %th= t ".name"
    %tbody
      - @groups.each do |group|
        %tr
          %td= link_to group.name, group
          %td= mail_to group.email
          %td.actions
            = link_to t(".edit"), [:edit, :admin, group]
            = link_to t(".edit_profile"), [:edit, group, :profile]
            = link_to t(".members"), [group, :members]


.content-hdr
  %h2.h2.error Session Timed Out

.intro-mod
  .intro-txt
    %h4.h4 Sorry, we have lost track of who you are.
    %p
      %ul
        %li
          Close this window or browser tab.
        %li
          Go back to the portal from which you launched the activity.
        %li
          Re-launch the activity.
    %p.stuck
      If you are stuck or surprised to see this, please
      %a{href: 'javascript:void(0)'} let us know
      \.

Remove wrapper for error heading that could make it invisible.


-extends "smartmin/list.html"
-load i18n

-block table-buttons
  -if view.add_button
    {% trans "Add" %}

-block extra-style
  :css
      td.field_created_on {
        white-space: nowrap;
      }

      td.field_sync_status {
        white-space: nowrap;
      }

      td.field_category {
        white-space: nowrap;
      }

      td.field_questions {
        text-align: center;
      }

      td.field_featured_responses {
        text-align: center;
      }

      td.field_images {
        text-align: center;
      }

Fix poll admin list styles

-extends "smartmin/list.html"
-load i18n

-block table-buttons
  -if view.add_button
    {% trans "Add" %}

-block extra-style
  :css
      td.field_created_on {
        white-space: nowrap;
      }

      td.field_sync_status {
        width: 150px;
      }

      td.field_category {
        max-width: 150px;
      }

      td.field_questions {
        text-align: center;
      }

      td.field_featured_responses {
        text-align: center;
      }

      td.field_images {
        text-align: center;
      }


- content_for(:title) do
  = t :checkout_title

.darkswarm.footer-pad
  - content_for :order_cycle_form do
    %closing
      = t :checkout_now
    %p
      = t :checkout_order_ready
      %strong
        = pickup_time current_order_cycle

  - content_for :ordercycle_sidebar do
    .show-for-large-up.large-4.columns
      = render partial: "shopping_shared/order_cycles"

  = render partial: "shopping_shared/header"

  .sub-header.show-for-medium-down
    = render partial: "shopping_shared/order_cycles"

  %checkout.row
    .small-12.medium-12.columns
      = render partial: "split_checkout/tabs"
      = render partial: "split_checkout/form"

= render partial: "shared/footer"

Enable Turbo in the new checkout

- content_for(:title) do
  = t :checkout_title

.darkswarm.footer-pad{"data-turbo": "true"}
  - content_for :order_cycle_form do
    %closing
      = t :checkout_now
    %p
      = t :checkout_order_ready
      %strong
        = pickup_time current_order_cycle

  - content_for :ordercycle_sidebar do
    .show-for-large-up.large-4.columns
      = render partial: "shopping_shared/order_cycles"

  = render partial: "shopping_shared/header"

  .sub-header.show-for-medium-down
    = render partial: "shopping_shared/order_cycles"

  %checkout.row
    .small-12.medium-12.columns
      = render partial: "split_checkout/tabs"
      = render partial: "split_checkout/form"

= render partial: "shared/footer"


#map

- if dossier.quartier_prioritaires.any?
  .card-title Quartiers prioritaires
  %ul
  - dossier.quartier_prioritaires.each do |q|
    %li= q.nom

- if dossier.cadastres.any?
  .card-title Parcelles cadastrales
  %ul
  - dossier.cadastres.each do |p|
    %li
      = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"

:javascript
  var getPositionUrl = "#{position_gestionnaire_dossier_path(dossier.procedure, dossier)}";
  var dossierJsonLatLngs = #{raw(ensure_safe_json(dossier.json_latlngs))};
  var dossierCadastres = #{raw(ensure_safe_json(dossier.cadastres.to_json))};
  var dossierQuartiersPrioritaires = #{raw(ensure_safe_json(dossier.quartier_prioritaires.to_json))};

Add an empty state for carto

- if dossier.json_latlngs.nil?
  %h2.empty-text Non renseigné
- else
  #map

  - if dossier.quartier_prioritaires.any?
    .card-title Quartiers prioritaires
    %ul
    - dossier.quartier_prioritaires.each do |q|
      %li= q.nom

  - if dossier.cadastres.any?
    .card-title Parcelles cadastrales
    %ul
    - dossier.cadastres.each do |p|
      %li
        = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"

  :javascript
    var getPositionUrl = "#{position_gestionnaire_dossier_path(dossier.procedure, dossier)}";
    var dossierJsonLatLngs = #{raw(ensure_safe_json(dossier.json_latlngs))};
    var dossierCadastres = #{raw(ensure_safe_json(dossier.cadastres.to_json))};
    var dossierQuartiersPrioritaires = #{raw(ensure_safe_json(dossier.quartier_prioritaires.to_json))};


%h3 Activity

%ul
  %li
    - if member.plantings.count > 0
      = link_to pluralize(member.plantings.count, "planting"), plantings_by_owner_path(:owner => member)
    - else
      0 plantings
  %li
    - if member.harvests.count > 0
      = link_to pluralize(member.harvests.count, "harvest"), harvests_by_owner_path(:owner => member)
    - else
      0 harvests
  %li
    - if member.seeds.count > 0
      = link_to pluralize(member.seeds.count, "seeds"), seeds_by_owner_path(:owner => member)
    - else
      0 seeds
  %li
    - if member.posts.count > 0
      = link_to pluralize(member.posts.count, "post"), posts_by_author_path(:author => member)
    - else
      0 posts

  %li
    - if member.followed.count > 0
      = link_to pluralize(member.followed.count, "follow"), member_follows_path(member)
    - else
      0 following

  %li
    - if member.followers.count > 0
      = link_to pluralize(member.followers.count, "follower"), member_followers_path(member)
    - else
      0 followers

Use .size instead of .count

%h3 Activity

%ul
  %li
    - if member.plantings.count > 0
      = link_to pluralize(member.plantings.size, "planting"), plantings_by_owner_path(:owner => member)
    - else
      0 plantings
  %li
    - if member.harvests.count > 0
      = link_to pluralize(member.harvests.size, "harvest"), harvests_by_owner_path(:owner => member)
    - else
      0 harvests
  %li
    - if member.seeds.count > 0
      = link_to pluralize(member.seeds.size, "seeds"), seeds_by_owner_path(:owner => member)
    - else
      0 seeds
  %li
    - if member.posts.count > 0
      = link_to pluralize(member.posts.size, "post"), posts_by_author_path(:author => member)
    - else
      0 posts

  %li
    - if member.followed.count > 0
      = link_to pluralize(member.followed.size, "follow"), member_follows_path(member)
    - else
      0 following

  %li
    - if member.followers.count > 0
      = link_to pluralize(member.followers.size, "follower"), member_followers_path(member)
    - else
      0 followers


- if params["category"] == "career" || @proposal.try(:category_list).try(:include?, "career")
  .top-banner
    %a.top-banner-clickable{ href: "http://effectivealtruismhub.com/career-help", target: "_blank" } Interested in career advice? You should also check out the career-advice page on the Effective Altruism Hub!

Update EA Hub career-advice link

- if params["category"] == "career" || @proposal.try(:category_list).try(:include?, "career")
  .top-banner
    %a.top-banner-clickable{ href: "http://eahub.org/career-help", target: "_blank" }
      Interested in career advice? You should also check out the career-advice page on the Effective Altruism Hub!


:ruby
  source ||= raise ArgumentError, "source is required in view partial #{__FILE__}"

.source{:class => (source.enabled? ? 'enabled' : 'disabled')}
  .source-title= link_to source.name, organization_source_path(:organization_id => source.organization_id, :id => source.id)
  .source-url
    .source-url-label= t('.url_label')
    = link_to source.url, source.url

  .source-topics<
    - source.topics.each do |topic|
      = link_to topic.name, '#', :class => 'topic'

  .source-types<
    - source.types.each do |type|
      = link_to type.name, '#', :class => 'type'

Make topics and types on same line for sources list on org show page

:ruby
  source ||= raise ArgumentError, "source is required in view partial #{__FILE__}"

.source{:class => (source.enabled? ? 'enabled' : 'disabled')}
  .source-title= link_to source.name, organization_source_path(:organization_id => source.organization_id, :id => source.id)
  .source-url
    .source-url-label= t('.url_label')
    = link_to source.url, source.url

  .source-topics-types<
    - source.topics.each do |topic|
      = link_to topic.name, '#', :class => 'topic'
    - source.types.each do |type|
      = link_to type.name, '#', :class => 'type'


:markdown
  Reference:

  - Titles – `#` (biggest), `##` (smaller), `###` (even smaller), ...
  - `*italic*` – *italic*
  - `**bold**` – **bold**
  - `[link](http://example.com)` – [link](http://example.com)
  - `<email@example.com>` – <email@example.com>

  In order to get paragraphs in texts, an additional empty new line is required between
  them.

  **Bad**:

  This is one paragraph.<br>
  This is another paragraph.

  **Good**:

  This is one paragraph.

  This is another paragraph.

Fix text in markdown reference

:markdown
  - Titles – `#` (biggest), `##` (smaller), `###` (even smaller), ...
  - `*italic*` – *italic*
  - `**bold**` – **bold**
  - `[link](http://example.com)` – [link](http://example.com)
  - `<email@example.com>` – <email@example.com>

  In order to get paragraphs in texts, an additional empty new line is required between
  them.

  **Bad**:

  This is one paragraph.<br>
  This is another paragraph.

  **Good**:

  This is one paragraph.

  This is another paragraph.


.file-holder.file
  .file-title
    .editor-ref
      %i.fa.fa-code-fork
      = ref
    %span.editor-file-name
      - if @path
        %span.monospace
          = @path

      - if current_action?(:new) || current_action?(:create)
        \/
        = text_field_tag 'file_name', params[:file_name], placeholder: "File name",
          required: true, class: 'form-control new-file-name'
        .pull-right
          = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control'

  .file-content.code
    %pre.js-edit-mode-pane#editor
      = params[:content] || local_assigns[:blob_data]
    - if local_assigns[:path]
      .js-edit-mode-pane#preview.hide
        .center
          %h2
            %i.icon-spinner.icon-spin

Allow base64 for edit blobs


%ul.nav.nav-list
  %li.nav-header= t('bookyt.main_navigation.accounting')
  %li= link_to t_title(:new, Booking), new_booking_path
  - BookingTemplate.where(:type => nil).limit(5).each do |template|
    %li= link_to template, [:new_booking, template]

  %li.nav-header= t_title(:index, DebitInvoice)
  %li= link_to t_title(:new, DebitInvoice), new_debit_invoice_path
  %li= link_to 'Offene Posten', debit_invoices_path

  %li.nav-header= t_title(:index, CreditInvoice)
  %li= link_to t_title(:new, CreditInvoice), new_credit_invoice_path
  %li= link_to 'Offene Posten', credit_invoices_path

  %li.nav-header Infos
  %li= link_to t_title(:index, Account), accounts_path

Add sidebar link to bookings journal.

%ul.nav.nav-list
  %li.nav-header= t('bookyt.main_navigation.accounting')
  %li= link_to t_title(:new, Booking), new_booking_path
  - BookingTemplate.where(:type => nil).limit(5).each do |template|
    %li= link_to template, [:new_booking, template]

  %li.nav-header= t_title(:index, DebitInvoice)
  %li= link_to t_title(:new, DebitInvoice), new_debit_invoice_path
  %li= link_to 'Offene Posten', debit_invoices_path

  %li.nav-header= t_title(:index, CreditInvoice)
  %li= link_to t_title(:new, CreditInvoice), new_credit_invoice_path
  %li= link_to 'Offene Posten', credit_invoices_path

  %li.nav-header Infos
  %li= link_to t_title(:index, Account), accounts_path
  %li= link_to t_title(:index, Booking), bookings_path


.card.thumbnail
  /= render 'plantings/quick_actions', planting: planting
  = render 'plantings/badges', planting: planting
  .planting-thumbnail-image
    = link_to image_tag(planting_image_path(planting, full_size: true),
                        alt: planting.crop, class: 'img-card'),
                        planting
  .card-body.plantinginfo
    = link_to planting.crop, planting

Move badges on planting thumbnail

.card.thumbnail
  /= render 'plantings/quick_actions', planting: planting
  .planting-thumbnail-image
    = link_to image_tag(planting_image_path(planting, full_size: true),
                        alt: planting.crop, class: 'img-card'),
                        planting
  .card-body
    = link_to planting.crop, planting
    = render 'plantings/badges', planting: planting


- if @project.import_in_progress?
  .save-project-loader
    %center
      %h2
        %i.icon-spinner.icon-spin
        Import in progress.
      %p.monospace git clone --bare #{@project.import_url}
      %p Please wait while we import the repository for you. Refresh at will.
      :javascript
        new ProjectImport();

- elsif @project.import_failed?
  .save-project-loader
    %center
      %h2
        Import failed. Retry?
  %hr
  = form_for @project, url: retry_import_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
    .form-group.import-url-data
      = f.label :import_url, class: 'control-label' do
        %span Import existing repo
      .col-sm-10
        = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
        .bs-callout.bs-callout-info
          This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
          %br
          The import will time out after 2 minutes. For big repositories, use a clone/push combination.
    .form-actions
      = f.submit 'Retry import', class: "btn btn-create", tabindex: 4

Hide retry import form for non masters

- if @project.import_in_progress?
  .save-project-loader
    %center
      %h2
        %i.icon-spinner.icon-spin
        Import in progress.
      %p.monospace git clone --bare #{@project.import_url}
      %p Please wait while we import the repository for you. Refresh at will.
      :javascript
        new ProjectImport();

- elsif @project.import_failed?
  .save-project-loader
    %center
      %h2
        Import failed. Retry?
  %hr
  - if can?(current_user, :admin_project, @project)
    = form_for @project, url: retry_import_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
      .form-group.import-url-data
        = f.label :import_url, class: 'control-label' do
          %span Import existing repo
        .col-sm-10
          = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
          .bs-callout.bs-callout-info
            This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
            %br
            The import will time out after 2 minutes. For big repositories, use a clone/push combination.
      .form-actions
        = f.submit 'Retry import', class: "btn btn-create", tabindex: 4


= active_link_to games_path(sorting_params_for(parameter)), class: "item", active: Regexp.new(parameter) do
  %i.icon{class: icon_class}
  Players
  %i.sort.icon{class: sorting_icon_for(parameter)}

Fix a sorting link names

= active_link_to games_path(sorting_params_for(parameter)), class: "item", active: Regexp.new(parameter) do
  %i.icon{class: icon_class}
  = title
  %i.sort.icon{class: sorting_icon_for(parameter)}


- content_for :header do
  Achievements
- if @achievements.count == 0
  .zero-items-text No Achievements
- else
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th Name
        %th Unlocked By
        %th When
    %tbody
      - @achievements.each do |a|
        %tr
          %td= a.text
          %td= link_to_unless current_user.nil?, a.team.display_name, a.team
          %td= a.created_at.strftime("%b %e %y, %R %Z")

Make achievements text slightly more clear

- content_for :header do
  Achievements
- if @achievements.count == 0
  .zero-items-text No achievements have been awarded
- else
  %table.table.table-bordered.table-striped
    %thead
      %tr
        %th Name
        %th Unlocked By
        %th When
    %tbody
      - @achievements.each do |a|
        %tr
          %td= a.text
          %td= link_to_unless current_user.nil?, a.team.display_name, a.team
          %td= a.created_at.strftime("%b %e %y, %R %Z")


- if location.is_a?(Route)
  = render :partial => 'shared/location_marker', :collection => location.points, :as => :location, :locals => { :small => true, :main => main}
- else
  %a{:href => location_url(location)}
    %img{:src => "/images/#{stop_icon(location, main, small)}.png", :title => "#{location.full_name}", :alt => "#{location.full_name}", :style => icon_style(location, @lon, @lat, @zoom, small) }

Use the description method for title and alt fields for markers

- if location.is_a?(Route)
  = render :partial => 'shared/location_marker', :collection => location.points, :as => :location, :locals => { :small => true, :main => main}
- else
  %a{:href => location_url(location)}
    %img{:src => "/images/#{stop_icon(location, main, small)}.png", :title => "#{location.description}", :alt => "#{location.description}", :style => icon_style(location, @lon, @lat, @zoom, small) }


%h1= t(:roles)

= render :partial => '/users/user_head', :locals => { :user => @user }

.module
  = form_tag(projects_admin_user_path, :method => 'post') do
    %table
      %thead
        %th
          = t(:client)
          = link_to_function("[+/-]", nil, :id => "show_hide")
        %th= t(:project)
        %th= t(:developer_role)
        %th= t(:client_role)
        %th= t(:no_roles)
      - Client.sort_by_name.each do |client|
        - if client.status == "Active"
          = render :partial => "shared/user_roles", :locals => { :user => @user, :client => client }
    = submit_tag("Submit")

- content_for :javascripts do
  :javascript
    $( "#show_hide" ).click(function(){
      $(".suspended").toggle();
    });

Add btn primary class to submit button on roles page.

%h1= t(:roles)

= render :partial => '/users/user_head', :locals => { :user => @user }

.module
  = form_tag(projects_admin_user_path, :method => 'post') do
    %table
      %thead
        %th
          = t(:client)
          = link_to_function("[+/-]", nil, :id => "show_hide")
        %th= t(:project)
        %th= t(:developer_role)
        %th= t(:client_role)
        %th= t(:no_roles)
      - Client.sort_by_name.each do |client|
        - if client.status == "Active"
          = render :partial => "shared/user_roles", :locals => { :user => @user, :client => client }
    = submit_tag("Submit", :class => 'btn primary')

- content_for :javascripts do
  :javascript
    $( "#show_hide" ).click(function(){
      $(".suspended").toggle();
    });


%li
  = step["stub"]
  - (step["children"] || []).each do |execution_set|
    %br/
    {
    = execution_set["name"]
    %ul
      - execution_set["steps"].each do |child|
        = haml :_step, :locals => {:step => child}
    }

Add a bunch of classes to things to make it more semantic.

%li.step
  = step["stub"]
  - (step["children"] || []).each_with_index do |execution_set, set_index|
    - if set_index > 5
      \.
    - elsif set_index == 5
      %br/
      Executed
      = (step["children"] || []).size - 5
      more times
      %br/
    - else
      .execution
        {
        .name= execution_set["name"]
        %ol.steps
          - execution_set["steps"].each do |child|
            = haml :_step, :locals => {:step => child}
        }


%h1 Redline
%p.lead Quick and simple art feedback

%form{action: '/upload', method: 'POST', enctype: 'multipart/form-data'}
  %input{type: 'file', name: 'image', accept: 'image/*'}
  %button Get Feedback

Add information to first page

%h1 Redline
%p.lead Quick and simple art feedback

%form{action: '/upload', method: 'POST', enctype: 'multipart/form-data'}
  %input{type: 'file', name: 'image', accept: 'image/*'}
  %button Get Feedback

%p
  Images must be less than 5MB in size.
  %br
  Uploads and redlines will be deleted after one week.
  %br
  If you have any questions or comments, email
  %a{href: 'mailto:contact@nullref.net'} contact@nullreff.net


---
title: about
---

%section.main-headline.white-bg
  .container-fluid
    .row
      .col-md-7.no-pad.text-left.header-caps
        %h2.black.font2bold
          About Us
        %h3.grey.font3
          Over the course of our careers, we have developed solutions for Société Général de Surveillance, Petroconsulants (now IHS Energy Group), Discount Bank & Trust Company, Banque Piguet, and Firmenich, among others. Today, we apply that accumulated knowledge to the unique challenges in the book publishing industry. Our flagship application is
          = link_to 'TitleLeaf', 'http://titleleaf.com'
          an SaaS application for publishers.

%section.case-study-item.case-study-item-02.fullheight.add-top-half
  .valign
    .container-fluid
      .row
        .col-md-6.col-md-offset-3.text-center.header-caps
          = link_to 'View Portfolio', '/portfolio.html', class: 'btn btn-nord btn-nord-dark'

Remove duplicate use of 'application' in same sentence of 'About' page

---
title: about
---

%section.main-headline.white-bg
  .container-fluid
    .row
      .col-md-7.no-pad.text-left.header-caps
        %h2.black.font2bold
          About Us
        %h3.grey.font3
          Over the course of our careers, we have developed solutions for Société Général de Surveillance, Petroconsulants (now IHS Energy Group), Discount Bank & Trust Company, Banque Piguet, and Firmenich, among others. Today, we apply that accumulated knowledge to the unique challenges in the book publishing industry. Our flagship application is #{link_to 'TitleLeaf', 'http://titleleaf.com'}, an SaaS solution for publishers.

%section.case-study-item.case-study-item-02.fullheight.add-top-half
  .valign
    .container-fluid
      .row
        .col-md-6.col-md-offset-3.text-center.header-caps
          = link_to 'View Portfolio', '/portfolio.html', class: 'btn btn-nord btn-nord-dark'


!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= page_title
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、仮名遣いなどでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。")
    %meta(name="keywords" content="青空文庫,全文検索")
    %link(href="vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="css/aozorasearch.css" rel="stylesheet" media="screen")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false

Add link tag for favicon

!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= page_title
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、仮名遣いなどでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。")
    %meta(name="keywords" content="青空文庫,全文検索")
    %link(href="vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="css/aozorasearch.css" rel="stylesheet" media="screen")
    %link(rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false


:ruby
  option_items = [3,7,12,25,items_count].sort
    .select{|c| c <= items_count}
    .map{|pp| ["#{pp} Per page",pp]}
  option_default = params[:per_page].presence || [25,items_count].min
.form-group
  %label.sr-only{for: "per_page"}
  = select_tag :per_page, options_for_select(option_items, option_default),
    class: "form-control input-sm"

Fix per_page default on tasks in job view

:ruby
  option_items = [3,7,12,25,items_count].sort
    .select{|c| c <= items_count}
    .map{|pp| ["#{pp} Per page",pp]}
  option_default = params[:per_page].presence || [12, items_count].min
.form-group
  %label.sr-only{for: "per_page"}
  = select_tag :per_page, options_for_select(option_items, option_default),
    class: "form-control input-sm"


= error_messages_for :site

- form_for :site, :url => admin_settings_path, :html => { :method => :put } do |f|
  .group
    %h2 Basic settings
    %dl
      %dt= f.label_for :title
      %dd= f.text_field :title, :class => 'large'
  %p.submit= submit_tag 'Save settings'

%p
  = "There are #{@site.cache_items.size} cached items..."

Make the view for editing the settings look better.

= error_messages_for :site

- form_for :site, :url => admin_settings_path, :html => { :method => :put } do |f|
  .group
    %dl
      %dt= f.label_for :title, :text => 'Site Title'
      %dd= f.text_field :title, :class => 'large'
      %dt
        = f.submit 'Save Changes'


%ul.breadcrumb
  %li
    %i.icon-angle-right
    = link_to project_tree_path(@project, @ref) do
      = @project.path
  - tree_breadcrumbs(@tree, 6) do |title, path|
    %li
      - if path
        - if path.end_with?(@path)
          = link_to project_blob_path(@project, path) do
            %span.cblue
              = truncate(title, length: 40)
        - else
          = link_to truncate(title, length: 40), project_tree_path(@project, path)
      - else
        = link_to title, '#'

%ul.blob-commit-info.bs-callout.bs-callout-info
  - blob_commit = @repository.last_commit_for_path(@commit.id, @blob.path)
  = render blob_commit, project: @project

%div#tree-content-holder.tree-content-holder
  .file-holder
    .file-title
      %i.icon-file
      %span.file_name
        = blob.name
        %small= number_to_human_size blob.size
      %span.options= render "actions"
    - if blob.text?
      = render "text", blob: blob
    - elsif blob.image?
      = render "image", blob: blob
    - else
      = render "download", blob: blob

Hide control elements and last login for xs display

%ul.breadcrumb
  %li
    %i.icon-angle-right
    = link_to project_tree_path(@project, @ref) do
      = @project.path
  - tree_breadcrumbs(@tree, 6) do |title, path|
    %li
      - if path
        - if path.end_with?(@path)
          = link_to project_blob_path(@project, path) do
            %span.cblue
              = truncate(title, length: 40)
        - else
          = link_to truncate(title, length: 40), project_tree_path(@project, path)
      - else
        = link_to title, '#'

%ul.blob-commit-info.bs-callout.bs-callout-info.hidden-xs
  - blob_commit = @repository.last_commit_for_path(@commit.id, @blob.path)
  = render blob_commit, project: @project

%div#tree-content-holder.tree-content-holder
  .file-holder
    .file-title.clearfix
      %i.icon-file
      %span.file_name
        = blob.name
        %small= number_to_human_size blob.size
      %span.options.hidden-xs= render "actions"
    - if blob.text?
      = render "text", blob: blob
    - elsif blob.image?
      = render "image", blob: blob
    - else
      = render "download", blob: blob


%h1 All Scrapers

= paginate @scrapers
= render @scrapers
= paginate @scrapers

Fix path to partial after sync update

%h1 All Scrapers

= paginate @scrapers
= render partial: "sync/scrapers/scraper", collection: @scrapers
= paginate @scrapers


%p 마이스누 인증이 필요합니다.
%p 인증을 통해 단과대학, 학부, 과정 정보를 수집하고, 학번은 누구도 알 수 없게 암호화해 중복 인증 방지용으로 사용합니다.
%a{href: "http://sso.snu.ac.kr/snu/ssologin.jsp?si_redirect_address=http://mimosa.snu.ac.kr/~glastonbury/acct.php"} 인증하러 가기

Save authorization url as environment variable

%p 마이스누 인증이 필요합니다.
%p 인증을 통해 단과대학, 학부, 과정 정보를 수집하고, 학번은 누구도 알 수 없게 암호화해 중복 인증 방지용으로 사용합니다.
%a{href: ENV['MYSNU_AUTH_PATH']} 인증하러 가기


= render "shared/loginout"
- content_for :head do
  = javascript_include_tag "application"
  = stylesheet_link_tag "application"
- content_for :content do
  .class
    %main#content{role: 'main'}
      = flash_messages
      .inner-block
        = yield
= render template: "layouts/moj_internal_template"

Remove log in status partial from layout


- content_for :title, 'Forgot your password?'
- content_for :sidebar do
  %p You can reset your password if you forgot it or simply would like to change it.
  %p Once you submit your email address we will send you instructions to change your password.

= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }, :wrapper => :inline) do |f|
  = f.error_notification
  .inputs= f.input :email, :required => true
  .actions= f.button :submit, 'Send me password reset instructions', :class => 'primary'

= render :partial => 'devise/shared/links'

Use default simple form wrapper.

- content_for :title, 'Forgot your password?'
- content_for :sidebar do
  %p You can reset your password if you forgot it or simply would like to change it.
  %p Once you submit your email address we will send you instructions to change your password.

= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
  = f.error_notification
  .inputs= f.input :email, :required => true
  .actions= f.button :submit, 'Send me password reset instructions', :class => 'primary'

= render :partial => 'devise/shared/links'


%p.event-time
  = l(event.start_at, :format => :long)
  to
  = l(event.end_at, :format => :long)
  - if event.start_at.future?
    (<%= distance_of_time_in_words_to_now event.start_at %> from now)

Fix display of time left

%p.event-time
  = l(event.start_at, :format => :long)
  to
  = l(event.end_at, :format => :long)
  - if event.start_at.future?
    = "(#{distance_of_time_in_words_to_now event.start_at} from now)"


%h1 StarterKit

%p
  Rails 4 starter app with social authentication and other goodies.

Add more info to home page

%h1 StarterKit

%p
  Rails 4 starter app with social authentication and other goodies.

%p
  StarterKit uses best practices and code extracted from several production projects.

%p
  = link_to 'Github', 'https://github.com/10hacks/rails4-starterkit'


%h2 Edit user information

= form_for(@current_user) do |f|
  - if @current_user.errors.any?
    #error_explanation
      %h2
        = pluralize(@current_user.errors.count, "error")
        prohibited this project from being saved:

      %ul
      - @current_user.errors.full_messages.each do |msg|
        %li
          = msg
  .field
    = f.label :name

    = f.text_field :name

  .field
    = f.label :email

    = f.text_field :email

  .actions
    = f.submit

Use same background for user editor as on other pages.

.row
  .span12.sticky
    %span.scratch
    .paper
      %h2 Edit user information

      = form_for(@current_user) do |f|
        - if @current_user.errors.any?
          #error_explanation
            %h2
              = pluralize(@current_user.errors.count, "error")
              prohibited this project from being saved:

            %ul
            - @current_user.errors.full_messages.each do |msg|
              %li
                = msg
        .field
          = f.label :name

          = f.text_field :name

        .field
          = f.label :email

          = f.text_field :email

        .actions
          = f.submit


.sitemap
  %div
    %h4 Ideas
    %ul.nav.map
      %li= link_to "Share Your Idea", root_url
      %li= link_to "What's Hot", search_ideas_path(:search => 'hot')
      %li= link_to 'Recent Ideas', search_ideas_path(:search => 'recent')
  %div
    %h4 Look Around
    %ul.nav.map
      %li= link_to 'Currents', currents_path
      %li= link_to 'Tags', tags_path
  %div
    %h4 Get to Know Us
    %ul.nav.map
      %li= link_to "About BBYIDX", home_about_path
      %li= link_to "Contact", home_contact_path
%ul.nav.supp
  / # %li= link_to "Terms of Use", home_path('terms-of-use')
%p.credit
  Powered by
  = link_to "Best Buy", "http://bestbuy.com", :target => "_blank"
  and
  = link_to "Bust Out Solutions", "http://bustoutsolutions.com", :target => "_blank"
  using
  = link_to "Ruby on Rails", "http://rubyonrails.org", :target => "_blank"
  \.
.error
  %b Replace text in app/views/custom/* with your own company-specific info.

Fix location of ToU link in custom footer

.sitemap
  %div
    %h4 Ideas
    %ul.nav.map
      %li= link_to "Share Your Idea", root_url
      %li= link_to "What's Hot", search_ideas_path(:search => 'hot')
      %li= link_to 'Recent Ideas', search_ideas_path(:search => 'recent')
  %div
    %h4 Look Around
    %ul.nav.map
      %li= link_to 'Currents', currents_path
      %li= link_to 'Tags', tags_path
  %div
    %h4 Get to Know Us
    %ul.nav.map
      %li= link_to "About BBYIDX", home_about_path
      %li= link_to "Contact", home_contact_path
      %li= link_to "Terms of Use", home_tou_path
%p.credit
  Powered by
  = link_to "Best Buy", "http://bestbuy.com", :target => "_blank"
  and
  = link_to "Bust Out Solutions", "http://bustoutsolutions.com", :target => "_blank"
  using
  = link_to "Ruby on Rails", "http://rubyonrails.org", :target => "_blank"
  \.
.error
  %b Replace text in app/views/custom/* with your own company-specific info.


#login_dialog.top-bar{'data-title' => t('devise.sessions.link')}
  %ul.auth-list
    %li
      = render "shared/login_drop_down"
#join_dialog.hide{'data-title' => t('layouts.application.join_group', :group => current_group.name)}
  = link_to t('layouts.application.not_member_join_dialog', :group => current_group.name), join_groups_path , :id => 'join_dialog_link'
%footer
  %p
    / !!!!!!!!!!!! DO NOT REMOVE LINK TO SOURCE CODE AND LICENSE !!!!!!!!!!!!!
    Copyright © 2012 Ask All Rights Reserved by us

  .feedback{:style => "display:none"}
    = render :partial => "welcome/feedback"

  = render "shared/layout/javascript"
  = render "shared/layout/websocket"
  - if current_group.shapado_version.has_custom_js?
    - if current_group.current_theme.has_js
      %script{type: 'text/javascript'}
        =raw current_group.current_theme.javascript.read

Modify the footer to 'by IID'

#login_dialog.top-bar{'data-title' => t('devise.sessions.link')}
  %ul.auth-list
    %li
      = render "shared/login_drop_down"
#join_dialog.hide{'data-title' => t('layouts.application.join_group', :group => current_group.name)}
  = link_to t('layouts.application.not_member_join_dialog', :group => current_group.name), join_groups_path , :id => 'join_dialog_link'
%footer
  %p
    / !!!!!!!!!!!! DO NOT REMOVE LINK TO SOURCE CODE AND LICENSE !!!!!!!!!!!!!
    Copyright © 2012 Ask All Rights Reserved by IID

  .feedback{:style => "display:none"}
    = render :partial => "welcome/feedback"

  = render "shared/layout/javascript"
  = render "shared/layout/websocket"
  - if current_group.shapado_version.has_custom_js?
    - if current_group.current_theme.has_js
      %script{type: 'text/javascript'}
        =raw current_group.current_theme.javascript.read


- diff_notes_disabled = (@merge_request_diff.latest? && !!@start_sha) if @merge_request_diff
- discussion = local_assigns.fetch(:discussion, nil)
- if current_user
  %jump-to-discussion{ "inline-template" => true, ":discussion-id" => "'#{discussion.try(:id)}'" }
    .btn-group{ role: "group", "v-show" => "!allResolved", "v-if" => "showButton" }
      %button.btn.btn-default.discussion-next-btn.has-tooltip{ "@click" => "jumpToNextUnresolvedDiscussion",
        title: "Jump to next unresolved discussion",
        "aria-label" => "Jump to next unresolved discussion",
        data: { container: "body" },
        disabled: diff_notes_disabled }
        = custom_icon("next_discussion")

Stop disabling jump_to_next buttons, when not on latest MR diff.

- discussion = local_assigns.fetch(:discussion, nil)
- if current_user
  %jump-to-discussion{ "inline-template" => true, ":discussion-id" => "'#{discussion.try(:id)}'" }
    .btn-group{ role: "group", "v-show" => "!allResolved", "v-if" => "showButton" }
      %button.btn.btn-default.discussion-next-btn.has-tooltip{ "@click" => "jumpToNextUnresolvedDiscussion",
        title: "Jump to next unresolved discussion",
        "aria-label" => "Jump to next unresolved discussion",
        data: { container: "body" }}
        = custom_icon("next_discussion")


.Grid
  .Grid-2-3

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

    - if Date.today < Date.parse('2014-12-17')
      #latest-change.notice
        %h1 Staff update: prisoner and visitor details re-added to processing form
        %p Many of you said you liked having the prisoner/visitor info on this page, so we have added this back on, in a column to the right. Please do let us know if there are other features you would like to have.
        %p
          %a(href="/staff/changes") Read more about recent updates

Update staff alerts for 'details at top'

.Grid
  .Grid-2-3

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

    - if Date.today < Date.parse('2014-12-23')
      #latest-change.notice
        %h1 Staff update: prisoner and visitor details moved to top
        %p We have moved the prisoner and visitor details to the top of the processing form. If your browser window is large enough, it will display them in a right-hand column.
        %p
          %a(href="/staff/changes") Read more about recent updates


= render :partial => 'activity_line_items_table', :locals => {:project => @project, :popup => true}

.row
  .col-md-12
    %fieldset
      %legend Add Activity Line Item
      = simple_form_for([@project, ActivityLineItem.new],
          :wrapper => :vertical_form,
          :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
        = f.input :name, :required => true, :minlength => 10
        = f.association :team_ali_code, :collection => @project.team_ali_code.children, :label_method => 'full_name', :required => true
        = f.submit "Add Line Item", :class => 'btn btn-primary'

Add ALI cost to CP form

= render :partial => 'activity_line_items_table', :locals => {:project => @project, :popup => true}

.row
  .col-md-12
    %fieldset
      %legend Add Activity Line Item
      = simple_form_for([@project, ActivityLineItem.new],
          :wrapper => :vertical_form,
          :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
        = f.input :name, :required => true, :minlength => 10
        = f.association :team_ali_code, :collection => @project.team_ali_code.children, :label_method => 'full_name', :required => true
        = f.input :anticipated_cost, :wrapper=> :vertical_prepend, :label => "Cost Estimate" do
          %span.input-group-addon
            %i.fa.fa-usd
          = f.input_field :anticipated_cost, :class => "form-control"
        = f.submit "Add Line Item", :class => 'btn btn-primary'


.row
  .col-md-4
  .col-md-4
    .panel.panel-primary
      .panel-heading.text-center
        %h2.panel-title Sign in
      .panel-body
        = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f|
          = f.text_field :login, placeholder: 'Login', autofocus: true, class: 'form-control'
          %br
          = f.password_field :password, placeholder: 'Password', class: 'form-control'
          %br
          = f.submit 'Sign in', class: 'btn btn-primary btn-block'
        %br
      .panel-footer
        = render 'devise/shared/links'
  .col-md-4

Remove unnecessary line break in sign in view

.row
  .col-md-4
  .col-md-4
    .panel.panel-primary
      .panel-heading.text-center
        %h2.panel-title Sign in
      .panel-body
        = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f|
          = f.text_field :login, placeholder: 'Login', autofocus: true, class: 'form-control'
          %br
          = f.password_field :password, placeholder: 'Password', class: 'form-control'
          %br
          = f.submit 'Sign in', class: 'btn btn-primary btn-block'
      .panel-footer
        = render 'devise/shared/links'
  .col-md-4


- provide(:title, "Plant Samples")
%h1 Plant Samples
= link_to "Generate Report", export_path(format: "csv"), class: 'btn btn-primary'
.table-responsive
  %table.table.table-striped
    %thead
      %tr
        %th Plot
        %th Species
        %th Date
        %th Time
        %th Temperature
        %th Species Richness
        %th Diversity Index
        %th Abundance
        %th Percent Cover
    %tbody
      - @plant_samples.each do |sample|
        %tr
          %td= sample.biodiversity_report.plot.name unless sample.biodiversity_report.nil?
          %td= sample.plant.common_name unless sample.plant.nil?
          %td= sample.biodiversity_report.measured_on.to_s(:long) unless sample.biodiversity_report.nil?
          %td= sample.biodiversity_report.measured_at.to_s(:ampm) unless sample.biodiversity_report.nil?
          %td= sample.biodiversity_report.temperature unless sample.biodiversity_report.nil?
          %td= sample.biodiversity_report.species_richness unless sample.biodiversity_report.nil?
          %td= sample.biodiversity_report.diversity_index unless sample.biodiversity_report.nil?
          %td= sample.abundance
          %td= sample.percent_cover

Implement ruby's safe navigation operator

- provide(:title, "Plant Samples")
%h1 Plant Samples
= link_to "Generate Report", export_path(format: "csv"), class: 'btn btn-primary'
.table-responsive
  %table.table.table-striped
    %thead
      %tr
        %th Plot
        %th Species
        %th Date
        %th Time
        %th Temperature
        %th Species Richness
        %th Diversity Index
        %th Abundance
        %th Percent Cover
    %tbody
      - @plant_samples.each do |sample|
        %tr
          %td= sample.biodiversity_report.plot.name unless sample.biodiversity_report.nil?
          %td= sample&.plant.common_name
          %td= sample&.biodiversity_report.measured_on.to_s(:long)
          %td= sample&.biodiversity_report.measured_at.to_s(:ampm)
          %td= sample&.biodiversity_report.temperature
          %td= sample&.biodiversity_report.species_richness
          %td= sample&.biodiversity_report.diversity_index
          %td= sample.abundance
          %td= sample.percent_cover


%div
  = react_component 'ActivityHome', {initialCollection: @todaysActivities}, {prerender: true}
%div
  = link_to "Sign in with Google", user_omniauth_authorize_path(:google_oauth2)

Remove unnecessary link to sign in with google


%br
%br
%h1= "Editing #{@assignment.title} for #{@course.title}"

%h1=  flash[:message]
-@assignment.errors.try(:each) do |attribute, error|
    %h3= attribute.to_s + " " + error.to_s
    %br
=form_tag assignment_update_path(@assignment), method: :post, class:"pure-form pure-form-aligned" do
    %fieldset
        .pure-control-group
            %label{for: "assignment_title"} Title:
            =text_field_tag 'assignment[title]', @assignment.try(:title)
        .pure-control-group
            %label{for: "course_description"} Description:
            =text_field_tag 'course[description]', @assignment.try(:description)
        .pure-control-group
            %label{for: "course_startdate"} Starts:
            =date_select :assignment, :start_date, default: @assignment.try(:start_date)
        .pure-control-group
            %label{for: "course_enddate"} Due:
            =datetime_select :assignment, :due_date, default: @assignment.try(:end_date)
        %br
        %br
        =submit_tag "save"

Fix namings in assignments edit page

%br
%br
%h1= "Editing #{@assignment.title} for #{@course.title}"

%h1=  flash[:message]
-@assignment.errors.try(:each) do |attribute, error|
    %h3= attribute.to_s + " " + error.to_s
    %br
=form_tag assignment_update_path(@assignment), method: :post, class:"pure-form pure-form-aligned" do
    %fieldset
        .pure-control-group
            %label{for: "assignment_title"} Title:
            =text_field_tag 'assignment[title]', @assignment.try(:title)
        .pure-control-group
            %label{for: "assignment_description"} Description:
            =text_field_tag 'assignment[description]', @assignment.try(:description)
        .pure-control-group
            %label{for: "assignment_startdate"} Starts:
            =date_select :assignment, :start_date, default: @assignment.try(:start_date)
        .pure-control-group
            %label{for: "assignment_enddate"} Due:
            =datetime_select :assignment, :due_date, default: @assignment.try(:end_date)
        %br
        %br
        =submit_tag "save"


- content_for :breadcrumbs do
  %ol.breadcrumb
    %li= link_to 'Home', root_path
    %li= link_to <%= class_name %>.model_name.human.pluralize, <%= index_helper %>_path
    %li.active= <%= class_name %>.model_name.human

.container
  .page-header.clearfix
    %h1.pull-left= <%= class_name %>.model_name.human
    .pull-right{ :style => 'margin-top: 20px' }
      = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-default pull-right' do
        %i.glyphicon.glyphicon-edit
        = "Edit #{<%= class_name %>.model_name.human}"

  %p#notice= notice

  %dl.dl-horizontal
  <%- for attribute in attributes -%>
    %dt= <%= class_name %>.human_attribute_name(:<%= attribute.name %>)
    %dd= @<%= singular_table_name %>.<%= attribute.name %>
  <%- end -%>

Remove old flash notice display from show template

- content_for :breadcrumbs do
  %ol.breadcrumb
    %li= link_to 'Home', root_path
    %li= link_to <%= class_name %>.model_name.human.pluralize, <%= index_helper %>_path
    %li.active= <%= class_name %>.model_name.human

.container
  .page-header.clearfix
    %h1.pull-left= <%= class_name %>.model_name.human
    .pull-right{ :style => 'margin-top: 20px' }
      = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-default pull-right' do
        %i.glyphicon.glyphicon-edit
        = "Edit #{<%= class_name %>.model_name.human}"

  %dl.dl-horizontal
  <%- for attribute in attributes -%>
    %dt= <%= class_name %>.human_attribute_name(:<%= attribute.name %>)
    %dd= @<%= singular_table_name %>.<%= attribute.name %>
  <%- end -%>


%script{src: '/shared/js/shared.js'}
-# TODO(JL): conditionally load on client
- if browser.chrome? && browser.version.to_s.to_i == 34
  :javascript
    window.dashboard.isChrome34 = true;

%div{style: 'display: none;'}= render partial: 'levels/reference_area'

#codeApp
  .loading
  .slow_load
    = t(:slow_loading)
    %br
    %a{href: 'javascript: location.reload();'}= t(:try_reloading)

  :javascript
    //<![CDATA[
    var script_path = "#{@script_level && build_script_level_path(@script_level)}";
    var appOptions = #{app_options.to_json};
    appOptions.locale = '#{js_locale}';
    //]]>

  %script{src: '/shared/js/shared.js'}

Remove unintentional script double inclusion


%h3.page_title
  Team: #{@team.name}

%fieldset
  %legend Members (#{@team.members.count})
  = form_tag admin_team_members_path(@team), id: "team_members", class: "bulk_import", method: :post  do
    %table#members_list
      %thead
        %tr
          %th User name
          %th Default project access
          %th Team access
          %th
      - @team.members.each do |member|
        %tr.member
          %td
            = link_to [:admin, member] do
              = member.name
              %small= "(#{member.email})"
          %td= @team.human_default_projects_access(member)
          %td= @team.admin?(member) ? "Admin" : "Member"
          %td
      %tr
        %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
        %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
        %td
          %span= check_box_tag :group_admin
          %span Admin?
        %td= submit_tag 'Add', class: "btn btn-primary", id: :add_members_to_team

Switch for from table to plain form without member list

%h3.page_title
  New members for
  = link_to @team.name, admin_team_path(@team)
  team
%hr
= form_tag admin_team_members_path(@team), id: "team_members", class: "bulk_import", method: :post  do
  - if @team.errors.any?
    .alert.alert-error
      %span= @team.errors.full_messages.first
  .clearfix
    = label_tag :user_ids do
      Users to add
    .input
      = select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
  .clearfix.group-description-holder
    = label_tag :default_project_access do
      Default permission in projects
    .input
      = select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
  .clearfix
    = label_tag :group_admin do
      Is team admin
    .input
      = check_box_tag :group_admin
  .clearfix.form-actions
    = submit_tag 'Add users into team', class: "btn btn-primary", id: :add_members_to_team
    = link_to 'Cancel', :back, class: "btn"


= form_for @user, url: profile_password_path, method: :post do |f|
  .light-well.padded
    %p.slead
      Please set new password before proceed.
      %br
      After successful password update you will be redirected to login screen
    -if @user.errors.any?
      .alert.alert-danger
        %ul
          - @user.errors.full_messages.each do |msg|
            %li= msg

    .form-group
      = f.label :password
      .col-sm-10= f.password_field :password, required: true
    .form-group
      = f.label :password_confirmation
      .col-sm-10
        = f.password_field :password_confirmation, required: true
    .form-group
      .col-sm-10
        = f.submit 'Set new password', class: "btn btn-create"

Fix new password page UI

%h3.page-title Setup new password
%hr
= form_for @user, url: profile_password_path, method: :post, html: { class: 'form-horizontal '} do |f|
  %p.slead
    Please set new password before proceed.
    %br
    After successful password update you will be redirected to login screen
  -if @user.errors.any?
    .alert.alert-danger
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  .form-group
    = f.label :password, class: 'control-label'
    .col-sm-10= f.password_field :password, required: true, class: 'form-control'
  .form-group
    = f.label :password_confirmation, class: 'control-label'
    .col-sm-10
      = f.password_field :password_confirmation, required: true, class: 'form-control'
  .form-actions
    = f.submit 'Set new password', class: "btn btn-create"


- layout      ||= index_branch
- has_siblings  = layout.siblings.select{|l| l.site_id == @site.id}.size > 0

%li{:id => dom_id(layout)}
  .item
    .icon
      - if !params[:category].present? && has_siblings
        .dragger
          %span ⇅

    .btn-group.btn-group-sm
      = link_to t('.add_child_layout'), new_comfy_admin_cms_site_layout_path(@site, :parent_id => layout.id), :class => 'btn btn-default'
      = link_to t('.edit'), edit_comfy_admin_cms_site_layout_path(@site, layout), :class => 'btn btn-default'
      = link_to t('.delete'), comfy_admin_cms_site_layout_path(@site, layout), :method => :delete, :data => {:confirm => t('.are_you_sure')}, :class => 'btn btn-danger'

    .item-content
      .item-title
        = link_to layout.label, edit_comfy_admin_cms_site_layout_path(@site, layout)
      .item-meta
        = layout.identifier

  - if layout.children.present?
    %ul= render :partial => 'index_branch', :collection => layout.children

Enable sort for children layouts

- layout      ||= index_branch
- has_siblings  = layout.siblings.select{|l| l.site_id == @site.id}.size > 0

%li{:id => dom_id(layout)}
  .item
    .icon
      - if !params[:category].present? && has_siblings
        .dragger
          %span ⇅

    .btn-group.btn-group-sm
      = link_to t('.add_child_layout'), new_comfy_admin_cms_site_layout_path(@site, :parent_id => layout.id), :class => 'btn btn-default'
      = link_to t('.edit'), edit_comfy_admin_cms_site_layout_path(@site, layout), :class => 'btn btn-default'
      = link_to t('.delete'), comfy_admin_cms_site_layout_path(@site, layout), :method => :delete, :data => {:confirm => t('.are_you_sure')}, :class => 'btn btn-danger'

    .item-content
      .item-title
        = link_to layout.label, edit_comfy_admin_cms_site_layout_path(@site, layout)
      .item-meta
        = layout.identifier

  - if layout.children.present?
    %ul.children.sortable
      = render :partial => 'index_branch', :collection => layout.children


= content_for :splash_nav do
  %li
    %a{ href: '#program' } Program

%div.container.text-center
  %div.row
    %div.col-md-12
      %h1 Program
      - if !@conference.description.blank?
        %p
          = @conference.description
      - if @conference.call_for_papers and @conference.call_for_papers.schedule_public
        %span You can find the complete schedule in our
        %span
          = link_to 'Master Schedule', conference_schedule_path(@conference.short_title), target: '_blank'
  -if !@conference.tracks.blank?
    = render 'tracks'

Change wording and use unless instead of if

= content_for :splash_nav do
  %li
    %a{ href: '#program' } Program

%div.container.text-center
  %div.row
    %div.col-md-12
      %h1 Program
      - unless @conference.description.blank?
        %p
          = @conference.description
      - if @conference.call_for_papers and @conference.call_for_papers.schedule_public
        %span You can check out our
        %span
          = link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank'
  -unless @conference.tracks.blank?
    = render 'tracks'


= render "projects/blob/breadcrumb", blob: blob

.info-well.hidden-xs
  .well-segment
    %ul.blob-commit-info
      = render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref

  = render "projects/blob/auxiliary_viewer", blob: blob

#blob-content-holder.blob-content-holder

Add old _blob code for old_repo

= render "projects/blob/breadcrumb", blob: blob

.info-well.hidden-xs
  .well-segment
    %ul.blob-commit-info
      = render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref

  = render "projects/blob/auxiliary_viewer", blob: blob

#blob-content-holder.blob-content-holder
  - if !show_new_repo?
    = render 'projects/blob/header', blob: blob
    = render 'projects/blob/content', blob: blob


.row
  %h5 Clinics (Patient: #{@patient.full_name})

.row
  %table.clinics.responsive
    %thead
      %tr
        %th
          Date
        %th
          BMI
        %th
          BP
        %th.g-center
          Actions

    %tbody
      = render @clinic_visits

.row
  = link_to 'New clinic', new_patient_clinic_visit_path(@patient), class: 'button tiny save'

Add Patient navbars to Clinic Visits index

.wide-screen
  .columns.large-12
    = render partial: "patients/patient_info_header", locals: { model: @patient }
    = render partial: "patients/mini_renal_profile", locals: { model: @patient }

    %h5 Clinic Visits

    %table.clinics.responsive
      %thead
        %tr
          %th
            Date
          %th
            BMI
          %th
            BP
          %th.g-center
            Actions

      %tbody
        = render @clinic_visits

.row
  = link_to 'Add Clinic Visit', new_patient_clinic_visit_path(@patient), class: 'button tiny save'


.row
  .col-md-4
  .col-md-4
    .panel.panel-primary
      .panel-heading.text-center
        %h2.panel-title Sign in
      .panel-body
        = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f|
          = f.text_field :login, placeholder: 'Login', autofocus: true, class: 'form-control'
          %br
          = f.password_field :password, placeholder: 'Password', class: 'form-control'
          %br
          = f.submit 'Sign in', class: 'btn btn-primary btn-block'
      .panel-footer
        = render 'devise/shared/links'
  .col-md-4

Add required field setting to sign in view form

.row
  .col-md-4
  .col-md-4
    .panel.panel-primary
      .panel-heading.text-center
        %h2.panel-title Sign in
      .panel-body
        = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f|
          = f.text_field :login, placeholder: 'Login', required: 'true', autofocus: true, class: 'form-control'
          %br
          = f.password_field :password, placeholder: 'Password', required: 'true', class: 'form-control'
          %br
          = f.submit 'Sign in', class: 'btn btn-primary btn-block'
      .panel-footer
        = render 'devise/shared/links'
  .col-md-4


.container.large-6
  .center
    .row.large-8
      %h2 Please login to Facebook to start searching...
    #status
    %br
    %fb:login-button{ onlogin: 'FacebookLogin.checkLoginState();',
                      data: { 'max-rows' => '1', size: 'medium', 'show-faces' => 'true' } }

- content_for :javascript do
  = javascript_include_tag 'facebook_login'

Update text in facebook login layout

.container.large-6
  .center
    .row.large-8
      %h2 Please login to Facebook to start searching for new events...
    .row.large-4
      %fb:login-button{ onlogin: 'FacebookLogin.checkLoginState();',
                        data: { 'max-rows' => '1', size: 'medium', 'show-faces' => 'true' } }
    %br
    .row.large-8
      %h4.subheader *No information from your profile is saved in our servers.

- content_for :javascript do
  = javascript_include_tag 'facebook_login'


%h2.slidetitle New Slide
=form_for [presentation, Slide.new], :html => {:class => "collapsable_slide"} do |f|
  =render :partial => "/slides/form", :object => f, :locals => {:presentation => presentation}
  =submit_tag "Create"
%h2.topictitle New Topic
=form_for [presentation, Topic.new], :html => {:class => "collapsable_topic"} do |f|
  =render :partial => "/topics/form", :object => f, :locals => {:presentation => presentation}
  =submit_tag "Create"

%ol.collection{:id => "presentations.#{presentation.id}.topics.sort",:class => 'sortable_topics'}
  -presentation.topics.each do |topic|
    %li[topic]{:style => "padding-left:#{(1*topic.level)}em"}
      ="-" * topic.level + " " +topic.title
      -unless topic.slides.empty?
        %ol.collection{:id => "presentations.#{presentation.id}.slides.sort", :class => 'sortable_slides', :topic_id => topic.id}
          -topic.slides.each do |slide|
            %li[slide]{:style => "padding-left:#{(1*topic.level)+1}em"}
              -if @slide && @slide.id == slide.id
                =slide.title
              -else
                =link_to slide.title, edit_presentation_slide_path(presentation, slide)

Remove indicaton of the topic level through a string. We show the level through indentation.

%h2.slidetitle New Slide
=form_for [presentation, Slide.new], :html => {:class => "collapsable_slide"} do |f|
  =render :partial => "/slides/form", :object => f, :locals => {:presentation => presentation}
  =submit_tag "Create"
%h2.topictitle New Topic
=form_for [presentation, Topic.new], :html => {:class => "collapsable_topic"} do |f|
  =render :partial => "/topics/form", :object => f, :locals => {:presentation => presentation}
  =submit_tag "Create"

%ol.collection{:id => "presentations.#{presentation.id}.topics.sort",:class => 'sortable_topics'}
  -presentation.topics.each do |topic|
    %li[topic]{:style => "padding-left:#{(1*topic.level)}em"}
      =topic.title
      -unless topic.slides.empty?
        %ol.collection{:id => "presentations.#{presentation.id}.slides.sort", :class => 'sortable_slides', :topic_id => topic.id}
          -topic.slides.each do |slide|
            %li[slide]{:style => "padding-left:#{(1*topic.level)+1}em"}
              -if @slide && @slide.id == slide.id
                =slide.title
              -else
                =link_to slide.title, edit_presentation_slide_path(presentation, slide)


.row
  .col-md-8
    = render 'projects/diffs/stats', diffs: diffs
  .col-md-4
    .btn-group.pull-right
      = inline_diff_btn
      = parallel_diff_btn

- if show_diff_size_warning?(diffs)
  = render 'projects/diffs/warning', diffs: diffs

.files
  - safe_diff_files(diffs).each_with_index do |diff_file, index|
    = render 'projects/diffs/file', diff_file: diff_file, i: index, project: project

- if @diff_timeout
  .alert.alert-danger
    %h4
      Failed to collect changes
    %p
      Maybe diff is really big and operation failed with timeout. Try to get diff locally

Add some space aroung diff stats block

.row.prepend-top-20.append-bottom-10
  .col-md-8
    = render 'projects/diffs/stats', diffs: diffs
  .col-md-4
    .btn-group.pull-right
      = inline_diff_btn
      = parallel_diff_btn

- if show_diff_size_warning?(diffs)
  = render 'projects/diffs/warning', diffs: diffs

.files
  - safe_diff_files(diffs).each_with_index do |diff_file, index|
    = render 'projects/diffs/file', diff_file: diff_file, i: index, project: project

- if @diff_timeout
  .alert.alert-danger
    %h4
      Failed to collect changes
    %p
      Maybe diff is really big and operation failed with timeout. Try to get diff locally


.page-header
  %h1 Addresses
= paginated_section @addresses do
  %table.table.table-striped
    %thead
      %tr
        %th Email
        %th Last received
        %th Last sent
    %tbody
      - @addresses.each do |address|
        %tr
          %td= link_to address.text, address
          %td
            - if address.time_last_received
              = time_ago_in_words(address.time_last_received)
              ago
          %td
            - if address.time_last_sent
              = time_ago_in_words(address.time_last_sent)
              ago

Make rows in table clickable

.page-header
  %h1 Addresses
= paginated_section @addresses do
  %table.table.table-striped
    %thead
      %tr
        %th Email
        %th Last received
        %th Last sent
    %tbody(data-provides="rowlink")
      - @addresses.each do |address|
        %tr
          %td= link_to address.text, address
          %td
            - if address.time_last_received
              = time_ago_in_words(address.time_last_received)
              ago
          %td
            - if address.time_last_sent
              = time_ago_in_words(address.time_last_sent)
              ago


.md-area
  .md-header
    %ul.nav-links
      %li.active
        %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
          Write
      %li
        %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
          Preview
      %li.pull-right
        %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 }
          Go full screen

  .md-write-holder
    = yield
  .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))}

  - if defined?(referenced_users) && referenced_users
    %div.referenced-users.hide
      %span
        = icon('exclamation-triangle')
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.

Fix issue with go full screen triggering attach file

.md-area
  .md-header
    %ul.nav-links.clearfix
      %li.active
        %a.js-md-write-button{ href: "#md-write-holder", tabindex: -1 }
          Write
      %li
        %a.js-md-preview-button{ href: "#md-preview-holder", tabindex: -1 }
          Preview
      %li.pull-right
        %button.zen-cotrol.zen-control-full.js-zen-enter{ type: 'button', tabindex: -1 }
          Go full screen

  .md-write-holder
    = yield
  .md.md-preview-holder.js-md-preview.hide{class: (preview_class if defined?(preview_class))}

  - if defined?(referenced_users) && referenced_users
    %div.referenced-users.hide
      %span
        = icon('exclamation-triangle')
        You are about to add
        %strong
          %span.js-referenced-users-count 0
          people
        to the discussion. Proceed with caution.


%nav.navbar.navbar-default.navbar-fixed-top{role: 'navigation'}
  .navbar-header
    %button.navbar-toggle{type: 'button', data: {toggle: 'collapse', target: '.navbar-collapse'}}
      %span.sr-only
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
    = link_to I18n.t('brand.name'), root_path, class: 'navbar-brand'

  .collapse.navbar-collapse
    %ul.nav.navbar-nav.navbar-right
      - if user_signed_in?
        %li.dropdown
          %a.dropdown-toggle{href: '#', data: {toggle: 'dropdown'}}
            = render 'users/avatar', size: :tiny
            %b.caret
          %ul.dropdown-menu
            - if current_user.is_admin?
              %li= link_to I18n.t('admin.link'), rails_admin_path
            %li= link_to I18n.t('account.edit.link'), edit_user_registration_path
            %li= link_to I18n.t('auth.logout.link'), destroy_user_session_path, rel: :nofollow
      - unless user_signed_in?
        %li= link_to I18n.t('auth.signup.link'), new_user_registration_path
        %li= link_to I18n.t('auth.login.link'), new_user_session_path

Disable turbolinks on admin link

%nav.navbar.navbar-default.navbar-fixed-top{role: 'navigation'}
  .navbar-header
    %button.navbar-toggle{type: 'button', data: {toggle: 'collapse', target: '.navbar-collapse'}}
      %span.sr-only
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
    = link_to I18n.t('brand.name'), root_path, class: 'navbar-brand'

  .collapse.navbar-collapse
    %ul.nav.navbar-nav.navbar-right
      - if user_signed_in?
        %li.dropdown
          %a.dropdown-toggle{href: '#', data: {toggle: 'dropdown'}}
            = render 'users/avatar', size: :tiny
            %b.caret
          %ul.dropdown-menu
            - if current_user.is_admin?
              %li= link_to I18n.t('admin.link'), rails_admin_path, data: {"no-turbolink" => true}
            %li= link_to I18n.t('account.edit.link'), edit_user_registration_path
            %li= link_to I18n.t('auth.logout.link'), destroy_user_session_path, rel: :nofollow
      - unless user_signed_in?
        %li= link_to I18n.t('auth.signup.link'), new_user_registration_path
        %li= link_to I18n.t('auth.login.link'), new_user_session_path