/ Sidebar Menu
.ui.vertical.sidebar.menu
  %a.active.item Home
  %a.item Work
  %a.item Company
  %a.item Careers
  %a.item Login
  %a.item Signup
/ Page Contents
.pusher
  .ui.vertical.center.aligned.segment
    .ui.container
      .ui.large.main.menu
        %a.toc.item
          %i.sidebar.icon
        %a.brand.item{href: root_path}= image_tag("logo/logo.png")
        %a.active.item Home
        %a.item About
        %a.item Company
        %a.item Careers
        .right.item
          .item
            %a.ui.button{href: new_user_session_path} Log in
          .item
            %a.ui.button{href: new_user_registration_path} Sign Up

Make a more functional header

/ Sidebar Menu
.ui.vertical.sidebar.menu
  %a.active.item{href: root_path} Home
  %a.item{href: new_user_session_path} Login
  %a.item{href: new_user_registration_path} Signup
/ Page Contents
.pusher
  .ui.vertical.center.aligned.segment
    .ui.container
      .ui.large.main.menu
        %a.toc.item
          %i.sidebar.icon
        %a.brand.item{href: root_path}= image_tag("logo/logo.png")
        %a.item{href: root_path} Home
        .right.item
          .item
            %a.ui.button{href: new_user_session_path} Log in
          .item
            %a.ui.green.button{href: new_user_registration_path} Sign Up


%h2.group-title Bokningar
%table.full.wrap
  %thead
    %tr
      %th Plats
      %th Tid
      %th
  %tbody
    - @company.bookings.each do |booking|
      %tr
        %td= link_to booking.place.name, place_path(booking.place)
        %td= date_and_time(booking)
        %td.delete= link_to 'Avboka', booking_path(booking, from_company_view: true),
          method: :delete, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"

Patch booking instead of destroy it on cancel from company views

%h2.group-title Bokningar
%table.full.wrap
  %thead
    %tr
      %th Plats
      %th Tid
      %th
  %tbody
    - @company.bookings.each do |booking|
      %tr
        %td= link_to booking.place.name, place_path(booking.place)
        %td= date_and_time(booking)
        %td.delete= button_to 'Avboka', cancel_booking_path(booking, from_company_view: true),
          method: :patch, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"


!!!
%html.no-js{lang: 'en'}
  %head
    %meta{charset: "utf-8"}/
    %meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
    %title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
    %meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    /[if lt IE 9]
      = javascript_include_tag 'ie', 'data-turbolinks-track' => true
    = javascript_include_tag 'head', 'data-turbolinks-track' => true
    = headjs_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    = yield :head
    //= render 'layouts/airbrake'
  %body{class: "controller__#{controller_name} action__#{action_name}"}
    = render 'layouts/navigation'
    .container
      .errors__container
        = render 'layouts/messages'
      = yield
      %footer.page__footer
        - if content_for? :footer
          = yield :footer
          = yield :scripts
        - else
          = render 'layouts/footer'
          = debug(params) if Rails.env.development?
    = render 'layouts/analytics'
    = render 'layouts/javascripts'

Add google webmaster tag to header to enable authorization

!!!
%html.no-js{lang: 'en'}
  %head
    %meta{charset: "utf-8"}/
    %meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
    %meta{name: "google-site-verification", content: "lrGgXETTHXE65MBmXL287EnrR2REq5kjbhK3_rr4oRQ"}
    %title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
    %meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    /[if lt IE 9]
      = javascript_include_tag 'ie', 'data-turbolinks-track' => true
    = javascript_include_tag 'head', 'data-turbolinks-track' => true
    = headjs_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    = yield :head
    //= render 'layouts/airbrake'
  %body{class: "controller__#{controller_name} action__#{action_name}"}
    = render 'layouts/navigation'
    .container
      .errors__container
        = render 'layouts/messages'
      = yield
      %footer.page__footer
        - if content_for? :footer
          = yield :footer
          = yield :scripts
        - else
          = render 'layouts/footer'
          = debug(params) if Rails.env.development?
    = render 'layouts/analytics'
    = render 'layouts/javascripts'


#registrant_contact_detail_attributes_state_wrapper
  - parent_region ||= params[:parent_region]
  - if parent_region.nil?
    %em
      = t(".select_country")
  - else
    - country = Carmen::Country.coded(parent_region)
    - if country.subregions?
      -if from_object
        = f.subregion_select(:state, parent_region)
      - else
        = subregion_select("registrant[contact_detail_attributes]", :state, parent_region)
    - else
      -if from_object
        = f.text_field :state
      -else
        = text_field("registrant[contact_detail_attributes]", :state)

Include blank option for carmen subregions

#registrant_contact_detail_attributes_state_wrapper
  - parent_region ||= params[:parent_region]
  - if parent_region.nil?
    %em
      = t(".select_country")
  - else
    - country = Carmen::Country.coded(parent_region)
    - if country.subregions?
      -if from_object
        = f.subregion_select(:state, parent_region, include_blank: ' ')
      - else
        = subregion_select("registrant[contact_detail_attributes]", :state, parent_region, include_blank:' ')
    - else
      -if from_object
        = f.text_field :state
      -else
        = text_field("registrant[contact_detail_attributes]", :state)


.previous-and-next-post
  %ol.xoxo
    - if p = post.previous_post
      %li.previous-post= link_to_post(p, :rel => "prev")

    - if p = post.next_post
      %li.next-post= link_to_post(p, :rel => "next")

Remove rel=prev/next attributes from links to prev/next posts because they aren't really part of the post.

.previous-and-next-post
  %ol.xoxo
    - if p = post.previous_post
      %li.previous-post= link_to_post(p)

    - if p = post.next_post
      %li.next-post= link_to_post(p)


%h3.page-title Welcome to GitLab!
%p.light Self Hosted Git Management application.
%hr
%div
  .dashboard-intro-icon
    %i.icon-bookmark-empty
  %div
    %p.slead
      You don't have access to any projects right now.
      %br
      - if current_user.can_create_project?
        You can create up to
        %strong= pluralize(current_user.projects_limit, "project") + "."
        Click on the button below to add a new one
      - else
        If you are added to a project, it will be displayed here

    - if current_user.can_create_project?
      .link_holder
        = link_to new_project_path, class: "btn btn-new" do
          New project »

- if current_user.can_create_group?
  %hr
  %div
    .dashboard-intro-icon
      %i.icon-group
    %div
      %p.slead
        You can create a group for several dependent projects.
        %br
        Group is the best way to manage projects and members
      .link_holder
        = link_to new_group_path, class: "btn btn-new" do
          New group »

Fix grammar in zero_authorized_projects view

%h3.page-title Welcome to GitLab!
%p.light Self Hosted Git Management application.
%hr
%div
  .dashboard-intro-icon
    %i.icon-bookmark-empty
  %div
    %p.slead
      You don't have access to any projects right now.
      %br
      - if current_user.can_create_project?
        You can create up to
        %strong= pluralize(current_user.projects_limit, "project") + "."
        Click on the button below to add a new one
      - else
        If you are added to a project, it will be displayed here

    - if current_user.can_create_project?
      .link_holder
        = link_to new_project_path, class: "btn btn-new" do
          New project »

- if current_user.can_create_group?
  %hr
  %div
    .dashboard-intro-icon
      %i.icon-group
    %div
      %p.slead
        You can create a group for several dependent projects.
        %br
        Groups are the best way to manage projects and members
      .link_holder
        = link_to new_group_path, class: "btn btn-new" do
          New group »


%td{'data-hook' => "cart_item_description"}
  %h4= link_to variant.product.name, product_path(variant.product)
  = variant.options_text
  - if @order.insufficient_stock_lines.include? line_item
    %span.out-of-stock
      = variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock)
      %br/

Remove link from cart to old product page

%td{'data-hook' => "cart_item_description"}
  %h4= variant.product.name
  = variant.options_text
  - if @order.insufficient_stock_lines.include? line_item
    %span.out-of-stock
      = variant.in_stock? ? t(:insufficient_stock, :on_hand => variant.on_hand) : t(:out_of_stock)
      %br/


!!!
%html{:lang => 'en'}
  %head
    %title TreeStats
    %link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
    %link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
  %body
    %table
      %tbody
        %tr
          %td{:colspan => 2}
            %table
              %tbody
                %tr#header
                  %td#title
                    %h1
                      %a{:href => "/"} TreeStats
                  %td#misc= haml :misc
                %tr
                  %td#search
                    = haml :_search
                  %td#download
                    Download:
                    %a{:href => "/download"} Latest Release

        %tr.line
          %td#nav
            = haml :nav
          %td#content
            = yield
        %tr
          %td#footer.center{:colspan => 2} This website created with love by Kolth.

Add versioning parameter to CSS to invalidate caches

!!!
%html{:lang => 'en'}
  %head
    %title TreeStats
    %link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css?ver=1"}
    %link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
  %body
    %table
      %tbody
        %tr
          %td{:colspan => 2}
            %table
              %tbody
                %tr#header
                  %td#title
                    %h1
                      %a{:href => "/"} TreeStats
                  %td#misc= haml :misc
                %tr
                  %td#search
                    = haml :_search
                  %td#download
                    Download:
                    %a{:href => "/download"} Latest Release

        %tr.line
          %td#nav
            = haml :nav
          %td#content
            = yield
        %tr
          %td#footer.center{:colspan => 2} This website created with love by Kolth.


%table.form-table
  %thead
    %tr
      %th.sub Contribute to the Constellation
  %tbody
    %tr
      %td.even= link_to 'Make a Patreon pledge', 'https://patreon.com/user?u=4240260'
    %tr
      %td.odd= link_to 'Donate via Paypal', 'http://paypal.me/aschloss'
    %tr
      %td.even= link_to 'Submit a pull request', 'https://bitbucket.org/MarriNikari/glowfic/overview'
    %tr
      %td.odd= link_to 'Write something!', new_post_path

Fix contribute link for pull requests

%table.form-table
  %thead
    %tr
      %th.sub Contribute to the Constellation
  %tbody
    %tr
      %td.even= link_to 'Make a Patreon pledge', 'https://patreon.com/user?u=4240260'
    %tr
      %td.odd= link_to 'Donate via Paypal', 'http://paypal.me/aschloss'
    %tr
      %td.even= link_to 'Submit a pull request', 'https://github.com/Marri/glowfic'
    %tr
      %td.odd= link_to 'Write something!', new_post_path


- if current_user.timesheets.exists?
  %li
    = link_to "All your timesheets", user_timesheets_path(current_user)
- if current_user.current_timesheet
  %li
    = link_to "Your current timesheet", [:edit, current_user, current_user.current_timesheet]
    .current-timesheet-ending-time.hidden= current_user.current_timesheet.end_date

Add time sheets drop down in the top menu

