#login-content
  = form_with url: spree.spree_user_session_path, scope: :spree_user, data: { remote: "true" } do |form|
    .row
      .large-12.columns#login-feedback
        - confirmation_result = request.query_parameters[:validation]
        - if confirmation_result.in? ["confirmed", "not_confirmed"]
          .alert-box{ class: "#{confirmation_result == "confirmed" ? "success" : "alert" }" }
            = t("devise.confirmations.#{confirmation_result}")

    .row
      .large-12.columns
        = form.label :email, t(:email)
        = form.email_field :email, { tabindex: 1, inputmode: "email", autocomplete: "off", "data-login-modal-target": "email", "data-action": "input->login-modal#emailOnInput" }
    .row
      .large-12.columns
        = form.label :password, t(:password)
        = form.password_field :password, { tabindex: 2, inputmode: "password" }
    .row
      .large-12.columns
        = form.check_box :remember_me, { tabindex: 3 }
        = form.label :remember_me, t(:remember_me)
    .row
      .large-12.columns
        = form.submit t(:label_login), { class: "button primary", tabindex: 4 }

Drop spree prefix in path generation

#login-content
  = form_with url: spree_user_session_path, scope: :spree_user, data: { remote: "true" } do |form|
    .row
      .large-12.columns#login-feedback
        - confirmation_result = request.query_parameters[:validation]
        - if confirmation_result.in? ["confirmed", "not_confirmed"]
          .alert-box{ class: "#{confirmation_result == "confirmed" ? "success" : "alert" }" }
            = t("devise.confirmations.#{confirmation_result}")

    .row
      .large-12.columns
        = form.label :email, t(:email)
        = form.email_field :email, { tabindex: 1, inputmode: "email", autocomplete: "off", "data-login-modal-target": "email", "data-action": "input->login-modal#emailOnInput" }
    .row
      .large-12.columns
        = form.label :password, t(:password)
        = form.password_field :password, { tabindex: 2, inputmode: "password" }
    .row
      .large-12.columns
        = form.check_box :remember_me, { tabindex: 3 }
        = form.label :remember_me, t(:remember_me)
    .row
      .large-12.columns
        = form.submit t(:label_login), { class: "button primary", tabindex: 4 }


.row
  .col-md-10
    %h2 #{@organisation.login}
    = link_to "#{@organisation.login} on GitHub", "https://github.com/#{@organisation.login}", class: 'btn btn-default'

  .col-md-2
    .avatar= image_tag(@organisation.avatar_url, :width => 100, :alt => @organisation.login)

#users.row.clearfix
  .col-md-12

    %h3=t("organisations.members", count: @organisation.users.count)

    .users
      %ul.avatar-list.clearfix
        = render @organisation.users

#pull_requests
  %h3= t("organisations.pull_requests", count: @organisation.pull_request_count)
  = render @organisation.pull_requests

Add HTML to fix the generated images

.row
  .col-md-10
    %h2 #{@organisation.login}
    = link_to "#{@organisation.login} on GitHub", "https://github.com/#{@organisation.login}", class: 'btn btn-default'

  .col-md-2
    .avatar= image_tag(@organisation.avatar_url(160), :width => 80, :height => 80, :alt => @organisation.login)

#users.row.clearfix
  .col-md-12

    %h3=t("organisations.members", count: @organisation.users.count)

    .users
      %ul.avatar-list.clearfix
        = render @organisation.users

#pull_requests
  %h3= t("organisations.pull_requests", count: @organisation.pull_request_count)
  = render @organisation.pull_requests


- if @results.present?
  .container.form-container
    %h1 Results
    - @results.each do |result|
      %li= result

.container.form-container
  %h1 Requested accounts for your courses

  - if @courses.empty?
    %p No requested accounts
  - else
    - @courses.each do |title, requested_accounts|
      %h2= title
      %table.table.w100
        %thead
          %th.w25 Username
          %th Email
          %th.w25 Actions
        %tbody
          - requested_accounts.each do |account|
            %tr
              %td= account.username
              %td= account.email
              %td
                %a{href: "/requested_accounts/#{account.course.slug}/#{account.id}/delete", 'data-method': :delete}> Delete this request
      .container.mt2.mb2
        %a.button{href: "/requested_accounts/#{requested_accounts.first.course.slug}/create", 'data-method': :post} Create these accounts
    %hr
    .container.mt2.mb2
      %a.button.danger{href: "/requested_accounts", 'data-method': :post} Create all accounts

Add links to the courses in /requested_accounts

- if @results.present?
  .container.form-container
    %h1 Results
    - @results.each do |result|
      %li= result

.container.form-container
  %h1 Requested accounts for your courses

  - if @courses.empty?
    %p No requested accounts
  - else
    - @courses.each do |title, requested_accounts|
      - course_slug = requested_accounts.first.course.slug
      %h2
        %a{href: "/courses/#{course_slug}"}= title
      %table.table.w100
        %thead
          %th.w25 Username
          %th Email
          %th.w25 Actions
        %tbody
          - requested_accounts.each do |account|
            %tr
              %td= account.username
              %td= account.email
              %td
                %a{href: "/requested_accounts/#{course_slug}/#{account.id}/delete", 'data-method': :delete}> Delete this request
      .container.mt2.mb2
        %a.button{href: "/requested_accounts/#{course_slug}/create", 'data-method': :post} Create these accounts
    %hr
    .container.mt2.mb2
      %a.button.danger{href: "/requested_accounts", 'data-method': :post} Create all accounts


- conferences = Conference.creation_order.has_submission(current_user.person).limit(5)
- if conferences.to_a.count > 1
  %li.dropdown
    = link_to t("switch_conference", default: "Switch conference"), "#", class: "dropdown-toggle"
    %ul.dropdown-menu
      - conferences.each do |conference|
        - unless @conference == conference
          %li= link_to conference.acronym, cfp_person_path(conference_acronym: conference.acronym)
%li= link_to t("logout", default: "Logout"), destroy_user_session_path, method: :delete

Add "manage this" link to cfp view for admins

%li
  - if @conference && policy(@conference).manage?
    = link_to t("manage_conference", default: "Manage this conference"), conference_path(conference_acronym: @conference.acronym)
- conferences = Conference.creation_order.has_submission(current_user.person).limit(5)
- if conferences.to_a.count > 1
  %li.dropdown
    = link_to t("switch_conference", default: "Switch conference"), "#", class: "dropdown-toggle"
    %ul.dropdown-menu
      - conferences.each do |conference|
        - unless @conference == conference
          %li= link_to conference.acronym, cfp_person_path(conference_acronym: conference.acronym)
%li= link_to t("logout", default: "Logout"), destroy_user_session_path, method: :delete


- @disable_logo_link  = true
- content_for :head do
  = stylesheet_link_tag "application", media: "all"

- content_for :body_end do
  = javascript_include_tag "application"

= content_for :content do
  = csrf_meta_tags
  .outer-block
    .inner-block
      #primary-nav-bar
        - if user_signed_in?
          = render partial: 'layouts/primary_navigation'
      .container
        = render partial: 'layouts/flashes' unless flash.empty?
        %main.main-content
          = render_breadcrumbs
          = yield

= render template: 'layouts/moj_internal_template'

Add missing Phase banner on the sign in page

- @disable_logo_link  = true
- content_for :head do
  = stylesheet_link_tag "application", media: "all"

- content_for :body_end do
  = javascript_include_tag "application"

= content_for :content do
  = csrf_meta_tags
  .outer-block
    .inner-block
      #primary-nav-bar
        - if user_signed_in?
          = render partial: 'layouts/primary_navigation'
      .phase-banner
        %p
          %strong.phase-tag= config_item(:phase)
          %span
            This is a new service – your
            %a{href: "#"} feedback
            will help us to improve it.
      .container
        = render partial: 'layouts/flashes' unless flash.empty?
        %main.main-content
          = render_breadcrumbs
          = yield

= render template: 'layouts/moj_internal_template'


= content_for :page_title do
  Order Cycles

= content_for :page_actions do
  %li#new_order_cycle_link
    = button_link_to "New Order Cycle", main_app.new_admin_order_cycle_path, :icon => 'add', :id => 'admin_new_order_cycle_link'

= form_for @order_cycle_set, :url => main_app.bulk_update_admin_order_cycles_path do |f|
  %table.index#listing_order_cycles
    %colgroup
      %col
      %col{'style' => 'width: 20%;'}
      %col{'style' => 'width: 20%;'}
      %col
      %col
      %col
      %col
      %col
      %col

    %thead
      %tr
        %th Name
        %th Open
        %th Close
        %th Suppliers
        %th Coordinator
        %th Distributors
        %th Products
        %th.actions
        %th.actions

    %tbody
      = f.fields_for :collection do |order_cycle_form|
        = render 'admin/order_cycles/row', order_cycle_form: order_cycle_form

  = f.submit 'Update'

Add plus icon to new order cycles button

= content_for :page_title do
  Order Cycles

= content_for :page_actions do
  %li#new_order_cycle_link
    = button_link_to "New Order Cycle", main_app.new_admin_order_cycle_path, :icon => 'icon-plus', :id => 'admin_new_order_cycle_link'

= form_for @order_cycle_set, :url => main_app.bulk_update_admin_order_cycles_path do |f|
  %table.index#listing_order_cycles
    %colgroup
      %col
      %col{'style' => 'width: 20%;'}
      %col{'style' => 'width: 20%;'}
      %col
      %col
      %col
      %col
      %col
      %col

    %thead
      %tr
        %th Name
        %th Open
        %th Close
        %th Suppliers
        %th Coordinator
        %th Distributors
        %th Products
        %th.actions
        %th.actions

    %tbody
      = f.fields_for :collection do |order_cycle_form|
        = render 'admin/order_cycles/row', order_cycle_form: order_cycle_form

  = f.submit 'Update'


#author_info
  .right
    - if user_signed_in? && current_user.person != person
      - if @block.present?
        = link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
          :method => :delete,
          :class => "button"

      - else
        = aspect_membership_dropdown(contact, person, 'right')
    - elsif user_signed_in? && current_user.person == person
      = link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'

  %h2
    = person.name
  %span.diaspora_handle
    = person.diaspora_handle

  .description
    - if !person.tag_string.blank? && user_signed_in?
      = Diaspora::Taggable.format_tags(person.profile.tag_string)
      - if user_signed_in? && person == current_user.person
        %span.hover_edit
          = link_to t('.edit'), edit_profile_path
    - else
      - if user_signed_in? && person == current_user.person
        %i
          = t('.you_have_no_tags')
          %span.add_tags
            = link_to t('.add_some'), edit_profile_path
  - if user_signed_in? && person == current_user.person && current_page?(controller: :people, action: :show)
    %hr
    = render 'aspects/aspect_stream', :stream => @stream
