- content_for(:title) do
  = t :checkout_title

- content_for :injection_data do
  = inject_enterprise_and_relatives
  = inject_available_countries

.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"

  %accordion{"close-others" => "false"}
    %checkout.row{"ng-controller" => "CheckoutCtrl"}
      .small-12.medium-8.large-9.columns
        - unless spree_current_user
          = render partial: "checkout/authentication"
        %div{"ng-show" => "enabled", "ng-controller" => "AccordionCtrl"}
          = render partial: "checkout/form"
      .small-12.medium-4.large-3.columns
        = render partial: "checkout/summary"

= render partial: "shared/footer"

Use 4 columns on checkout sidebar

- content_for(:title) do
  = t :checkout_title

- content_for :injection_data do
  = inject_enterprise_and_relatives
  = inject_available_countries

.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"

  %accordion{"close-others" => "false"}
    %checkout.row{"ng-controller" => "CheckoutCtrl"}
      .small-12.medium-8.columns
        - unless spree_current_user
          = render partial: "checkout/authentication"
        %div{"ng-show" => "enabled", "ng-controller" => "AccordionCtrl"}
          = render partial: "checkout/form"
      .small-12.medium-4.columns
        = render partial: "checkout/summary"

= render partial: "shared/footer"


.card
  .card-body
    = t(".services", count: services.count)

    - APP_CONFIG["sharing"].each do |service, service_options|
      - if service_options["enabled"] && services.none? { |x| x.provider == service.to_s }
        %p= button_to t(".connect", service: service.capitalize), "/auth/#{service}", method: :post, class: "btn btn-info"

  - if services.count.positive?
    %ul.list-group
      - services.each do |service|
        %li.list-group-item
          %i{ class: "fa fa-#{service.provider}" }
          %strong= service.provider.capitalize
          (#{service.nickname})
          = button_to t(".disconnect"),
            service_path(service),
            data: { confirm: t(".confirm", service: service.provider.capitalize) },
            method: :delete,
            class: "btn btn-link text-danger",
            form: { class: "d-inline" }

          .col-md-6.mt-2
            = bootstrap_form_for(service, as: "service", url: update_service_path(service)) do |f|
              = f.text_field :post_tag, label_as_placeholder: true,
                append: f.submit(t("voc.update"), class: "btn btn-primary"), maxlength: 20, pattern: "^[^@]*$"

Disable Turbo on Service Settings

.card
  .card-body
    = t(".services", count: services.count)

    - APP_CONFIG["sharing"].each do |service, service_options|
      - if service_options["enabled"] && services.none? { |x| x.provider == service.to_s }
        %p= button_to t(".connect", service: service.capitalize), "/auth/#{service}", method: :post, class: "btn btn-info",
          form: { data: { turbo: false } }

  - if services.count.positive?
    %ul.list-group
      - services.each do |service|
        %li.list-group-item
          %i{ class: "fa fa-#{service.provider}" }
          %strong= service.provider.capitalize
          (#{service.nickname})
          = button_to t(".disconnect"),
            service_path(service),
            data: { confirm: t(".confirm", service: service.provider.capitalize) },
            method: :delete,
            class: "btn btn-link text-danger",
            form: { class: "d-inline", data: { turbo: false } }

          .col-md-6.mt-2
            = bootstrap_form_for(service, as: "service", url: update_service_path(service), data: { turbo: false }) do |f|
              = f.text_field :post_tag, label_as_placeholder: true,
                append: f.submit(t("voc.update"), class: "btn btn-primary"), maxlength: 20, pattern: "^[^@]*$"


#users
  %ul.user-list{:class => list_class}
    - authors.each_with_index do |author, i|
      - next if author.nil?
      %li.user{:class => i%2 == 0 ? "even" : "odd"}
        = AuthorDecorator.decorate(author).avatar

        .info
          %a{:href => author.url, :rel => 'user messages'}
            %b
              = author.display_name

            (#{author.username})
          .bio
            %span.description
              = author.bio

        - if current_user && current_user.feed != author.feed && author.feed
          - following = current_user.following_author?(author)
          .follow{:class => (following ? "negative" : "positive")}
            - if following
              = form_tag "/subscriptions/#{author.feed.id}" do
                %input{:type => "hidden", :name => "_method", :value => "delete"}
                = submit_tag "Unfollow", :class => "button unfollow", :id => "unfollow-#{author.feed.id}", :confirm => t(:unfollow, :scope => :confirms)
            - else
              = form_tag "/subscriptions" do
                %input{:type => "hidden", :name => "subscribe_to", :value => author.feed.id}
                %input.button.follow{:type => "submit", :value => "Follow", :id => "follow-#{author.feed.id}"}

Add the user-name alps attribute to user search results

#users
  %ul.user-list{:class => list_class}
    - authors.each_with_index do |author, i|
      - next if author.nil?
      %li.user{:class => i%2 == 0 ? "even" : "odd"}
        = AuthorDecorator.decorate(author).avatar

        .info
          %a{:href => author.url, :rel => 'user messages'}
            %b
              %span.user-name
                = author.display_name

            (#{author.username})
          .bio
            %span.description
              = author.bio

        - if current_user && current_user.feed != author.feed && author.feed
          - following = current_user.following_author?(author)
          .follow{:class => (following ? "negative" : "positive")}
            - if following
              = form_tag "/subscriptions/#{author.feed.id}" do
                %input{:type => "hidden", :name => "_method", :value => "delete"}
                = submit_tag "Unfollow", :class => "button unfollow", :id => "unfollow-#{author.feed.id}", :confirm => t(:unfollow, :scope => :confirms)
            - else
              = form_tag "/subscriptions" do
                %input{:type => "hidden", :name => "subscribe_to", :value => author.feed.id}
                %input.button.follow{:type => "submit", :value => "Follow", :id => "follow-#{author.feed.id}"}


%h1
  %a{href: '', title: 'Ruby <> CoffeeScript'}
    Ruby <> CoffeeScript

.container-fluid
  .row
    .col-md-6
      = partial(:content, locals: {filter: -> (hash_index, hash_size) { hash_index < hash_size } })
    .col-md-6
      = partial(:content, locals: {filter: -> (hash_index, hash_size) { hash_index >= hash_size } })

  .row
    .col-md-6
      %h2 Ruby
    .col-md-6
      %h2 CoffeeScript

  - data.code.each do |section|
    %h3{id: header_to_id(section.first)}= section.first
    - section.last.each do |header, code|
      %h4{id: header_to_id("#{section.first}_#{header}")}= header
      .row
        .col-md-6
          = code_file(code.ruby)
        .col-md-6
          = code_file(code.coffeescript)

  %br
  %br

%span#top-link-block
  %a.scrollTop.well.well-sm{href: '#top'}
    Top

Add language versions an the bottom

%h1
  %a{href: '', title: 'Ruby <> CoffeeScript'}
    Ruby <> CoffeeScript

.container-fluid
  .row
    .col-md-6
      = partial(:content, locals: {filter: -> (hash_index, hash_size) { hash_index < hash_size } })
    .col-md-6
      = partial(:content, locals: {filter: -> (hash_index, hash_size) { hash_index >= hash_size } })

  .row
    .col-md-6
      %h2 Ruby
    .col-md-6
      %h2 CoffeeScript

  - data.code.each do |section|
    %h3{id: header_to_id(section.first)}= section.first
    - section.last.each do |header, code|
      %h4{id: header_to_id("#{section.first}_#{header}")}= header
      .row
        .col-md-6
          = code_file(code.ruby)
        .col-md-6
          = code_file(code.coffeescript)

  %br
  .row
    .col-md-6
      %p ruby 2.2.2
    .col-md-6
      %p coffee 1.10.0
  %br

%span#top-link-block
  %a.scrollTop.well.well-sm{href: '#top'}
    Top


- if current_user
  .dropdown
    %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
      %i.fa.fa-globe
      %span.light Visibility:
      - if params[:visibility_level].present?
        = visibility_level_label(params[:visibility_level].to_i)
      - else
        Any
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to explore_projects_filter_path(visibility_level: nil) do
          Any
      - Gitlab::VisibilityLevel.values.each do |level|
        %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
          = link_to explore_projects_filter_path(visibility_level: level) do
            = visibility_level_icon(level)
            = visibility_level_label(level)

- if @tags.present?
  .dropdown
    %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
      %i.fa.fa-tags
      %span.light Tags:
      - if params[:tag].present?
        = params[:tag]
      - else
        Any
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to explore_projects_filter_path(tag: nil) do
          Any

      - @tags.each do |tag|
        %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
          = link_to explore_projects_filter_path(tag: tag.name) do
            %i.fa.fa-tag
            = tag.name

Use helper for font-awesome icons

- if current_user
  .dropdown
    %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
      = icon('globe')
      %span.light Visibility:
      - if params[:visibility_level].present?
        = visibility_level_label(params[:visibility_level].to_i)
      - else
        Any
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to explore_projects_filter_path(visibility_level: nil) do
          Any
      - Gitlab::VisibilityLevel.values.each do |level|
        %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
          = link_to explore_projects_filter_path(visibility_level: level) do
            = visibility_level_icon(level)
            = visibility_level_label(level)

- if @tags.present?
  .dropdown
    %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
      = icon('tags')
      %span.light Tags:
      - if params[:tag].present?
        = params[:tag]
      - else
        Any
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to explore_projects_filter_path(tag: nil) do
          Any

      - @tags.each do |tag|
        %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
          = link_to explore_projects_filter_path(tag: tag.name) do
            %i.fa.fa-tag
            = tag.name


.popover-title
  %h5.oneline=@control.title

.popover-content
  .cleanlabels
    .row-fluid
      .span4
        %label Short Code
        %p=@control.slug
      .span8
        %label Title
        %p=@control.title

    %br/
    .row-fluid
      .span12
        %label Description
        %p=@control.description

    %br/
    .row-fluid
      .span6
        %label Version
        %p ---
      .span6
        %label Deprecated
        %p ---

Use h3 in popover titles

.popover-title
  %h3.oneline=@control.title

.popover-content
  .cleanlabels
    .row-fluid
      .span4
        %label Short Code
        %p=@control.slug
      .span8
        %label Title
        %p=@control.title

    %br/
    .row-fluid
      .span12
        %label Description
        %p=@control.description

    %br/
    .row-fluid
      .span6
        %label Version
        %p ---
      .span6
        %label Deprecated
        %p ---


#scaled_scenario_setup
  = form_tag load_scenarios_path, id: 'new_scaled_scenario' do
    = hidden_field_tag 'id', Current.setting.api_session_id

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"

  = form_tag load_scenarios_path, id: 'preset_scaled_scenario', method: :post do
    .row
      .field
        %p Select a saved scenario
        = presets_select

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"

Remove unused "scale preset" form


#main-box
  #quote= "Player Info: #{@player}"

#content
  %p
    - unless @player.active?
      %strong= "#{@player} is no an active foosball player."

  %p
    %strong Plus-Minus:
    = PlayersHelper.colored_plus_minus @player.plus_minus

  %h3 Bagel Participation
  = render :partial => 'shared/bagel_table'

Fix typo, 'not' instead of 'no'

#main-box
  #quote= "Player Info: #{@player}"

#content
  %p
    - unless @player.active?
      %strong= "#{@player} is not an active foosball player."

  %p
    %strong Plus-Minus:
    = PlayersHelper.colored_plus_minus @player.plus_minus

  %h3 Bagel Participation
  = render :partial => 'shared/bagel_table'


#disqus_thread
- if current_page.data.comments
  - if current_page.data.community
    :javascript
      var disqus_shortname = 'bloggitlabhqcom';
      //var disqus_developer = 1;
      var disqus_identifier = 'http://blog.gitlabhq.com/{{ page.url | remove_date_from_path }}/';
      var disqus_url = 'http://blog.gitlabhq.com/{{ page.url | remove_date_from_path }}/';
  - else
    :javascript
      var disqus_shortname = 'gitlab'; // required: replace example with your forum shortname
      //var disqus_developer = 1;
      var disqus_identifier = '#{data.site.url}#{current_page.url}';
      var disqus_url = '#{data.site.url}#{current_page.url}';
- else
  :javascript
    var disqus_script = 'count.js';
:javascript
  /* * * DON'T EDIT BELOW THIS LINE * * */
  (function() {
   var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
   dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
   (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
   })();

Fix Disqus for posts that didn't include `comments: true`

#disqus_thread
  :javascript
    var disqus_shortname = 'gitlab'; // required: replace example with your forum shortname
    //var disqus_developer = 1;
    var disqus_identifier = '#{data.site.url}#{current_page.url}';
    var disqus_url = '#{data.site.url}#{current_page.url}';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();


%h3.pb-2#triggered-email-overview Automated Messages

%table.table.table-striped
  %caption
    %ul
      %li.mb-1
        Recipient updates that match a given event will be sent the corresponding email(s) automatically.
        %br
        For example, when a user moves from the "Accepted" to "RSVP Confirmed" state, the user will be sent an email for the "RSVP Confirmed" event.
      %li Hard-coded emails are those managed in the source code repository, and cannot be disabled.
  %thead
    %tr
      %th Automation Event
      %th Hard-coded Email
      %th Automated Emails
  %tbody
    - Message::POSSIBLE_TRIGGERS.keys.each do |trigger|
      %tr
        %td= Message::POSSIBLE_TRIGGERS[trigger]
        - messages = Message.automated.where(trigger: trigger).all
        %td
          = ['questionnaire.pending'].include?(trigger) ? 'Hard-coded'.html_safe : 'No'
        %td
          - if messages.present?
            %ul.list-unstyled.mb-0
              - messages.each do |message|
                %li= link_to(message.name, manage_message_path(message))
          - else
            None
    %tr
      %td Disabled
      %td N/A
      %td
        - messages = Message.automated.where(trigger: nil).all
        - if messages.present?
          %ul.list-unstyled.mb-0
            - messages.each do |message|
              %li= link_to(message.name, manage_message_path(message))
        - else
          None

Remove hard-coded column from triggered email summary

%h3.pb-2#triggered-email-overview Automated Messages

%table.table.table-striped
  %caption
    %ul
      %li.mb-1
        Recipient updates that match a given event will be sent the corresponding email(s) automatically.
        %br
        For example, when a user moves from the "Accepted" to "RSVP Confirmed" state, the user will be sent an email for the "RSVP Confirmed" event.
      %li Hard-coded emails are those managed in the source code repository, and cannot be disabled.
  %thead
    %tr
      %th Automation Event
      %th Message(s)
  %tbody
    - Message::POSSIBLE_TRIGGERS.keys.each do |trigger|
      %tr
        %td= Message::POSSIBLE_TRIGGERS[trigger]
        - messages = Message.automated.where(trigger: trigger).all
        %td
          - if messages.present?
            %ul.list-unstyled.mb-0
              - messages.each do |message|
                %li= link_to(message.name, manage_message_path(message))
          - else
            None
    %tr
      %td Disabled
      %td
        - messages = Message.automated.where(trigger: nil).all
        - if messages.present?
          %ul.list-unstyled.mb-0
            - messages.each do |message|
              %li= link_to(message.name, manage_message_path(message))
        - else
          None


- if logged_in?
  %nav
    %ul.nav.nav-pills
      %li.logout
        = link_to logout_path, :title => t("navigation.logout") do
          %span.octicon.octicon-sign-out

      %li
        = link_to dashboard_path do
          %span.octicon.octicon-dashboard
          = t("navigation.dashboard")
      %li
        = link_to user_path(current_user) do
          %span.octicon.octicon-person
          = t("navigation.profile")
      %li
        = link_to t("navigation.gifted_code"), gifts_path
      %li
        = link_to t("navigation.my_suggestions"), my_suggestions_path
      %li
        = link_to t("navigation.events"), events_path
      - if admin?
        %li
          = link_to t("navigation.manage_projects"), admin_projects_path

Remove events link from user nav

- if logged_in?
  %nav
    %ul.nav.nav-pills
      %li.logout
        = link_to logout_path, :title => t("navigation.logout") do
          %span.octicon.octicon-sign-out

      %li
        = link_to dashboard_path do
          %span.octicon.octicon-dashboard
          = t("navigation.dashboard")
      %li
        = link_to user_path(current_user) do
          %span.octicon.octicon-person
          = t("navigation.profile")
      %li
        = link_to t("navigation.gifted_code"), gifts_path
      %li
        = link_to t("navigation.my_suggestions"), my_suggestions_path
      - if admin?
        %li
          = link_to t("navigation.manage_projects"), admin_projects_path


.table-holder
  = render partial: "gas_asset_lists/table", locals: { testing_ground: testing_ground, gas_asset_list: gas_asset_list }

- if gas_asset_list
  .graph.npv-chart{ data: { url: calculate_net_present_value_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), title: "Net present value (€)" } }

  .graph.cummulative-costs-chart{ data: { url: calculate_cumulative_investment_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), interpolate: 'step-after', title: "Cummalative costs (€)" } }

  = form_for [testing_ground, gas_asset_list], html: { remote: true } do |f|
    .hidden
      = f.text_area :asset_list, value: JSON.dump(gas_asset_list.asset_list)

    .btn-group
      = f.submit "Update gas asset list", class: "btn btn-primary"
      %button.btn.btn-success.reload-gas-asset-list{ data: { url: reload_gas_asset_list_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), confirmation: "Are you sure?" } }
        Reload gas asset list
      %span.wait.hidden= image_tag "wait.gif"

Update gas form page layout

.table-holder
  = render partial: "gas_asset_lists/table", locals: { testing_ground: testing_ground, gas_asset_list: gas_asset_list }

= form_for [testing_ground, gas_asset_list], html: { remote: true } do |f|
  .hidden
    = f.text_area :asset_list, value: JSON.dump(gas_asset_list.asset_list)

  .btn-group
    = f.submit "Apply", class: "btn btn-primary"
    = save_all_button(testing_ground, "Save all and view gas-load")

  .btn-group.pull-right
    %button.btn.btn-danger.reload-gas-asset-list{ data: { url: reload_gas_asset_list_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), confirmation: "Are you sure?" } }
      Rescale assets to gas connections
    -# tooltip
    %span.wait.hidden= image_tag "wait.gif"

- if gas_asset_list
  .graph.npv-chart{ data: { url: calculate_net_present_value_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), title: "Equity value (€)" } }

  .graph.cummulative-costs-chart{ data: { url: calculate_cumulative_investment_testing_ground_gas_asset_list_path(testing_ground, gas_asset_list), interpolate: 'step-after', title: "Cummalative investment (€)" } }