- if current_user.timesheets.exists?
  %li.dropdown
    %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
      Timesheets
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to "All your timesheets", user_timesheets_path(current_user)
      - if current_user.current_timesheet
        %li
          = link_to "Your current timesheet", [:edit, current_user, current_user.current_timesheet]
          .current-timesheet-ending-time.hidden= current_user.current_timesheet.end_date


= content_for(:page_id, 'auth')

.auth-form.sign-in-form

  = form_for User.new, url: user_session_path, html: { class: "form" } do |f|
    %h2.huge-title Connectez-vous

    = f.label :email, "Email"
    = f.text_field :email, autofocus: true

    = f.label :password, "Mot de passe"
    = f.password_field :password, placeholder: "8 caractères minimum"

    .auth-options
      %div
        = f.check_box :remember_me, as: :boolean
        = f.label :remember_me, "Se souvenir de moi", class: 'remember-me'

      .text-right
        = link_to "Mot de passe oublié ?", new_user_password_path, class: "link"

    = f.submit "Se connecter", class: "button large primary expand"

  = render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }

  %hr
  %p.center
    %span Vous êtes nouveau sur demarches‑simplifiees.fr ?
    %br
    %br
    = link_to "Trouvez votre démarche", "https://faq.demarches-simplifiees.fr/article/59-comment-trouver-ma-demarche", target: "_blank", class: "button expend secondary"

Make login w3c compatible again

= content_for(:page_id, 'auth')

.auth-form.sign-in-form

  = form_for User.new, url: user_session_path, html: { class: "form" } do |f|
    %h2.huge-title Connectez-vous

    = f.label :email, "Email"
    = f.text_field :email, autofocus: true

    = f.label :password, "Mot de passe"
    = f.password_field :password, placeholder: "8 caractères minimum"

    .auth-options
      %div
        = f.check_box :remember_me
        = f.label :remember_me, "Se souvenir de moi", class: 'remember-me'

      .text-right
        = link_to "Mot de passe oublié ?", new_user_password_path, class: "link"

    = f.submit "Se connecter", class: "button large primary expand"

  = render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }

  %hr
  %p.center
    %span Vous êtes nouveau sur demarches‑simplifiees.fr ?
    %br
    %br
    = link_to "Trouvez votre démarche", "https://faq.demarches-simplifiees.fr/article/59-comment-trouver-ma-demarche", target: "_blank", class: "button expend secondary"


.row
  = simple_form_for(@project,
    :html => {:class => 'form-horizontal' },
    :wrapper => :horizontal_form,
    :wrapper_mappings => {:check_boxes => :horizontal_radio_and_checkboxes, :radio_buttons => :horizontal_radio_and_checkboxes, :file => :horizontal_file_input, :boolean => :horizontal_boolean}) do |f|
    .col-md-6
      = dialog_tag('Project Details', {:icon => 'fa fa-book', :class => "header_part"}) do
        = f.input :fy_year, :collection => @fiscal_years, :label => "Fiscal Year"
        = f.input :title, :placeholder => "Enter a title for this project..."
        = f.association :team_ali_code, :collection => TeamAliCode.bus_categories, :label_method => 'full_name', :label => 'Scope'
        = f.input :emergency, :as => :radio_buttons

    .col-md-6
      = dialog_tag('Project Description', {:icon => 'fa fa-book', :class => "header_part"}) do
        = f.input :description, :placeholder => "Enter a description for this project..."
        = f.input :justification, :placeholder => "Enter a justification for this project..."

    .col-md-12
      = f.button :submit, :class => "btn btn-primary"
      = submit_tag 'Cancel', :name => 'cancel', :class=>"btn btn-warning"

Add project type to form

.row
  = simple_form_for(@project,
    :html => {:class => 'form-horizontal' },
    :wrapper => :horizontal_form,
    :wrapper_mappings => {:check_boxes => :horizontal_radio_and_checkboxes, :radio_buttons => :horizontal_radio_and_checkboxes, :file => :horizontal_file_input, :boolean => :horizontal_boolean}) do |f|
    .col-md-6
      = dialog_tag('Project Details', {:icon => 'fa fa-book', :class => "header_part"}) do
        = f.input :fy_year, :collection => @fiscal_years, :label => "Fiscal Year"
        = f.input :title, :placeholder => "Enter a title for this project..."
        = f.association :team_ali_code, :collection => TeamAliCode.bus_categories, :label_method => 'full_name', :label => 'Scope'
        = f.association :capital_project_type, :label => 'Project Type'
        = f.input :emergency, :as => :radio_buttons

    .col-md-6
      = dialog_tag('Project Description', {:icon => 'fa fa-book', :class => "header_part"}) do
        = f.input :description, :placeholder => "Enter a description for this project..."
        = f.input :justification, :placeholder => "Enter a justification for this project..."

    .col-md-12
      = f.button :submit, :class => "btn btn-primary"
      = submit_tag 'Cancel', :name => 'cancel', :class=>"btn btn-warning"


%h1
  Listing roles
- unless Locomotive::Role.count == 0
  %p
    Roles are like job descriptions for your servers.
    You can check out the list below to see the roles that are currently available
    or add more using the "add more" link to the right.

  %table
    %tr
      %th
        Name
    - for role in @roles
      %tr
        %td
          = link_to role.name, resource(role)
        %td
          = link_to 'Edit', resource(role, :edit)
        %td
          = link_to 'Delete', resource(role, :delete), :class => 'delete-link'
- else # no roles defined yet
  %p
    Hey! It looks like you haven't defined any roles yet.
    Roles are like job descriptions for your servers. Hurry to the "add more"
    link to the right to add more.

#pagination
  = paginate_links(params[:page], @page_count, :platforms)

- throw_content :sidebar do
  %h2
    Actions
  %ul#general
    %li
      = link_to "Add a new role", resource(:roles, :new)

Fix pagination on roles index page

%h1
  Listing roles
- unless Locomotive::Role.count == 0
  %p
    Roles are like job descriptions for your servers.
    You can check out the list below to see the roles that are currently available
    or add more using the "add more" link to the right.

  %table
    %tr
      %th
        Name
    - for role in @roles
      %tr
        %td
          = link_to role.name, resource(role)
        %td
          = link_to 'Edit', resource(role, :edit)
        %td
          = link_to 'Delete', resource(role, :delete), :class => 'delete-link'
- else # no roles defined yet
  %p
    Hey! It looks like you haven't defined any roles yet.
    Roles are like job descriptions for your servers. Hurry to the "add more"
    link to the right to add more.

#pagination
  = paginate_links(params[:page], @page_count, :roles)

- throw_content :sidebar do
  %h2
    Actions
  %ul#general
    %li
      = link_to "Add a new role", resource(:roles, :new)