%hr

Fix and simplify current_page? check on profile page

#author_info
  .right
    - if user_signed_in? && current_user.person != person
      - if @block.present?
        = link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
          :method => :delete,
          :class => "button"

      - else
        = aspect_membership_dropdown(contact, person, 'right')
    - elsif user_signed_in? && current_user.person == person
      = link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'

  %h2
    = person.name
  %span.diaspora_handle
    = person.diaspora_handle

  .description
    - if !person.tag_string.blank? && user_signed_in?
      = Diaspora::Taggable.format_tags(person.profile.tag_string)
      - if user_signed_in? && person == current_user.person
        %span.hover_edit
          = link_to t('.edit'), edit_profile_path
    - else
      - if user_signed_in? && person == current_user.person
        %i
          = t('.you_have_no_tags')
          %span.add_tags
            = link_to t('.add_some'), edit_profile_path
  - if user_signed_in? && current_page?(person_path current_user.person)
    %hr
    = render 'aspects/aspect_stream', :stream => @stream
%hr


- page_title @blob.path, @ref

= render 'projects/last_push'

%div#tree-holder.tree-holder
  = render 'blob', blob: @blob

- if can_edit_blob?(@blob)
  = render 'projects/blob/remove'

  - title = "Replace #{@blob.name}"
  = render 'projects/blob/upload', title: title, placeholder: title, button_title: 'Replace file', form_path: namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put

Add sub nav to file view

- @no_container = true
- page_title @blob.path, @ref
= render "projects/commits/head"

%div{ class: (container_class) }
  = render 'projects/last_push'

  %div#tree-holder.tree-holder
    = render 'blob', blob: @blob

  - if can_edit_blob?(@blob)
    = render 'projects/blob/remove'

    - title = "Replace #{@blob.name}"
    = render 'projects/blob/upload', title: title, placeholder: title, button_title: 'Replace file', form_path: namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put


.header
  %h1 Edit #{resource_name.to_s.humanize}

.content
  %section
    = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'pure-form pure-form-aligned' }) do |f|
      = devise_error_messages!
      %fieldset
        .pure-control-group
          = f.label :email
          = f.email_field :email, :autofocus => true
          - if devise_mapping.confirmable? && resource.pending_reconfirmation?
            %small
              Currently waiting confirmation for: #{resource.unconfirmed_email}
        .pure-control-group
          = f.label :password
          = f.password_field :password, :autocomplete => "off"
          %small leave blank if you don't want to change it
        .pure-control-group
          = f.label :password_confirmation
          = f.password_field :password_confirmation
        .pure-control-group
          = f.label :current_password
          = f.password_field :current_password
          %small we need your current password to confirm your changes
        .pure-controls
          = f.submit "Update", class: 'pure-button pure-button-primary'

  %section
    %h1 Cancel my account
    %p
      Unhappy? #{button_to "Cancel my account", registration_path(resource_name), data: { confirm: 'Are you sure?' }, method: :delete, class: 'pure-button'}

  %section
    = link_to "Back", :back

Revise forms for player's profile.

.header
  %h1 Edit Profile

.content
  %section
    = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'pure-form pure-form-aligned' }) do |f|
      = devise_error_messages!
      %fieldset
        .pure-control-group
          = f.label :name
          = f.text_field :name, required: true
        .pure-control-group
          = f.label :email
          = f.email_field :email, :autofocus => true, required: true
          - if devise_mapping.confirmable? && resource.pending_reconfirmation?
            %small
              Currently waiting confirmation for: #{resource.unconfirmed_email}
        .pure-control-group
          = f.label :password
          = f.password_field :password, :autocomplete => "off"
          %small leave this blank if you don't want to change it
        .pure-control-group
          = f.label :password_confirmation
          = f.password_field :password_confirmation
        .pure-control-group
          = f.label :current_password
          = f.password_field :current_password, required: true
          %small we need your current password to confirm your changes
        .pure-controls
          = f.submit "Update", class: 'pure-button pure-button-primary'

  %section
    %h1 Delete my account
    %p
      Unhappy? #{button_to "Delete my account", registration_path(resource_name), data: { confirm: 'Are you sure?' }, method: :delete, class: 'pure-button'}

  %section
    = link_to "Back", :back


.speaker.clearfix
  = f.simple_fields_for :speakers, f.object.speakers do |speaker_fields|
    - speaker = speaker_fields.object.decorate
    = link_to (edit_profile_path) do
      = speaker.gravatar
      %h4
        = speaker.name_and_email
        %br
        .help-block.small Edit my profile

    .clearfix
    %p
      This information will be
      %strong hidden
      from the review committee.

    = speaker_fields.hidden_field :person_id, value: speaker.person_id

    = speaker_fields.input :bio, maxlength: :lookup,
      placeholder: 'Bio for the event program.',
      input_html: { value: speaker.bio, rows: 4 },
      hint: 'Bio is limited to 500 characters.'

Remove link to edit profile in proposal form

.speaker.clearfix
  = f.simple_fields_for :speakers, f.object.speakers do |speaker_fields|
    - speaker = speaker_fields.object.decorate
    = speaker.gravatar
    %h4
      = speaker.name_and_email

    .clearfix
    %p
      This information will be
      %strong hidden
      from the review committee.

    = speaker_fields.hidden_field :person_id, value: speaker.person_id

    = speaker_fields.input :bio, maxlength: :lookup,
      placeholder: 'Bio for the event program.',
      input_html: { value: speaker.bio, rows: 4 },
      hint: 'Bio is limited to 500 characters.'


%h1= t_title

%table.list
  %tr
    %th Datum
    %th Wochentag
    %th.number Soll-Stunden
    %th.number Stunden
    %th.number Über-/Unterzeit
    %th.number Saldo

  - overall_overtime = 0
  - @work_days.each do |day|
    - overall_overtime += day.overtime
    %tr
      %td= day.date
      %td= l(day.date, :format => '%A')
      %td.number= day.hours_due
      %td.number= day.hours_worked
      %td.number= day.overtime
      %td.number= overall_overtime

Include link to new activity in thimesheet.

.contextual
  = contextual_link_to :new, Activity

%h1= t_title

%table.list
  %tr
    %th Datum
    %th Wochentag
    %th.number Soll-Stunden
    %th.number Stunden
    %th.number Über-/Unterzeit
    %th.number Saldo

  - overall_overtime = 0
  - @work_days.each do |day|
    - overall_overtime += day.overtime
    %tr
      %td= day.date
      %td= l(day.date, :format => '%A')
      %td.number= day.hours_due
      %td.number= day.hours_worked
      %td.number= day.overtime
      %td.number= overall_overtime


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

Set facepile default width to auth form width

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


-#
-# Parameters:
-#    widget: MiqWidget object
-#
%div.modboxin.rss_widget
  - style =  @sb[:dashboards][@sb[:active_db]][:minimized].include?(widget.id) ? 'display:none' : ''
  %div.mc{:id => "dd_w#{widget.id}_box", :style => style}
    - if widget.contents_for_user(session[:userid]).contents.blank?
      No RSS Feed data found . . .
    - else
      = widget.contents_for_user(session[:userid]).contents.gsub("https://localhost:3000",
          "#{request.protocol}://#{request.host}:#{request.port}").html_safe

Simplify HAML code using hidden_div_if.

-#
-# Parameters:
-#    widget: MiqWidget object
-#
%div.modboxin.rss_widget
  = hidden_div_if(@sb[:dashboards][@sb[:active_db]][:minimized].include?(widget.id), :id => "dd_w#{widget.id}_box") do
    - if widget.contents_for_user(session[:userid]).contents.blank?
      No RSS Feed data found . . .
    - else
      = widget.contents_for_user(session[:userid]).contents.gsub("https://localhost:3000",
          "#{request.protocol}://#{request.host}:#{request.port}").html_safe


.project_clone_panel
  .row
    .span8
      .form-horizontal= render "shared/clone_panel"
    .span3.pull-right
      .pull-right
        - unless @project.empty_repo?
          - if can? current_user, :download_code, @project
            = link_to archive_project_repository_path(@project), class: "btn grouped" do
              %i.icon-download-alt
              Download

            = link_to tags_project_repository_path(@project), class: "btn grouped only-wide", title: 'Git Tags' do
              %i.icon-tags

            .dropdown.pull-right
              %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
                %i.icon-plus
                Add new
                %b.caret
              %ul.dropdown-menu
                - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
                  %li
                    = link_to new_project_merge_request_path(@project), title: "New Merge Request" do
                      Merge Request
                - if @project.issues_enabled && can?(current_user, :write_issue, @project)
                  %li
                    = link_to url_for_new_issue, title: "New Issue" do
                      Issue
                - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
                  %li
                    = link_to new_project_snippet_path(@project), title: "New Snippet" do
                      Snippet

Add link to quickly add new team member from project panel

.project_clone_panel
  .row
    .span8
      .form-horizontal= render "shared/clone_panel"
    .span3.pull-right
      .pull-right
        - unless @project.empty_repo?
          - if can? current_user, :download_code, @project
            = link_to archive_project_repository_path(@project), class: "btn grouped" do
              %i.icon-download-alt
              Download

            = link_to tags_project_repository_path(@project), class: "btn grouped only-wide", title: 'Git Tags' do
              %i.icon-tags

            .dropdown.pull-right
              %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
                %i.icon-plus
                Add new
                %b.caret
              %ul.dropdown-menu
                - if @project.issues_enabled && can?(current_user, :write_issue, @project)
                  %li
                    = link_to url_for_new_issue, title: "New Issue" do
                      Issue
                - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
                  %li
                    = link_to new_project_merge_request_path(@project), title: "New Merge Request" do
                      Merge Request
                - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
                  %li
                    = link_to new_project_snippet_path(@project), title: "New Snippet" do
                      Snippet
                - if @project.issues_enabled && can?(current_user, :admin_team_member, @project)
                  %li.divider
                  %li
                    = link_to new_project_team_member_path(@project), title: "New Team member" do
                      Team member