%div{:class => 'btn-group pull-right'}
  %a{:class => 'username btn btn-info btn-xs dropdown-toggle', "data-toggle" => 'dropdown', :href => '#' }
    = current_user.public_name
    %span.caret
  %ul{:class => 'dropdown-menu'}
    %li= link_to "My Account", edit_profile_users_path
    %li= link_to "Logout", :logout
- if current_user.is_admin?
  %div{:class => 'btn-group pull-right course-list'}
    = form_tag change_current_course_path, :class => 'btn btn-info btn-xs dropdown-toggle' do
      = select_tag 'course_id', options_from_collection_for_select(current_user.courses, 'id', 'name'), prompt: "My Courses"
      %span.caret

Allow students to have multiple courses

%div{:class => 'btn-group pull-right'}
  %a{:class => 'username btn btn-info btn-xs dropdown-toggle', "data-toggle" => 'dropdown', :href => '#' }
    = current_user.public_name
    %span.caret
  %ul{:class => 'dropdown-menu'}
    %li= link_to "My Account", edit_profile_users_path
    %li= link_to "Logout", :logout
%div{:class => 'btn-group pull-right course-list'}
  = form_tag change_current_course_path, :class => 'btn btn-info btn-xs dropdown-toggle' do
    = select_tag 'course_id', options_from_collection_for_select(current_user.courses, 'id', 'name'), prompt: "My Courses"
    %span.caret


!!! 5
%html
  %head
    %title= App::NAME
    %meta(charset='utf-8')
  %body
    #header
      %h1= App::NAME

    #content
      %h2 Examples
      %ul
        %li
          %a(href='/github/kana/vim-arpeggio/master/doc/arpeggio.txt.html')
            kana/vim-arpeggio/master/doc/arpeggio.txt
        %li
          %a(href='/github/kana/vim-textobj-user/master/doc/textobj-user.txt.html')
            kana/vim-textobj-user/master/doc/textobj-user.txt
        %li
          \...

    #footer
      %address
        = App::NAME
        @@VERSION@@
        —
        Copyright © 2011
        %a(href='http://whileimautomaton.net/') Kana Natsuno
        (
        %a(href='http://twitter.com/kana1')> @kana1
        )
        —
        %a(href='#{App::GITHUB_REPOS_URI}')
        Watch changes
        —
        %a(href='#{App::GITHUB_REPOS_URI}/issues')
        Report issues

-# __END__

Add a short description to the home page

!!! 5
%html
  %head
    %title= App::NAME
    %meta(charset='utf-8')
  %body
    #header
      %h1= App::NAME

    #content
      %h2 What's this?
      %p A HTML'ized viewer for Vim :help documents of arbitrary plugins.

      %h2 Examples
      %ul
        %li
          %a(href='/github/kana/vim-arpeggio/master/doc/arpeggio.txt.html')
            kana/vim-arpeggio/master/doc/arpeggio.txt
        %li
          %a(href='/github/kana/vim-textobj-user/master/doc/textobj-user.txt.html')
            kana/vim-textobj-user/master/doc/textobj-user.txt
        %li
          \...

    #footer
      %address
        = App::NAME
        @@VERSION@@
        —
        Copyright © 2011
        %a(href='http://whileimautomaton.net/') Kana Natsuno
        (
        %a(href='http://twitter.com/kana1')> @kana1
        )
        —
        %a(href='#{App::GITHUB_REPOS_URI}')
        Watch changes
        —
        %a(href='#{App::GITHUB_REPOS_URI}/issues')
        Report issues

-# __END__


#preview.grid_6.push_2
  %form{:method => "POST", :action => "/streams"}
    = csrf_tag
    %p
      %label{:for => "stream_title"} Title
      %input{:id => "stream_title", :name => "title"}
    %p
      %label{:for => "stream_description"} Description
      %input{:id => "stream_description", :name => "description"}
    %p
      %input{:type => "submit"}

Remove unused csrf tag in form.

#preview.grid_6.push_2
  %form{:method => "POST", :action => "/streams"}
    %p
      %label{:for => "stream_title"} Title
      %input{:id => "stream_title", :name => "title"}
    %p
      %label{:for => "stream_description"} Description
      %input{:id => "stream_description", :name => "description"}
    %p
      %input{:type => "submit"}


%html
  %head
    %title
      = page_title
    %link{:rel => 'stylesheet', :type => 'text/css', :href => '/styles/main.css'}
    %script{:type => 'text/javascript', :src => '/javascripts/mootools.js'}
    %script{:type => 'text/javascript', :src => '/javascripts/application.js'}
  %body
    .title
      = page_title
    .subtitle Tracking Open Source Contributions
    #calendar
      = seinfeld
    #main
      #stats
        .current_streak
          %span.type
            current streak
          %span.num
            = @user.current_streak
            %span.desc days
        .longest_streak
          %span.type
            longest streak
          %span.num
            = @user.longest_streak
            %span.desc days
      #content.footnote
        %a{:href => "http://calendaraboutnothing.com"} Calendar About Nothing
        by rick and kyle
        %br
        %a{:href => "http://github.com/entp/seinfeld/tree/master"} accepting patches