.account-well.prepend-top-default.append-bottom-default
  %ul
    %li
      = _('The repository must be accessible over http://,
      https://, ssh:// and git://.').html_safe
    %li= _('The update action will time out after 10 minutes. For big repositories, use a clone/push combination.')
    %li= _('The Git LFS objects will not be synced.').html_safe
    %li
      = _('This user will be the author of all events in the activity feed that are the result of an update,
      like new branches being created or new commits being pushed to existing branches.')

Add in username help text

.account-well.prepend-top-default.append-bottom-default
  %ul
    %li
      = _('The repository must be accessible over http://,
      https://, ssh:// and git://.').html_safe
    %li= _('Include the username in the URL if required: https://username@gitlab.company.com/group/project.git.').html_safe
    %li= _('The update action will time out after 10 minutes. For big repositories, use a clone/push combination.')
    %li= _('The Git LFS objects will not be synced.').html_safe
    %li
      = _('This user will be the author of all events in the activity feed that are the result of an update,
      like new branches being created or new commits being pushed to existing branches.')


-#We'll figure out a better way to deal with this later.
%noscript
  %nav#admin_subsections
    = render_navigation({:expand_all => true, :level => 2})

-# TODO: Actually design nav for the Administer section.
-# Ugly hack to avoid moving files around for the moment.. Abs position the nav :/
#tab_actions{:style => "margin-bottom: 5px;"}
  %span.label.small Control Panels
  %select#admin-section-select
    %option{:value => users_path} Choose section...
    %option{:value => users_path} Users
    %option{:value => roles_path} Roles
    %option{:value => providers_path} Providers
    %option{:value => provider_accounts_path} Provider Accounts
    %option{:value => hardware_profiles_path} Hardware Profiles
    %option{:value => realms_path} Realms
    %option{:value => pool_families_path} Pool Families
    %option{:value => suggested_deployables_path} Suggested Deployables
    %option{:value => settings_path} Settings

:javascript
  $(document).ready(function() {
    $('select#admin-section-select').change(function() {
      window.location = $(this).val();
    });
  });

Fix positioning of control panel select drop-down.

-#We'll figure out a better way to deal with this later.
%noscript
  %nav#admin_subsections
    = render_navigation({:expand_all => true, :level => 2})

-# TODO: Actually design nav for the Administer section.
-# Ugly hack to avoid moving files around for the moment.. Abs position the nav :/
#tab_actions{:style => "position: absolute; top: -32px; right: 0px;"}
  %label.label.small{:for => 'admin-section-select'} Control Panels
  %select#admin-section-select
    %option{:value => users_path} Choose section...
    %option{:value => users_path} Users
    %option{:value => roles_path} Roles
    %option{:value => providers_path} Providers
    %option{:value => provider_accounts_path} Provider Accounts
    %option{:value => hardware_profiles_path} Hardware Profiles
    %option{:value => realms_path} Realms
    %option{:value => pool_families_path} Pool Families
    %option{:value => suggested_deployables_path} Suggested Deployables
    %option{:value => settings_path} Settings

:javascript
  $(document).ready(function() {
    $('select#admin-section-select').change(function() {
      window.location = $(this).val();
    });
  });


.table-holder
  = render partial: "heat_source_lists/must_run_table", locals: { testing_ground: testing_ground, heat_source_list: heat_source_list }
  = render partial: "heat_source_lists/dispatchable_table", locals: { testing_ground: testing_ground, heat_source_list: heat_source_list }

.heat_source_profiles.hidden.profile
  - heat_source_technologies.each do |technology|
    = select_tag "profile", options_for_load_profiles(technology), include_blank: "---", class: "#{ technology.key } form-control profile heat"

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

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

  .btn-group.pull-right
    %span.wait.hidden= image_tag "wait.gif"

Remove blank profile option for must run heat assets

.table-holder
  = render partial: "heat_source_lists/must_run_table", locals: { testing_ground: testing_ground, heat_source_list: heat_source_list }
  = render partial: "heat_source_lists/dispatchable_table", locals: { testing_ground: testing_ground, heat_source_list: heat_source_list }

.heat_source_profiles.hidden.profile
  - heat_source_technologies.each do |technology|
    = select_tag "profile", options_for_load_profiles(technology), class: "#{ technology.key } form-control profile heat"

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

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

  .btn-group.pull-right
    %span.wait.hidden= image_tag "wait.gif"


.append-bottom-10
  .check-all-holder
    = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
  = render 'shared/issuable_filter'

  .clearfix
    .issues_bulk_update.hide
      = form_tag bulk_update_project_issues_path(@project), method: :post  do
        = select_tag('update[status]', options_for_select([['Open', 'open'], ['Closed', 'closed']]), prompt: "Status")
        = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
        = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
        = hidden_field_tag 'update[issues_ids]', []
        = hidden_field_tag :status, params[:status]
        = button_tag "Update issues", class: "btn update_selected_issues btn-save"

.panel.panel-default
  %ul.well-list.issues-list
    = render @issues
    - if @issues.blank?
      %li
        .nothing-here-block No issues to show

- if @issues.present?
  .pull-right
    %span.issue_counter #{@issues.total_count}
    issues for this filter

  = paginate @issues, theme: "gitlab"

Disable 'check all issues' checkbox for unprivileged users.

.append-bottom-10
  .check-all-holder
    = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left", disabled: !can?(current_user, :modify_issue, @project)
  = render 'shared/issuable_filter'

  .clearfix
    .issues_bulk_update.hide
      = form_tag bulk_update_project_issues_path(@project), method: :post  do
        = select_tag('update[status]', options_for_select([['Open', 'open'], ['Closed', 'closed']]), prompt: "Status")
        = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
        = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
        = hidden_field_tag 'update[issues_ids]', []
        = hidden_field_tag :status, params[:status]
        = button_tag "Update issues", class: "btn update_selected_issues btn-save"

.panel.panel-default
  %ul.well-list.issues-list
    = render @issues
    - if @issues.blank?
      %li
        .nothing-here-block No issues to show

- if @issues.present?
  .pull-right
    %span.issue_counter #{@issues.total_count}
    issues for this filter

  = paginate @issues, theme: "gitlab"


%aside.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" } }
  .sidebar-container
    .block.wiki-sidebar-header.append-bottom-default
      %a.gutter-toggle.float-right.d-block.d-sm-none.d-md-none.js-sidebar-wiki-toggle{ href: "#" }
        = icon('angle-double-right')

      - git_access_url = project_wikis_git_access_path(@project)
      = link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '' do
        = icon('cloud-download', class: 'append-right-5')
        %span= _("Clone repository")

    .blocks-container
      .block.block-first
        %ul.wiki-pages
          = render @sidebar_wiki_entries, context: 'sidebar'

      .block
        = link_to project_wikis_pages_path(@project), class: 'btn btn-block' do
          = s_("Wiki|More Pages")

= render 'projects/wikis/new'

Fix d-sm-block for wiki sidebar

%aside.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" } }
  .sidebar-container
    .block.wiki-sidebar-header.append-bottom-default
      %a.gutter-toggle.float-right.d-block.d-sm-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" }
        = icon('angle-double-right')

      - git_access_url = project_wikis_git_access_path(@project)
      = link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '' do
        = icon('cloud-download', class: 'append-right-5')
        %span= _("Clone repository")

    .blocks-container
      .block.block-first
        %ul.wiki-pages
          = render @sidebar_wiki_entries, context: 'sidebar'

      .block
        = link_to project_wikis_pages_path(@project), class: 'btn btn-block' do
          = s_("Wiki|More Pages")

= render 'projects/wikis/new'


- existing_students = portal_clazz.teacher ? (portal_clazz.teacher.students - portal_clazz.students) : nil
- student_list = (students_in_class(portal_clazz.students)).sort { |a,b| (a.user.last_name <=> b.user.last_name) }
/ = accordion_for(portal_clazz, "Students: #{student_list.length}", 'students_container') do

.content
  .action_menu
    .action_menu_header_left
      %strong= "Students: #{student_list.length}"
    .action_menu_header_right
      %ul
        - if portal_clazz.changeable?(current_user)
          - if (defined? existing_students) && existing_students.size > -1
            %li
              %span{:id => 'link_text'}
              = link_to_remote "Add ", :url => {:action=>'add_student', :id => portal_clazz}, :with => "'student_id='+$('student_id_selector').value"
              =select_tag('student_id', options_for_select(existing_students.map { |s| [s.login,s.id] }), :id=>'student_id_selector')

          %li= link_to "add new", new_portal_student_path(:clazz_id => portal_clazz.id), :title => "add a student to #{portal_clazz.name}"
.item{:id=>'students_listing'}
  = render :partial => 'portal/students/table_for_clazz', :locals => {:portal_clazz => @portal_clazz}

Hide / show student roster in clazz listing

- existing_students = portal_clazz.teacher ? (portal_clazz.teacher.students - portal_clazz.students) : nil
- student_list = (students_in_class(portal_clazz.students)).sort { |a,b| (a.user.last_name <=> b.user.last_name) }
/ = accordion_for(portal_clazz, "Students: #{student_list.length}", 'students_container') do

= accordion_for(portal_clazz, 'Student Roster') do
  .content
    .action_menu
      .action_menu_header_left
        %strong= "Students: #{student_list.length}"
      .action_menu_header_right
        %ul
          - if portal_clazz.changeable?(current_user)
            - if (defined? existing_students) && existing_students.size > -1
              %li
                %span{:id => 'link_text'}
                = link_to_remote "Add ", :url => {:action=>'add_student', :id => portal_clazz}, :with => "'student_id='+$('student_id_selector').value"
                =select_tag('student_id', options_for_select(existing_students.map { |s| [s.login,s.id] }), :id=>'student_id_selector')

            %li= link_to "add new", new_portal_student_path(:clazz_id => portal_clazz.id), :title => "add a student to #{portal_clazz.name}"
  .item{:id=>'students_listing'}
    = render :partial => 'portal/students/table_for_clazz', :locals => {:portal_clazz => @portal_clazz}


.section.content-fields
  - content_fields_to_display = f.object.content_fields_to_display(params[:action])
  - if content_fields_to_display.present?
    = f.fields_for :content, f.object.content do |ff|
      = render 'edit.fields', :f => ff, :fields => content_fields_to_display, :view_prefix => 'edit.field.content'
  .clear

Fix content issues. See full description.

.section.content-fields
  - content_fields_to_display = f.object.content_fields_to_display(params[:action])
  - if content_fields_to_display.present?
    = f.fields_for :content, f.object.content || f.object.content_class.new do |ff|
      = render 'edit.fields', :f => ff, :fields => content_fields_to_display, :view_prefix => 'edit.field.content'
  .clear


%h1 Listing posts

= link_to 'New Post', new_editor_post_url, class: 'btn btn-default'

%table.table
  %thead
    %tr
      %th Public ID
      %th Title
      %th Category
      %th Published at
      %th Thumbnail
      %th
      %th
      %th

  %tbody
    - @posts.each do |post|
      %tr
        %td= post.public_id
        %td= post.title
        %td= post.category&.name
        %td= post.published_at
        %td= image_tag post.thumbnail_url, height: 80 if post.thumbnail.present?
        %td= link_to 'Show', editor_post_url(post)
        %td= link_to 'Preview', preview_editor_post_url(post), target: '_blank'
        %td= link_to 'Edit', edit_editor_post_url(post)
        %td= link_to 'Destroy', editor_post_url(post), method: :delete, data: { confirm: 'Are you sure?' }

- if @posts.total_pages > 1
  .text-center
    %nav.pagination
      = paginate @posts, views_prefix: 'editor'
      %p.pagination__entries= page_entries_info @posts

Use `l` to display `post.published_at`

%h1 Listing posts

= link_to 'New Post', new_editor_post_url, class: 'btn btn-default'

%table.table
  %thead
    %tr
      %th Public ID
      %th Title
      %th Category
      %th Published at
      %th Thumbnail
      %th
      %th
      %th

  %tbody
    - @posts.each do |post|
      %tr
        %td= post.public_id
        %td= post.title
        %td= post.category&.name
        %td= l post.published_at  if post.published_at
        %td= image_tag post.thumbnail_url, height: 80 if post.thumbnail.present?
        %td= link_to 'Show', editor_post_url(post)
        %td= link_to 'Preview', preview_editor_post_url(post), target: '_blank'
        %td= link_to 'Edit', edit_editor_post_url(post)
        %td= link_to 'Destroy', editor_post_url(post), method: :delete, data: { confirm: 'Are you sure?' }

- if @posts.total_pages > 1
  .text-center
    %nav.pagination
      = paginate @posts, views_prefix: 'editor'
      %p.pagination__entries= page_entries_info @posts


.thread-previews
  %outlet{name: "before-thread-previews", model: "query"}
  .blank{ng-repeat: "thread in query.threads() | limitTo: limit | orderBy: '-lastActivityAt' track by thread.key"}
    %thread_preview{thread: "thread"}

Order before limiting for thread preview collection

.thread-previews
  %outlet{name: "before-thread-previews", model: "query"}
  .blank{ng-repeat: "thread in query.threads() | orderBy: '-lastActivityAt' | limitTo: limit track by thread.key"}
    %thread_preview{thread: "thread"}


%h1
  You're about submit paper
  = @paper.short_title

%h2#paper-title= @paper.title

#paper-abstract= @paper.abstract.html_safe

%table#paper-authors.table.table-hover
  %tr
    %thead Name
    %thead Affiliation
    %thead Email
  - @paper.authors.map { |a| a.with_indifferent_access }.each do |author|
    %tr
      %td= "#{author[:first_name]} #{author[:last_name]}"
      %td= author[:affiliation]
      %td= author[:email]

%table#paper-declarations.table.table-hover
  %tr
    %thead Question
    %thead Answer
  - @paper.declarations.each do |declaration|
    %tr
      %td= declaration.question
      %td= declaration.answer

= link_to 'Cancel', edit_paper_path(@paper), class: 'btn-primary btn-lg btn'
= button_to 'Submit', paper_submissions_path(@paper), class: 'btn-primary btn-lg btn'

Use proper tags for table headers

%h1
  You're about submit paper
  = @paper.short_title

%h2#paper-title= @paper.title

#paper-abstract= @paper.abstract.html_safe

%table#paper-authors.table.table-hover
  %tr
    %th Name
    %th Affiliation
    %th Email
  - @paper.authors.map { |a| a.with_indifferent_access }.each do |author|
    %tr
      %td= "#{author[:first_name]} #{author[:last_name]}"
      %td= author[:affiliation]
      %td= author[:email]

%table#paper-declarations.table.table-hover
  %tr
    %th Question
    %th Answer
  - @paper.declarations.each do |declaration|
    %tr
      %td= declaration.question
      %td= declaration.answer

= link_to 'Cancel', edit_paper_path(@paper), class: 'btn-primary btn-lg btn'
= button_to 'Submit', paper_submissions_path(@paper), class: 'btn-primary btn-lg btn'


.container
  .row
    .alert-message.block-message.notice.span8.offset3
      Your builds should now be working, and please alert us if this is not the case. You can message us directly via the white envelope below.
      As always, please feel free to contact us directly:
      %ul
        %li
          = mail_to "paul@circleci.com"
        %li
          +1 415 341 2432

  %table#projects
    %thead
      %tr
        %th Project
        %th Github
        %th Status
    %tbody
      - @projects.each do |project|
        %tr
          %td
            = link_to(project.github_project_name, github_project_path(project))
          %td
            = link_to project.vcs_url do
              = project.vcs_url
          %td
            Available

Make the front page a little bit better. Not perfect, but better.

.container
  .row
    .alert-message.block-message.notice.span8.offset3
      Your builds should now be working, and please alert us if this is not the case. You can message us directly via the white envelope below.
      As always, please feel free to contact us directly:
      %ul.contact
        %li
          = mail_to "paul@circleci.com"
        %li
          +1 415 341 2432

  %table#projects
    %thead
      %tr
        %th Project
        %th Latest build
        %th Status
    %tbody
      - @projects.each do |project|
        %tr
          %td
            = link_to(project.github_project_name, github_project_path(project))
          %td
            - if project.latest_build
              = build_link_to (project.latest_build)
          %td
            - if project.latest_build
              = project.latest_build.status


%h1= t(".title", group: @group.name)
%p= t(".main_site_link_html", group: @group.name, url: search_dashboard_url(subdomain: 'www', params: request.params))
= render partial: 'shared/search'

Remove action and controller from search redirect url

%h1= t(".title", group: @group.name)
%p= t(".main_site_link_html", group: @group.name, url: search_dashboard_url(subdomain: 'www', params: request.params.except(:action, :controller)))
= render partial: 'shared/search'


#top.clearfix
  %span.push_1.project_label Project
  %h1.push_1.grid_24= "Edit #{@project.name}"

#leftcolumn.push_1.prepend-1.grid_15
  = render "form"

#github.push_1.prepend-1.grid_15
  %h2 GitHub Post-Receive Hook
  %p You can use this to automatically post Git commit messages to the project page.
  %ol
    %li Copy the post-receive hook URL from below
    %li Go to your project's repository administration page on GitHub
    %li Choose "Service hooks"
    %li Add a new post-receive URL
  :textile
    More information can be found in GitHub's "Post-Receive Guide":http://help.github.com/post-receive-hooks/
  %input#post-receive.flip.grid_15{:type => :text, :value => github_api_v1_project_url(@project, :token => @project.api_token), :readonly => "readonly"}

#destroy.push_1.prepend-1.grid_15
  %h2 Destroy this project
  %p If you are absolutely sure (there is no undo), you can destroy this project by clicking the button below.
  = button_to "Destroy this project!", { :action => :destroy, :id => @project.id }, :class => "button", :confirm => "Are you sure you want to destroy this project?", :method => :delete

Update the GitHub instructions to reflect new Service Hook awesomeness...

#top.clearfix
  %span.push_1.project_label Project
  %h1.push_1.grid_24= "Edit #{@project.name}"

#leftcolumn.push_1.prepend-1.grid_15
  = render "form"

#github.push_1.prepend-1.grid_15
  %h2 GitHub Service Hook
  %p You can use this to automatically post Git commit messages to the project page.
  %ol
    %li Go to your project's repository administration page on GitHub
    %li Choose "Service hooks"
    %li Scroll down to Splendid Bacon in the list
    %li Copy/paste you Token and Project ID from below and mark the hook active
    %li Save the settings, and that's it.
  %label{:for => "project_id"} Project ID
  %input#post-receive.flip.grid_15#project_id{:type => :text, :value => @project.id, :readonly => "readonly"}
  %label{:for => "token"} Token
  %input#post-receive.flip.grid_15#token{:type => :text, :value => @project.api_token, :readonly => "readonly"}

#destroy.push_1.prepend-1.grid_15
  %h2 Destroy this project
  %p If you are absolutely sure (there is no undo), you can destroy this project by clicking the button below.
  = button_to "Destroy this project!", { :action => :destroy, :id => @project.id }, :class => "button", :confirm => "Are you sure you want to destroy this project?", :method => :delete


- if current_user&.theme.in?(Slice::THEMES.collect(&:second))
  - @menu = current_user&.theme
  - @body = current_user&.theme
  - @body_alt = current_user&.theme
  - @footer = current_user&.theme
- else
  - @menu = "default"
  - @body = "default"
  - @body_alt = "default"
  - @footer = "default"

- case @body
- when "night"
  - content_for :footer, render("decorations/moon")
- when "sunset"
  - content_for :footer, render("decorations/sunset")

Allow theme to be set by URL parameters

- if params[:theme].present?
  - @menu = @body = @body_alt = @footer = params[:theme]
- elsif current_user&.theme.in?(Slice::THEMES.collect(&:second))
  - @menu = @body = @body_alt = @footer = current_user&.theme
- else
  - @menu = @body = @body_alt = @footer = "default"

- case @body
- when "night"
  - content_for :footer, render("decorations/moon")
- when "sunset"
  - content_for :footer, render("decorations/sunset")


- content_for :page_title do
  = t(:listing_reports)

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

Use the same template even if there is no sub_report

- content_for :page_title do
  = t(:listing_reports)

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


- if show_last_push_widget?(event)
  .event-last-push
    .event-last-push-text
      %span You pushed to
      = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do
        %strong= event.ref_name
      at
      %strong= link_to_project event.project
      #{time_ago_with_tooltip(event.created_at)}

    .pull-right
      = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-create btn-sm" do
        Create Merge Request
  %hr

Fix text align in last push event

- if show_last_push_widget?(event)
  .event-last-push
    .event-last-push-text
      %span You pushed to
      = link_to namespace_project_commits_path(event.project.namespace, event.project, event.ref_name) do
        %strong= event.ref_name
      %span at
      %strong= link_to_project event.project
      #{time_ago_with_tooltip(event.created_at)}

    .pull-right
      = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-create btn-sm" do
        Create Merge Request
  %hr


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

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

  = smart_listing.paginate
  = smart_listing.pagination_per_page_links

- else
  %h4.center
    Aucun administrateur créé

Add informations on administrations view

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

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

- else
  %h4.center
    Aucun administrateur créé


- page_title "Tasks Queue"
- header_title "Tasks Queue", dashboard_tasks_path

.top-area
  %ul.nav-links
    %li{class: ("active" if params[:state].blank? || params[:state] == 'pending')}
      = link_to dashboard_tasks_path(state: 'pending') do
        Tasks (#{@pending_count})
    %li{class: ("active" if params[:state] == 'done')}
      = link_to dashboard_tasks_path(state: 'done') do
        Done (#{@done_count})

.tasks
  - if @tasks.any?
    - @tasks.group_by(&:project).each do |group|
      .panel.panel-default
        - project = group[0]
        .panel-heading
          = link_to project.name_with_namespace, namespace_project_path(project.namespace, project)

        %ul.well-list.tasks-list
          = render group[1]
    = paginate @tasks, theme: "gitlab"
  - else
    .nothing-here-block No tasks to show

Fix task queue list page title

- page_title "Task Queue"
- header_title "Task Queue", dashboard_tasks_path

.top-area
  %ul.nav-links
    %li{class: ("active" if params[:state].blank? || params[:state] == 'pending')}
      = link_to dashboard_tasks_path(state: 'pending') do
        Tasks (#{@pending_count})
    %li{class: ("active" if params[:state] == 'done')}
      = link_to dashboard_tasks_path(state: 'done') do
        Done (#{@done_count})

.tasks
  - if @tasks.any?
    - @tasks.group_by(&:project).each do |group|
      .panel.panel-default
        - project = group[0]
        .panel-heading
          = link_to project.name_with_namespace, namespace_project_path(project.namespace, project)

        %ul.well-list.tasks-list
          = render group[1]
    = paginate @tasks, theme: "gitlab"
  - else
    .nothing-here-block No tasks to show


.article.featured.primary{ :style => "background-image: url(#{article.image.url})" }
  %h2
    =link_to article.title, article.url
  = render 'home/posted_by', :article => article
  = render 'home/article_links', :article => article

Add debug questionmark to featured articles

.article.featured.primary{ :style => "background-image: url(#{article.image.url})" }
  = render 'home/debug', :article => article if current_user.debug_user?
  %h2
    =link_to article.title, article.url
  = render 'home/posted_by', :article => article
  = render 'home/article_links', :article => article


%ul.nav.nav-sidebar
  = nav_link(path: user_snippets_path(current_user), html_options: {class: 'home'}) do
    = link_to user_snippets_path(current_user), title: 'Your snippets', data: {placement: 'right'} do
      = icon('dashboard fw')
      %span
        Your Snippets
  = nav_link(path: snippets_path) do
    = link_to snippets_path, title: 'Discover snippets', data: {placement: 'right'} do
      = icon('globe fw')
      %span
        Discover Snippets

Fix snippest sidebar when signed out.

%ul.nav.nav-sidebar
  - if current_user
    = nav_link(path: user_snippets_path(current_user), html_options: {class: 'home'}) do
      = link_to user_snippets_path(current_user), title: 'Your snippets', data: {placement: 'right'} do
        = icon('dashboard fw')
        %span
          Your Snippets
  = nav_link(path: snippets_path) do
    = link_to snippets_path, title: 'Discover snippets', data: {placement: 'right'} do
      = icon('globe fw')
      %span
        Discover Snippets


%h4 Overall stats
%ul
  %li
    Total:
    %strong= pluralize @counts[:total], 'job'
  %li
    Successful:
    %strong= pluralize @counts[:success], 'job'
  %li
    Failed:
    %strong= pluralize @counts[:failed], 'job'
  %li
    Success ratio:
    %strong
      #{success_ratio(@counts)}%

Remove last references to job for pipeline charts

%h4 Overall stats
%ul
  %li
    Total:
    %strong= pluralize @counts[:total], 'pipeline'
  %li
    Successful:
    %strong= pluralize @counts[:success], 'pipeline'
  %li
    Failed:
    %strong= pluralize @counts[:failed], 'pipeline'
  %li
    Success ratio:
    %strong
      #{success_ratio(@counts)}%


- content_for :title, 'Apps'
- content_for :action_bar do
  %span= link_to('Add a New App', new_app_path, :class => 'add') if current_user.admin?

%table.apps
  %thead
    %tr
      %th Name
      %th Last Deploy
      %th Errs
  %tbody
    - @apps.each do |app|
      %tr
        %td.name= link_to app.name, app_path(app)
        %td.deploy= app.last_deploy_at ? app.last_deploy_at.to_s(:micro) : 'n/a'
        %td.count
          - if app.errs.any?
            = link_to app.errs.unresolved.count, app_errs_path(app)
          - else
            \-
    - if @apps.none?
      %tr
        %td{:colspan => 3}
          %em
            No apps here.
            = link_to 'Click here to create your first one', new_app_path

Add link from the application page to the deploys

- content_for :title, 'Apps'
- content_for :action_bar do
  %span= link_to('Add a New App', new_app_path, :class => 'add') if current_user.admin?

%table.apps
  %thead
    %tr
      %th Name
      %th Last Deploy
      %th Errs
  %tbody
    - @apps.each do |app|
      %tr
        %td.name= link_to app.name, app_path(app)
        %td.deploy= app.last_deploy_at ? link_to( app.last_deploy_at.to_s(:micro), app_deploys_path(app)) : 'n/a'
        %td.count
          - if app.errs.any?
            = link_to app.errs.unresolved.count, app_errs_path(app)
          - else
            \-
    - if @apps.none?
      %tr
        %td{:colspan => 3}
          %em
            No apps here.
            = link_to 'Click here to create your first one', new_app_path


- @page_title = 'Home'
#home_index
  .group_1
    %section.locations
      = render :partial => 'locations'
    %section.about_app
      :markdown
        Looking for government **data sets**, **APIs**, and **tools**? We have
        data from various **levels** (federal, state, and local) and
        **branches** (executive, legislative, and judicial) of government.
    %section.categories
      = render :partial => 'categories'
    .clear
  %section.aggregates
    = render :partial => 'aggregates'
  .highlights
    %section.find_data
      :markdown
        # Find Data
        Find data sources (data sets, APIs, and tools)
    %section.discuss_data
      :markdown
        # Discuss Data
        Discuss, question, document data sources
    %section.share_data
      :markdown
        # Share Data
        Share your derivative work based on the data here
    %section.find_people
      :markdown
        # Find People
        Find interesting people in the data community
    .clear
  .group_2
    %section.activity_stream
      = render :partial => 'activity_stream'
    %section.featured_data_source
      = render :partial => 'featured_data_source'
    .clear

Add hyperlinks to home page highlights

- @page_title = 'Home'
#home_index
  .group_1
    %section.locations
      = render :partial => 'locations'
    %section.about_app
      :markdown
        Looking for government **data sets**, **APIs**, and **tools**? We have
        data from various **levels** (federal, state, and local) and
        **branches** (executive, legislative, and judicial) of government.
    %section.categories
      = render :partial => 'categories'
    .clear
  %section.aggregates
    = render :partial => 'aggregates'
  .highlights
    %section.find_data
      %h1= link_to('Find Data', data_sources_path)
      %p Find data sources (data sets, APIs, and tools)
    %section.discuss_data
      %h1= link_to('Discuss Data', discussions_path)
      %p Discuss, question, document data sources
    %section.share_data
      %h1= link_to('Share Data', data_sources_path)
      %p Share your derivative work based on the data here
    %section.find_people
      %h1= link_to('Find People', users_path)
      %p Find interesting people in the data community
    .clear
  .group_2
    %section.activity_stream
      = render :partial => 'activity_stream'
    %section.featured_data_source
      = render :partial => 'featured_data_source'
    .clear


.container
  %h2
    404
    %small Not Found
  %p
    That user doesn't exist.
  %p
    If you have reason to believe this is a mistake, please
    %a{href: "mailto:qhiiyr@gmail.com"} email me
    this URL and why you think so.

Fix headers on user 404 page

- title '404'
- content_for(:header) do
  %h2
    404
    %small Not Found
%article
  %p
    That user doesn't exist.
  %p
    If you have reason to believe this is a mistake, please
    %a{href: "mailto:qhiiyr@gmail.com"} email me
    this URL and why you think so.


%li.user
  = link_to image_tag(gravatar_url(user.gravatar_id), :width => 80, :height => 80, :alt =>user.nickname), user.nickname, rel: 'tooltip', data: { original_title: "#{user.nickname} - #{user.pull_requests.year(current_year).count} pull requests." }

Use proper link in user partial

%li.user
  = link_to image_tag(gravatar_url(user.gravatar_id), :width => 80, :height => 80, :alt =>user.nickname), user_path(user.nickname), rel: 'tooltip', data: { original_title: "#{user.nickname} - #{user.pull_requests.year(current_year).count} pull requests." }


#save-bar.animate-show{ ng: { show: 'dirty || persist || StatusMessage.active()' } }
  .container
    .eight.columns.alpha
      %h5#status-message{ ng: { show: "StatusMessage.invalidMessage == ''", style: 'StatusMessage.statusMessage.style' } }
        {{ StatusMessage.statusMessage.text || " " }}
      %h5#status-message{ ng: { show: "StatusMessage.invalidMessage !== ''" }, style: 'color: #da5354' }
        {{ StatusMessage.invalidMessage || " " }}
    .eight.columns.omega.text-right{ ng: { transclude: true } }

Increase space for buttons in savebar layout

#save-bar.animate-show{ ng: { show: 'dirty || persist || StatusMessage.active()' } }
  .container
    .seven.columns.alpha
      %h5#status-message{ ng: { show: "StatusMessage.invalidMessage == ''", style: 'StatusMessage.statusMessage.style' } }
        {{ StatusMessage.statusMessage.text || " " }}
      %h5#status-message{ ng: { show: "StatusMessage.invalidMessage !== ''" }, style: 'color: #da5354' }
        {{ StatusMessage.invalidMessage || " " }}
    .nine.columns.omega.text-right{ ng: { transclude: true } }


= form_for [:case_workers, :admin, @case_worker], builder: AdpFormBuilder do |f|
  = f.fields_for :user do |user_fields|
    %fieldset
      %legend
        = 'Case worker details'

      = f.adp_text_field :first_name,
                          label: t('.first_name')

      = f.adp_text_field :last_name,
                          label: t('.last_name')

      = f.adp_text_field :email,
                          label: t('.email'),
                          input_classes: 'long-input'

      - if @case_worker.new_record?
        = f.adp_text_field :email_confirmation,
                          label: t('.email_confirmation')
      %fieldset.inline
        %legend
          = 'Location'
        .form-group
          = f.collection_radio_buttons(:location_id, Location.all, :id, :name) do |b|
            - b.label(class: "block-label") { b.radio_button + b.object.name }

      %fieldset.inline
        %legend
          = 'Roles'
        .form-group
          = f.collection_check_boxes(:roles, CaseWorker::ROLES, :to_s, :to_s) do |b|
            - b.label(class: "block-label") { b.check_box + b.value.humanize }

    = f.submit 'Save', class: "button"

Use the proper form accessor.

= form_for [:case_workers, :admin, @case_worker], builder: AdpFormBuilder do |f|
  = f.fields_for :user do |user_fields|
    %fieldset
      %legend
        = 'Case worker details'

      = user_fields.adp_text_field :first_name, label: t('.first_name')

      = user_fields.adp_text_field :last_name, label: t('.last_name')

      = user_fields.adp_text_field :email, label: t('.email')

      - if @case_worker.new_record?
        = user_fields.adp_text_field :email_confirmation, label: t('.email_confirmation')

      %fieldset.inline
        %legend
          = 'Location'
        .form-group
          = f.collection_radio_buttons(:location_id, Location.all, :id, :name) do |b|
            - b.label(class: "block-label") { b.radio_button + b.object.name }

      %fieldset.inline
        %legend
          = 'Roles'
        .form-group
          = f.collection_check_boxes(:roles, CaseWorker::ROLES, :to_s, :to_s) do |b|
            - b.label(class: "block-label") { b.check_box + b.value.humanize }

    = f.submit 'Save', class: "button"


%h1
  %a{:href => "/"} Picasa Gallery
#content
  = @photos.pager.to_html("/")
  #thumbnails
    - @photos.each do |img|
      %a.thumbnail{:href => img['image'], :rel => "gallery"}
        %img{:src => img["thumb"], :alt => "Soshi Image"}/
  = @photos.pager.to_html("/")

Add missing files for cleaner page urls.

%h1
  %a{:href => "/"} Picasa Gallery
#content
  = @photos.pager.to_html("/page", :clean => true)
  #thumbnails
    - @photos.each do |img|
      %a.thumbnail{:href => img['image'], :rel => "gallery"}
        %img{:src => img["thumb"], :alt => "Gallery Image"}/
  = @photos.pager.to_html("/page", :clean => true)


- case @visit_status
- when :confirmed
  %h1 Your visit is confirmed
  %p Your visit has been confirmed and you should have received a confirmation email.
- when :rejected
  %h1 Your visit request has been rejected
  %p You should have received an email to say that your visit cannot take place as planned.
- when :pending
  %h1 Your visit is pending
  %p Your visit request is currently being processed. You’ll get a confirmation email within 3 working days.
%p If you don’t receive a confirmation email within 3 days, please check your spam or junk folder. You need to do this on a computer or tablet (rather than a smart phone).
%p
  To stop visit confirmation emails going to your spam or junk folder please add
  %span.no-wrap no-reply@email.prisonvisits.service.gov.uk
  to your address book or safe senders list.

Copy changes to the visit status page.

- case @visit_status
- when :confirmed
  %h1 Your visit has been confirmed
  %p Your visit has been confirmed. You should have received an email confirming the exact date and time of your visit.
- when :rejected
  %h1 Your visit request has been rejected
  %p You should have received an email to say that your visit cannot take place as planned.
- when :pending
  %h1 Your visit is currently being processed
  %p Your visit request is currently being processed. You’ll get a confirmation email within 3 working days.
%p If you don’t receive an email within 3 days, please check your spam or junk folder. You need to do this on a computer or tablet (rather than a smart phone).
%p
  To stop visit confirmation emails going to your spam or junk folder please add
  %span.no-wrap no-reply@email.prisonvisits.service.gov.uk
  to your address book or safe senders list.


.hero-unit
  %h1
    Start working on a lab
    %br
    %p Connect a lab group to the lab or create a new lab group.
.row
  .span6
    .well.equal-height
      .center
        - if @lab_groups
          %br
          %h3
            Connect an existing lab group
          %br
          = form_tag "", class: "form form-horizontal" do
            = select_tag "lab_group",
              options_from_collection_for_select(@lab_groups,
                "id",
                "name",
                prompt: "Select a group")
            = submit_tag "Connect", class: "btn btn-primary"
        - else
          %h1 You have no lab groups.
  .span6
    .well.equal-height
      .center
        %br
        %h3
          = link_to 'Create a Lab Group',
            course_lab_groups_path("student", params[:course_id]),
            method: 'post',
            class: "btn btn-big btn-primary"
        %br
        %h5 A new group will be created and connected to the lab

Fix paths in lab start view

.hero-unit
  %h1
    Start working on a lab
    %br
    %p Connect a lab group to the lab or create a new lab group.
.row
  .span6
    .well.equal-height
      .center
        - if @lab_groups
          %br
          %h3
            Connect an existing lab group
          %br
          = form_tag join_course_lab_path(current_role_name,
            params[:course_id], params[:id]),
            method: :post,
            html: {class: "form form-horizontal"} do
            = select_tag "lab_group_id",
              options_from_collection_for_select(@lab_groups,
                "id",
                "name",
                prompt: "Select a group")
            = submit_tag "Connect", class: "btn btn-primary"
        - else
          %h1 You have no lab groups.
  .span6
    .well.equal-height
      .center
        %br
        %h3
          = form_tag register_course_lab_path("student", params[:course_id], @lab) do
            = submit_tag "Create a Lab Group", class: "btn btn-big btn-primary"
        %br
        %h5 A new group will be created and connected to the lab


- content_for :head_css do
  = stylesheet_link_tag "show_data"

- title "User #{@user.name}"

%fieldset.show_data
  %p
    %span.key Name:
    %span.data= @user.name
  %p
    %span.key e-Mail:
    %span.data= @user.email
  %p
    %span.key Extension:
    %span.data= @user.extension

= link_to "Change password", change_password_path
|
= link_to "Back to users", users_path

Fix some links in show user

- content_for :head_css do
  = stylesheet_link_tag "show_data"

- title "User #{@user.name}"

%fieldset.show_data
  %p
    %span.key Name:
    %span.data= @user.name
  %p
    %span.key e-Mail:
    %span.data= @user.email
  %p
    %span.key Extension:
    %span.data= @user.extension

= link_to "Edit", edit_user_path(@user)
- if current_user == @user
  |
  = link_to "Change password", change_password_path
|
= link_to "Back to users", users_path


%h2.title Not Found (404)

%span There was an error processing your request. Check the URL you've typed in for errors.

Improve the grammar on the not found page

%h2.title Not Found (404)

%span There was an error processing your request. Check the URL for errors.


.header-login-box
  %div
    /= form_tag session_path, :id=>"header-project-signin" do
    = form_tag "", :id=>"header-project-signin" do
      %table{:cellpadding=>"0", :cellspacing=>"0", :border=>"0"}
        %tbody
          %tr.first-row
            %td
              %label{:for=>"header_login"}Username
            %td.login-box
              %input{:type=>"text", :id=>"header_login", :value=> @login, :name=>"login"}
          %tr.second-row
            %td
              %label{:for=>"header_password"}Password
            %td.password-box
              %input{:type=>"password", :id=>"header_password", :class=>"text", :name=>"password"}
          %tr.third-row
            %td
            %td
              =link_to 'Forgot login?',forgot_password_path, :id=>"link_forgot_password"
              |
              =link_to 'Register', pick_signup_path
              %input{:type=>"submit", :id=>"LoginSubmitButtonHeader",:value=>"GO"}
      .clear_both
  - if current_user
    %div
      = link_to 'Logout', destroy_user_session_path
  - else
    %div Not Logged In

Add Welcome text for current_user

.header-login-box
  - if current_user
    %div{:style=> "font-size:14px"}
      %span{:style=> "max-width: 646px; text-align: left;"}
        Welcome
        = current_user.first_name + " " + current_user.last_name
      = link_to 'Logout', destroy_user_session_path

  - else
    %div
      /= form_tag session_path, :id=>"header-project-signin" do
      = form_tag "", :id=>"header-project-signin" do
        %table{:cellpadding=>"0", :cellspacing=>"0", :border=>"0"}
          %tbody
            %tr.first-row
              %td
                %label{:for=>"header_login"}Username
              %td.login-box
                %input{:type=>"text", :id=>"header_login", :value=> @login, :name=>"login"}
            %tr.second-row
              %td
                %label{:for=>"header_password"}Password
              %td.password-box
                %input{:type=>"password", :id=>"header_password", :class=>"text", :name=>"password"}
            %tr.third-row
              %td
              %td
                =link_to 'Forgot login?',forgot_password_path, :id=>"link_forgot_password"
                |
                =link_to 'Register', pick_signup_path
                %input{:type=>"submit", :id=>"LoginSubmitButtonHeader",:value=>"GO"}
        .clear_both


- page_title t('.page_title') do
  - link_to edit_daemon_setting_path(@fluentd), class: "btn btn-primary float-right" do
    = icon('fa-pencil')
    = t("terms.edit")

.row
  .col-xl-12
    %pre
      = preserve do
        = @config

.row
  .col-xl-12
    %h3= link_to(t('fluentd.settings.running_backup.title'), daemon_setting_running_backup_path)
    %p
      %label= t('terms.backup_time')
      = @running_backedup_file.ctime.try(:strftime, I18n.t('time.formats.default')) || t('fluentd.common.never_started_yet', brand: fluentd_ui_brand)

.row
  .col-xl-12
    %h3= t('fluentd.settings.history')
    = render '/fluentd/settings/histories/list'
    .link= link_to t('.link_to_histories'), daemon_setting_histories_path

Use card to display box

- page_title t('.page_title') do
  - link_to edit_daemon_setting_path(@fluentd), class: "btn btn-primary float-right" do
    = icon('fa-pencil')
    = t("terms.edit")

.row
  .card.col-xl-12
    %pre.card-body
      = preserve do
        = @config

.row
  .col-xl-12
    %h3= link_to(t('fluentd.settings.running_backup.title'), daemon_setting_running_backup_path)
    %p
      %label= t('terms.backup_time')
      = @running_backedup_file.ctime.try(:strftime, I18n.t('time.formats.default')) || t('fluentd.common.never_started_yet', brand: fluentd_ui_brand)

.row
  .col-xl-12
    %h3= t('fluentd.settings.history')
    = render '/fluentd/settings/histories/list'
    .link= link_to t('.link_to_histories'), daemon_setting_histories_path


- content_for :page_title do
  = "#{@page_title} - #{Rails.configuration.app_title}"

- content_for :stylesheets do
  = raw stylesheet_link_tag("application", media: "all")
  = raw %Q|    <!--[if IE 6]> #{stylesheet_link_tag "govuk_elements_extensions_ie6", media: "all"} <![endif]-->|
  = raw %Q|    <!--[if IE 7]> #{stylesheet_link_tag "govuk_elements_extensions_ie7", media: "all"} <![endif]-->|
  = raw %Q|    <!--[if IE 8]> #{stylesheet_link_tag "govuk_elements_extensions_ie8", media: "all"} <![endif]-->|

- content_for :javascripts do
  = raw %Q|    <!--[if gte IE 7]><!--> #{javascript_include_tag "application"} <!--<![endif]-->|

- content_for :head do
  = csrf_meta_tag

- content_for :cookie_message, ""

- content_for :content_override do
  %main#page-container{ role: "main" }
    .phase-banner
      %p
        %span This is a prototype.
    =yield

- content_for :footer_app_links do
  %li
    %ul
      %li

= render template: "layouts/moj_template"

Use id="content" on main element to fix layout

- content_for :page_title do
  = "#{@page_title} - #{Rails.configuration.app_title}"

- content_for :stylesheets do
  = raw stylesheet_link_tag("application", media: "all")
  = raw %Q|    <!--[if IE 6]> #{stylesheet_link_tag "govuk_elements_extensions_ie6", media: "all"} <![endif]-->|
  = raw %Q|    <!--[if IE 7]> #{stylesheet_link_tag "govuk_elements_extensions_ie7", media: "all"} <![endif]-->|
  = raw %Q|    <!--[if IE 8]> #{stylesheet_link_tag "govuk_elements_extensions_ie8", media: "all"} <![endif]-->|

- content_for :javascripts do
  = raw %Q|    <!--[if gte IE 7]><!--> #{javascript_include_tag "application"} <!--<![endif]-->|

- content_for :head do
  = csrf_meta_tag

- content_for :cookie_message, ""

- content_for :content_override do
  %main#content{ role: "main" }
    .phase-banner
      %p
        %span This is a prototype.
    =yield

- content_for :footer_app_links do
  %li
    %ul
      %li

= render template: "layouts/moj_template"


- if @portal_clazz.is_teacher?(current_user) || current_user.has_role?("admin")
  = render_portal_clazz_partial 'portal/clazzes/show'
  = render_portal_clazz_partial 'portal/offerings/list_for_clazz'
  %br
  = render_portal_clazz_partial 'portal/students/list_for_clazz'
- elsif current_user.has_role?("manager", "researcher")
  = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- else
  = render_portal_clazz_partial 'portal/clazzes/show'
  - # Added to show investigations to students in class view. -- Cantina-CMH 6/21/10
  %h4 #{top_level_container_name.capitalize.pluralize}:
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @offerings }

Remove the class roster from the class home page

- if @portal_clazz.is_teacher?(current_user) || current_user.has_role?("admin")
  = render_portal_clazz_partial 'portal/clazzes/show'
  = render_portal_clazz_partial 'portal/offerings/list_for_clazz'
- elsif current_user.has_role?("manager", "researcher")
  = render :partial => 'shared/offering_for_teacher', :collection => @portal_clazz.offerings, :as => :offering
- else
  = render_portal_clazz_partial 'portal/clazzes/show'
  - # Added to show investigations to students in class view. -- Cantina-CMH 6/21/10
  %h4 #{top_level_container_name.capitalize.pluralize}:
  = render :partial => 'shared/offerings_for_student', :locals => { :offerings => @offerings }


%table
  %tr
    %td login
    %td email
    %td first_name
    %td last_name
    %td current_login_at
    %td last_login_at
  -@users.each do |user|
    %tr
      %td= user.login
      %td= user.email
      %td= user.first_name
      %td= user.last_name
      %td= user.current_login_at
      %td= user.last_login_at

Fix markup and looks for the Users table

%table
  %thead
    %tr
      %th login
      %th email
      %th first_name
      %th last_name
      %th current_login_at
      %th last_login_at
  -@users.each do |user|
    %tbody
      %tr
        %td= user.login
        %td= user.email
        %td= user.first_name
        %td= user.last_name
        %td= user.current_login_at
        %td= user.last_login_at


%table#claims-list
  %thead
    %tr
      %th
      %th
        Case number
      %th
        Advocate
      %th
        Defendant(s)
      %th{:title => "Including VAT"}
        Claim Total
      %th
        Date
      %th
        Status
      %th.message-placeholder
  %tbody
    - @claims.each do |claim_object|
      - present(claim_object) do | claim |
        %tr
          %td
          %td
            = link_to claim.case_number , case_workers_claim_path(claim),{:class => 'js-test-case-number-link'}
          %td
            = claim.advocate.user.name
          %td
            = claim.defendant_names
          %td.js-test-total
            = claim.total_inc_vat
          %td
            = claim.submitted_at(include_time: false) unless claim.draft?
          %td
            = "Current (WIP)"
          %td
            - if claim.has_unread_messages_for?(current_user)
              %object{:type => 'image/svg+xml', :data => image_path('unread-message.svg'), :class => 'message'}
            - elsif claim.messages.any?
              %object{:type => 'image/svg+xml', :data => image_path('read-message.svg'), :class => 'message'}
            - else
              %span.message-placeholder

Remove 'status' column from the report.

%table#claims-list
  %thead
    %tr
      %th
      %th
        Case number
      %th
        Advocate
      %th
        Defendant(s)
      %th{:title => "Including VAT"}
        Claim Total
      %th
        Date
      %th.message-placeholder
  %tbody
    - @claims.each do |claim_object|
      - present(claim_object) do | claim |
        %tr
          %td
          %td
            = link_to claim.case_number , case_workers_claim_path(claim),{:class => 'js-test-case-number-link'}
          %td
            = claim.advocate.user.name
          %td
            = claim.defendant_names
          %td.js-test-total
            = claim.total_inc_vat
          %td
            = claim.submitted_at(include_time: false) unless claim.draft?
          %td
            - if claim.has_unread_messages_for?(current_user)
              %object{:type => 'image/svg+xml', :data => image_path('unread-message.svg'), :class => 'message'}
            - elsif claim.messages.any?
              %object{:type => 'image/svg+xml', :data => image_path('read-message.svg'), :class => 'message'}
            - else
              %span.message-placeholder


%fieldset#signup
  %legend Sign up
  = simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
    = f.error_notification
    .form-inputs
      = f.input :email,
        required: true,
        autofocus: true
      = f.association :organization
      = f.input :password,
        required: true,
        hint: "At least 10 characters."
      = f.input :password_confirmation, required: true
      = f.input :first_name
      = f.input :last_name
      = f.input :emergency_role,
        label: "Role during emergencies"
      = f.input :mobile_phone_number
      = f.input :landline_phone_number
      = f.input :street_address
      = f.input :city
      = f.input :state
    .form-actions
      = f.button :submit, "Sign up", class: 'btn-primary'
  = render "devise/shared/links"

Add errors to signin form

= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
  = f.error_notification
  %fieldset#signup
    %legend Sign up
  .form-inputs
    = f.input :email,
      required: true,
      autofocus: true
    = f.association :organization
    = f.input :password,
      required: true,
      hint: "At least 10 characters."
    = f.input :password_confirmation, required: true
    = f.input :first_name
    = f.input :last_name
    = f.input :emergency_role,
      label: "Role during emergencies"
    = f.input :mobile_phone_number
    = f.input :landline_phone_number
    = f.input :street_address
    = f.input :city
    = f.input :state
  .form-actions
    = f.button :submit, "Sign up", class: 'btn-primary'
= render "devise/shared/links"


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


%table.list
  %tr
    %th= t_attr :date, Activity
    %th Wochentag
    %th.number= t_attr :hours_due, Activity
    %th.number= t_attr :hours_worked, Activity
    %th.number= t_attr :overtime, Activity
    %th.number= t_attr :overall_overtime, Activity

  - overall_overtime = 0
  - WorkDay.for_month(@employee).each do |day|
    - overall_overtime += day.overtime
    %tr{:style => "opacity: #{day.hours_due == 0.0 ? 0.4 : 1}; #{day.overtime < 0.0 ? 'color: #B94A48' : ''}"}
      %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

Drop unused .list style for timesheets table.

%table
  %tr
    %th= t_attr :date, Activity
    %th Wochentag
    %th.number= t_attr :hours_due, Activity
    %th.number= t_attr :hours_worked, Activity
    %th.number= t_attr :overtime, Activity
    %th.number= t_attr :overall_overtime, Activity

  - overall_overtime = 0
  - WorkDay.for_month(@employee).each do |day|
    - overall_overtime += day.overtime
    %tr{:style => "opacity: #{day.hours_due == 0.0 ? 0.4 : 1}; #{day.overtime < 0.0 ? 'color: #B94A48' : ''}"}
      %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


%h1 Claims

%p
  = link_to 'Add Claim', new_advocates_claim_path, class: 'button'

%p
  = form_tag case_workers_claims_path, method: :get do
    = text_field_tag :search, params[:search], placeholder: 'Advocate'
    = submit_tag 'Search', class: 'button'

%h2 Current claims (#{@current_claims.count})
#current
  = render partial: 'claims', locals: { claims: @current_claims }

%h2 Completed claims (#{@completed_claims.count})
#completed
  = render partial: 'claims', locals: { claims: @completed_claims }

%h2 Draft claims (#{@draft_claims.count})
#draft
  = render partial: 'claims', locals: { claims: @draft_claims }

Fix advocate name search form url to advocates claims url

%h1 Claims

%p
  = link_to 'Add Claim', new_advocates_claim_path, class: 'button'

%p
  = form_tag advocates_claims_path, method: :get do
    = text_field_tag :search, params[:search], placeholder: 'Advocate'
    = submit_tag 'Search', class: 'button'

%h2 Current claims (#{@current_claims.count})
#current
  = render partial: 'claims', locals: { claims: @current_claims }

%h2 Completed claims (#{@completed_claims.count})
#completed
  = render partial: 'claims', locals: { claims: @completed_claims }

%h2 Draft claims (#{@draft_claims.count})
#draft
  = render partial: 'claims', locals: { claims: @draft_claims }


- page_title "Groups"
- header_title  "Groups", dashboard_groups_path
= render 'dashboard/groups_head'

= page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('groups')

- if @groups.empty?
  = render 'empty_state'
- else
  = render 'groups'

Use webpack_bundle_tag instead of deprecated page_specific_javascript_bundle_tag

- page_title "Groups"
- header_title  "Groups", dashboard_groups_path
= render 'dashboard/groups_head'

= webpack_bundle_tag 'common_vue'
= webpack_bundle_tag 'groups'

- if @groups.empty?
  = render 'empty_state'
- else
  = render 'groups'


%p{:style=>'font-weight:bold'}
  - if @activities_count > 0 or @investigations_count > 0
    = build_onSearch_message(@form_model).html_safe
  - else
    No Results Found

.results_container
  %form{:method => :post, :id => "search_result_form"}
    -# TODO: I think this form can be safely removed
    = hidden_field_tag "search_term", @search_term
    = hidden_field_tag "investigation_page", @investigation_page
    = hidden_field_tag "activity_page", @activity_page
    = hidden_field_tag "interactive_page", @interactive_page
    - if investigations && !investigations.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => investigations, :type => 'Investigations', :material_symbol => :investigation, :material_class => Investigation, :param_name => 'investigation_page'}
    - if activities && !activities.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => activities, :type => 'Activities', :material_symbol => :activity, :material_class => Activity, :param_name => 'activity_page' }
    - if interactives && !interactives.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => interactives, :type => 'Interactives', :material_symbol => :interactive, :material_class => Interactive, :param_name => 'interactive_page' }

Fix the result message in the search page.

%p{:style=>'font-weight:bold'}
  - if @activities_count > 0 or @investigations_count > 0 or @interactives_count > 0
    = build_onSearch_message(@form_model).html_safe
  - else
    No Results Found

.results_container
  %form{:method => :post, :id => "search_result_form"}
    -# TODO: I think this form can be safely removed
    = hidden_field_tag "search_term", @search_term
    = hidden_field_tag "investigation_page", @investigation_page
    = hidden_field_tag "activity_page", @activity_page
    = hidden_field_tag "interactive_page", @interactive_page
    - if investigations && !investigations.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => investigations, :type => 'Investigations', :material_symbol => :investigation, :material_class => Investigation, :param_name => 'investigation_page'}
    - if activities && !activities.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => activities, :type => 'Activities', :material_symbol => :activity, :material_class => Activity, :param_name => 'activity_page' }
    - if interactives && !interactives.empty?
      = render :partial => 'search/result_materials', :locals => { :materials => interactives, :type => 'Interactives', :material_symbol => :interactive, :material_class => Interactive, :param_name => 'interactive_page' }


-# CSS: implied media="all"
= stylesheet_link_tag 'application', :media => 'all'
= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:300', :media => 'all'

-# Append your own using content_for :stylesheets
= yield :stylesheets

%style{:type=>"text/css"}
  :sass
    $day: #{@color_date}
    $percent: percentage_from_day_of_year($day)
    $primary_color: primary_color_from_day($day)
    $secondary_color: secondary_color_from_day($day)

    body
      background-color: $primary_color

    ::-moz-selection, ::selection
      background: $secondary_color

    .primary_bg_color
      background-color: $primary_color !important

    .primary_color, aside h1
      color: $primary_color !important

    .secondary_color, footer aside h1
      color: $secondary_color !important

    h2
      color: $secondary_color !important

    a:active, a:hover
      color: $primary_color !important

      #s_nav &
        color: $secondary_color !important

    input[type=text]:focus, input[type=password], textarea
      border-color: $secondary_color !important

Update alert styling to be theme-driven

-# CSS: implied media="all"
= stylesheet_link_tag 'application', :media => 'all'
= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:300', :media => 'all'

-# Append your own using content_for :stylesheets
= yield :stylesheets

%style{:type=>"text/css"}
  :sass
    $day: #{@color_date}
    $percent: percentage_from_day_of_year($day)
    $primary_color: primary_color_from_day($day)
    $secondary_color: secondary_color_from_day($day)

    body
      background-color: $primary_color

    ::-moz-selection, ::selection
      background: $secondary_color

    .primary_bg_color
      background-color: $primary_color !important

    .primary_color, aside h1
      color: $primary_color !important

    .secondary_color, footer aside h1
      color: $secondary_color !important

    h2
      color: $secondary_color !important

    a:active, a:hover
      color: $primary_color !important

      #s_nav &
        color: $secondary_color !important

    input[type=text]:focus, input[type=password], textarea
      border-color: $secondary_color !important

    #flash .message.notice
      background-color: mix($secondary_color, #2B2C30, 20%)
      border: 1px solid $secondary_color !important


!!! 5
%html
  %head
    %link(rel="stylesheet" href="index.css")
  %body
    .container
      %section
        %h2 Borked
        - @broken_projects.each do |project|
          .box.broken
            = project.name
      - unless @in_progress_projects.empty?
        %section
          %h2 In progress
          - @in_progress_projects.each do |project|
            .box.in-progress
              = project.name
      %section
        %h2 Recent
        - @recently_built_projects.each do |project|
          .box.recent
            = project.name
      %footer.box.time
        = @display_time

Refresh the page every 30 seconds.

!!! 5
%html
  %head
    %meta(http-equiv="refresh" content="30")
    %link(rel="stylesheet" href="index.css")
  %body
    .container
      %section
        %h2 Borked
        - @broken_projects.each do |project|
          .box.broken
            = project.name
      - unless @in_progress_projects.empty?
        %section
          %h2 In progress
          - @in_progress_projects.each do |project|
            .box.in-progress
              = project.name
      %section
        %h2 Recent
        - @recently_built_projects.each do |project|
          .box.recent
            = project.name
      %footer.box.time
        = @display_time


= simple_form_for @contact_message do |f|
  = f.error_notification

  .form-inputs
    = f.input :name, label: I18n.t(".views.messages.name_label")
    = f.input :email, label: I18n.t("views.messages.email_address_label")
    = f.input :message, label: I18n.t(".views.messages.message_label"), as: :text

  .form-actions
    = f.submit I18n.t("views.messages.submit_button_title"), class: "button"

Replace simple_form based contact form with dummy rails form (needs to be merged with redesign).

= form_for @contact_message do |f|
  = f.label I18n.t(".views.messages.name_label")
  %br
  = f.text_field :name
  %br
  = f.label I18n.t("views.messages.email_address_label")
  %br
  = f.text_field :email
  %br
  = f.label I18n.t(".views.messages.message_label")
  %br
  = f.text_area :message
  %br
  = f.submit I18n.t("views.messages.submit_button_title"), class: "button"


:javascript
  $.redirectTo('#{topic_path(@topic.slug)}');
  $.blabbrNotify('success','#{flash[:notice]}');

Initialize pusher on a newly created topic

:javascript
  $.redirectTo('#{topic_path(@topic.slug)}');
  $.blabbrNotify('success','#{flash[:notice]}');
  subscribeToPusher('#{@topic.slug}');


%table.char
  %tbody
    %tr
      %td.specialized{:colspan => 2} Augmentations
    %tr.colnames
      %td Name
      %td Uses
    - @character.properties.each do |k,v|
    - next unless PropertiesHelper::is_type(k, :aug)
      %tr
        %td= PropertiesHelper::get_property_name(k)
        %td= v
    %tr
      %td.specialized{:colspan => 2} Auras
    %tr.colnames
      %td Name
      %td Uses
    - @character.properties.each do |k,v|
    - next unless PropertiesHelper::is_type(k, :aura)
      %tr
        %td= PropertiesHelper::get_property_name(k)
        %td= v

Handle case where char has no properties

- if @character.properties
  %table.char
    %tbody
      %tr
        %td.specialized{:colspan => 2} Augmentations
      %tr.colnames
        %td Name
        %td Uses
      - @character.properties.each do |k,v|
      - next unless PropertiesHelper::is_type(k, :aug)
        %tr
          %td= PropertiesHelper::get_property_name(k)
          %td= v
      %tr
        %td.specialized{:colspan => 2} Auras
      %tr.colnames
        %td Name
        %td Uses
      - @character.properties.each do |k,v|
      - next unless PropertiesHelper::is_type(k, :aura)
        %tr
          %td= PropertiesHelper::get_property_name(k)
          %td= v
- else
  %span This char doesn't have any augmentations or auras.


-if user_signed_in?
  -poll = current_user.next_unanswered_poll
  -if poll.present?
    .polls{'data-id' => poll.id}
      -if poll.present?
        %h2 Poll:#{poll.question}
        /%p=poll.description

        -answers = poll.answers
        -answer = UserAnswer.new
        -answer.user_id = current_user.id
        = form_for :answer, :url => "/polls/answer", :remote => true do |f|
          %ul
            -answers.each do |answer|
              = answer_list_item(f, answer).html_safe
          = f.hidden_field :poll_id, :value => poll.id
          = f.submit "Vote", :class => "small_button"
  -else
    .polls
      %h2 Polls
      Please watch the statistics

  -if previous_poll.present?
    .poll-result
      %p Poll result
      %h3=previous_poll.try(:question)
      =render :partial => 'polls/stats', :locals => {:poll => previous_poll}

-else
  .polls
    %h2 Polls
    Please
    %a{:href => "#", "data-reveal-id" => "LoginModal"} sign in

Refactor out auth logic from poll view-template


.article.section.autopagerize_page_element.hentry
  .header
    %h2.title= link_to post.title, post.link
    .meta
      == #{link_to l(post.created_at.to_date, format: '%Y年%m月%d日 (%a)'), post.link}
      - if post.category
        == | @#{link_to post.category.title, "/category/#{post.category.slug}/"}
  .body
    ~ post.body
  .footer
    = post.tags_to_html
    .comment== #{link_to "#{t('comments')} (#{post.comments.size})", "#{post.link}#comment_form"}
    .created_at== #{l post.created_at, format: :long}
    - if logged_in?
      .edit= link_to t('edit'), post.edit_link
  .article-bottom
    - if index.zero?
      = partial :advertisement

Hide ads even when entry's index is zero


.banner-160
  - if Rails.env.production?
    %ins{ "class" => "adsbygoogle",
          "style" => "display:block",
          "data-ad-client" => "ca-pub-9541275144173875",
          "data-ad-slot" => "7254085490",
          "data-ad-format" => "vertical",
    }
    %script
      (adsbygoogle = window.adsbygoogle || []).push({});

Change data-ad-format to auto for sidebar banner

.banner-160
  - if Rails.env.production?
    %ins{ "class" => "adsbygoogle",
          "style" => "display:block",
          "data-ad-client" => "ca-pub-9541275144173875",
          "data-ad-slot" => "7254085490",
          "data-ad-format" => "auto",
    }
    %script
      (adsbygoogle = window.adsbygoogle || []).push({});


%ul.nav.nav-sidebar
  = nav_link do
    = link_to root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
      = icon('caret-square-o-left fw')
      %span
        Back to GitLab
  %li.separate-item
  = nav_link path: 'projects#index' do
    = link_to ci_root_path do
      %i.fa.fa-home
      %span
        Projects
  - if current_user && current_user.is_admin?
    %li
      = link_to ci_admin_projects_path do
        %i.fa.fa-cogs
        %span
          Admin
  %li
    = link_to ci_help_path do
      %i.fa.fa-info
      %span
        Help

Fix active state of CI Help nav link.

%ul.nav.nav-sidebar
  = nav_link do
    = link_to root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do
      = icon('caret-square-o-left fw')
      %span
        Back to GitLab
  %li.separate-item
  = nav_link path: 'projects#index' do
    = link_to ci_root_path do
      %i.fa.fa-home
      %span
        Projects
  - if current_user && current_user.is_admin?
    %li
      = link_to ci_admin_projects_path do
        %i.fa.fa-cogs
        %span
          Admin
  = nav_link path: "helps#show" do
    = link_to ci_help_path do
      %i.fa.fa-info
      %span
        Help


%products.small-12.columns{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null",
"infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1"}

  = form_for :order, :url => populate_orders_path, html: {:class => "custom"} do

    .row
      .small-6.columns
        %input#search.text{"ng-model" => "query",
        placeholder: "Search",
        "ng-debounce" => "150",
        "ofn-disable-enter" => true}
      .small-6.columns
        %input.button.right{type: :submit, value: "Add to Cart"}

    %div{bindonce: true}
      %product{"ng-controller" => "ProductNodeCtrl",
        "ng-repeat" => "product in data.products | filter:query | orderBy:ordering.order | limitTo: limit track by product.id"}
        %div
          = render partial: "shop/products/summary"

          %div{"bo-if" => "hasVariants"}
            = render partial: "shop/products/variants"

        .variant.row{"bo-if" => "!hasVariants"}
          = render partial: "shop/products/master"

    .row
      .small-12.columns
        %input.button.right.add_to_cart{type: :submit, value: "Add to Cart"}

Add button style to shop page

%products.small-12.columns{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null",
"infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1"}

  = form_for :order, :url => populate_orders_path, html: {:class => "custom"} do

    .row
      .small-6.columns
        %input#search.text{"ng-model" => "query",
        placeholder: "Search",
        "ng-debounce" => "150",
        "ofn-disable-enter" => true}
      .small-6.columns
        %input.button.primary.right{type: :submit, value: "Add to Cart"}

    %div{bindonce: true}
      %product{"ng-controller" => "ProductNodeCtrl",
        "ng-repeat" => "product in data.products | filter:query | orderBy:ordering.order | limitTo: limit track by product.id"}
        %div
          = render partial: "shop/products/summary"

          %div{"bo-if" => "hasVariants"}
            = render partial: "shop/products/variants"

        .variant.row{"bo-if" => "!hasVariants"}
          = render partial: "shop/products/master"

    .row
      .small-12.columns
        %input.button.primary.right.add_to_cart{type: :submit, value: "Add to Cart"}


%div
  - if @query.participant_id.present?
    関係者：
    = Author.find(@query.participant_id).name
    = link_to content_tag(:span, '', class: 'fa fa-remove'), @query.params(remove: [:participant_id])
  - else
    - @result_set.participants.each do |participant|
      %span
        = link_to participant.name, @query.params(add: {participant_id: participant._key})
        = "(#{participant.n_sub_records})"

%ol
  - @result_set.posts.each do |post|
    %li
      = link_to post.title, post_url(post.public_id)
      %span.score= "(#{post.score})"
      - if post.participants
        - post.participants.each do
          .participant= link_to participant.name, @query.params(add: {participant_id: post.participant.id})

- if @result_set.posts.total_pages > 1
  %nav.pagination
    = paginate @result_set.posts
    %p.pagination__entries= page_entries_info @result_set.posts

Add missing block local variable

%div
  - if @query.participant_id.present?
    関係者：
    = Author.find(@query.participant_id).name
    = link_to content_tag(:span, '', class: 'fa fa-remove'), @query.params(remove: [:participant_id])
  - else
    - @result_set.participants.each do |participant|
      %span
        = link_to participant.name, @query.params(add: {participant_id: participant._key})
        = "(#{participant.n_sub_records})"

%ol
  - @result_set.posts.each do |post|
    %li
      = link_to post.title, post_url(post.public_id)
      %span.score= "(#{post.score})"
      - if post.participants
        - post.participants.each do |participant|
          .participant= link_to participant.name, @query.params(add: {participant_id: post.participant.id})

- if @result_set.posts.total_pages > 1
  %nav.pagination
    = paginate @result_set.posts
    %p.pagination__entries= page_entries_info @result_set.posts


.section
  %h1 Sermons
  %p Here's a sermons page header. Yeah!

  - @sermons.each do |s|
    %p= s.title

Add slightly meatier sermon index

.section
  %h1 Sermons
  %p Here's a sermons page header. Yeah!

.col-md-3
  .section
    %h3 Sidebar
    %p This is my sidebar!
    %p Over here, maybe we can put some controls and stuff.
    %p Maybe like a search box and whatever, some filters for like date, speaker, etc

.col-md-9
  - @sermons.each do |s|
    .section
      %h2= s.title
      %p= "#{s.speaker}, #{s.date}"
      = audio_tag s.audio_file.url, controls: true, class: 'sermon-audio'