%main.row
  .cell.well.well--l
    .js-search
      .split
        .split-cell.form.form--inline
          = form_tag articles_path, method: :get, remote: true, class: 'js-search-form' do
            = search_field_tag :search, params[:search],
              class: 'form-input js-search-input',
              placeholder: "Search #{@articles.count} articles by keyword",
              autofocus: true
        .split-cell.mls.prs
          = render partial: "filter_link", locals: { name: "fresh", definition: Article::FRESHNESS }
          = render partial: "filter_link", locals: { name: "stale", definition: Article::STALENESS }
          = render partial: "filter_link", locals: { name: "rotten", definition: Article::ROTTENNESS }

        .split-cell.pls.bdrl
          = render partial: "filter_link", locals: { name: "popular", definition: Article::POPULARITY }
          = render partial: "filter_link", locals: { name: "archived", definition: Article::ARCHIVAL }

      %ul.list.list--xs.js-search-results
        = render @articles

    .split.mtm.mbm.fr
      .split-cell
        = link_to "Article Subscriptions", subscriptions_path, class: "btn btn--b mls"
        = link_to "Article Endorsements", endorsements_path, class: "btn btn--b mls"

Simplify article index style integration

%main.row
  .cell.well.well--l

    .js-search.mbm
      .split
        .split-cell.form.form--inline
          = form_tag articles_path, method: :get, remote: true, class: 'js-search-form' do
            = search_field_tag :search, params[:search],
              class: 'form-input js-search-input',
              placeholder: "Search #{ @articles.count } articles by keyword",
              autofocus: true

        .split-cell.mls.prs
          = render partial: 'filter_link', locals: { name: 'fresh', definition: Article::FRESHNESS }
          = render partial: 'filter_link', locals: { name: 'stale', definition: Article::STALENESS }
          = render partial: 'filter_link', locals: { name: 'rotten', definition: Article::ROTTENNESS }

        .split-cell.pls.bdrl
          = render partial: 'filter_link', locals: { name: 'popular', definition: Article::POPULARITY }
          = render partial: 'filter_link', locals: { name: 'archived', definition: Article::ARCHIVAL }

      %ul.list.list--xs.js-search-results
        = render @articles

    .tar
      = link_to 'Article Subscriptions', subscriptions_path, class: 'btn btn--b mrs'
      = link_to 'Article Endorsements', endorsements_path, class: 'btn btn--b'


%table
  %thead
    %tr
      %th{colspan: 6} Monthly Report
    - 1.upto(1.month.ago.end_of_month.day) do |num_days|
      - day = 1.month.ago.end_of_month - (num_days - 1).days
      - posts = Post.where(tagged_at: day.beginning_of_day .. day.end_of_day)
      - if posts.present?
        %tr
          %th.subber{colspan: 6}= day.strftime("%b %d, %Y")
        %tr
          %th.sub.width-15
          %th.sub Thread
          %th.sub Continuity
          %th.sub Authors
          %th.sub Replies
          %th.sub Last Updated
        - posts.each do |post|
          = render partial: 'posts/list_item', locals: {post: post, hide_continuity: false}

Hide private posts from the monthly list

%table
  %thead
    %tr
      %th{colspan: 6} Monthly Report
    - 1.upto(1.month.ago.end_of_month.day) do |num_days|
      - day = 1.month.ago.end_of_month - (num_days - 1).days
      - posts = Post.where(tagged_at: day.beginning_of_day .. day.end_of_day)
      - if posts.present?
        %tr
          %th.subber{colspan: 6}= day.strftime("%b %d, %Y")
        %tr
          %th.sub.width-15
          %th.sub Thread
          %th.sub Continuity
          %th.sub Authors
          %th.sub Replies
          %th.sub Last Updated
        - posts.each do |post|
          - next unless post.visible_to?(current_user)
          = render partial: 'posts/list_item', locals: {post: post, hide_continuity: false}


= semantic_form_for @user do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :email
    = f.input :password, :hint => !f.object.new_record?, :input_html => {:autocomplete => "off"}
    = f.input :password_confirmation
    -# f.input :current_password, :required => true unless can?(:manage, User)
    = f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple'}, :required => true if can?(:manage, Role)

  = f.buttons do
    = f.commit_button

Use roles_for_collection helper, not class method from Ability in users form.

= semantic_form_for @user do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :email
    = f.input :password, :hint => !f.object.new_record?, :input_html => {:autocomplete => "off"}
    = f.input :password_confirmation
    -# f.input :current_password, :required => true unless can?(:manage, User)
    = f.input :role_texts, :as => :select, :collection => roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple'}, :required => true if can?(:manage, Role)

  = f.buttons do
    = f.commit_button


.box.next-step
  .header-box
    %span= t(:agreement_state)
    %span{class: css_class_for_agreement_status(@agreement_revision.state)}
      = t(@agreement_revision.state)
  .body-box
    .event
      %p
        %strong Próximo Paso
        %br Revisión borrador Fiscal
      %p
        Responsable: Alberto Fuenzalida
        %br
        Contacto: alberto@mail.com

Remove next_step from agreement show, when agrement is signed

.box.next-step
  .header-box
    %span= t(:agreement_state)
    %span{class: css_class_for_agreement_status(@agreement_revision.state)}
      = t(@agreement_revision.state)
  - unless @agreement.state == 'signed'
    .body-box
      .event
        %p
          %strong= t(:next_step)
          %br= t(@agreement.next_step + '_log')
        %p
          Responsable: Alberto Fuenzalida
          %br
          Contacto: alberto@mail.com


.col.col-lg-12.col-md-12.col-sm-12.col-xs-12.center.badge-info#todo{"data-target" => "#toDoList", "data-toggle" => "collapse"}
  %h4.center Due This Week
  %div{:id => "toDoList", :class => "collapse clear"}
    - current_course_data.by_assignment_type.each do |assignment_type, assignments|
      -# Do not use `assignment_type.has_soon_assignments?' It will trigger a query.
      - if assignments.any?(&:soon?) && assignment_type.name != "Attendance"
        %h5= "#{assignment_type.try(:name)}"
        - assignments.each do |assignment|
          - if assignment.soon?
            - if current_student_data.submission_for_assignment?(assignment)
              %div.submitted
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - else
              %div
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - if assignment.accepts_submissions?
              - if assignment.is_individual?
                = render "students/submissions", assignment: assignment
              - else
                = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)

Hide invisible assignments on the to do list

.col.col-lg-12.col-md-12.col-sm-12.col-xs-12.center.badge-info#todo{"data-target" => "#toDoList", "data-toggle" => "collapse"}
  %h4.center Due This Week
  %div{:id => "toDoList", :class => "collapse clear"}
    - current_course_data.by_assignment_type.each do |assignment_type, assignments|
      -# Do not use `assignment_type.has_soon_assignments?' It will trigger a query.
      - if assignments.any?(&:soon?) && assignment_type.name != "Attendance"
        %h5= "#{assignment_type.try(:name)}"
        - assignments.each do |assignment|
          - if assignment.soon? && assignment.visible?
            - if current_student_data.submission_for_assignment?(assignment)
              %div.submitted
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - else
              %div
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - if assignment.accepts_submissions?
              - if assignment.is_individual?
                = render "students/submissions", assignment: assignment
              - else
                = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)


%main.row
  .cell.well.well--l

    - if user_signed_in?
      .g
        %main.g-b.g-b--2of3
          .search-bar
            = form_tag articles_path, method: :get, remote: true do
              = search_field_tag :search, params[:search], placeholder: "Search articles by keyword"
              = submit_tag "Search", class: "btn-a"

          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }

Move 'New Article' button above article list

%main.row
  .cell.well.well--l

    - if user_signed_in?
      .g
        %main.g-b.g-b--2of3
          .split.search-bar.mbm
            .split-item
              .split-cell.split-cell--fluid
                = form_tag articles_path, method: :get, remote: true do
                  = search_field_tag :search, params[:search], placeholder: "Search articles by keyword"
              .split-cell.split-cell--fixed
                = link_to "New Article", new_article_url, class: 'btn btn--a'
          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }


.blank-slate-pf{:style => 'border: 0'}
  .blank-slate-pf-icon
    %span.pficon.pficon-add-circle-o
  %h1= _("Add a Provider")
  %p
    = _("You don't have any providers to display. Please add a Provider.")
  %p
    = _("Learn more about this")
    %a{:href => documentation,
       :target => '_blank'}
      = _("in the documentation.")
  .blank-slate-pf-main-action
    - title = _("Add a Provider")
    - if @explorer
      = button_tag(title,
      :class => 'btn btn-primary btn-lg',
      :title => add_message,
      :onclick => "miqAjaxButton('#{url_for_only_path(:action => 'new')}');")
    - else
      = link_to(title,
      {:action => 'new'},
      :class => 'btn btn-primary btn-lg',
      "data-miq_sparkle_on" => true,
      "data-miq_sparkle_off" => true,
      "data-method" => :post,
      :title => add_message)

Add error message div to empty provider page

= render :partial => "layouts/flash_msg"
.blank-slate-pf{:style => 'border: 0'}
  .blank-slate-pf-icon
    %span.pficon.pficon-add-circle-o
  %h1= _("Add a Provider")
  %p
    = _("You don't have any providers to display. Please add a Provider.")
  %p
    = _("Learn more about this")
    %a{:href => documentation,
       :target => '_blank'}
      = _("in the documentation.")
  .blank-slate-pf-main-action
    - title = _("Add a Provider")
    - if @explorer
      = button_tag(title,
      :class => 'btn btn-primary btn-lg',
      :title => add_message,
      :onclick => "miqAjaxButton('#{url_for_only_path(:action => 'new')}');")
    - else
      = link_to(title,
      {:action => 'new'},
      :class => 'btn btn-primary btn-lg',
      "data-miq_sparkle_on" => true,
      "data-miq_sparkle_off" => true,
      "data-method" => :post,
      :title => add_message)


:javascript
  GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
  GitLab.GfmAutoComplete.Emoji.assetBase = '/assets/emoji'
  GitLab.GfmAutoComplete.setup();

Add support for relative url to GitLab.GfmAutoComplete.Emoji.assetBase

:javascript
  GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
  GitLab.GfmAutoComplete.Emoji.assetBase = "#{Gitlab.config.gitlab.relative_url_root + '/assets/emoji'}"
  GitLab.GfmAutoComplete.setup();


-load i18n

.modal-header
  %h3.modal-title
    - trans "Open Case"
  .modal-body
    %p
      - trans "Open a new case for this contact? This will archive all messages from the contact."

    %form{ name:"form", novalidate:"" }
      .form-group{ ng-class:'{"has-error": form.summary.$invalid}' }
        %label.control-label
          - trans "Summary"
        %textarea.form-control{ ng-model:"fields.summary.val", ng-maxlength:"fields.summary.maxLength", name:"summary", required:"" }
        .help-block{ ng-show:"form.summary.$error.required" }
          - trans "Required"
        .help-block{ ng-show:"form.summary.$error.maxlength" }
          - trans "Too long"
      .form-group{ ng-if:"partners != null" }
        %label.control-label
          - trans "Assign to"
        %select.form-control{ ng-model:"fields.assignee.val", ng-options:"p.name for p in partners track by p.id" }
  .modal-footer
    %button.btn.btn-primary{ ng-click:"ok()" }
      - trans "Open"
    %button.btn.btn-default{ ng-click:"cancel()" }
      - trans "Cancel"