Add icon, every web page needs an icon!

%html
  %head
    %title
      = page_title
    %link{:rel => 'icon', :type => 'image/png', :href => '/images/x_1.png', :sizes => '48x48'}
    %link{:rel => 'stylesheet', :type => 'text/css', :href => '/styles/main.css'}
    %script{:type => 'text/javascript', :src => '/javascripts/mootools.js'}
    %script{:type => 'text/javascript', :src => '/javascripts/application.js'}
  %body
    .title
      = page_title
    .subtitle Tracking Open Source Contributions
    #calendar
      = seinfeld
    #main
      #stats
        .current_streak
          %span.type
            current streak
          %span.num
            = @user.current_streak
            %span.desc days
        .longest_streak
          %span.type
            longest streak
          %span.num
            = @user.longest_streak
            %span.desc days
      #content.footnote
        %a{:href => "http://calendaraboutnothing.com"} Calendar About Nothing
        by rick and kyle
        %br
        %a{:href => "http://github.com/entp/seinfeld/tree/master"} accepting patches


.headline-anchor{:id => "#{widget.anchor}"}
= scrivito_tag :h2, widget, :headline, class: "headline"

Use abbr of hashrocket in Widget

.headline-anchor{id: "#{widget.anchor}"}
= scrivito_tag :h2, widget, :headline, class: "headline"


- content_for :injection_data do
  = inject_saved_credit_cards

%div.checkout-step
  = form_with url: checkout_update_path(checkout_step), model: @order, method: :put do |f|
    = render "split_checkout/#{checkout_step}", f: f

Set data-remote on checkout form

- content_for :injection_data do
  = inject_saved_credit_cards

%div.checkout-step
  = form_with url: checkout_update_path(checkout_step), model: @order, method: :put,
    data: { remote: "true" } do |form|

    = render "split_checkout/#{checkout_step}", f: form


- url = content.url(@ref) rescue nil
- name = content.basename
- return unless url
%tr{ class: "tree-item", url: url }
  %td.tree-item-file-name
    = image_tag "submodule.png"
    %strong= truncate(name, length: 40)
  %td
    %code= content.id[0..10]
  %td
    = link_to truncate(url, length: 40), url

Remove locals from tree/submodule_item, use "object" instead

- url = submodule_item.url(@ref) rescue nil
- name = submodule_item.basename
- return unless url
%tr{ class: "tree-item", url: url }
  %td.tree-item-file-name
    = image_tag "submodule.png"
    %strong= truncate(name, length: 40)
  %td
    %code= submodule_item.id[0..10]
  %td
    = link_to truncate(url, length: 40), url


- col_count = 5
- col_count += 1 if !local_assigns[:hide_continuity] # Include continuity name
- col_count += 1 if local_assigns[:show_unread_count] # Include # Unread
- col_count += 1 if local_assigns.has_key? :check_box_name  # Include form check box tags
- post_args = local_assigns.except(:posts, :list)

%table
  %thead
    %tr
      %th{colspan: col_count}= content_for :posts_title
    %tr
      %th.sub.width-15
      %th.sub Thread
      - unless local_assigns[:hide_continuity]
        %th.sub Continuity
      %th.sub Authors
      %th.sub Replies
      - if local_assigns[:show_unread_count]
        %th.sub # Unread
      %th.sub Last Updated
      - if local_assigns[:check_box_name]
        %th.sub
  %tbody
    - posts.each do |post|
      - next unless post.visible_to?(current_user)
      = render partial: 'posts/list_item', locals: {post: post}.merge(post_args)
    - if posts.empty?
      %tr
        %td.centered.padding-10.no-posts{ class: cycle('even','odd'), colspan: col_count } — No posts yet —
- if posts.total_pages > 1
  = render partial: 'posts/paginator', locals: { paginated: @posts, path: (local_assigns[:path] || :posts_path) }

Fix presumably-a-typo (@posts when the variable is posts?)

- col_count = 5
- col_count += 1 if !local_assigns[:hide_continuity] # Include continuity name
- col_count += 1 if local_assigns[:show_unread_count] # Include # Unread
- col_count += 1 if local_assigns.has_key? :check_box_name  # Include form check box tags
- post_args = local_assigns.except(:posts, :list)

%table
  %thead
    %tr
      %th{colspan: col_count}= content_for :posts_title
    %tr
      %th.sub.width-15
      %th.sub Thread
      - unless local_assigns[:hide_continuity]
        %th.sub Continuity
      %th.sub Authors
      %th.sub Replies
      - if local_assigns[:show_unread_count]
        %th.sub # Unread
      %th.sub Last Updated
      - if local_assigns[:check_box_name]
        %th.sub
  %tbody
    - posts.each do |post|
      - next unless post.visible_to?(current_user)
      = render partial: 'posts/list_item', locals: {post: post}.merge(post_args)
    - if posts.empty?
      %tr
        %td.centered.padding-10.no-posts{ class: cycle('even','odd'), colspan: col_count } — No posts yet —
- if posts.total_pages > 1
  = render partial: 'posts/paginator', locals: { paginated: posts, path: (local_assigns[:path] || :posts_path) }


%h2
  ATP rankings chart for top 50 players
  %span.generated-note (generated at )

#rankings-chart

%script(src='javascripts/rankings-dep.js')
:javascript
  loadData('rankings', function(rankings) {
    updateGenerationTime(rankings.generated_at);

    window.d = $.map(rankings.data, function(v, i){return [[v.rank + ' ' + v.last, v.points]]});

    $.jqplot('rankings-chart', [d], {
      series: [{
        renderer:$.jqplot.BarRenderer,
        rendererOptions:{
          barWidth: 14,
          barMargin: 2,
          barPadding: 2
        },
      }],
      axesDefaults: {
        tickRenderer: $.jqplot.CanvasAxisTickRenderer,
        tickOptions: {
          showGridLine: false,
          angle: -35,
          fontSize: '10pt',
          fontFamily: 'Georgia'
        }
      },
      axes: {
        xaxis: {
          renderer: $.jqplot.CategoryAxisRenderer
        },
        yaxis: {
          min: 0,
          max: 15000,
          numberTicks: 7,
          autoscale:true
        }
      }
    });
    $('#rankings-chart').bind('jqplotDataClick',
      function (ev, seriesIndex, pointIndex, data) {
        if (window.console) console.log(seriesIndex, pointIndex, data);
      }
    );
  })

Change ranking bar direction to horizontal

%h2
  ATP rankings chart for top 50 players
  %span.generated-note (generated at )

#rankings-chart(style='height: 1000px')

%script(src='javascripts/rankings-dep.js')
:javascript
  loadData('rankings', function(rankings) {
    updateGenerationTime(rankings.generated_at);

    window.d = $.map(rankings.data, function(v, i){return [[v.points, v.rank + ' ' + v.last]]}).reverse();

    $.jqplot('rankings-chart', [d], {
      series: [{
        shadowAngle: 135,
        renderer:$.jqplot.BarRenderer,
        rendererOptions:{
          barDirection: 'horizontal',
          barWidth: 10,
          barMargin: 2,
          barPadding: 2
        },
      }],
      axesDefaults: {
        tickRenderer: $.jqplot.CanvasAxisTickRenderer,
        tickOptions: {
          showGridLine: false,
          fontSize: '10pt',
          fontFamily: 'Georgia'
        }
      },
      axes: {
        yaxis: {
          renderer: $.jqplot.CategoryAxisRenderer
        },
        xaxis: {
          min: 0,
          max: 15000,
          numberTicks: 7,
          autoscale:true
        }
      }
    });
    //$('#rankings-chart').bind('jqplotDataClick',
    //  function (ev, seriesIndex, pointIndex, data) {
    //    if (window.console) console.log(seriesIndex, pointIndex, data);
    //  }
    //);
  })


%h1 feedcellar
%p= "Powered by Groonga #{groonga_version} and Rroonga #{rroonga_version}."
%form{:action => url("/search", false, true), :method => :get}
  %input{:type => "textarea", :name => "word", :size => 20, :value => params[:word]}
  %input{:type => "submit", :value => "Search"}
- if @feeds
  %p
    - grouping(@feeds).each do |resource|
      = markup_drilled_item(resource)
  %ul
    - @feeds.each do |feed|
      %li
        %a{:href => feed.link}= "#{feed.title} - #{feed.resource.title}"

Add %p to the feed list

%h1 feedcellar
%p= "Powered by Groonga #{groonga_version} and Rroonga #{rroonga_version}."
%form{:action => url("/search", false, true), :method => :get}
  %input{:type => "textarea", :name => "word", :size => 20, :value => params[:word]}
  %input{:type => "submit", :value => "Search"}
- if @feeds
  %p
    - grouping(@feeds).each do |resource|
      = markup_drilled_item(resource)
  %ul
    - @feeds.each do |feed|
      %li
        %p
          %a{:href => feed.link}= "#{feed.title} - #{feed.resource.title}"


%h1 Editing category

= render 'form'

= link_to 'Show', @category
\|
= link_to 'Back', categories_path

Update edit form to use simple form

%h1 Editing category

= simple_form_for @category, :url => category_path(@category), :html => { :class => 'form' } do |form|
  = render 'form', :form => form, :cancel_url => @category


%section#about.grid_10
  %h2 About Astral
  %p This is a description of the project.
  %h2 Technology
  %p The technology used in Astral.
  %h2 References
  %p Some references to our inspiration and CMU.

%ul#team
  %h2 Team Members
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Darshana Advani
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Anusha Varshney
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Christopher Peplin
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Fabian Popa
      %p.grid_7
        This is short bio.

Fix alphabetical ordering of names.

%section#about.grid_10
  %h2 About Astral
  %p This is a description of the project.
  %h2 Technology
  %p The technology used in Astral.
  %h2 References
  %p Some references to our inspiration and CMU.

%ul#team
  %h2 Team Members
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Darshana Advani
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Christopher Peplin
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Fabian Popa
      %p.grid_7
        This is short bio.
  %li.grid_10
    %img.grid_2{:src => "images/screenshot.png"}
    .grid_7
      %h3 Anusha Varshney
      %p.grid_7
        This is short bio.


- content_for :title, "Survey"

.typeform-widget{"data-text" => "Entrepreneurs", "data-url" => "https://longbeachbusiness.typeform.com/to/mHoveY", :style => "width:100%;height:500px;"}
:javascript
  (function(){var qs,js,q,s,d=document,gi=d.getElementById,ce=d.createElement,gt=d.getElementsByTagName,id='typef_orm',b='https://s3-eu-west-1.amazonaws.com/share.typeform.com/';if(!gi.call(d,id)){js=ce.call(d,'script');js.id=id;js.src=b+'widget.js';q=gt.call(d,'script')[0];q.parentNode.insertBefore(js,q)}})()
%div{:style => "font-family: Sans-Serif;font-size: 12px;color: #999;opacity: 0.5; padding-top: 5px;"}
Powered by
%a{:href => "https://www.typeform.com/examples/forms/?utm_campaign=mHoveY&utm_source=typeform.com-1791110-Basic&utm_medium=typeform&utm_content=typeform-embedded-poweredbytypeform&utm_term=EN", :style => "color: #999", :target => "_blank"} Typeform

Fix for Typeform close button on mobile

- content_for :title, "Survey"