Add to new case modal template dropdown to select user

-load i18n

.modal-header
  %h3.modal-title
    - trans "Open Case"
  .modal-body
    %p
      - trans "Open a new case for this contact? This will archive all messages from the contact."

    %form{ name:"form", novalidate:"" }
      .form-group{ ng-class:'{"has-error": form.summary.$invalid}' }
        %label.control-label
          - trans "Summary"
        %textarea.form-control{ ng-model:"fields.summary.val", ng-maxlength:"fields.summary.maxLength", name:"summary", required:"" }
        .help-block{ ng-show:"form.summary.$error.required" }
          - trans "Required"
        .help-block{ ng-show:"form.summary.$error.maxlength" }
          - trans "Too long"
      .form-group{ ng-if:"partners != null" }
        %label.control-label
          - trans "Assign to partner/user"
        %select.form-control{ ng-model:"fields.assignee.val", ng-options:"p.name for p in partners track by p.id", ng-change:"refreshUserList()" }
        %select.form-control{ ng-model:"fields.user.val", ng-options:"u.name for u in users track by u.id" }
  .modal-footer
    %button.btn.btn-primary{ ng-click:"ok()" }
      - trans "Open"
    %button.btn.btn-default{ ng-click:"cancel()" }
      - trans "Cancel"


.callout
  %h3
    Install GitLab in 2 minutes
  %h4
    With Ubuntu, Debian, CentOS and Raspbian packages or from source
  %a.btn.btn-lg.btn-red{ href: "/download/" } Install GitLab Now

Fix broken link on Install callout

.callout
  %h3
    Install GitLab in 2 minutes
  %h4
    With Ubuntu, Debian, CentOS and Raspbian packages or from source
  %a.btn.btn-lg.btn-red{ href: "/downloads/" } Install GitLab Now


%nav.navbar.navbar-default{:role=>"navigation"}
%div.container
  %div.page-header
    %h1 12/#{@advent_calendar_item.date}のAdventCalendar情報
    %h1 #{@advent_calendar_item.date}日目(12/#{@advent_calendar_item.date})のAdventCalendar情報
    %hr
    %h3 お名前
    = @advent_calendar_item.user_name + "さん"
    %h3 コメント
    = @advent_calendar_item.comment
    %p.advent-calendar-item-link
      = link_to "名前とコメントを編集する", edit_advent_calendar_item_path(id:@advent_calendar_item.id), class:"btn btn-success"
  %div.page-header
    %h2 記事の投稿
    %hr
    - if @advent_calendar_item.item
      記事が登録されています
      %p.advent-calendar-item-link
        = link_to "投稿記事を編集する", edit_item_path(id:@advent_calendar_item.item.id), class:"btn btn-success"
    - else
      記事が投稿されていません
      %p.advent-calendar-item-link
        = link_to "記事を登録する", new_item_path(id: @advent_calendar_item.id), class:"btn btn-success"

Remove old h1 of AdventCalendarItem show

%nav.navbar.navbar-default{:role=>"navigation"}
%div.container
  %div.page-header
    %h1 #{@advent_calendar_item.date}日目(12/#{@advent_calendar_item.date})のAdventCalendar情報
    %hr
    %h3 お名前
    = @advent_calendar_item.user_name + "さん"
    %h3 コメント
    = @advent_calendar_item.comment
    %p.advent-calendar-item-link
      = link_to "名前とコメントを編集する", edit_advent_calendar_item_path(id:@advent_calendar_item.id), class:"btn btn-success"
  %div.page-header
    %h2 記事の投稿
    %hr
    - if @advent_calendar_item.item
      記事が登録されています
      %p.advent-calendar-item-link
        = link_to "投稿記事を編集する", edit_item_path(id:@advent_calendar_item.item.id), class:"btn btn-success"
    - else
      記事が投稿されていません
      %p.advent-calendar-item-link
        = link_to "記事を登録する", new_item_path(id: @advent_calendar_item.id), class:"btn btn-success"


#space-admin-tabs.page-tabs.page-tabs-full
  .btn-group{ :"data-toggle" => "buttons-radio" }
    = link_to t('.general_options'), edit_space_path(@space), spaces_admin_menu_select_if(:main, :class => "btn btn-small")

    - if can?(:manage_news, @space)
      = link_to t('.news'), space_news_index_path(@space), spaces_admin_menu_select_if(:news, :class => "btn btn-small")

    - if can?(:manage_join_requests, @space)
      = link_to t('.invite'), invite_space_join_requests_path(@space), spaces_admin_menu_select_if(:invite, :class => "btn btn-small")
      = link_to t('.admissions'), space_join_requests_path(@space), spaces_admin_menu_select_if(:admissions, :class => "btn btn-small")

    - if can?(:user_permissions, @space)
      = link_to t('.users'), user_permissions_space_path(@space), spaces_admin_menu_select_if(:users, :class => "btn btn-small")

    - if can?(:webconference_options, @space.bigbluebutton_room)
      = link_to t('.webconf_options'), webconference_options_space_path(@space), spaces_admin_menu_select_if(:webconference_options, :class => "btn btn-small")

Fix permission check on space admin tabs after 38bccab

#space-admin-tabs.page-tabs.page-tabs-full
  .btn-group{ :"data-toggle" => "buttons-radio" }
    = link_to t('.general_options'), edit_space_path(@space), spaces_admin_menu_select_if(:main, :class => "btn btn-small")

    - if can?(:manage_news, @space)
      = link_to t('.news'), space_news_index_path(@space), spaces_admin_menu_select_if(:news, :class => "btn btn-small")

    - if can?(:manage_join_requests, @space)
      = link_to t('.invite'), invite_space_join_requests_path(@space), spaces_admin_menu_select_if(:invite, :class => "btn btn-small")
      = link_to t('.admissions'), space_join_requests_path(@space), spaces_admin_menu_select_if(:admissions, :class => "btn btn-small")

    - if can?(:user_permissions, @space)
      = link_to t('.users'), user_permissions_space_path(@space), spaces_admin_menu_select_if(:users, :class => "btn btn-small")

    - if can?(:webconference_options, @space)
      = link_to t('.webconf_options'), webconference_options_space_path(@space), spaces_admin_menu_select_if(:webconference_options, :class => "btn btn-small")


%span.label.pull-right{:class => intervention.referral && "label-warning"}
  = "Referral" if intervention.referral
  - if intervention.workshops.try(">", 0)
    = " - " if intervention.referral
    = pluralize(intervention.workshops, "workshop")
%h5
  = intervention.pi_type
  —
  = intervention.referral_category
%p
  - if intervention.incident_date
    %b= pretty_date(intervention.incident_date) + ":"
  - case event.transition
  - when :create
    = intervention.referral_text
  - when :complete
    = intervention.disc_text

Hide labels on interventions if they're empty

- if intervention.workshops.try(">", 0) or intervention.referral
  %span.label.pull-right{:class => intervention.referral && "label-warning"}
    = "Referral" if intervention.referral
    - if intervention.workshops.try(">", 0)
      = " - " if intervention.referral
      = pluralize(intervention.workshops, "workshop")
%h5
  = intervention.pi_type
  —
  = intervention.referral_category
%p
  - if intervention.incident_date
    %b= pretty_date(intervention.incident_date) + ":"
  - case event.transition
  - when :create
    = intervention.referral_text
  - when :complete
    = intervention.disc_text


%ul.breadcrumb
  %li
    = link_to 'URLs', root_path
    %span.divider /
  %li= @url.name

%h3 Snapshots
%table.table
  %tr
    %td
      %strong Website URL:
    %td= link_to @url.address, @url.address, target: '_blank'
  %tr
    %td
      %strong Viewport width:
    %td= pluralize(@url.viewport_width, 'pixel')
  %tr
    %td
      %strong Number of snapshots:
    %td= @url.snapshots.count
  - if @url.snapshots.count > 0
    %tr
      %td
        %strong Latest snapshot:
      %td= time_ago_in_words(@url.snapshots.first.created_at) + ' ago'

= form_for Snapshot.new, class: 'form' do |f|
  = hidden_field_tag :url, @url.id
  = f.submit 'Create new snapshot', class: 'btn btn-primary'

.clearfix
  = render @url.snapshots

Make it more obvious that snapshots are taken automatically

%ul.breadcrumb
  %li
    = link_to 'URLs', root_path
    %span.divider /
  %li= @url.name

%h3 Snapshots
%table.table
  %tr
    %td
      %strong Website URL:
    %td= link_to @url.address, @url.address, target: '_blank'
  %tr
    %td
      %strong Viewport width:
    %td= pluralize(@url.viewport_width, 'pixel')
  %tr
    %td
      %strong Number of snapshots:
    %td= @url.snapshots.count
  - if @url.snapshots.count > 0
    %tr
      %td
        %strong Latest snapshot:
      %td= time_ago_in_words(@url.snapshots.first.created_at) + ' ago'

= form_for Snapshot.new, class: 'form' do |f|
  = hidden_field_tag :url, @url.id
  Snapshots are taken every hour. If you are impatient, you can
  = f.submit 'Create a new snapshot', class: 'btn btn-info'
  manually.

.clearfix
  = render @url.snapshots


- content_for :breadcrumbs do
  = breadcrumbs(Home.path + @group.path + ['Organogram'])

- @page_title = "#{ @group.name } Organogram"
.organogram
  .group-title
    - if @group.acronym?
      %h1
        = @group.acronym
        team organogram
    - else
      %h1
        = @group.name
        team organogram

  - if @group.leaderships.present?
    %div.inner-block
      %div.grid-wrapper.leaders
        %h2 Team leaders
        - @group.leaderships_by_person.each do |person, leaderships|
          %div.leader= render partial: 'leaderships', object: leaderships, locals: { person: person }

  - if @group.all_people.present?
    %div.inner-block
      %div.grid-wrapper.people
        %h2 People
        - @group.all_people.each do |person, summary|
          %div.person
            .image-background
              = profile_image_tag person
            %h4= link_to person, person
            .role= person.role_names
            .tel= person.primary_phone_number

  - if @group.children.present?
    %div.inner-block
      %div.grid-wrapper.teams
        %h2 Teams
        - @group.children.each do |subgroup|
          %div.team
            .image-background
              .maginot
                =image_tag ('medium_team.png')
            %a{ href: url_for(subgroup) }
              %h3= subgroup

Add new route for organogram page


= simple_form_for(@preference, html: { class: 'form-horizontal' }) do |f|
  = f.input :name, as: :string
  = f.input :value, as: :string
  .form-actions
    = f.button :submit, class: 'btn btn-primary'

Make preferences values textarea wider

= simple_form_for(@preference, html: { class: 'form-horizontal' }) do |f|
  = f.input :name, as: :string
  = f.input :value, as: :text, input_html: { class: 'input-xxlarge' }
  .form-actions
    = f.button :submit, class: 'btn btn-primary'


!!! 5
!!!

%html
  %head
    %link{ :href => "css/bootstrap.min.css", :rel => "stylesheet" }
    %link{ :href => "css/bootstrap-responsive.min.css", :rel => "stylesheet" }
    %link{ :href => "css/main.css", :rel => "stylesheet" }
    %title Versionator
  %body
    %nav
      .navbar.navbar-fixed-top
        .navbar-inner
          .container
            =link_to "#{image("nav-index")} Versionator", '/', :class => "brand"

            %ul.nav
              %li= link_to("#{image("nav-installations")} Installations", '/')
              %li
                %button.btn.js-refresh-installations-button
                  %i.icon-refresh
                  Reload
                  = busy_indicator

            %ul.nav.pull-right
              %li.about= link_to("#{image("nav-about")} About", '/about')

    #content.container-fluid
      = yield

    %script{ :src => "js/jquery.min.js" }
    %script{ :src => "js/bootstrap.min.js" }
    %script{ :src => "js/handlers.js", :defer => true }
    %script{ :src => "js/misc.js", :defer => true }
    %script{ :src => "js/render.js", :defer => true }

Add loading jQuery from CDN

!!! 5
!!!

%html
  %head
    %link{ :href => "css/bootstrap.min.css", :rel => "stylesheet" }
    %link{ :href => "css/bootstrap-responsive.min.css", :rel => "stylesheet" }
    %link{ :href => "css/main.css", :rel => "stylesheet" }
    %title Versionator
  %body
    %nav
      .navbar.navbar-fixed-top
        .navbar-inner
          .container
            =link_to "#{image("nav-index")} Versionator", '/', :class => "brand"

            %ul.nav
              %li= link_to("#{image("nav-installations")} Installations", '/')
              %li
                %button.btn.js-refresh-installations-button
                  %i.icon-refresh
                  Reload
                  = busy_indicator

            %ul.nav.pull-right
              %li.about= link_to("#{image("nav-about")} About", '/about')

    #content.container-fluid
      = yield

    %script{ :src => "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" }
    -# fall back if CDN fails
    :javascript
      window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>');
    %script{ :src => "js/bootstrap.min.js" }
    %script{ :src => "js/handlers.js", :defer => true }
    %script{ :src => "js/misc.js", :defer => true }
    %script{ :src => "js/render.js", :defer => true }


- content_for(:title, 'Cologne Digital Sanskrit Dictionaries (search)')

%h1 Cologne Digital Sanskrit Dictionaries

= render 'search_form'

- if !@results[:exact].all? { |dict, results| results.empty? }
  %section.results.exact
    %h2 Exact matches
    %details
      - total_results = @results[:exact].map { |d,r| r.count }.inject(&:+)
      %summary= "#{total_results} results"
      - @results[:exact].each do |dict, results|
        %p= "#{results.count} results in #{dict.handle}"
    - @results[:exact].each do |dict, exact_results|
      %div
        %p= "Matches in #{dict.handle}"
        - exact_results.each do |exact_result|
          = render 'entry', :lemma => exact_result
    %h3 Adjacent lemmas
    %ul.adjacent
      - @results[:preceding].each do |dict, prec_results|
        - prec_results.each do |prec_result|
          = render 'adjacent_entry', :lemma => prec_result
      %li.term= "#{@query[:term]}"
      - @results[:following].each do |dict, follow_results|
        - follow_results.each do |follow_result|
          = render 'adjacent_entry', :lemma => follow_result

- if !@results[:similar].empty?
  = render 'similar_entries', :similar_entries => @results[:similar]

Disable adjacent lemmas for the moment

- content_for(:title, 'Cologne Digital Sanskrit Dictionaries (search)')

%h1 Cologne Digital Sanskrit Dictionaries

= render 'search_form'

- if !@results[:exact].all? { |dict, results| results.empty? }
  %section.results.exact
    %h2 Exact matches
    %details
      - total_results = @results[:exact].map { |d,r| r.count }.inject(&:+)
      %summary= "#{total_results} results"
      - @results[:exact].each do |dict, results|
        %p= "#{results.count} results in #{dict.handle}"
    - @results[:exact].each do |dict, exact_results|
      %div
        %p= "Matches in #{dict.handle}"
        - exact_results.each do |exact_result|
          = render 'entry', :lemma => exact_result
    %h3 Adjacent lemmas (FIXME: disabled)
-#    %ul.adjacent
-#      - @results[:preceding].each do |dict, prec_results|
-#        - prec_results.each do |prec_result|
-#          = render 'adjacent_entry', :lemma => prec_result
-#      %li.term= "#{@query[:term]}"
-#      - @results[:following].each do |dict, follow_results|
-#        - follow_results.each do |follow_result|
-#          = render 'adjacent_entry', :lemma => follow_result

- if !@results[:similar].empty?
  = render 'similar_entries', :similar_entries => @results[:similar]


%ul.user-list
  - authors.each_with_index do |author, i|
    - next if author.nil?
    %li.user{:class => i%2 == 0 ? "even" : "odd"}
      .avatar
        %a{:href => author.url}
          %img{:alt => "avatar", :src => author.avatar_url}/

      .info
        %a{:href => author.url}
          %b
            = author.display_name

          (#{author.username})
        .bio
          = 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"}
              %input.button.unfollow{:type => "submit", :value => "Unfollow", :id => "unfollow-#{author.feed.id}"}
          - 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}"}

Use the avatar_for helper that uses asset_path so that default avatars actually work

%ul.user-list
  - authors.each_with_index do |author, i|
    - next if author.nil?
    %li.user{:class => i%2 == 0 ? "even" : "odd"}
      .avatar
        %a{:href => author.url}
          %img{:alt => "avatar", :src => avatar_for(author)}/

      .info
        %a{:href => author.url}
          %b
            = author.display_name

          (#{author.username})
        .bio
          = 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"}
              %input.button.unfollow{:type => "submit", :value => "Unfollow", :id => "unfollow-#{author.feed.id}"}
          - 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}"}


%ul
  - branches.each do |branch|
    %li
      %a{ href: '#', class: "#{('is-active' if selected == branch)}", data: { id: branch } }
        = branch

Add a title attribute to each branch in the branches dropdown on the New MR page.

%ul
  - branches.each do |branch|
    %li
      %a{ href: '#', class: "#{('is-active' if selected == branch)}", title: branch, data: { id: branch } }
        = branch


.ui-box
  %h5.title Projects
  %ul.well-list
    - @projects.each do |project|
      %li
        = link_to project_path(project), class: dom_class(project) do
          - if project.namespace
            = project.namespace.human_name
            \/
          %strong.well-title
            = truncate(project.name, length: 45)
          %span.pull-right.light
            - if project.owner == user
              %i.icon-wrench
            - tm = project.team.get_tm(user.id)
            - if tm
              = tm.project_access_human
%p.light
  %i.icon-wrench
  – user is a project owner

Remove invalid information from /u/:user page


!!!
%html
  %head
    - subtitle = content_for(:title) || "free TF2 server reservations"
    %title #{SITE_HOST} - #{subtitle}
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "themes/black", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v3/"
    = content_for(:stripe)
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'shared/google_analytics'
    %meta{:name => "viewport",    :content => "width=device-width, initial-scale=1.0, shrink-to-fit=no"}
    %meta{:name => "description", :content => "Free TF2 servers, ready for action in 60 seconds!"}
    = content_for(:head)
  %body

    = render 'shared/navigation'

    = content_for(:jumbotron)

    .container

      - if !donator?
        %main{role: "main"}
          .row
            .col-md-12
              = render 'shared/adsense_responsive'

            - if notice || alert
              .row
                .col-md-11
                  .row
                    .col-md-12
                      = render 'shared/flash'

          = yield

          .col-md-1
            = render 'shared/adsense_sidebar'
      - else
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          = yield

      = render 'shared/timezone'

Make ads look less sucky

!!!
%html
  %head
    - subtitle = content_for(:title) || "free TF2 server reservations"
    %title #{SITE_HOST} - #{subtitle}
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "themes/black", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v3/"
    = content_for(:stripe)
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'shared/google_analytics'
    %meta{:name => "viewport",    :content => "width=device-width, initial-scale=1.0, shrink-to-fit=no"}
    %meta{:name => "description", :content => "Free TF2 servers, ready for action in 60 seconds!"}
    = content_for(:head)
  %body

    = render 'shared/navigation'

    = content_for(:jumbotron)

    .container

      - if !donator?
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          .row
            .col-md-12
              = render 'shared/adsense_responsive'

          .row
            .col-md-11
              = yield
            .col-md-1
              = render 'shared/adsense_sidebar'
      - else
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          = yield

      = render 'shared/timezone'


.number
  %p="#{answer.question_index}."
.prompt!= answer.prompt
.answer
  - if !answer.answer_texts.empty?
    - answer.answer_texts.each do |answer|
      .answer_item= answer
  - else
    %p!

Enforce singular answers for MC in summary

.number
  %p="#{answer.question_index}."
.prompt!= answer.prompt
.answer
  - if !answer.answer_texts.empty?
    - if answer.multi_answer
      - answer.answer_texts.each do |answer|
        .answer_item= answer
    - else
      .answer_item= answer.answer_tests.last
  - else
    %p!


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

- content_for :javascript do
  = javascript_include_tag 'facebook_login'

Update text header in facebook login layout

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

- content_for :javascript do
  = javascript_include_tag 'facebook_login'


-#  Non-link tag that stands for skipped pages...
-#  available local variables
-#    current_page:  a page object for the currently displayed page
-#    num_pages:     total number of pages
-#    per_page:      number of items to fetch per page
-#    remote:        data-remote
%span.page.gap
  = raw(t 'views.pagination.truncate')

Fix admin paging gap issue

-#  Non-link tag that stands for skipped pages...
-#  available local variables
-#    current_page:  a page object for the currently displayed page
-#    num_pages:     total number of pages
-#    per_page:      number of items to fetch per page
-#    remote:        data-remote
%li{class: "page"}
  %span.page.gap
    = raw(t 'views.pagination.truncate')