.typeform-widget{"data-text" => "Entrepreneurs and Current Business Owners", "data-url" => "https://longbeachbusiness.typeform.com/to/mHoveY", style: "width:100%;height:500px;"}
:javascript
  (function(){var qs,js,q,s,d=document,gi=d.getElementById,ce=d.createElement,gt=d.getElementsByTagName,id='typef_orm',b='https://s3-eu-west-1.amazonaws.com/share.typeform.com/';if(!gi.call(d,id)){js=ce.call(d,'script');js.id=id;js.src=b+'widget.js';q=gt.call(d,'script')[0];q.parentNode.insertBefore(js,q)}})()

-# When the form is opened on mobile (iOS and Android), the "typeform-close" X
-# button is partway off the canvas.
-# This is a terrible hack, and fixes it.
:css
  .typeform-modal .typeform-close {
    width: initial;
  }


:markdown
  # Webhooks

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

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

  ## Payloads

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

Use 'send' rather than 'pass', it's a bit of a clearer verb here

:markdown
  # Webhooks

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

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

  ## Payloads

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


.loading-wrapper.lmo-two-column-layout
  %loading{ng-if: "!groupPage.group"}
  %main.group-page.lmo-row{ng-if: "groupPage.group"}
    %outlet{name: "before-group-page", model: "groupPage.group"}
    %group_theme{group: "groupPage.group", home-page: "true"}
    .lmo-row
      .lmo-group-column-left
        %description_card{group: "groupPage.group"}
        %discussions_card{group: "groupPage.group", page_window: "groupPage.pageWindow"}
      .lmo-group-column-right
        %outlet{name: "before-group-page-column-right", model: "groupPage.group"}
        %current_polls_card{model: "groupPage.group"}
        %poll_common_index_card{model: "groupPage.group", limit: "5", view-more-link: "true"}
        %group_previous_proposals_card{group: "groupPage.group", ng-if: "!groupPage.usePolls"}
        %membership_requests_card{group: "groupPage.group"}
        %members_card{group: "groupPage.group", ng-if: "groupPage.canViewMemberships()"}
        %install_slack_card{group: "groupPage.group"}
        %subgroups_card{group: "groupPage.group"}
        %group_help_card{group: "groupPage.group"}

Add outlet for install slack card

.loading-wrapper.lmo-two-column-layout
  %loading{ng-if: "!groupPage.group"}
  %main.group-page.lmo-row{ng-if: "groupPage.group"}
    %outlet{name: "before-group-page", model: "groupPage.group"}
    %group_theme{group: "groupPage.group", home-page: "true"}
    .lmo-row
      .lmo-group-column-left
        %description_card{group: "groupPage.group"}
        %discussions_card{group: "groupPage.group", page_window: "groupPage.pageWindow"}
      .lmo-group-column-right
        %outlet{name: "before-group-page-column-right", model: "groupPage.group"}
        %current_polls_card{model: "groupPage.group"}
        %poll_common_index_card{model: "groupPage.group", limit: "5", view-more-link: "true"}
        %group_previous_proposals_card{group: "groupPage.group", ng-if: "!groupPage.usePolls"}
        %membership_requests_card{group: "groupPage.group"}
        %members_card{group: "groupPage.group", ng-if: "groupPage.canViewMemberships()"}
        %install_slack_card{group: "groupPage.group"}
        %outlet{name: "after-slack-card", group: "groupPage.group"}
        %subgroups_card{group: "groupPage.group"}
        %group_help_card{group: "groupPage.group"}


.loading-wrapper.lmo-two-column-layout
  %loading{ng-if: "!groupPage.group"}
  %main.group-page.lmo-row{ng-if: "groupPage.group"}
    %outlet{name: "before-group-page", model: "groupPage.group"}
    %group_theme{group: "groupPage.group", home-page: "true"}
    .lmo-row
      .lmo-group-column-left
        %description_card{group: "groupPage.group"}
        %discussions_card{group: "groupPage.group", page_window: "groupPage.pageWindow"}
      .lmo-group-column-right
        %outlet{name: "before-group-page-column-right", model: "groupPage.group"}
        %current_polls_card{model: "groupPage.group"}
        %poll_common_index_card{model: "groupPage.group", limit: "5", view-more-link: "true"}
        %group_previous_proposals_card{group: "groupPage.group", ng-if: "!groupPage.usePolls"}
        %membership_requests_card{group: "groupPage.group"}
        %members_card{group: "groupPage.group", ng-if: "groupPage.canViewMemberships()"}
        %install_slack_card{group: "groupPage.group"}
        %outlet{name: "after-slack-card", group: "groupPage.group"}
        %subgroups_card{group: "groupPage.group"}
        %group_help_card{group: "groupPage.group"}

Fix after slack card outlet

.loading-wrapper.lmo-two-column-layout
  %loading{ng-if: "!groupPage.group"}
  %main.group-page.lmo-row{ng-if: "groupPage.group"}
    %outlet{name: "before-group-page", model: "groupPage.group"}
    %group_theme{group: "groupPage.group", home-page: "true"}
    .lmo-row
      .lmo-group-column-left
        %description_card{group: "groupPage.group"}
        %discussions_card{group: "groupPage.group", page_window: "groupPage.pageWindow"}
      .lmo-group-column-right
        %outlet{name: "before-group-page-column-right", model: "groupPage.group"}
        %current_polls_card{model: "groupPage.group"}
        %poll_common_index_card{model: "groupPage.group", limit: "5", view-more-link: "true"}
        %group_previous_proposals_card{group: "groupPage.group", ng-if: "!groupPage.usePolls"}
        %membership_requests_card{group: "groupPage.group"}
        %members_card{group: "groupPage.group", ng-if: "groupPage.canViewMemberships()"}
        %install_slack_card{group: "groupPage.group"}
        %outlet{name: "after-slack-card", model: "groupPage.group"}
        %subgroups_card{group: "groupPage.group"}
        %group_help_card{group: "groupPage.group"}


- page_title "Network", @ref
= render "head"
.project-network
  .controls
    = form_tag namespace_project_network_path(@project.namespace, @project, @id), method: :get, class: 'form-inline network-form js-requires-input' do |f|
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha', required: true
      = button_tag class: 'btn btn-success' do
        = icon('search')
      .inline.prepend-left-20
        .checkbox.light
          = label_tag :filter_ref do
            = check_box_tag :filter_ref, 1, @options[:filter_ref]
            %span Begin with the selected commit

  .network-graph
    = spinner nil, true

:javascript
  network_graph = new Network({
    url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}',
    commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}',
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
  })
  new ShortcutsNetwork(network_graph.branch_graph)

Remove requires-input from the Network Graph form

- page_title "Network", @ref
= render "head"
.project-network
  .controls
    = form_tag namespace_project_network_path(@project.namespace, @project, @id), method: :get, class: 'form-inline network-form' do |f|
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: 'search-input form-control input-mx-250 search-sha'
      = button_tag class: 'btn btn-success' do
        = icon('search')
      .inline.prepend-left-20
        .checkbox.light
          = label_tag :filter_ref do
            = check_box_tag :filter_ref, 1, @options[:filter_ref]
            %span Begin with the selected commit

  .network-graph
    = spinner nil, true

:javascript
  network_graph = new Network({
    url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}',
    commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}',
    ref: '#{@ref}',
    commit_id: '#{@commit.id}'
  })
  new ShortcutsNetwork(network_graph.branch_graph)


%table.student_list
  %tr
    %th
      %div.progressbar_container
        In Progress
    %th
      %div.progressbar_container

  - students.each do |student|
    - learner = learners.find_by_student_id(student.id)
    - report_learner = nil
    - unless learner.nil?
      - report_learner = learner.report_learner
    - student_name = student.user.last_name + ", " + student.user.first_name
    - if report_learner && report_learner.complete_percent > 0 && report_learner.complete_percent < 100
      %tr
        %td.student_name{:title=>"#{student_name}"}
          %div.progressbar_container
            = student_name
        %td.last_update_date{:title=>"#{report_learner.last_run.strftime('%m/%d/%Y')}"}
          %div.progressbar_container
            = report_learner.last_run.strftime('%m/%d')

Add nil check for 'last_run' timestamp

%table.student_list
  %tr
    %th
      %div.progressbar_container
        In Progress
    %th
      %div.progressbar_container

  - students.each do |student|
    - learner = learners.find_by_student_id(student.id)
    - report_learner = nil
    - unless learner.nil?
      - report_learner = learner.report_learner
    - student_name = student.user.last_name + ", " + student.user.first_name
    - if report_learner && report_learner.complete_percent > 0 && report_learner.complete_percent < 100
      %tr
        %td.student_name{:title=>"#{student_name}"}
          %div.progressbar_container
            = student_name
        %td.last_update_date{:title=>"#{(report_learner.last_run.nil?) '' : report_learner.last_run.strftime('%m/%d/%Y')}"}
          %div.progressbar_container
            = (report_learner.last_run.nil?) '' : report_learner.last_run.strftime('%m/%d')


- content_for :breadcrumbs do
  = link_to "Characters", characters_path
  »
  %b= @character.name

- if @character.icon
  = icon_tag @character.icon
  %br
%b= @character.screenname
%br
= @character.name
- if @character.template
  = surround '(', ')' do
    = link_to @character.template.name, template_path(@character.template)
- if @character.pb
  %br
  Played by:
  = @character.pb
- if logged_in? && current_user.id == @character.user_id
  %br
  = link_to 'Edit character', edit_character_path(@character)
%br
%br
- if @character.recent_posts.present?
  = render partial: 'posts/list', locals: {posts: @character.recent_posts, title: 'Recent Threads' }

Add nickname to character page

- content_for :breadcrumbs do
  = link_to "Characters", characters_path
  »
  %b= @character.name

- if @character.icon
  = icon_tag @character.icon
  %br
%b= @character.screenname
%br
= @character.name
- if @character.template
  = surround '(', ')' do
    = link_to @character.template.name, template_path(@character.template)
- if @character.template_name
  %br
  Nickname: #{@character.template_name}
- if @character.pb
  %br
  Played by:
  = @character.pb
- if logged_in? && current_user.id == @character.user_id
  %br
  = link_to 'Edit character', edit_character_path(@character)
%br
%br
- if @character.recent_posts.present?
  = render partial: 'posts/list', locals: {posts: @character.recent_posts, title: 'Recent Threads' }


- content_for_title(@user.name)
- content_for(:subnav) do
  .btn-public
    = button_to('« Users', users_path, class: 'button primary', title: 'List of all users', method: 'get')
  - if current_user&.admin?
    .btn-admin
      = link_to(content_tag(:i, '', :class => "icon-trash"), @user, method: :delete, data: { confirm: "Delete #{@user.name}?" }, class: 'btn-icon', title: "Delete #{@plant}")
.email.center.italic= @user.email

%section.small-table
  %table.table.list#reports
    %thead
      %tr
        %th{scope: 'col'} Report
        %th{scope: 'col'} Collection Date
    %tbody
      - @user.biodiversity_reports.each do |report|
        %tr{:onclick => "location.href='#{url_for(report)}'"}
          %td= report.to_s
          %td= measured_on(report)

Order biodiversity reports in desc order

- content_for_title(@user.name)
- content_for(:subnav) do
  .btn-public
    = button_to('« Users', users_path, class: 'button primary', title: 'List of all users', method: 'get')
  - if current_user&.admin?
    .btn-admin
      = link_to(content_tag(:i, '', :class => "icon-trash"), @user, method: :delete, data: { confirm: "Delete #{@user.name}?" }, class: 'btn-icon', title: "Delete #{@plant}")
.email.center.italic= @user.email

%section.small-table
  %table.table.list#reports
    %thead
      %tr
        %th{scope: 'col'} Report
        %th{scope: 'col'} Collection Date
    %tbody
      - @user.biodiversity_reports.order('measured_on DESC').each do |report|
        %tr{:onclick => "location.href='#{url_for(report)}'"}
          %td= report.to_s
          %td= measured_on(report)


.avatar.text-center
  %h3= current_student.name
  %hr
  - if current_student.avatar_file_name.present?
    %img.img-rounded{:src => current_student.avatar_file_name, :width => 150}
    %br
  .italic= "#{current_student.team_for_course(current_course).name}" if current_student.team_for_course(current_course).present?
  .italic= "Last activity: #{current_student.try(:last_activity_at) || "(never)"} "
  %ul
    %li= link_to raw(' Edit'), edit_user_path(current_student), :class => "button"
    %li= link_to raw(' Email'), 'mailto:#{current_student.email}"', :class => "button"
    - if current_user_is_admin?
      %li= link_to "Recalculate Score", student_recalculate_path(:student_id => current_student.id), :class => "button"

Add flag functionality to student sidebar for staff members

= div_for current_student, class: "avatar text-center" do
  %h3= current_student.name
  %hr
  - if current_student.avatar_file_name.present?
    %img.img-rounded{:src => current_student.avatar_file_name, :width => 150}
    %br
  .italic= "#{current_student.team_for_course(current_course).name}" if current_student.team_for_course(current_course).present?
  .italic= "Last activity: #{current_student.try(:last_activity_at) || "(never)"} "
  %ul
    - if current_user_is_staff?
      %li= link_to flagged_user_icon(current_course, current_user, current_student.id), flag_user_path(current_student), method: :post, remote: true, class: "button flagged-user-icon"
    %li= link_to raw(' Edit'), edit_user_path(current_student), :class => "button"
    %li= link_to raw(' Email'), 'mailto:#{current_student.email}"', :class => "button"
  - if current_user_is_admin?
    %ul
      %li= link_to "Recalculate Score", student_recalculate_path(:student_id => current_student.id), :class => "button"


- unless smart_listing.empty?
  %table.table
    %thead
      %th.col-md-4.col-lg-4= smart_listing.sortable 'Email', :email
      %th.col-md-4.col-lg-4= smart_listing.sortable 'API Token', :api_token
      %th.col-md-4.col-lg-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at

    - @admins.each do |admin|
      %tr
        %td
          = admin.email
        %td
          = admin.api_token
        %td
          - unless admin.last_sign_in_at.nil?
            = time_ago_in_words(l(admin.last_sign_in_at, format: "%d/%m/%Y %H:%M UTC +02:00"))
            (
            = admin.last_sign_in_at.to_date.strftime('%d/%m/%Y')
            )

  = smart_listing.paginate
  = smart_listing.pagination_per_page_links

- else
  %h4.center
    Aucun administrateur créé

Add informations on administrations view

- unless smart_listing.empty?
  %table.table
    %thead
      %th.col-md-4.col-lg-4= smart_listing.sortable 'Email', :email
      %th.col-md-4.col-lg-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
      %th.col-md-2.col-lg-2 Procédure active
      %th.col-md-2.col-lg-2 Dossier en cours

    - @admins.each do |admin|
      %tr
        %td
          = admin.email
        %td
          - unless admin.last_sign_in_at.nil?
            = time_ago_in_words(l(admin.last_sign_in_at, format: "%d/%m/%Y %H:%M UTC +02:00"))
            (
            = admin.last_sign_in_at.to_date.strftime('%d/%m/%Y')
            )
        %td
          = admin.procedures.where(published: true).count
        %td
          - total_dossier = 0
          - admin.procedures.each do |procedure| total_dossier += procedure.dossiers.count end
          = total_dossier
  = smart_listing.paginate
  = smart_listing.pagination_per_page_links

- else
  %h4.center
    Aucun administrateur créé


-#   Copyright (c) 2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

.dropdown{:class => "hang_#{hang}"}
  .button.toggle{:class => ("in_aspects" if contact.aspects.size > 0)}
    - if contact.aspects.size == 1
      = contact.aspects.first.name
    - else
      = t('.toggle', :count => contact.aspects.size)
    ▼

  .wrapper
    %ul.dropdown_list{:unSelectable => 'on', 'data-person_id' => ((person.id) if person)}
      - for aspect in all_aspects
        = aspect_dropdown_list_item(aspect, contact, person)

      - if defined?(@aspect) && ( @aspect == :profile || @aspect == :tag || @aspect == :search || @aspect == :notification)
        %li.newItem
          .add_aspect
            = link_to t('contacts.index.add_a_new_aspect'), new_aspect_path(:person_id => person.id), :rel => 'facebox'

Put the new_aspect class on the notification page aspect dropdown, so that the focus js is triggered

-#   Copyright (c) 2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

.dropdown{:class => "hang_#{hang}"}
  .button.toggle{:class => ("in_aspects" if contact.aspects.size > 0)}
    - if contact.aspects.size == 1
      = contact.aspects.first.name
    - else
      = t('.toggle', :count => contact.aspects.size)
    ▼

  .wrapper
    %ul.dropdown_list{:unSelectable => 'on', 'data-person_id' => ((person.id) if person)}
      - for aspect in all_aspects
        = aspect_dropdown_list_item(aspect, contact, person)

      - if defined?(@aspect) && ( @aspect == :profile || @aspect == :tag || @aspect == :search || @aspect == :notification)
        %li.newItem
          .add_aspect
            = link_to t('contacts.index.add_a_new_aspect'), new_aspect_path(:person_id => person.id), :rel => 'facebox', :class => 'new_aspect'


- content_for(:title) { "Lenzie GC Conditions" }

#header
  .title
    %h1= yield :title
  .date
    = Date.today.to_s(:long)

= simple_form_for [@source, @report] do |f|
  = f.input :status, collection: ["Open", "Closed"], as: :radio, wrapper_html: { class: "two-up" }

  = f.input :weather, collection: ["Good", "Fair", "Poor"], as: :radio, wrapper_html: { class: "three-up" }

  = f.submit "Send Report"

Edit title text to fit on mobile screen.

- content_for(:title) { "Course Conditions" }

#header
  .title
    %h1= yield :title
  .date
    = Date.today.to_s(:long)

= simple_form_for [@source, @report] do |f|
  = f.input :status, collection: ["Open", "Closed"], as: :radio, wrapper_html: { class: "two-up" }

  = f.input :weather, collection: ["Good", "Fair", "Poor"], as: :radio, wrapper_html: { class: "three-up" }

  = f.submit "Send Report"