!!!
%html
  %head
    %title Anil Maurya
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags

    // Responsive, Mobile Compatibility
    %meta{:charset => "utf-8"}/
    %meta{:'http-equiv' => "X-UA-Compatible", :content => "IE=edge"}/
    %meta{:name => "viewport", :content => "width=device-width", 'initial-scale' => "1"}/
    %meta{:name => "description", :content => ""}/
    %meta{:name => "author", :content => ""}/
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

  %body.index{id: 'page-top'}
    = render 'header'
    = yield
    = render 'footer'
    = render 'portfolio_modals'

Add meta tag for description and author

!!!
%html
  %head
    %title Anil Maurya
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags

    // Responsive, Mobile Compatibility
    %meta{:charset => "utf-8"}/
    %meta{:'http-equiv' => "X-UA-Compatible", :content => "IE=edge"}/
    %meta{:name => "viewport", :content => "width=device-width", 'initial-scale' => "1"}/
    %meta{:name => "description", :content => "anil maurya"}/
    %meta{:name => "author", :content => "anil maurya"}/
    %meta{:name => "keywords", :content => "anil, maurya "}/
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

  %body.index{id: 'page-top'}
    = render 'header'
    = yield
    = render 'footer'
    = render 'portfolio_modals'


- provide(:title, generate_title("Notifications"))
= render 'notifications/notification_nav'
.container.j2-page
  = render 'notification_tabs'
  .col-md-9.col-xs-12.col-sm-8
    .card
      %ul#notifications.list-group
        - if @notifications.count == 0
          %li.list-group-item.text-center
            .notifications--none
              %i.fa.fa-bell-o.no-notifications
            %p
              - if params[:type] != "all"
                No new notifications.
              - else
                No notifications.
        - else
          - @notifications.each do |notification|
            = render 'notifications/notification', notification: notification

    #pagination= will_paginate @notifications, renderer: BootstrapPagination::Rails, page_links: false

    - if @notifications.next_page
      %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @notifications.current_page }}
        Load more
- Notification.for(current_user).update_all(new: false)

Add row to notification list

- provide(:title, generate_title("Notifications"))
= render 'notifications/notification_nav'
.container.j2-page
  .row
    = render 'notification_tabs'
    .col-md-9.col-xs-12.col-sm-8
      .card
        %ul#notifications.list-group
          - if @notifications.count == 0
            %li.list-group-item.text-center
              .notifications--none
                %i.fa.fa-bell-o.no-notifications
              %p
                - if params[:type] != "all"
                  No new notifications.
                - else
                  No notifications.
          - else
            - @notifications.each do |notification|
              = render 'notifications/notification', notification: notification

      #pagination= will_paginate @notifications, renderer: BootstrapPagination::Rails, page_links: false

      - if @notifications.next_page
        %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @notifications.current_page }}
          Load more
- Notification.for(current_user).update_all(new: false)


%h1 Set up DKIM

%h2 Setting up your DNS
%p You will need to create two text records to your DNS server with the following information:

%table.table
  %tr
    %th Name
    %th Value
  %tr
    %td _domainkey.#{@app.from_domain}
    %td t=y;o=~;
  %tr
    %td cuttlefish._domainkey.#{@app.from_domain}
    %td= @app.dkim_public_key_dns_dnsmadeeasy

%h3 Current value in DNS

- a = Net::DNS::Resolver.start("cuttlefish._domainkey.#{@app.from_domain}", Net::DNS::TXT).answer.first.txt
%p= a

%p
  - if a == @app.dkim_public_key_dns_dnsmadeeasy
    Matches
  - else
    Does not match

%p Only enable DKIM once you've set up your DNS records

= button_to (@app.dkim_enabled ? "Disable DKIM" : "Enable DKIM"), toggle_dkim_app_path(@app), class: "btn btn-primary"

Add a note about DNS providers

%h1 Set up DKIM

%h2 Setting up your DNS
%p You will need to add two TXT records to your DNS.
%p
  Note that the format of the DNS values should work with #{link_to "DNS Made Easy", "http://www.dnsmadeeasy.com/"}.
  If you have a different DNS provider and discover that it does or does not work please
  #{link_to "file an issue on GitHub", "https://github.com/mlandauer/cuttlefish/issues/new"}.

%table.table
  %tr
    %th Name
    %th Value
  %tr
    %td _domainkey.#{@app.from_domain}
    %td t=y;o=~;
  %tr
    %td cuttlefish._domainkey.#{@app.from_domain}
    %td= @app.dkim_public_key_dns_dnsmadeeasy

%h3 Current value in DNS

- a = Net::DNS::Resolver.start("cuttlefish._domainkey.#{@app.from_domain}", Net::DNS::TXT).answer.first.txt
%p= a

%p
  - if a == @app.dkim_public_key_dns_dnsmadeeasy
    Matches
  - else
    Does not match

%p Only enable DKIM once you've set up your DNS records

= button_to (@app.dkim_enabled ? "Disable DKIM" : "Enable DKIM"), toggle_dkim_app_path(@app), class: "btn btn-primary"


- page_title t('fluentd.common.recent_errors', days: @error_duration_days) do
  - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary float-right mt-3" do
    = icon('fa-download')
    = t('fluentd.common.raw_log_link')

.row
  .col-xl-12.col-sm-12
    - @errors.each do |error|
      .card.card-primary
        .card-heading
          %h4= error[:subject]
        - if error[:notes].present?
          .card-body
            %ul
              - error[:notes].each do |stack|
                %li= stack
    - if @errors.empty?
      %p= t('.error_is_empty')

Fix a typo in StyleSheet class name

- page_title t('fluentd.common.recent_errors', days: @error_duration_days) do
  - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary float-right mt-3" do
    = icon('fa-download')
    = t('fluentd.common.raw_log_link')

.row
  .col-xl-12.col-sm-12
    - @errors.each do |error|
      .card.card-primary
        .card-header
          %h4= error[:subject]
        - if error[:notes].present?
          .card-body
            %ul
              - error[:notes].each do |stack|
                %li= stack
    - if @errors.empty?
      %p= t('.error_is_empty')


.stripe.reverse
  .row
    .large-12.columns
      %h2 Sponsors
      %p.lead
        Without our sponsors running codebar would be impossible. They provide us with space, food and drinks, internet, and they also help us cover our running costs.
      %p.lead
        Thank you for sharing our dream of creating a more welcoming, equal and diverse tech industry.

      %p
        If you are interested in becoming a host please do get in touch with us at #{mail_to "hello@codebar.io", "hello@codebar.io"}
        ='.'

- ['gold', 'silver', 'bronze', 'standard'].each do |level|
  - if @sponsor_levels[level]
    .stripe.reverse
      .row
        .large-12.columns
          %h3.sponsor-header-margin.text-center
            #{level == 'standard' ? 'And thanks to our other ' : level.humanize} sponsors
      .row
        .large-12.columns
          %ul.small-block-grid-2.medium-block-grid-3.large-block-grid-4
            - @sponsor_levels[level].each do |sponsor|
              %li.text-center
                = link_to image_tag(sponsor.avatar, class: "sponsor-logo-image", alt: sponsor.name), sponsor.website

Update logo listing in /sponsors to match /donations/new

.stripe.reverse
  .row
    .large-12.columns
      %h2 Sponsors
      %p.lead
        Without our sponsors running codebar would be impossible. They provide us with space, food and drinks, internet, and they also help us cover our running costs.
      %p.lead
        Thank you for sharing our dream of creating a more welcoming, equal and diverse tech industry.

      %p
        If you are interested in becoming a host please do get in touch with us at #{mail_to "hello@codebar.io", "hello@codebar.io"}
        ='.'

- ['gold', 'silver', 'bronze', 'standard'].each do |level|
  - if @sponsor_levels[level]
    .stripe.reverse
      .row
        .large-12.columns
          %h3.sponsor-header-margin.text-center
            #{level == 'standard' ? 'And thanks to our other ' : level.humanize} sponsors
      - @sponsor_levels[level].in_groups_of(6) do |grouped_sponsors|
        .row.sponsor-row
          - grouped_sponsors.compact.each do |sponsor|
            .medium-2.small-4.columns
              = link_to image_tag(sponsor.avatar, class: "small-image", alt: sponsor.name), sponsor.website


.slideshow-wrapper
  .preloader
  %ul{"data-orbit" => ""}
    %li
      %img{src: "/slider/1.jpg"}
      .orbit-caption "Some text here, probably
    %li
      %img{src: "/slider/2.jpg"}
      .orbit-caption "Some other stuff"

%i.fi-die-six
%i.fi-plus

Add a feature completion status on root page

%h2
  = t(:welcome_msg)
%h5 Legend:
%i.fi-check - Done
%i.fi-wrench - In progress
%i.fi-x - Feature not available
.row
  .columns.small-6{style: "padding: 0px 30px;"}
    %h5 Here you can:
    %ul
      %i.fi-wrench.right
      %li pick a teacher/course based on your interests
      %i.fi-x.right
      %li give the course and teacher a rating
      %i.fi-wrench.right
      %li choose a prefered language
      %i.fi-x.right
      %li filter by skills you are looking for
  .columns.small-6
    %h5 The site also allows:
    %ul
      %i.fi-x.right
      %li screen sharing
      %i.fi-x.right
      %li voice/video chat
      %i.fi-x.right
      %li presentations
      %i.fi-x.right
      %li doodling
.slideshow-wrapper
  .preloader
  %ul{"data-orbit" => ""}
    %li
      %img{src: "/slider/1.jpg"}
      .orbit-caption "Some text here, probably
    %li
      %img{src: "/slider/2.jpg"}
      .orbit-caption "Some other stuff"
.row
  %h4 Most popular courses
.row
  %h4 Newest courses


%div
  %h2= h @idea.title
  %p=    @idea.description
  %div
    %h5 Tags
    = @idea.tags.map { |tag| link_to h(tag.name), search_ideas_path(:search => ['tag', tag.name]) }.join(', ')
  %div
    %h3 Comments
    %div= render :partial => 'comments/comment', :collection => @idea.comments, :controller => 'comments'
    %div
      = if user_signed_in?
        %h4 Comment on this idea
        %div= render :partial => 'comments/new'

Make links to tags use POST method

%div
  %h2= h @idea.title
  %p=    @idea.description
  %div
    %h5 Tags
    = @idea.tags.map { |tag| link_to h(tag.name), search_ideas_path(:search => ['tag', tag.name]), :method => :post }.join(', ')
  %div
    %h3 Comments
    %div= render :partial => 'comments/comment', :collection => @idea.comments, :controller => 'comments'
    %div
      = if user_signed_in?
        %h4 Comment on this idea
        %div= render :partial => 'comments/new'