.list{:id => "list-#{list.id}"}
	.list_header
		%table{:class => 'list_header_table'}
			%tr
				%td
					.title&= list.title
				%td
					.actions.right
						.edit&= "#{list.users.size} user#{list.users.size > 1 ? 's' : ''}"
						%a{:href => "javascript:window.location = 'http://bm.smattr.de/bookmarks/quick_new?title=' + escape(document.title) + '&url=' + escape(window.location) + '&list=' + #{list.id}", :class => 'bookmarklet'}
							bookmarklet
						.delete
							.confirm unsubscribe
							.cancel.hidden cancel
	.bookmarks
		%ul
			%li{:id => "nobookmarks-#{list.id}", :class => list.bookmarks.empty? ? 'hi' : 'hidden'} No bookmarks yet :(
			- list.bookmarks.sort.each do |bookmark|
				= render :haml, :partial_bookmark, :locals => { :bookmark => bookmark }
	.addbookmark add bookmark

Fix encoding issue in bookmarklets

.list{:id => "list-#{list.id}"}
	.list_header
		%table{:class => 'list_header_table'}
			%tr
				%td
					.title&= list.title
				%td
					.actions.right
						.edit&= "#{list.users.size} user#{list.users.size > 1 ? 's' : ''}"
						%a{:href => "javascript:window.location = 'http://bm.smattr.de/bookmarks/quick_new?title=' + encodeURIComponent(document.title) + '&url=' + escape(window.location) + '&list=' + #{list.id}", :class => 'bookmarklet'}
							bookmarklet
						.delete
							.confirm unsubscribe
							.cancel.hidden cancel
	.bookmarks
		%ul
			%li{:id => "nobookmarks-#{list.id}", :class => list.bookmarks.empty? ? 'hi' : 'hidden'} No bookmarks yet :(
			- list.bookmarks.sort.each do |bookmark|
				= render :haml, :partial_bookmark, :locals => { :bookmark => bookmark }
	.addbookmark add bookmark


%h2 We've got your code - better tell us who you are!

= form_for(@user, :url => user_registration_path) do |f|
  %div
    = f.label :name
    %br/
    = f.text_field :name, :value => @user.fetched_name
  %div
    = f.label :email
    %br/
    = f.email_field :email, :value => @user.fetched_email
  %div
    = f.label :password
    %br/
    = f.password_field :password
  %div
    = f.label :password_confirmation
    %br/
    = f.password_field :password_confirmation
  %div= f.submit "Sign up"

Remove password confirmation field - it doesn't actually work since we skip the verification.

%h2 We've got your code - better tell us who you are!

= form_for(@user, :url => user_registration_path) do |f|
  %div
    = f.label :name
    %br/
    = f.text_field :name, :value => @user.fetched_name
  %div
    = f.label :email
    %br/
    = f.email_field :email, :value => @user.fetched_email
  %div
    = f.label :password
    %br/
    = f.password_field :password
  -# %div
  -#   = f.label :password_confirmation
  -#   %br/
  -#   = f.password_field :password_confirmation
  %div= f.submit "Sign up"


%h3
  = @wiki.title
  %span.right
    - if can? current_user, :write_wiki, @project
      = link_to history_project_wiki_path(@project, @wiki), :class => "btn small padded" do
        History
      = link_to edit_project_wiki_path(@project, @wiki), :class => "btn small" do
        Edit
%hr
.wiki_content
  = preserve do
    = markdown @wiki.content

%p.time Last edited by #{@wiki.user.name}, in #{time_ago_in_words @wiki.created_at}
- if can? current_user, :admin_wiki, @project
  = link_to project_wiki_path(@project, @wiki), :confirm => "Are you sure you want to delete this page?", :method => :delete do
    Delete this page

Change "in" to "ago" in last edited message.

%h3
  = @wiki.title
  %span.right
    - if can? current_user, :write_wiki, @project
      = link_to history_project_wiki_path(@project, @wiki), :class => "btn small padded" do
        History
      = link_to edit_project_wiki_path(@project, @wiki), :class => "btn small" do
        Edit
%hr
.wiki_content
  = preserve do
    = markdown @wiki.content

%p.time Last edited by #{@wiki.user.name}, #{time_ago_in_words @wiki.created_at} ago
- if can? current_user, :admin_wiki, @project
  = link_to project_wiki_path(@project, @wiki), :confirm => "Are you sure you want to delete this page?", :method => :delete do
    Delete this page


= form.input :membership_source, :collection => UserGroup.active_membership_sources.collect {|x| [t("user_groups.#{x.downcase}"), x]},
                                 :readonly => !@user_group.new_record?, :input_html => {:disabled => !@user_group.new_record?}
= form.input :name, :readonly => !@user_group.new_record? && !@user_group.membership_source == UserGroup::MEMBERSHIP_SOURCE_LOCAL
= form.input :description

Adjust textarea rows attribute on user_groups/form

= form.input :membership_source, :collection => UserGroup.active_membership_sources.collect {|x| [t("user_groups.#{x.downcase}"), x]},
                                 :readonly => !@user_group.new_record?, :input_html => {:disabled => !@user_group.new_record?}
= form.input :name, :readonly => !@user_group.new_record? && !@user_group.membership_source == UserGroup::MEMBERSHIP_SOURCE_LOCAL
= form.input :description, :input_html => { :rows => 2 }


.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %button.navbar-toggle(type="button" data-target=".navbar-collapse" data-toggle="collapse")
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      %a.navbar-brand(href=root_path)
        = image_tag("/assets/3000acres_logo.png", :size => "70x70", :alt => Acres::Application.config.site_name)
    .navbar-collapse.collapse
      %ul.nav.navbar-nav.navbar-right

        - if @cms_topnav
          - @cms_topnav.pages.root.children.published.each do |page|
            %li= link_to page.label, page.full_path

        - if user_signed_in?
          - if current_user.has_role? :admin
            %li= link_to 'Sites Admin', sites_path
            %li{ :data => { :no_turbolink => true }}= link_to 'CMS Admin', cms_admin_path
          %li= link_to 'Edit account', edit_user_registration_path
          %li= link_to 'Sign out', destroy_user_session_path, :method=>'delete'
        - else
          %li= link_to 'Sign in', new_user_session_path
          %li= link_to 'Sign up', new_user_registration_path

      - if user_signed_in?
        %p.navbar-text.navbar-right
          You are signed in as
          = current_user.name

Add link to user page in navbar

.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %button.navbar-toggle(type="button" data-target=".navbar-collapse" data-toggle="collapse")
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      %a.navbar-brand(href=root_path)
        = image_tag("/assets/3000acres_logo.png", :size => "70x70", :alt => Acres::Application.config.site_name)
    .navbar-collapse.collapse
      %ul.nav.navbar-nav.navbar-right

        - if @cms_topnav
          - @cms_topnav.pages.root.children.published.each do |page|
            %li= link_to page.label, page.full_path

        - if user_signed_in?
          %li= link_to 'Your sites', user_path(current_user)
          - if current_user.has_role? :admin
            %li= link_to 'Sites Admin', sites_path
            %li{ :data => { :no_turbolink => true }}= link_to 'CMS Admin', cms_admin_path
          %li= link_to 'Edit account', edit_user_registration_path
          %li= link_to 'Sign out', destroy_user_session_path, :method=>'delete'
        - else
          %li= link_to 'Sign in', new_user_session_path
          %li= link_to 'Sign up', new_user_registration_path

      - if user_signed_in?
        %p.navbar-text.navbar-right
          You are signed in as
          = current_user.name


%h1= @document.title
%ol
  - @document.top_level_paragraphs.each do |paragraph|
    = render paragraph
- if @document.top_level_paragraphs.empty?
  .insert_paragraph_wrapper
    %p.control
      = link_to "Insert paragraph", new_document_paragraph_path(:document_id => @document), :class => 'insert_paragraph'
    .insert_paragraph_form{:style => "display: none;"}
      = form_for :paragraph do |f|
        = render(:partial => 'paragraphs/form', :locals => {:f => f, :cancel_link => true})

%p
  = link_to "Back to documents list.", documents_path

Fix that initial new paragraph form had wrong action URL.

%h1= @document.title
%ol
  - @document.top_level_paragraphs.each do |paragraph|
    = render paragraph
- if @document.top_level_paragraphs.empty?
  .insert_paragraph_wrapper
    %p.control
      = link_to "Insert paragraph", new_document_paragraph_path(:document_id => @document), :class => 'insert_paragraph'
    .insert_paragraph_form{:style => "display: none;"}
      = form_for :paragraph, :url => document_paragraphs_path(:document_id => @document) do |f|
        = render(:partial => 'paragraphs/form', :locals => {:f => f, :cancel_link => true})

%p
  = link_to "Back to documents list.", documents_path


- content_for :title, @book.title
.container
  .row
    .col-xs-8
      %section
        .h4
          Book Data
        %table.table.table-striped
          =attr_row(@book, :title)
          =attr_row(@book, :author)
          =attr_row(@book, :call_no)
          =attr_row(@book, :pages)
          =attr_row(@book, :height)
          =attr_row(@book, :section)
          =attr_row(@book, :brn)

      %section
        %h4
          User Data
        %table.table.table-striped
          %tr
            %td.col-xs-4
              Rating
            %td.col-xs-8
              = responsive_rater_tag(value: @book.meta.rating, min: 0, max: 5, id: @book.id)
          =attr_row(@book.meta, :borrowed)
          =attr_row(@book.meta, :starred)

      %section
        %h4
          Availability
        %table.table.table-striped
          %thead
            %tr
              %th Library
              %th Reference
          %tbody
            - @book.library_books.each do |lb|
              %tr{ class: (lb.available ? 'success' : '') }
                %td.col-xs-7= lb.library_name
                %td.col-xs-1= (lb.reference ? 'Reference' : '')

Set browsed and borrowed status for books in show view

- content_for :title, @book.title
.container
  .row
    .col-xs-8
      %section
        .h4
          Book Data
        %table.table.table-striped
          =attr_row(@book, :title)
          =attr_row(@book, :author)
          =attr_row(@book, :call_no)
          =attr_row(@book, :pages)
          =attr_row(@book, :height)
          =attr_row(@book, :section)
          =attr_row(@book, :brn)

      %section
        %h4
          User Data
        %table.table.table-striped
          %tr
            %td.col-xs-4
              Rating
            %td.col-xs-8
              = responsive_rater_tag(value: @book.meta.rating, min: 0, max: 5, id: @book.id)
          =attr_row(@book.meta, :borrowed)
          =attr_row(@book.meta, :starred)

      %section
        %h4
          Availability
        %table.table.table-striped
          %thead
            %tr
              %th Library
              %th Reference
          %tbody
            - @book.library_books.each do |lb|
              %tr{ class: (lb.available ? 'success' : '') }
                %td.col-xs-7= lb.library_name
                %td.col-xs-1= (lb.reference ? 'Reference' : '')

      %section
        .pull-right
          - if @book.meta.can_browse?
            = link_to 'Mark Browsed', browse_book_url(@book), method: :post, class: 'btn btn-default'
          - if @book.meta.can_borrow?
            = link_to 'Mark Borrowed', borrow_book_url(@book), method: :post, class: 'btn btn-default'


.subscribe
  - if signed_in? && current_user.subscribed_to_thread?(thread)
    - subscription = current_user.thread_subscriptions.to(thread)
    - if subscription.send_email?
      %p= t(".subscribed_by_email")
    - else
      %p= t(".subscribed")
    = semantic_form_for subscription, url: thread_subscription_path(thread, subscription, action: :destroy), method: :delete do |f|
      = f.buttons do
        = f.commit_button :delete
  - else
    = semantic_form_for ThreadSubscription.new, url: thread_subscriptions_path(thread_id: thread, action: :create) do |f|
      = f.inputs :send_email
      = f.buttons do
        = f.commit_button button_html: {class: "btn-green"}

Set unfollow button style, but need more guidance on this.

.subscribe
  - if signed_in? && current_user.subscribed_to_thread?(thread)
    - subscription = current_user.thread_subscriptions.to(thread)
    - if subscription.send_email?
      %p= t(".subscribed_by_email")
    - else
      %p= t(".subscribed")
    = semantic_form_for subscription, url: thread_subscription_path(thread, subscription, action: :destroy), method: :delete do |f|
      = f.buttons do
        = f.commit_button :delete, button_html: {class: "btn-red"}
  - else
    = semantic_form_for ThreadSubscription.new, url: thread_subscriptions_path(thread_id: thread, action: :create) do |f|
      = f.inputs :send_email
      = f.buttons do
        = f.commit_button button_html: {class: "btn-green"}


---
layout: default
priority: 1.0
change_frequency: monthly
---

- release = release_for_version( page.version )

.row
  #main-column.span8
    .post
      .byline
        .author
          = page.author
        .date
          = format_date( page.date )
      .tags
        - page.tags.each do |tag|
          %a{:href=>tag.primary_page.url}<
            = tag
      .body
        ~ content
      .comments
        = page.disqus_comments

  #sidebar-column.span4
    .post-navigation
      .previous
        - if page.previous_post
          Previous:
          %a{:href => page.previous_post.url}= page.previous_post.title
      .next
        - if page.next_post
          Next:
          %a{:href => page.next_post.url}= page.next_post.title
    #release-block
      %hr
      :markdown
        __Version *#{release.version}* was released on
        #{format_date( page.date )}__.
        You [browse the documentation](/documentation/#{release.version}/) or
        install it via:
            $ lein immutant install #{version}
        Don't have the `lein-immutant` plugin installed?
        [Learn how](/install/), or
        [download the zip archive](#{release.urls.remote_dist_zip}).
      %hr

    .tags
      = site.posts_tag_cloud

Fix markdown for release layout.


-# -*- coding: utf-8 -*-
- @title = "曲の一覧"

#my_songs_box
  %h2.title
    ="#{current_account.name}さんの曲一覧"
  %ul#my_songs{:class => 'bulleted'}
    %li= link_to '作曲開始', url(:songs, :new)
    = partial 'songs/song', :collection => @my_songs
#public_songs_box
  - if @public_songs.length > 0
    %h2.title みんなの曲一覧
    %ul#public_songs{:class => 'bulleted'}
      = partial 'songs/song', :collection => @public_songs
#op_panel
  %ul
    %li= link_to '設定・ログアウト', url(:profiles, :show, :id => current_account.id)

Add link to the manual

-# -*- coding: utf-8 -*-
- @title = "曲の一覧"

#my_songs_box
  %h2.title
    ="#{current_account.name}さんの曲一覧"
  %ul#my_songs{:class => 'bulleted'}
    %li= link_to '作曲開始', url(:songs, :new)
    = partial 'songs/song', :collection => @my_songs
#public_songs_box
  - if @public_songs.length > 0
    %h2.title みんなの曲一覧
    %ul#public_songs{:class => 'bulleted'}
      = partial 'songs/song', :collection => @public_songs
#op_panel
  %ul
    %li= link_to 'マニュアル', 'https://ushiushix.github.io/text_score/', :target => '_blank'
    %li= link_to '設定・ログアウト', url(:profiles, :show, :id => current_account.id)


#running-indicator
  - if scraper.queued? || scraper.running?
    = render "spinner"

Change id to class because many of these can appear on the same page

.running-indicator
  - if scraper.queued? || scraper.running?
    = render "spinner"


.wrapper--footer.js-wrapper
  = render 'layouts/core/snippets/body_footer'

.js-config.is-hidden
  = requirejs_include_tag('app_secure_core_legacy'){|c|{'main' => 'app_secure_core_legacy'}}

Fix requirejs_helper for app_secure_core_legacy also

.wrapper--footer.js-wrapper
  = render 'layouts/core/snippets/body_footer'

.js-config.is-hidden
  :javascript
      (function(d, s) {
        var firstJs, js;
        firstJs = d.getElementsByTagName(s)[0];
        js = d.createElement(s);
        js.src = "#{normalised_asset_path('requirejs/require.js')}";
        js.setAttribute("data-main", "#{async_js_path("app_secure_core_legacy")}");
        firstJs.parentNode.insertBefore(js, firstJs);
      })(document, 'script');


- if edit
  - select_values = field.values.collect(&:reverse)
  - selected ||= wf.value(field.name)
  = select_tag(field.name, options_for_select(select_values, selected), drop_down_options(field, url))

  :javascript
    dialogFieldRefresh.initializeDialogSelectPicker('#{field.name}', '#{field.id}', '#{selected}', '#{url}');

- else
  = h(field.values.detect { |k, _v| k == wf.value(field.name) }.try(:last) || wf.value(field.name))

- if field.dynamic
  - if field.auto_refresh
    :javascript
      dialogFieldRefresh.listenForAutoRefreshMessages("#{field.id}", function() {
        var selectedValue = $('select[name="#{field.name}"]').val();
        dialogFieldRefresh.refreshDropDownList("#{field.name}", "#{field.id}", selectedValue);
      });

  - if field.show_refresh_button?
    = button_tag(_('Refresh'), :id => "refresh-dynamic-field-#{field.id}", :class => "btn btn-default")

  :javascript
    $('#refresh-dynamic-field-#{field.id}').click(function() {
      var selectedValue = $('select[name="#{field.name}"]').val();
      dialogFieldRefresh.refreshDropDownList("#{field.name}", "#{field.id}", selectedValue);
      dialogFieldRefresh.triggerAutoRefresh("#{field.id}", "#{field.trigger_auto_refresh}");
    });

Fix value of dynamic dropdown list in prov. request details screen

- if edit
  - select_values = field.values.collect(&:reverse)
  - selected ||= wf.value(field.name)
  = select_tag(field.name, options_for_select(select_values, selected), drop_down_options(field, url))

  :javascript
    dialogFieldRefresh.initializeDialogSelectPicker('#{field.name}', '#{field.id}', '#{selected}', '#{url}');

- else
  = h(field.values.detect { |k, _v| [k, k.to_s].include?(wf.value(field.name)) }.try(:last) || wf.value(field.name))

- if field.dynamic
  - if field.auto_refresh
    :javascript
      dialogFieldRefresh.listenForAutoRefreshMessages("#{field.id}", function() {
        var selectedValue = $('select[name="#{field.name}"]').val();
        dialogFieldRefresh.refreshDropDownList("#{field.name}", "#{field.id}", selectedValue);
      });

  - if field.show_refresh_button?
    = button_tag(_('Refresh'), :id => "refresh-dynamic-field-#{field.id}", :class => "btn btn-default")

  :javascript
    $('#refresh-dynamic-field-#{field.id}').click(function() {
      var selectedValue = $('select[name="#{field.name}"]').val();
      dialogFieldRefresh.refreshDropDownList("#{field.name}", "#{field.id}", selectedValue);
      dialogFieldRefresh.triggerAutoRefresh("#{field.id}", "#{field.trigger_auto_refresh}");
    });


!!! 5
%html
  %head
    %title= Settings.app_name
    %meta{:charset=>"UTF-8"}
    = csrf_meta_tag
    = stylesheet_link_tag 'application'
    = javascript_include_tag 'application'
    = yield :head
  %body
    .navbar.navbar-inverse.navbar-fixed-top{:'data-dropdown'=>"dropdown"}
      .navbar-inner
        .container-fluid
          = link_to(Settings.app_name, root_path, :class => 'brand')
    #main.container-fluid
      = render '/app_frame/layout/flashes'
      = yield
      = render :partial => "app_frame/devise/shared/links"

Fix renders in devise layout

!!! 5
%html
  %head
    %title= Settings.app_name
    %meta{:charset=>"UTF-8"}
    = csrf_meta_tag
    = stylesheet_link_tag 'application'
    = javascript_include_tag 'application'
    = yield :head
  %body
    .navbar.navbar-inverse.navbar-fixed-top{:'data-dropdown'=>"dropdown"}
      .navbar-inner
        .container-fluid
          = link_to(Settings.app_name, root_path, :class => 'brand')
    #main.container-fluid
      = render 'flashes'
      = yield
      = render :partial => "app_frame/devise/shared/links"


%article.card.card--collection.js-card{class: "#{card[:double?] ? 'card--double card--full-image' : 'card--single card--extended-content--half js-single'} card--collection--#{card[:topic]} #{(card[:filter]) ? "js-stack-card-filter" : ""}"}
  %a.link--wrapper{:href => "/#{card[:slug]}", :data => { 'stack-kind' => card[:stack_kind], :filter => card[:filter] }}
    - if card[:count]
      %span.card__item-count
        = card[:count]
    %figure.card__hero{class: (card[:double?]) ? "card__hero--#{card[:topic]}" : ''}
      = safe_image_tag(card[:image_url], class: 'card__image', alt: "#{card[:title]}", lazyload: defined?(lazyload))
    .card__content
      .card__content__inner
        %span.card__context
          - if card[:kind].present?
            = card[:kind].titlecase
          - else
            Collection
        %h2.card__name.js-card-name
          = card[:title]
        - unless card[:double?]
          - if card[:description].present?
            %p.card__description
              = card[:description]

Add rough markup for image attribution to collection card

%article.card.card--collection.js-card{class: "#{card[:double?] ? 'card--double card--full-image' : 'card--single card--extended-content--half js-single'} card--collection--#{card[:topic]} #{(card[:filter]) ? "js-stack-card-filter" : ""}"}
  %a.link--wrapper{:href => "/#{card[:slug]}", :data => { 'stack-kind' => card[:stack_kind], :filter => card[:filter] }}
    - if card[:count]
      %span.card__item-count
        = card[:count]
    %figure.card__hero{class: (card[:double?]) ? "card__hero--#{card[:topic]}" : ''}
      = safe_image_tag(card[:image_url], class: 'card__image', alt: "#{card[:title]}", lazyload: defined?(lazyload))
    .card__content
      .card__content__inner
        %span.card__context
          - if card[:kind].present?
            = card[:kind].titlecase
          - else
            Collection
        %h2.card__name.js-card-name
          = card[:title]
        - unless card[:double?]
          - if card[:description].present?
            %p.card__description
              = card[:description]

      .card__attribution<
        Santaurio de Chimayo by Joanna Poe
        %span.card__licenses
          %span.license.license--cc<
            Creative Commons
          %span.license.license--attribution<
            Attribution
          %span.license.license--share-alike<
            Share Alike
          %span.license.license--non-deriv<
            Non-Derivation


:javascript
  function toggleBox(b, form, v){
    var form = document.forms[form];
    for(var i=0;i < form.length; i++){
      form.elements[i].checked = v;
    }
  }

%h1 table

- for slide,rows in @table.group_by{|r| r.values_at('slide').first}
  %p= "slide ===#{slide}==="
  %form(action="/" method="post" name="#{slide}")
    %input(type="hidden" name="slide" value="#{slide}")
    %input(type="submit" value="Send  slide:#{slide}" class="button")
    %input(type="button" value='selectAll' onclick="toggleBox(true, '#{slide}', 'checked') " )
    %input(type="button" value='selectNone' onclick="toggleBox(true, '#{slide}', '')" )

    %table(border="1")
      %thread
        %tr
          - for header in @show_headers
            %th= header.to_s
      %tbody
        - for row in rows
          %tr
            - for cell in row.values_at(* @show_headers)
              %td= cell.to_s
            - lib_id = row.values_at('library_id')[0].to_s
            %td
              %input(type="checkbox" name="check[]" value="#{lib_id}")
            -if check_dir
              %td
                #exist= dir_exists?(slide, lib_id, row.values_at('prep_lit') )

FIX BUG, change form name so that ID-attribute begin with letter

:javascript
  function toggleBox(form, v){
    var f = document.forms[form];
    for(var i=0;i < f.length; i++){
      f.elements[i].checked = v;
    }
  }

%h1 table

- for slide,rows in @table.group_by{|r| r.values_at('slide').first}
  %p= "slide ===#{slide}==="
  %form(action="/" method="post" name="form-#{slide}")
    %input(type="hidden" name="slide" value="#{slide}")
    %input(type="submit" value="Send  slide:#{slide}" class="button")
    %input(type="button" value='selectAll' onclick="toggleBox(  'form-#{slide}', 'checked') " )
    %input(type="button" value='selectNone' onclick="toggleBox( 'form-#{slide}', '')" )

    %table(border="1")
      %thread
        %tr
          - for header in @show_headers
            %th= header.to_s
      %tbody
        - for row in rows
          %tr
            - for cell in row.values_at(* @show_headers)
              %td= cell.to_s
            - lib_id = row.values_at('library_id')[0].to_s
            %td
              %input(type="checkbox" name="check[]" value="#{lib_id}")
            -if check_dir
              %td
                #exist= dir_exists?(slide, lib_id, row.values_at('prep_lit') )


= repository_nav ontology.repository, :ontologies

= ontology_nav ontology, :theorems

%h3
  = link_to theorem, locid_for(theorem)
  = render partial: 'theorems/proof_status', locals: {proof_status: theorem.proof_status}

%h4 Proof Attempts
= link_to t('theorems.show.prove'), [*resource_chain, theorem, :proofs, :new], class: 'btn btn-primary'
- if collection.empty?
  = t('theorems.show.proof_attemps_empty')
- else
  %table
    %thead
      %tr
        %th Number
        %th Date
        %th Time taken
        %th Prover
        %th Status
        %th State
    - collection.latest.each do |proof_attempt|
      %tr
        %td= link_to proof_attempt.number, proof_attempt.locid
        %td
          = link_to proof_attempt.locid do
            %span.timestamp= proof_attempt.created_at
        %td
          = proof_attempt.time_taken
          = t('proof_attempts.show.seconds')
        %td= proof_attempt.prover
        %td= render partial: 'theorems/proof_status', locals: {proof_status: proof_attempt.proof_status}
        %td= state_tag(proof_attempt)

Add theorem state to proof attempt index view.

= repository_nav ontology.repository, :ontologies

= ontology_nav ontology, :theorems

%h3
  = link_to theorem, locid_for(theorem)
  = render partial: 'theorems/proof_status', locals: {proof_status: theorem.proof_status}

- unless State::TERMINAL_STATES.include?(theorem.state)
  = render partial: '/shared/state', locals: {resource: theorem}

%h4 Proof Attempts
= link_to t('theorems.show.prove'), [*resource_chain, theorem, :proofs, :new], class: 'btn btn-primary'
- if collection.empty?
  = t('theorems.show.proof_attemps_empty')
- else
  %table
    %thead
      %tr
        %th Number
        %th Date
        %th Time taken
        %th Prover
        %th Status
        %th State
    - collection.latest.each do |proof_attempt|
      %tr
        %td= link_to proof_attempt.number, proof_attempt.locid
        %td
          = link_to proof_attempt.locid do
            %span.timestamp= proof_attempt.created_at
        %td
          = proof_attempt.time_taken
          = t('proof_attempts.show.seconds')
        %td= proof_attempt.prover
        %td= render partial: 'theorems/proof_status', locals: {proof_status: proof_attempt.proof_status}
        %td= state_tag(proof_attempt)


- title "Правка — #{@content.title || @content.path}"

%article.page.edit-content
  %h1
    Изменение страницы
    - if @content.title
      «#{@content.title}»

  = form_tag @content.path, method: :put do
    %textarea( name="text" role="content-textarea" )= @content.versions.last.try(:text)

- content_for :controls do
  .page-controls.edit-content
    = button('Сохранить', role: 'save-content')
    %a.cancel{ href: @content.path } Отмена

Change title on root page edit

- title "Правка — #{@content.title || @content.path}"

%article.page.edit-content
  %h1
    Изменение
    - if @content.root?
      главной страницы
    - else
      страницы
      - if @content.title
        «#{@content.title}»

  = form_tag @content.path, method: :put do
    %textarea( name="text" role="content-textarea" )= @content.versions.last.try(:text)

- content_for :controls do
  .page-controls.edit-content
    = button('Сохранить', role: 'save-content')
    %a.cancel{ href: @content.path } Отмена


%section.group-page-members{aria-labelledby: 'members-card-title'}
  %h2#members-card-title.lmo-card-heading{ translate: 'group_page.members'}
  .group-member-list
    .group-member-list-item{ng-repeat: 'member in group.members() | limitTo:5'}
      .group-member-list-avatar.lg{data-username: '{{member.label}}'}
        %user_avatar{user: 'member', coordinator: 'memberIsAdmin(member)'}
    .group-page__members-placeholder.group-page-placeholder{translate: 'group_page.members_placeholder', ng-if: 'showMembersPlaceholder()' }
  .members-card__invite-members{ng-if: '::canAddMembers()'}
    %a.btn.btn-success.btn-block.lmo-btn-icon{href: '', ng_click: 'invitePeople()'}
      %i.fa.fa-lg.fa-plus>
      %span{translate: 'group_page.invite_people' }
  .members-card__manage-members.show-more.card-minor-action
    %a{href: '/g/{{group.key}}/memberships', translate: 'group_page.manage_members'}

Add membership count on group page

%section.group-page-members{aria-labelledby: 'members-card-title'}
  %h2#members-card-title.lmo-card-heading{ translate: 'group_page.members', translate-value-count: '{{group.membershipsCount}}'}
  .group-member-list
    .group-member-list-item{ng-repeat: 'member in group.members() | limitTo:5'}
      .group-member-list-avatar.lg{data-username: '{{member.label}}'}
        %user_avatar{user: 'member', coordinator: 'memberIsAdmin(member)'}
    .group-page__members-placeholder.group-page-placeholder{translate: 'group_page.members_placeholder', ng-if: 'showMembersPlaceholder()' }
  .members-card__invite-members{ng-if: '::canAddMembers()'}
    %a.btn.btn-success.btn-block.lmo-btn-icon{href: '', ng_click: 'invitePeople()'}
      %i.fa.fa-lg.fa-plus>
      %span{translate: 'group_page.invite_people' }
  .members-card__manage-members.show-more.card-minor-action
    %a{href: '/g/{{group.key}}/memberships', translate: 'group_page.manage_members'}


%p#notice= notice

%h1 Listing Books

%table
  %thead
    %tr
      %th Title
      %th Content
      %th User
      %th(colspan=3)

  %tbody
    - @books.each do |book|
      %tr
        %td= book.title
        %td= book.content
        %td= book.user.name
        %td= link_to 'Show', book
        %td= link_to 'Edit', edit_book_path(book)
        %td= link_to 'Destroy', book, method: :delete, data: { confirm: 'Are you sure?' }

%br

#{link_to 'New Book', new_book_path}

Remove book content from index

%p#notice= notice

%h1 Listing Books

%table
  %thead
    %tr
      %th Title
      %th User
      %th(colspan=3)

  %tbody
    - @books.each do |book|
      %tr
        %td= book.title
        %td= book.user.name
        %td= link_to 'Show', book
        %td= link_to 'Edit', edit_book_path(book)
        %td= link_to 'Destroy', book, method: :delete, data: { confirm: 'Are you sure?' }

%br

#{link_to 'New Book', new_book_path}


- @tabbed_navigation_items = common_tabs(:pages)
- @user_navigation_items = user_tabs(nil)

- form_tag hash_for_share_page_path.merge(:id => @page.id, :use_route => nil), :method => :post, :class => 'pageShareForm' do
  != error_messages_for :page

  %div.pageShareSection
    != check_box_tag 'page[is_public]', true, @page.is_public, :id => "pageSetPublic"
    %label= :page_public.l_with_args(:link => link_to(public_page_url(@page), public_page_url(@page)))

  %div.pageShareSection
    %h2= :users_who_can_see_page.l

    %table.pageShareUsers
      - Account.owner.users.each do |user|
        - next if user.id == @page.created_by_id
        %tr
          %td
            %label= h user.display_name
          %td
            != check_box_tag 'page[shared_users][]', user.id, @page.shared_user_ids.include?(user.id), :id => "pageShareUser#{user.id}"
  %div.pageShareSection
    != submit_tag :update.l
    %a{:href => url_for(hash_for_page_path.merge(:id => @page.id, :use_route => nil))}= :cancel.l

Change formatting of public page label

- @tabbed_navigation_items = common_tabs(:pages)
- @user_navigation_items = user_tabs(nil)

- form_tag hash_for_share_page_path.merge(:id => @page.id, :use_route => nil), :method => :post, :class => 'pageShareForm' do
  != error_messages_for :page

  %div.pageShareSection
    != check_box_tag 'page[is_public]', true, @page.is_public, :id => "pageSetPublic"
    %label.check= :page_public.l_with_args(:link => link_to(public_page_url(@page), public_page_url(@page)))

  %div.pageShareSection
    %h2= :users_who_can_see_page.l

    %table.pageShareUsers
      - Account.owner.users.each do |user|
        - next if user.id == @page.created_by_id
        %tr
          %td
            %label= h user.display_name
          %td
            != check_box_tag 'page[shared_users][]', user.id, @page.shared_user_ids.include?(user.id), :id => "pageShareUser#{user.id}"
  %div.pageShareSection
    != submit_tag :update.l
    %a{:href => url_for(hash_for_page_path.merge(:id => @page.id, :use_route => nil))}= :cancel.l


.page-header
  %h1 Apps

%p
  All emails are sent through apps, which represent the application that sends the email.
  Each App has its own settings and its own smtp authentication settings to contact the
  Cuttlefish SMTP server.

- if policy(:app).new?
  %p
    = link_to "New App", new_app_path, class: "btn btn-primary"

%table.table
  %thead
    %tr
      %th
        Name
  %tbody
    - @apps.each do |app|
      %tr
        %td= link_to app.name, app

Make apps list more clickable

.page-header
  %h1 Apps

%p
  All emails are sent through apps, which represent the application that sends the email.
  Each App has its own settings and its own smtp authentication settings to contact the
  Cuttlefish SMTP server.

- if policy(:app).new?
  %p
    = link_to "New App", new_app_path, class: "btn btn-primary"

%table.table
  %thead
    %tr
      %th
        Name
  %tbody(data-provides="rowlink")
    - @apps.each do |app|
      %tr
        %td= link_to app.name, app


.testimonial

  %blockquote
    = testimonial.content

    %footer
      %b.author= testimonial.author
      = ", #{testimonial.project}" if testimonial.project.present?

Move the author of the testimonial to top

.testimonial

  %blockquote
    %header
      %b.author= testimonial.author
      = ", #{testimonial.project}" if testimonial.project.present?

    = testimonial.content


.content
  .row
    .small-12.columns
      %h5
        =current_distributor.name
        belongs to:
      %ul.bullet-list
        - for group in current_distributor.groups
          %li
            %a{href: main_app.groups_path(anchor: "#/#group#{group.id}")}= group.name

Tweak markup for GROUPS tab on mini menu

.content
  .row
    .small-12.columns.panel
      %h5
        =current_distributor.name
        is part of:
      %ul.bullet-list
        - for group in current_distributor.groups
          %li
            %a{href: main_app.groups_path(anchor: "#/#group#{group.id}")}= group.name


.thread-item{ng-controller: "StanceCreatedItemController"}
  .thread-item__header.media
    .media-left
      %user_avatar{user: "stance.participant()", size: "small"}
    .media-body
      %h3.thread-item__title{id: "event-{{event.id}}"}
        %span{translate: "poll_thread_item.{{stance.poll().pollType}}.{{event.kind}}", translate-values: "{author: stance.participant().name}"}>
        %poll_common_stance_choice{ng-repeat: "choice in stance.stanceChoices()", ng-if: "choice.score > 0", stance_choice: "choice"}

      %p.lmo-markdown-wrapper{marked: "stance.reason"}
      %timeago.timeago--inline{timestamp: "event.createdAt"}

Fix spacing on stance created

.thread-item{ng-controller: "StanceCreatedItemController"}
  .thread-item__header.media.lmo-flex{layout: "row"}
    .media-left
      %user_avatar{user: "stance.participant()", size: "small"}
    .media-body.lmo-flex{layout: "column"}
      %h3.thread-item__title{id: "event-{{event.id}}", translate: "poll_thread_item.{{stance.poll().pollType}}.{{event.kind}}", translate-values: "{author: stance.participant().name}"}>
      %poll_common_stance_choice{ng-repeat: "choice in stance.stanceChoices()", ng-if: "choice.score > 0", stance_choice: "choice"}
      .lmo-markdown-wrapper{marked: "stance.reason", ng-if: "stance.reason"}
      %timeago.timeago--inline{timestamp: "event.createdAt"}


%h1= Investigation.display_name.pluralize

%table
  %tr
    %th= Investigation.display_name.pluralize
    %th Usage Count
  - @investigations.each do |investigation|
    %tr{:style=>"background-color: #{cycle("#FFF", "#EEE")}"}
      %td= investigation.name
      - unless session[:include_usage_count].blank?
        %td= investigation.offerings_count

Hide usage count header in print view, too

%h1= Investigation.display_name.pluralize

%table
  %tr
    %th= Investigation.display_name.pluralize
    - unless session[:include_usage_count].blank?
      %th Usage Count
  - @investigations.each do |investigation|
    %tr{:style=>"background-color: #{cycle("#FFF", "#EEE")}"}
      %td= investigation.name
      - unless session[:include_usage_count].blank?
        %td= investigation.offerings_count


= contextual_links

%h2= t_title

%table.list#days_list
  %tr
    %th= t_attr :date
    %th.currency= t_attr :cash
    %th.currency= t_attr :card_turnover
    %th.currency= t_attr :gross_turnover
    %th.currency= t_attr :net_turnover
    %th.currency= t_attr :client_count
    %th.currency= t_attr :expenses
    %th.currency= t_attr :credit_turnover
    %th.currency= t_attr :discount
    %th.action-links

  = render @days

Use pagination for days controller.

= contextual_links

%h2= t_title

= paginated_section @ccounts, :params => {:query => params[:query]} do
  %table.list#days_list
    %tr
      %th= t_attr :date
      %th.currency= t_attr :cash
      %th.currency= t_attr :card_turnover
      %th.currency= t_attr :gross_turnover
      %th.currency= t_attr :net_turnover
      %th.currency= t_attr :client_count
      %th.currency= t_attr :expenses
      %th.currency= t_attr :credit_turnover
      %th.currency= t_attr :discount
      %th.action-links

    = render @days


- content_for(:title) { "recent reservations" }

%h2 Recent reservations

.row
  .col-md-12
    = will_paginate @recent_reservations

.row
  .col-md-12

    %table.table.table-condensed.table-hover
      %thead
        %tr
          %th Server
          %th Reserved by
          %th Reserved from
          %th Reserved until
          - if current_admin || current_streamer
            %th Actions
      %tbody
        - @recent_reservations.each do |reservation|
          - klass = 'table-success' if reservation.active?
          - klass = 'table-info'    if reservation.future?
          %tr[reservation]{:class => klass}
            - server = reservation.server.decorate
            - user = reservation.user.decorate
            %td= server.name
            %td= link_to(user.nickname, user.steam_profile_url, :target => "_blank")
            %td= I18n.l(reservation.starts_at,  :format => :short)
            %td= I18n.l(reservation.ends_at,    :format => :short)
            - if current_admin || current_streamer
              %td.actions= render 'reservations/actions', :reservation => reservation

Allow reservations to have no server yet

- content_for(:title) { "recent reservations" }

%h2 Recent reservations

.row
  .col-md-12
    = will_paginate @recent_reservations

.row
  .col-md-12

    %table.table.table-condensed.table-hover
      %thead
        %tr
          %th Server
          %th Reserved by
          %th Reserved from
          %th Reserved until
          - if current_admin || current_streamer
            %th Actions
      %tbody
        - @recent_reservations.each do |reservation|
          - klass = 'table-success' if reservation.active?
          - klass = 'table-info'    if reservation.future?
          %tr[reservation]{:class => klass}
            - user = reservation.user.decorate
            - if reservation.server
              - server = reservation.server.decorate
              %td= server.name
            - else
              %td
            %td= link_to(user.nickname, user.steam_profile_url, :target => "_blank")
            %td= I18n.l(reservation.starts_at,  :format => :short)
            %td= I18n.l(reservation.ends_at,    :format => :short)
            - if current_admin || current_streamer
              %td.actions= render 'reservations/actions', :reservation => reservation