- content_for :page_title do
  Site Settings

%table.table
  %colgroup
    %col{ width: '35%' }/
  %thead
    %tr
      %th Setting
      %th Click to edit
  %tbody
    %tr
      %td
        %strong Site description
        %br/
        Displayed as a paragraph on the frontpage and used as a meta tag.
        %br/
        You can use HTML tags, in particular
        %code= '<a>'
        and
        %code= '<em>'
      %td= best_in_place @settings['site_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_description'])

Add settings for contact information

- content_for :page_title do
  Site Settings

%table.table
  %colgroup
    %col{ width: '35%' }/
  %thead
    %tr
      %th Setting
      %th Click to edit
  %tbody
    %tr
      %td
        %strong Site description
        %br/
        Displayed as a paragraph on the frontpage and used as a meta tag.
        %br/
        You can use HTML tags, in particular
        %code= '<a>'
        and
        %code= '<em>'
      %td= best_in_place @settings['site_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_description'])
    %tr
      %td{ rowspan: 2 }
        %strong Contact information
      %td= best_in_place @settings['site_contact_username'], :value, url: admin_setting_path(@settings['site_contact_username']), place_holder: 'Enter a username'
    %tr
      %td= best_in_place @settings['site_contact_email'], :value, url: admin_setting_path(@settings['site_contact_email']), place_holder: 'Enter a public e-mail address'


= simple_form_for @group_request do |f|
  = f.input :admin_name
  = f.input :admin_email
  = f.input :name, placeholder: placeholder
  = f.input :is_commercial, as: :select, collection: [[t(:'group_request.commercial_use_option'), true],[t(:'group_request.non_commercial_use_option'), false]], prompt: t(:'common.select')
  = f.input :description, as: :text, required: false
  = f.input :payment_plan, as: :hidden
  - if using_commercial_modal?
    %a{ :class => 'btn btn-info btn-lg commercial-modal-toggle', :data => { :toggle => :modal, :target => "#commercial" } }
      = submit_label
    = render 'modal_commercial', f: f, submit_label: submit_label
    = render 'modal_non_commercial', f: f, submit_label: submit_label
  - else
    = f.submit submit_label, class: 'btn btn-info btn-lg', :data => { :disable_with => submit_label }, id: 'sign-up-submit'

Make background static on modal

= simple_form_for @group_request do |f|
  = f.input :admin_name
  = f.input :admin_email
  = f.input :name, placeholder: placeholder
  = f.input :is_commercial, as: :select, collection: [[t(:'group_request.commercial_use_option'), true],[t(:'group_request.non_commercial_use_option'), false]], prompt: t(:'common.select')
  = f.input :description, as: :text, required: false
  = f.input :payment_plan, as: :hidden
  - if using_commercial_modal?
    %a{ :class => 'btn btn-info btn-lg commercial-modal-toggle', :data => { :toggle => :modal, :target => "#commercial", :backdrop => "static", :keyboard => "false" } }
      = submit_label
    = render 'modal_commercial', f: f, submit_label: submit_label
    = render 'modal_non_commercial', f: f, submit_label: submit_label
  - else
    = f.submit submit_label, class: 'btn btn-info btn-lg', :data => { :disable_with => submit_label }, id: 'sign-up-submit'


!!!
%html
  %head
    %title Apipony
    %link{ :href => '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css', :rel => 'stylesheet' }/
    %link{ :href => 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', :rel => 'stylesheet' }/
    = stylesheet_link_tag 'apipony/application', media: 'all'
    %script{ :src => '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js' }
    = javascript_include_tag 'apipony/application'
    = csrf_meta_tags
  %body
    = yield

Add documentation title to page title

!!!
%html
  %head
    %title= @documentation.title
    %link{ :href => '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css', :rel => 'stylesheet' }/
    %link{ :href => 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', :rel => 'stylesheet' }/
    = stylesheet_link_tag 'apipony/application', media: 'all'
    %script{ :src => '//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js' }
    = javascript_include_tag 'apipony/application'
    = csrf_meta_tags
  %body
    = yield


%p
  ="#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'es', 'emails.confirmation.welcome')}"
  =@email

%p
  ="#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'es', 'emails.confirmation.message')}"

%p
  = link_to "#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'es', 'emails.confirmation.confirm')}", confirmation_url(@resource, confirmation_token: @token)

Use English as default in sign up if another language is not specified.

%p
  ="#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'en', 'emails.confirmation.welcome')}"
  =@email

%p
  ="#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'en', 'emails.confirmation.message')}"

%p
  = link_to "#{SimpleTranslationEngine.translate(@resource.preferred_locale.try(:name) || 'en', 'emails.confirmation.confirm')}", confirmation_url(@resource, confirmation_token: @token)


%h3.page_title
  Groups
  %small
    allows you to keep projects organized.
    Use groups for uniting related projects.

  = link_to 'New Group', new_admin_group_path, class: "btn btn-small pull-right"
%br
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
  = text_field_tag :name, params[:name], class: "xlarge"
  = submit_tag "Search", class: "btn submit btn-primary"

%table
  %thead
    %tr
      %th
        Name
        %i.icon-sort-down
      %th Path
      %th Description
      %th Projects
      %th Owner
      %th.cred Danger Zone!

  - @groups.each do |group|
    %tr
      %td
        %strong= link_to group.name, [:admin, group]
      %td= truncate group.description
      %td= group.path
      %td= group.projects.count
      %td
        = link_to group.owner_name, admin_user_path(group.owner)
      %td.bgred
        = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
        = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
= paginate @groups, theme: "admin"

Fix column heading order in group admin view

%h3.page_title
  Groups
  %small
    allows you to keep projects organized.
    Use groups for uniting related projects.

  = link_to 'New Group', new_admin_group_path, class: "btn btn-small pull-right"
%br
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
  = text_field_tag :name, params[:name], class: "xlarge"
  = submit_tag "Search", class: "btn submit btn-primary"

%table
  %thead
    %tr
      %th
        Name
        %i.icon-sort-down
      %th Description
      %th Path
      %th Projects
      %th Owner
      %th.cred Danger Zone!

  - @groups.each do |group|
    %tr
      %td
        %strong= link_to group.name, [:admin, group]
      %td= truncate group.description
      %td= group.path
      %td= group.projects.count
      %td
        = link_to group.owner_name, admin_user_path(group.owner)
      %td.bgred
        = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
        = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
= paginate @groups, theme: "admin"


= boot_page_title

.form-view
  = simple_form_for :vesr do |form|

    %h3= 'Allgemein'
    = form.fields_for @tenant do |f|
      = render :partial => 'form_fields', :locals => {:form => f}

    %h3= 'Konto'
    = form.fields_for @bank_account do |f|
      = f.input :id, :as => :hidden

      = f.input :number
      = f.input :iban
      = f.input :pc_id
      = f.input :esr_id, :input_html => { :maxlength => 21 }

    %h3= 'Vorlage'
    = form.fields_for @letter_template do |f|
      = f.input :id, :as => :hidden

      = f.input :title
      = f.input :file

    = form.button :submit

Fix page title for vesr settings update.

= boot_page_title t_title(:vesr)

.form-view
  = simple_form_for :vesr do |form|

    %h3= 'Allgemein'
    = form.fields_for @tenant do |f|
      = render :partial => 'form_fields', :locals => {:form => f}

    %h3= 'Konto'
    = form.fields_for @bank_account do |f|
      = f.input :id, :as => :hidden

      = f.input :number
      = f.input :iban
      = f.input :pc_id
      = f.input :esr_id, :input_html => { :maxlength => 21 }

    %h3= 'Vorlage'
    = form.fields_for @letter_template do |f|
      = f.input :id, :as => :hidden

      = f.input :title
      = f.input :file

    = form.button :submit


.row.append-bottom-20
  .col-md-2.append-bottom-10
    = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
  .col-md-10
    = form_tag project_network_path(@project, @id), method: :get, class: 'form-inline network-form' do |f|
      = label_tag :search , "Looking for", class: 'light inline-label'
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: "search-input form-control input-mx-250"
      = button_tag type: 'submit', class: 'btn btn-success' do
        %i.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

Change the Label for SHA1-Seach inside the Network

.row.append-bottom-20
  .col-md-2.append-bottom-10
    = render partial: 'shared/ref_switcher', locals: {destination: 'graph'}
  .col-md-10
    = form_tag project_network_path(@project, @id), method: :get, class: 'form-inline network-form' do |f|
      = label_tag :extended_sha1 , "Looking for", class: 'light inline-label'
      = text_field_tag :extended_sha1, @options[:extended_sha1], placeholder: "Input an extended SHA1 syntax", class: "search-input form-control input-mx-250"
      = button_tag type: 'submit', class: 'btn btn-success' do
        %i.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


- field_set_tag "Sign Up" do
  %p
    If you are a Teacher in an existing RITES School signup as a Teacher.
    = button_to 'Sign up as a teacher', :new_portal_teacher

  %p
    If you are a student of a Teacher who is using RITES Investigations sign up here.
    = button_to 'Sign up as a student', :signup_portal_students

  %p
    Otherwise if you are an author sign up as a member. Members can run and author RITES Investigations.
    = button_to 'Sign up as a member', :signup

REFACTOR ME: Itsi Specific wording change.

- field_set_tag "Sign Up" do
  %p
    If you are a Teacher in an existing ITSI School signup as a Teacher.
    = button_to 'Sign up as a teacher', :new_portal_teacher

  %p
    If you are a student of a Teacher who is using ITSI Investigations sign up here.
    = button_to 'Sign up as a student', :signup_portal_students

  %p
    Otherwise if you are an author sign up as a member. Members can run and author ITSI Investigations.
    = button_to 'Sign up as a member', :signup


#new_organization_form
  = render :partial => 'site/appropriateness_message'
  -# Create a form that collects Org details (currently name + URL).
  = semantic_form_for(@organization, :html => {:id => 'organization_form', :class => 'standard_form'}) do |f|
    = f.inputs :name => "Create Organization" do
      %li.input
        %p.inline-hints
          Specify the organization's full name:
      = f.input :name, :label => "Name"
      = f.input :url, :label => "Homepage"
      = f.input :topics, :input_html => { :class => 'required chzn-select-create' }
      - focus_on '#organization_name'
    = f.buttons do
      = f.commit_button "Save"

Remove irrelevant msg on /organizations/new

#new_organization_form
  -# Create a form that collects Org details (currently name + URL).
  = semantic_form_for(@organization, :html => {:id => 'organization_form', :class => 'standard_form'}) do |f|
    = f.inputs :name => "Create Organization" do
      %li.input
        %p.inline-hints
          Specify the organization's full name:
      = f.input :name, :label => "Name"
      = f.input :url, :label => "Homepage"
      = f.input :topics, :input_html => { :class => 'required chzn-select-create' }
      - focus_on '#organization_name'
    = f.buttons do
      = f.commit_button "Save"


:ruby
  @users_created_by_day = User.count(:group => 'date(created_at)')
#list
  %table.table.table-condensed.table-striped
    %thead
      %tr
        %th
          = "Day"
        %th
          = "Users Registered"
    %tbody
      - @users_created_by_day.keys.sort.each do |date|
        %tr
          %td
            = date
          %td
            = @users_created_by_day[date]

Sort dates for signups (reverse)

:ruby
  @users_created_by_day = User.count(:group => 'date(created_at)')
#list
  %table.table.table-condensed.table-striped
    %thead
      %tr
        %th
          = "Day"
        %th
          = "Users Registered"
    %tbody
      - @users_created_by_day.keys.sort.reverse.each do |date|
        %tr
          %td
            = date
          %td
            = @users_created_by_day[date]


!!! 5
%html
  %head
    %meta{:charset => "utf-8"}
    %title
      A Brand new nanoc site -
      = item[:title]
    %link{:rel => "stylesheet", :href => "/assets/app.scss.css" }
  %body
    .large-2.columns
      .column
        .large-2.rows
          Placeholder for image
        .large-10.rows
          %ul.side-nav
            %li
              %a{:href=>'#'}Home
            %li
              %a{:href=>'#'}Other Home
    .large-10.columns
      = yield

    %small.footer
      .large-2.columns
        .column
          %p
            wiki.template (C) 2015 Matthias Beyer
      .large-10.columns
        - unless @item[:hide_categories]
          %p
            Categories:
            = category_links_for_item item

Add link to categories overview in sidebar

!!! 5
%html
  %head
    %meta{:charset => "utf-8"}
    %title
      A Brand new nanoc site -
      = item[:title]
    %link{:rel => "stylesheet", :href => "/assets/app.scss.css" }
  %body
    .large-2.columns
      .column
        .large-2.rows
          Placeholder for image
        .large-10.rows
          %ul.side-nav
            %li
              %a{:href=>'#'}Home
            %li
              %a{:href=>'/categories'}Categories
    .large-10.columns
      = yield

    %small.footer
      .large-2.columns
        .column
          %p
            wiki.template (C) 2015 Matthias Beyer
      .large-10.columns
        - unless @item[:hide_categories]
          %p
            Categories:
            = category_links_for_item item


- if @harvesting.size.positive?
  %section.harvests
    %h2 Ready to harvest
    .index-cards
      - @harvesting.each do |planting|
        = render 'plantings/thumbnail', planting: planting
- if @others.size.positive?
  %section.planting-progress
    %h2 Progress report
    %p Still growing
    - @others.each do |planting|
      .row
        .col-2= render 'plantings/tiny', planting: planting
        .col-10= render 'plantings/progress', planting: planting
- if @late.size.positive?
  %section.late
    %h2 Late
    %p
      These plantings are at the end of their lifecycle.
      - if member_signed_in? && @member == current_member
        When you have removed the planting from your garden, mark the planting as finished in Growstuff.
    .index-cards
      - @late.each do |planting|
        = render 'plantings/thumbnail', planting: planting
- if @super_late.size.positive?
  %section.superlate
    %h2 Super late
    %p
      We suspect the following plantings finished long ago and no longer need tracking. You can mark them as finished to stop tracking.
    %ul
      - @super_late.each do |planting|
        %li
          = link_to planting.crop_name, planting_url(slug: planting.slug)
          planted on #{planting.planted_at.to_date}

Tidy up member planting progress section

- if @harvesting.size.positive?
  %section.harvests
    %h2 Ready to harvest
    .index-cards
      - @harvesting.each do |planting|
        = render 'plantings/thumbnail', planting: planting
- if @others.size.positive?
  %section.planting-progress
    %h2 Progress report
    %p Still growing
    .list-group
      - @others.each do |planting|
        .list-group-item
          %span= render 'plantings/tiny', planting: planting
          %span= render 'plantings/progress', planting: planting
- if @late.size.positive?
  %section.late
    %h2 Late
    %p
      These plantings are at the end of their lifecycle.
      - if member_signed_in? && @member == current_member
        When you have removed the planting from your garden, mark the planting as finished in Growstuff.
    .index-cards
      - @late.each do |planting|
        = render 'plantings/thumbnail', planting: planting
- if @super_late.size.positive?
  %section.superlate
    %h2 Super late
    %p
      We suspect the following plantings finished long ago and no longer need tracking. You can mark them as finished to stop tracking.
    %ul
      - @super_late.each do |planting|
        %li
          = link_to planting.crop_name, planting_url(slug: planting.slug)
          planted on #{planting.planted_at.to_date}


- content_for :page_title do
  = t(:listing_reports)

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

Remove report description when they are useless

- content_for :page_title do
  = t(:listing_reports)

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


= form_for @group, html: { class: 'group-form form-horizontal' } do |f|
  - if @group.errors.any?
    .alert.alert-danger
      %span= @group.errors.full_messages.first
  .form-group
    = f.label :name, class: 'control-label' do
      Group name
    .col-sm-10
      = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"

  .form-group.group-description-holder
    = f.label :description, "Details", class: 'control-label'
    .col-sm-10
      = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4

  .form-group
    .col-sm-2
    .col-sm-10
      %ul
        %li A group is a collection of several projects
        %li Groups are private by default
        %li Members of a group may only view projects they have permission to access
        %li Group project URLs are prefixed with the group namespace
        %li Existing projects may be moved into a group

  .form-actions
    = f.submit 'Create group', class: "btn btn-create"

Allow set group avatar when create group. Not only edit page

= form_for @group, html: { class: 'group-form form-horizontal' } do |f|
  - if @group.errors.any?
    .alert.alert-danger
      %span= @group.errors.full_messages.first
  .form-group
    = f.label :name, class: 'control-label' do
      Group name
    .col-sm-10
      = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"

  .form-group.group-description-holder
    = f.label :description, "Details", class: 'control-label'
    .col-sm-10
      = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4

  .form-group.group-description-holder
    = f.label :avatar, "Group avatar", class: 'control-label'
    .col-sm-10
      %a.choose-btn.btn.btn-small.js-choose-group-avatar-button
        %i.icon-paper-clip
        %span Choose File ...

      %span.file_name.js-avatar-filename File name...
      = f.file_field :avatar, class: "js-group-avatar-input hidden"
      .light The maximum file size allowed is 100KB.

  .form-group
    .col-sm-2
    .col-sm-10
      %ul
        %li A group is a collection of several projects
        %li Groups are private by default
        %li Members of a group may only view projects they have permission to access
        %li Group project URLs are prefixed with the group namespace
        %li Existing projects may be moved into a group

  .form-actions
    = f.submit 'Create group', class: "btn btn-create"


= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f|
  - if application.errors.any?
    .alert.alert-danger{"data-alert" => ""}
      %p Whoops! Check your form for possible errors
  = content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do
    = f.label :name, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :name, class: 'form-control'
      = doorkeeper_errors_for application, :name
  = content_tag :div, class: "form-group#{' has-error' if application.errors[:redirect_uri].present?}" do
    = f.label :redirect_uri, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_area :redirect_uri, class: 'form-control'
      = doorkeeper_errors_for application, :redirect_uri
      %span.help-block
        Use one line per URI
      - if Doorkeeper.configuration.native_redirect_uri
        %span.help-block
          Use
          %code= Doorkeeper.configuration.native_redirect_uri
          for local tests
  .form-actions
    = f.submit 'Submit', class: "btn btn-primary wide"
    = link_to "Cancel", applications_profile_path, class: "btn btn-default"

Fix layout issue when New Application validation fails.

= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f|
  - if application.errors.any?
    .alert.alert-danger
      %ul
        - application.errors.full_messages.each do |msg|
          %li= msg

  .form-group
    = f.label :name, class: 'control-label'

    .col-sm-10
      = f.text_field :name, class: 'form-control', required: true

  .form-group
    = f.label :redirect_uri, class: 'control-label'

    .col-sm-10
      = f.text_area :redirect_uri, class: 'form-control', required: true

      %span.help-block
        Use one line per URI
      - if Doorkeeper.configuration.native_redirect_uri
        %span.help-block
          Use
          %code= Doorkeeper.configuration.native_redirect_uri
          for local tests
  .form-actions
    = f.submit 'Submit', class: "btn btn-primary wide"
    = link_to "Cancel", applications_profile_path, class: "btn btn-default"


= f.input_field :quantity_population, as: :hidden, data: { intervention_updater: prefix + 'quantity_population' }
- if reference.handlers.any?
  - options = reference.handlers.map do |handler|
    - if handler.population?
      - [Nomen::Unit.find(:unity).human_name, handler.name]
    - elsif handler.widget == :number
      - unit = handler.unit? ? handler.unit : Nomen::Unit.find(:unity)
      - ["#{unit.symbol} (#{handler.indicator.human_name})", handler.name]
    - else
      - fail "Cannot handler #{handler.widget} handlers"
  = f.input(:quantity, wrapper: :append) do
    = f.input :quantity_value, input_html: { data: { intervention_updater: prefix + 'quantity_value', intervention_field: 'quantity-value' } }, wrapper: :simplest
    = f.input(:quantity_handler, collection: options, include_blank: false, input_html: { data: { intervention_updater: prefix + 'quantity_handler', intervention_field: 'quantity-handler' } }, wrapper: :simplest)

Update handler unit show method in intervention.

= f.input_field :quantity_population, as: :hidden, data: { intervention_updater: prefix + 'quantity_population' }
- if reference.handlers.any?
  - options = reference.handlers.map do |handler|
    - if handler.population?
      - [Nomen::Unit.find(:unity).human_name, handler.name]
    - elsif handler.widget == :number
      - unit = handler.unit? ? handler.unit : Nomen::Unit.find(:unity)
      - ["#{unit.symbol} (#{handler.human_name})", handler.name]
    - else
      - fail "Cannot handler #{handler.widget} handlers"
  = f.input(:quantity, wrapper: :append) do
    = f.input :quantity_value, input_html: { data: { intervention_updater: prefix + 'quantity_value', intervention_field: 'quantity-value' } }, wrapper: :simplest
    = f.input(:quantity_handler, collection: options, include_blank: false, input_html: { data: { intervention_updater: prefix + 'quantity_handler', intervention_field: 'quantity-handler' } }, wrapper: :simplest)