= render 'backend/shared/financial_year_warning' if Preference.get(:permanent_stock_inventory, true).boolean_value

- main_toolbar do |t|
  = t.export :stocks
  - if Product.any?
    - if FinancialYear.any?
      = t.new params: { redirect: nil }
    - else
      = t.new params: { redirect: nil }, disabled: "disabled"

= main_list

Enhance condition to enable new inventory button

= render 'backend/shared/financial_year_warning' if Preference.get(:permanent_stock_inventory, true).boolean_value

- main_toolbar do |t|
  = t.export :stocks
  - if FinancialYear.any? && Product.any?
    = t.new params: { redirect: nil }
  - else
    = t.new params: { redirect: nil }, disabled: "disabled"

= main_list


#container
  .pure-g.main
    .pure-u-1-1
      - if @error
        %p.error.pure-u-2-5
          = @error
      %h1
        %form.pure-form(action="/photo" method="GET")
          rand(
          %input.pure-input-1-5(name="user" type="text" placeholder="flickr user")
          )
          %button.pure-button.button-error
            %i.fa.fa-flickr  View
    .pure-u-5-6.predefined
      %a(href="/photo/jarm0") or view my random images

Change wording on main page.

#container
  .pure-g.main
    .pure-u-1-1
      - if @error
        %p.error.pure-u-2-5
          = @error
      %h1
        %form.pure-form(action="/photo" method="GET")
          rand(
          %input.pure-input-1-5(name="user" type="text" placeholder="flickr user")
          )
          %button.pure-button.button-error
            %i.fa.fa-flickr
            %span show
    .pure-u-5-6.predefined
      %a(href="/photo/jarm0") or just view random user images


%h2
  = label
  |
  %a{href: link[:endpoint]}= link[:label]
%table{:border => '1', :cellpadding => '2'}
  %thead
    %tr
      %th Id
      %th Description
      %th Label Applied
      %th Assignee
  %tbody
  - list.each do |item|
    %tr
      %td
        %a{href: item['html_url']}= item['number']
      %td= item['title']
      %td= item['label_event_data']['created_at']
      %td
        - if item['assignee']
          %img{ src: item['assignee']['avatar_url'], height: 20, width: 20 }= item['assignee']['login']

Add a count of the total number of issues

%h2
  = label + "(#{list.count})"
  |
  %a{href: link[:endpoint]}= link[:label]
%table{:border => '1', :cellpadding => '2'}
  %thead
    %tr
      %th Id
      %th Description
      %th Label Applied
      %th Assignee
  %tbody
  - list.each do |item|
    %tr
      %td
        %a{href: item['html_url']}= item['number']
      %td= item['title']
      %td= item['label_event_data']['created_at']
      %td
        - if item['assignee']
          %img{ src: item['assignee']['avatar_url'], height: 20, width: 20 }= item['assignee']['login']


!!!
%html
  %head
    %title Converged Cloud Dashboard
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = content_for :javascripts do
      = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags

    %meta(name="viewport" content="width=device-width, initial-scale=1")
    %meta(http-equiv="X-UA-Compatible" content="IE=edge")

  %body

    %nav.navbar.navbar-login
      .navbar-header
        = link_to "/", class: "navbar-brand" do
          .logo
          Converged Cloud

    = yield

    = yield :templates
    = yield :javascripts

Fix home link on login page to point to current domain.

!!!
%html
  %head
    %title Converged Cloud Dashboard
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = content_for :javascripts do
      = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags

    %meta(name="viewport" content="width=device-width, initial-scale=1")
    %meta(http-equiv="X-UA-Compatible" content="IE=edge")

  %body

    %nav.navbar.navbar-login
      .navbar-header
        = link_to "/#{@domain_name}", class: "navbar-brand" do
          .logo
          Converged Cloud

    = yield

    = yield :templates
    = yield :javascripts


#main_div
  - if @showtype == "timeline"
    = render(:partial => "layouts/tl_show")
    :javascript
      ManageIQ.afterOnload = "miqAsyncAjax('#{url_for(:action => @ajax_action, :id => @record)}');"
  - elsif @showtype == "performance"
    = render(:partial => "layouts/performance")
    :javascript
      ManageIQ.afterOnload = "miqAsyncAjax('#{url_for(:action => @ajax_action, :id => @record)}');"
  - elsif TreeBuilder.get_model_for_prefix(@nodetype) == "Container"
    -# Showing a specific Service
    = render :partial => "container_show", :locals => {:controller => "container"}
  - else
    -# Showing a list of Containers
    = render :partial => 'layouts/x_gtl'

Add adv. search to Containers explorer

- content_for :search do
  = render(:partial => "layouts/x_adv_searchbox")
  = render(:partial => 'layouts/quick_search')
#main_div
  - if @showtype == "timeline"
    = render(:partial => "layouts/tl_show")
    :javascript
      ManageIQ.afterOnload = "miqAsyncAjax('#{url_for(:action => @ajax_action, :id => @record)}');"
  - elsif @showtype == "performance"
    = render(:partial => "layouts/performance")
    :javascript
      ManageIQ.afterOnload = "miqAsyncAjax('#{url_for(:action => @ajax_action, :id => @record)}');"
  - elsif TreeBuilder.get_model_for_prefix(@nodetype) == "Container"
    -# Showing a specific Service
    = render :partial => "container_show", :locals => {:controller => "container"}
  - else
    -# Showing a list of Containers
    = render :partial => 'layouts/x_gtl'


.container
  .row
    .col-xs-12
      %h1 Scrapers currently running
      .list-group= sync partial: "scraper", collection: @scrapers

Add count of running scrapers to heading

.container
  .row
    .col-xs-12
      %h1 #{pluralize(@scrapers.count, "scraper")} currently running
      .list-group= sync partial: "scraper", collection: @scrapers


= semantic_form_for [:admin, @place.data_set, @place], html: { disabled: true } do |f|
  = f.inputs "Quelle: Datenspende" do
    = f.input :name, label: false, as: :text_with_apply
    = f.input :street, label: false, as: :text_with_apply
    = f.input :housenumber, label: false, as: :text_with_apply
    = f.input :postcode, label: false, as: :text_with_apply
    = f.input :city, label: false, as: :text_with_apply
    = f.input :wheelchair, label: false, as: :text_with_apply
    = f.input :website, label: false, as: :text_with_apply
    = f.input :phone, label: false, as: :text_with_apply

Change text on place form.

= semantic_form_for [:admin, @place.data_set, @place], html: { disabled: true } do |f|
  = f.inputs "Angaben von #{@place.data_set.name}" do
    = f.input :name, label: false, as: :text_with_apply
    = f.input :street, label: false, as: :text_with_apply
    = f.input :housenumber, label: false, as: :text_with_apply
    = f.input :postcode, label: false, as: :text_with_apply
    = f.input :city, label: false, as: :text_with_apply
    = f.input :wheelchair, label: false, as: :text_with_apply
    = f.input :website, label: false, as: :text_with_apply
    = f.input :phone, label: false, as: :text_with_apply


- words = current_user.words
.row
  - if words.count == 0
    .alert.alert-info
      You have no cards in your deck! Select 'Deck' and add your first card.
  - if flash[:success]
    .alert.alert-sucess
      =flash[:success]
.row
  .span7.offset1
    %table.table
      %thead
        %tr
          %th
            Total cards:
          %td=words.count
        %tr
          %th
            Expired:
          %td=words.expired.count
        %tr
          %th
            Forgotten:
          %td=words.failed.count

Add untested to review page

- words = current_user.words
.row
  - if words.count == 0
    .alert.alert-info
      You have no cards in your deck! Select 'Deck' and add your first card.
  - if flash[:success]
    .alert.alert-sucess
      =flash[:success]
.row
  .span7.offset1
    %table.table
      %thead
        %tr
          %th
            Total cards:
          %td=words.count
        %tr
          %th
            Not yet reviewed:
          %td=words.untested.count
        %tr
          %th
            Expired:
          %td=words.expired.count
        %tr
          %th
            Forgotten:
          %td=words.failed.count


%table#booking_list.list.booking_list
  = render :partial => 'accounts/booking_list_header'
  - @saldo = @account.saldo(@bookings.first, false)
  - for @booking in @bookings
    - @saldo -= @booking.amount if @booking.debit_account == @account
    - @saldo += @booking.amount if @booking.credit_account == @account
    = render :partial => 'accounts/booking_item'
  = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?

Fix saldo in liability account views.

%table#booking_list.list.booking_list
  = render :partial => 'accounts/booking_list_header'
  - @saldo = @account.saldo(@bookings.first, false)
  - for @booking in @bookings
    - amount = @booking.amount
    - amount = -(amount) if @account.is_liability_account?
    - @saldo -= amount if @booking.debit_account == @account
    - @saldo += amount if @booking.credit_account == @account
    = render :partial => 'accounts/booking_item'
  = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?


- if current_user
  %ul#nav
    %li.navitem= link_to 'Dashboard', root_path
    %li.navitem= link_to 'Resolutions', proposals_path
    %li.navitem= link_to 'Meetings', meetings_path
    %li.navitem= link_to 'Members', members_path
    %li.navitem= link_to 'Directors', directors_path
    %li.navitem= link_to 'Rules', constitution_path
    %li.navitem= link_to 'Shares', shares_path

Simplify main menu for pending/proposed stage.

- if current_user
  - if co.pending? || co.proposed?
    %ul#nav
      %li.navitem= link_to 'Checklist', root_path
      %li.navitem= link_to 'Members', members_path
      %li.navitem= link_to 'Directors', directors_path
      %li.navitem= link_to 'Rules', constitution_path
  -else
    %ul#nav
      %li.navitem= link_to 'Dashboard', root_path
      %li.navitem= link_to 'Resolutions', proposals_path
      %li.navitem= link_to 'Meetings', meetings_path
      %li.navitem= link_to 'Members', members_path
      %li.navitem= link_to 'Directors', directors_path
      %li.navitem= link_to 'Rules', constitution_path
      %li.navitem= link_to 'Shares', shares_path


#wishlist-form{ :style => "display: none" }
  %fieldset
    %legend.hidden Add Wishlist Entry
    - remote_form_for :wishlist, @wishlist, :url => wishlists_path, :html => { :method => :post } do |f|
      = render :partial => 'form', :object => f
      .buttons
        = styled_button(:type => 'submit', :text => 'Save', :image => 'tick.png')
#wishlist-toggle.buttons
  = link_to_function(image_tag('add.png') + 'Add Entry', "$('#wishlist-form').show(); $('#wishlist_item_name').focus(); $('#wishlist-toggle').hide()")

Add error display to our inline form.

#wishlist-form{ :style => "display: none" }
  %fieldset
    %legend.hidden Add Wishlist Entry
    #errors.error.hidden
    - remote_form_for :wishlist, @wishlist, :url => wishlists_path, :html => { :method => :post } do |f|
      = render :partial => 'form', :object => f
      .buttons
        = styled_button(:type => 'submit', :text => 'Save', :image => 'tick.png')
#wishlist-toggle.buttons
  = link_to_function(image_tag('add.png') + 'Add Entry', "$('#wishlist-form').show(); $('#wishlist_item_name').focus(); $('#wishlist-toggle').hide()")


---
title: Launching Fall 2015
---

#wrap
  #logo
    = image_tag 'logo.png', alt: data.config.company_name

  #content
    %ul
      %li Young Adult
      %li Hardcover & eBook
      %li.last 8 6-book Series

    = form_tag 'http://marketing.titleleaf.com/t/r/s/iitljjd/', id: 'campaign' do
      %p Launching Fall 2015
      %input#fieldEmail{ name: "cm-iitljjd-iitljjd", type: "email", placeholder: "Your Email Address" }
      %button.ghost{ type: "submit" } Notify Me

    = partial 'partials/social'

    .grid-items
      .grid-item
        .video
          %iframe{ src: '//www.youtube.com/embed/DIA1t5Knhlc?rel=0', width: '640', height: '480', frameborder: '0', allowfullscreen: '1' }

      .grid-item
        .video
          %iframe{ src: '//www.youtube.com/embed/b1M_zpH5qjg?rel=0', width: '640', height: '480', frameborder: '0', allowfullscreen: '1' }

  #footer

Connect notification form to Constant Contact

---
title: Launching Fall 2015
---

#wrap
  #logo
    = image_tag 'logo.png', alt: data.config.company_name

  #content
    %ul
      %li Young Adult
      %li Hardcover & eBook
      %li.last 8 6-book Series

    = form_tag 'http://visitor.r20.constantcontact.com/d.jsp', id: 'campaign' do
      %input{ type: 'hidden', name: 'llr', value: 'x9amm5cab' }
      %input{ type: 'hidden', name: 'm', value: '1102678721367' }
      %input{ type: 'hidden', name: 'p', value: 'oi' }
      %input{ type: 'hidden', name: 'sit', value: 'ekuvgjneb' }
      %input{ type: 'hidden', name: 'f', value: '9d2363e3-48d4-4651-a61e-df0d670078ca' }
      %p Launching Fall 2015
      %input#fieldEmail{ name: 'ea', type: 'email', placeholder: 'Your Email Address' }
      %button.ghost{ type: 'submit' } Notify Me

    = partial 'partials/social'

    .grid-items
      .grid-item
        .video
          %iframe{ src: '//www.youtube.com/embed/DIA1t5Knhlc?rel=0', width: '640', height: '480', frameborder: '0', allowfullscreen: '1' }

      .grid-item
        .video
          %iframe{ src: '//www.youtube.com/embed/b1M_zpH5qjg?rel=0', width: '640', height: '480', frameborder: '0', allowfullscreen: '1' }

  #footer


#modal-remove-blob.modal.hide
  .modal-dialog
    .modal-content
      .modal-header
        %a.close{href: "#", "data-dismiss" => "modal"} ×
        %h3.page-title Remove #{@blob.name}
        %p.light
          From branch
          %strong= @ref

      .modal-body
        = form_tag project_blob_path(@project, @id), method: :delete do
          .form-group.commit_message-group
            = label_tag 'commit_message', class: "control-label" do
              Commit message
            .col-sm-10
              = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3
          .form-group
            .col-sm-10
              = submit_tag 'Remove file', class: 'btn btn-remove'
              = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"

Fix blob remove modal style

#modal-remove-blob.modal.hide
  .modal-dialog
    .modal-content
      .modal-header
        %a.close{href: "#", "data-dismiss" => "modal"} ×
        %h3.page-title Remove #{@blob.name}
        %p.light
          From branch
          %strong= @ref

      .modal-body
        = form_tag project_blob_path(@project, @id), method: :delete, class: 'form-horizontal' do
          .form-group.commit_message-group
            = label_tag 'commit_message', class: "control-label" do
              Commit message
            .col-sm-10
              = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control'
          .form-group
            .col-sm-2
            .col-sm-10
              = submit_tag 'Remove file', class: 'btn btn-remove'
              = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"


%p
  #{link_to @abuse_report.user.name, user_url(@abuse_report.user)}
  (@#{@abuse_report.user.username}) was reported for abuse by
  #{link_to @abuse_report.reporter.name, user_url(@abuse_report.reporter)}
  (@#{@abuse_report.reporter.username}).

%blockquote
  = @abuse_report.message

%p
  = link_to "View details", abuse_reports_url

Fix the abuse report detail URL in the HTML email template

%p
  #{link_to @abuse_report.user.name, user_url(@abuse_report.user)}
  (@#{@abuse_report.user.username}) was reported for abuse by
  #{link_to @abuse_report.reporter.name, user_url(@abuse_report.reporter)}
  (@#{@abuse_report.reporter.username}).

%blockquote
  = @abuse_report.message

%p
  = link_to "View details", admin_abuse_reports_url


.content#producers{"ng-controller" => "ProducersTabCtrl"}
  .row
    .small-12.columns
      %h5
        =current_distributor.name
        's producers:
      %ul.ofn-list
        %li{"ng-repeat" => "producer in CurrentHub.producers"}
          = render partial: "modals/producer"

Refactor producers tab content for spacing of string

.content#producers{"ng-controller" => "ProducersTabCtrl"}
  .row
    .small-12.columns
      %h5
        = "#{current_distributor.name}'s producers:"
      %ul.ofn-list
        %li{"ng-repeat" => "producer in CurrentHub.producers"}
          = render partial: "modals/producer"


- content_for :breadcrumbs do
  %li.breadcrumb-item= link_to 'Admin', admin_path
  %li.breadcrumb-item.active= link_to 'Members', admin_members_path

.row
  .col-md-6
    = bootstrap_form_tag url: admin_members_path, method: :get, layout: :horizontal do |f|
      .input-group.md-form.form-sm
        .input-group-prepend
          %span.input-group-text= icon 'fas', 'user'
        = f.text_field(:q, 'aria-label': 'search members', placeholder: 'search members', hide_label: true)
        = f.submit 'search', class: 'btn btn-secondary'

%table.table.table-striped
  %thead
    %tr
      %th{scope: "col"} #
      %th{scope: "col"} Login Name
      %th{scope: "col"} Email
  - @members.each do |member|
    %tr
      %td= render 'members/tiny', member: member
      %td= member.login_name
      %td= member.email
      %td
        %ul
          - member.roles.pluck(:name).each do |r|
            %li= r
      %td
        = link_to edit_admin_member_path(member), class: 'btn' do
          = edit_icon
        = link_to admin_member_path(member), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-light text-danger' do
          = icon 'fas', 'ban'
          Ban member
= page_entries_info @members
= will_paginate @members

Remove email from display in admin/members

- content_for :breadcrumbs do
  %li.breadcrumb-item= link_to 'Admin', admin_path
  %li.breadcrumb-item.active= link_to 'Members', admin_members_path

.row
  .col-md-6
    = bootstrap_form_tag url: admin_members_path, method: :get, layout: :horizontal do |f|
      .input-group.md-form.form-sm
        .input-group-prepend
          %span.input-group-text= icon 'fas', 'user'
        = f.text_field(:q, 'aria-label': 'search members', placeholder: 'search members', hide_label: true)
        = f.submit 'search', class: 'btn btn-secondary'

%table.table.table-striped
  %thead
    %tr
      %th{scope: "col"} #
      %th{scope: "col"} Login Name
  - @members.each do |member|
    %tr
      %td= render 'members/tiny', member: member
      %td= member.login_name
      %td
        %ul
          - member.roles.pluck(:name).each do |r|
            %li= r
      %td
        = link_to edit_admin_member_path(member), class: 'btn' do
          = edit_icon
        = link_to admin_member_path(member), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-light text-danger' do
          = icon 'fas', 'ban'
          Ban member
= page_entries_info @members
= will_paginate @members


!!! 5
%html{ lang: 'en' }
  %head
    %title Long Running Ruby Benchmark
    = stylesheet_link_tag 'application', media: 'all'
    = stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Roboto:100,400'
    = javascript_include_tag 'application'
    = render 'layouts/ga' if Rails.env.production?
    = csrf_meta_tags

  %header
    .row.top-nav
      .col-xs-10.col-xs-offset-1
        = render 'layouts/top_nav'

  %body
    .row.body
      .col-xs-12
        = yield

  %footer
    .row.footer
      .col-xs-10.col-xs-offset-1
        = render 'layouts/footer'
        = yield :footer if content_for(:footer)

Move JavaScript code to footer.

!!! 5
%html{ lang: 'en' }
  %head
    %title Long Running Ruby Benchmark
    = stylesheet_link_tag 'application', media: 'all'
    = stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Roboto:100,400'
    = render 'layouts/ga' if Rails.env.production?
    = csrf_meta_tags

  %header
    .row.top-nav
      .col-xs-10.col-xs-offset-1
        = render 'layouts/top_nav'

  %body
    .row.body
      .col-xs-12
        = yield

  %footer
    .row.footer
      .col-xs-10.col-xs-offset-1
        = render 'layouts/footer'
        = javascript_include_tag 'application'
        = yield :footer if content_for(:footer)


- if @form_model.available_projects.size > 0
  .filterheader
    Projects
  - @form_model.available_projects.each do |project|
    .tablecell
      = check_box_tag 'project_ids[]', project[:id], @form_model.project_ids.include?(project[:id].to_s), id: "project_#{project[:id]}", class: 'check-box-left-margin'
      = label_tag "project_#{project[:id]}", project[:name]
  %br

Sort alphabetically project names in projects search filter

- if @form_model.available_projects.size > 0
  .filterheader
    Projects
  - puts  @form_model.available_projects
  - @form_model.available_projects.sort_by { |p| p[:name].downcase }.each do |project|
    .tablecell
      = check_box_tag 'project_ids[]', project[:id], @form_model.project_ids.include?(project[:id].to_s), id: "project_#{project[:id]}", class: 'check-box-left-margin'
      = label_tag "project_#{project[:id]}", project[:name]
  %br


.gallery.index.group
  %h2= link_to t('Gallery'), photos_path
  .spacer_wrapper
    - SemiStatic::Photo.locale(I18n.locale).limit(21).each do |p|
      .photo.nutshell
        .spaced
          = link_to image_tag(p.img.url(:mini), :title => "#{p.title} - #{truncate(p.description, :length => 50)}"), photo_path(p)
  .feint
    %br/
    .more= link_to t(:more), photos_path

Remove invisible photos from Gallery side-bar

.gallery.index.group
  %h2= link_to t('Gallery'), photos_path
  .spacer_wrapper
    - SemiStatic::Photo.not_invisible.locale(I18n.locale).limit(21).each do |p|
      .photo.nutshell
        .spaced
          = link_to image_tag(p.img.url(:mini), :title => "#{p.title} - #{truncate(p.description, :length => 50)}"), photo_path(p)
  .feint
    %br/
    .more= link_to t(:more), photos_path


= form_tag sessions_path do
  .field
    = label_tag :email
    = text_field_tag :email

  .field
    = label_tag :password
    = password_field_tag :password

  .actions
    = submit_tag "Sign in", class: "btn btn-primary"

Add sign up button in sign in form

= form_tag sessions_path do
  .field
    = label_tag :email
    = text_field_tag :email

  .field
    = label_tag :password
    = password_field_tag :password

  .actions
    = submit_tag "Sign in", class: "btn btn-large btn-primary"
= button_to "Create new account", new_user_path, class: "btn btn-success", :method => :get


%div
  %div= render :partial => 'votes/vote'
  %h= @idea.rating
  %h2= h @idea.title
  %p=    @idea.description
  %div
    %h5 Tags
    - @idea.tags.each do |tag|
      = render :partial => 'tags/tag', :locals => { :tag => tag }
  %div
    %h3 Comments
    %div= render :partial => 'comments/comment', :collection => @comments, :controller => 'comments'
    %div
      - if user_signed_in?
        %h4 Comment on this idea
        %div= render :partial => 'comments/new'

Bring over idea/show view template

%div
  #idea-1.main.panel.section.idea.hentry
    .header
      %h2.entry-title= @idea.title
      - if (@idea.owner == current_user)
        %div
          = link_to('Edit', edit_idea_path(@idea))
      %h4.posted
        Posted at
        %abbr.published.time-relative== #{@idea.created_at}
        by
        %span.vcard.author
          = link_to h(@idea.owner.name), user_profile_path
        %br
        - if !@idea.current.nil? && @idea.current.id != Current::DEFAULT_CURRENT_ID
          Part of:
          %strong= link_to h(@idea.current.title), current_path(@idea.current)
          %br
        Status:
        %strong= # @idea.status

    .body
      .entry-content
        %p= @idea.description
      .idea-meta
        %div
          %ul.entry-meta
            / %li.comments
            %li.tags
              %h3 Tags
              - @idea.tags.each do |tag|
                = render :partial => 'tags/tag', :locals => { :tag => tag }
      #comments.group.slate
        - if @idea.comments.visible.empty? && !@idea.closed?
          %h3 No comments yet. Write one!
        - else
          %h3== #{@idea.comments.visible.length} #{'Comment'.pluralize(@idea.comments.visible.length)}
          .comments.inset
            %div
              %div= render :partial => 'comments/comment', :collection => @comments, :controller => 'comments'
        -if !@idea.closed? && user_signed_in?
          %div= render :partial => 'comments/new'


%article#node.container{itemscope:'', itemtype: 'http://schema.org/Place'}
  = render partial: 'node_header', object: @node

  .row-fluid
    %section#node-content.node-wrapper.span8
      = render partial: 'node_status', object: @node
      = render partial: 'node_photos', object: @node
      = render partial: 'node_note', object: @node
      = render partial: 'node_streetview', object: @node

    %section#node-aside.span4.node-wrapper
      = render partial: 'node_edit', object: @node
      = render partial: 'node_map', object: @node
      = render partial: 'node_data', object: @node
      = render partial: 'node_similar', object: @node

- content_for :meta do
  = render_og_metadata(title: @node.name, :description => t('header.title'), type: 'place', url: node_url(@node), image: image_path("bg_logo.png"))
  = render_og_locationdata(latitude: @node.lat, longitude: @node.lon)

- content_for :head do
  %title= [@node.name, @node.node_type_name, @node.category_name, @node.region_name, "Wheelmap"].compact.join(' | ')

Remove manual call for images lightbox.


%h1 API

%p The API allows you to programatically retrieve data from any public scraper using an SQL query. It's all pretty easy.

%pre
  %code http://127.0.0.1:3000/[scraper]/data.json?query=[sql]

%h2 parameters

%dl
  %dt [scraper]
  %dd The full name of the scraper as seen in the url (e.g. #{@scraper.full_name})
  %dt [sql]
  %dd
    The SQL query to perform on the SQLite database that is the output of the scraper (e.g. "#{@query}").
    Ensure it is #{link_to "url encoded", "https://en.wikipedia.org/wiki/Percent-encoding"}.

%p
  For example, to retrieve data from the
  = link_to "#{@scraper.full_name} scraper", @scraper
  with the SQL query "#{@query}"

%pre
  %code= link_to scraper_data_url(@scraper, query: @query, format: :json), scraper_data_url(@scraper, query: @query, format: :json)

Fix displayed url when not in development

%h1 API

%p The API allows you to programatically retrieve data from any public scraper using an SQL query. It's all pretty easy.

%pre
  %code #{root_url}[scraper]/data.json?query=[sql]

%h2 parameters

%dl
  %dt [scraper]
  %dd The full name of the scraper as seen in the url (e.g. #{@scraper.full_name})
  %dt [sql]
  %dd
    The SQL query to perform on the SQLite database that is the output of the scraper (e.g. "#{@query}").
    Ensure it is #{link_to "url encoded", "https://en.wikipedia.org/wiki/Percent-encoding"}.

%p
  For example, to retrieve data from the
  = link_to "#{@scraper.full_name} scraper", @scraper
  with the SQL query "#{@query}"

%pre
  %code= link_to scraper_data_url(@scraper, query: @query, format: :json), scraper_data_url(@scraper, query: @query, format: :json)


%div{:id => info[:id]}
:javascript
  Ext.onReady(function(){
    new Ext.FormPanel({
      renderTo: $(#{info[:id].to_json}),
      title: #{form_title.to_json},
      url: #{form_url.to_json},
      items: #{prompts_to_extjs_items(info).to_json},
      buttons: [{
        text: #{('Save ' + form_title).to_json},
        type: 'submit',
        handler: function(f) {
          var fp = this.ownerCt.ownerCt;
          var form = fp.getForm();
          if(form.isValid()) {
            form.submit({
              url: #{form_url.to_json},
              success: function() {
                fp.collapse(true);
              },
              failure: function() {
                /* do something to indicate failure */
              }
            });
          }
        }
      }],
      collapsible: true,
      collapsed: #{(!info[:values].nil? && !info[:values].empty?).to_json}
    });
  });

Make eval submit button left-align for better visibility

%div{:id => info[:id]}
:javascript
  Ext.onReady(function(){
    new Ext.FormPanel({
      renderTo: $(#{info[:id].to_json}),
      title: #{form_title.to_json},
      url: #{form_url.to_json},
      items: #{prompts_to_extjs_items(info).to_json},
      buttonAlign: 'left',
      buttons: [{
        text: #{('Save ' + form_title).to_json},
        type: 'submit',
        handler: function(f) {
          var fp = this.ownerCt.ownerCt;
          var form = fp.getForm();
          if(form.isValid()) {
            form.submit({
              url: #{form_url.to_json},
              success: function() {
                fp.collapse(true);
              },
              failure: function() {
                /* do something to indicate failure */
              }
            });
          }
        }
      }],
      collapsible: true,
      collapsed: #{(!info[:values].nil? && !info[:values].empty?).to_json}
    });
  });


-# navigation styled for Bootstrap 3.0
%nav.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to image_tag('BitParrot_logo_GrayFont.png', width: 150, height: 50, align: 'left', style: 'margin: 0px 0px 10px 0px'), root_path
      = link_to 'Home', root_path, class: 'navbar-brand'
    .collapse.navbar-collapse
      %ul.nav.navbar-nav
        = render 'layouts/navigation_links'

Fix Home tab spacing so it does not overlap the logo.

-# navigation styled for Bootstrap 3.0
%nav.navbar.navbar-default.navbar-fixed-top
  .container
    .navbar-header
      %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to image_tag('BitParrot_logo_GrayFont.png', width: 150, height: 50, align: 'left', style: 'margin: 0px 0px 10px 0px'), root_path
      = link_to 'Home', root_path, class: 'navbar-brand', style: 'margin: 0px 0px 0px 15px'
    .collapse.navbar-collapse
      %ul.nav.navbar-nav
        = render 'layouts/navigation_links'


%section#events.section--alternate
  .container
    .row
      .col-lg-12.text-center
        %h2.section-heading Next Events
    .row
      .col-lg-12
        %ul.timeline#events-list
          %li
            = link_to 'http://railsgirls.com/brussels' do
              .timeline-image
                = image_tag 'railsgirls-sq.png', class: 'img-circle img-responsive', alt: '28-29/10/2016'
            .timeline-panel
              .timeline-heading
                %h4 28-29/10/2016
                %h4.subheading
                  = link_to 'Rails Girls Brussels', 'http://railsgirls.com/brussels'
              .timeline-body
                %p.text-muted Get started with tech
          %li.more
            = link_to 'https://www.meetup.com/ruby_belgium' do
              .timeline-image
                %h4 check
meetup.com
for more

%script{id: 'event-template', type: 'text/x-jsrender'}
  %li{class: '{{:class}}'}
    %a{href: '{{:link}}'}
      .timeline-image
        %img.img-circle.img-responsive{src: '{{:image}}', alt: '{{:date}}'}
    .timeline-panel
      .timeline-heading
        %h4 {{>date}}
        %h4.subheading
          %a{href: '{{:link}}'}
            {{>title}}
      .timeline-body
        %p.text-muted {{>description}}

Remove old rails girl event on homepage

%section#events.section--alternate
  .container
    .row
      .col-lg-12.text-center
        %h2.section-heading Next Events
    .row
      .col-lg-12
        %ul.timeline#events-list
          %li.more
            = link_to 'https://www.meetup.com/ruby_belgium' do
              .timeline-image
                %h4 check
meetup.com
for more

%script{id: 'event-template', type: 'text/x-jsrender'}
  %li{class: '{{:class}}'}
    %a{href: '{{:link}}'}
      .timeline-image
        %img.img-circle.img-responsive{src: '{{:image}}', alt: '{{:date}}'}
    .timeline-panel
      .timeline-heading
        %h4 {{>date}}
        %h4.subheading
          %a{href: '{{:link}}'}
            {{>title}}
      .timeline-body
        %p.text-muted {{>description}}


!!! Strict
%html{ :lang => "en", :"xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
  %head
    %meta{ :content => "text/html; charset=utf-8", :"http-equiv" => "Content-Type" }
    %meta{ :content => "en", :"http-equiv" => "Content-Language" }
    %title= "#{@title.last} | integrity"
    - stylesheets(:reset, :buttons, :integrity)
    - unless @project.nil?
      %link{ :rel  => "alternate",                   |
        :type   => "application/atom+xml",           |
        :title  => "Build history Atom",             |
        :href   => "#{project_path(@project)}.atom"} |

  %body
    #header
      %h1= @title.join(" / ")
      %address.watermark
        checked with
        %a{ :href => "http://integrityapp.com", :title => "The fun continuous integration server" } integrity
    #content= yield
    - if Integrity.config && Integrity.config[:use_basic_auth]
      #footer
        - if authorized?
          Oh, hello
          %strong&= current_user
        - else
          Hey there!
          %a{ :href => path("/login") } Log In
          if you have a user

Remove Atom feed auto-discovery link

!!! Strict
%html{ :lang => "en", :"xml:lang" => "en", :xmlns => "http://www.w3.org/1999/xhtml" }
  %head
    %meta{ :content => "text/html; charset=utf-8", :"http-equiv" => "Content-Type" }
    %meta{ :content => "en", :"http-equiv" => "Content-Language" }
    %title= "#{@title.last} | integrity"
    - stylesheets(:reset, :buttons, :integrity)
  %body
    #header
      %h1= @title.join(" / ")
      %address.watermark
        checked with
        %a{ :href => "http://integrityapp.com", :title => "The fun continuous integration server" } integrity
    #content= yield
    - if Integrity.config && Integrity.config[:use_basic_auth]
      #footer
        - if authorized?
          Oh, hello
          %strong&= current_user
        - else
          Hey there!
          %a{ :href => path("/login") } Log In
          if you have a user


%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      Changes are shown from the version in the first field to the version in the second field.

    %br

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], placeholder: "from", class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], placeholder: "to", class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#from, #to").autocomplete({
    source: availableTags,
    minLength: 1
  });

  disableButtonIfEmptyField('#to', '.commits-compare-btn');

Add br for new sentense in Compare view

%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      %br
      Changes are shown from the version in the first field to the version in the second field.

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], placeholder: "from", class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], placeholder: "to", class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#from, #to").autocomplete({
    source: availableTags,
    minLength: 1
  });

  disableButtonIfEmptyField('#to', '.commits-compare-btn');


= form_for :feedback do |f|
  %fieldset#user
    - Wingman.stats.each do |k, s|
      = s.render
      = f.text_field s.name, :value => s.value
  %fieldset#form

Add labels and readonly attribute to form

= form_for :feedback do |f|
  %fieldset#user
    - Wingman.stats.each do |k, s|
      = s.render
      = f.label s.name
      = f.text_field s.name, :value => s.value, :readonly => true
  %fieldset#form
    = f.label :email
    = f.text_field :email
    = f.label :comments
    = f.text_field :comments


---
layout: default
---
- page.title = "Community member: #{page.identity.name}"
- page.header_title = "#{page.identity.name}"
#content
  .row
    .span12
      .hero-unit
        .row
          .pull-left
            %img{:src=>page.identity.avatar_url(120), :alt=>page.identity.name, style:"padding:5px;"}
          %h2
            =page.identity.role
          %h3
            =page.identity.company
            %small #{page.identity.location}
        .row
          .bio=page.identity.bio

- #for release in site.pages.select{|x| !x.release.nil? and page.identity.emails.index(x.release.released_by.email)}
- #release.title

Add basic social info to profile

---
layout: default
---
- page.title = "Community member: #{page.identity.name}"
- page.header_title = "#{page.identity.name}"
#content
  .row
    .span9
      .hero-unit
        .row
          .pull-left
            %img{:src=>page.identity.avatar_url(120), :alt=>page.identity.name, style:"padding:5px;"}
          %h2
            =page.identity.company
            %small #{page.identity.location}
          .bio=page.identity.bio

    .span3
      .well
        - unless page.identity.role.nil?
          %h4
            %i.icon-star
            = page.identity.role

        %dl.unstyled
          %dt
            GitHub
          %dd
            %a{:href=>page.identity.github.profile_url}
              =page.identity.github.username
          - unless page.identity.twitter.nil?
            %dt
              Twitter
            %dd
              %a{:href=>page.identity.twitter.url}
                ="@#{page.identity.twitter.username}"
          - unless page.identity.blog.nil?
            %dt
              Blog
            %dd
              %a{:href=>page.identity.blog} Blog
          - unless page.identity.teams.nil?
            %dd
              - for team in page.identity.teams
                %span.greenbar=team
- #for release in site.pages.select{|x| !x.release.nil? and page.identity.emails.index(x.release.released_by.email)}
- #release.title


%table.char
  %tbody
    - if @character.current_title && @character.titles
      - @character.titles.each do |t|
        %tr
          %td
            - if t == @character.current_title
              %span.current_title= TitleHelper::get_title_name(t)
            - else
              %span= TitleHelper::get_title_name(t)
    - else
      %tr
        %td No titles.

Add name header to titles pane

%table.char
  %tbody
    %tr.colnames
      %td Name
    - if @character.current_title && @character.titles
      - @character.titles.each do |t|
        %tr
          %td
            - if t == @character.current_title
              %span.current_title= TitleHelper::get_title_name(t)
            - else
              %span= TitleHelper::get_title_name(t)
    - else
      %tr
        %td No titles.


%section.threads
  %h1= t ".title"
  - @threads.each do |thread|
    %article.thread_summary
      %h1= link_to thread.title, {action: :show, id: thread}
      %p= t ".latest_activity", ago: time_ago_in_words(thread.latest_activity_at)
  = will_paginate @threads

Use the compact threads listing for the threads page - looks much nicer.

%section.threads
  %h1= t ".title"
  %ul.thread-list
    = render partial: "message_threads/compact", collection: @threads, as: :thread
  = will_paginate @threads


%h4
  Can't be merged
%p
  This merge request can not be accepted because branch
  - unless @merge_request.source_branch_exists?
    %span.label.label-inverse= @merge_request.source_branch
    does not exist in
    %span.label.label-info= @merge_request.source_project_path
  - else
    %span.label.label-inverse= @merge_request.target_branch
    does not exist in
    %span.label.label-info= @merge_request.target_project_path
  %br
  %strong Please close this merge request or change branches with existing one

Update merge request text to reflect editability of source/target branch

%h4
  Can't be merged
%p
  This merge request can not be accepted because branch
  - unless @merge_request.source_branch_exists?
    %span.label.label-inverse= @merge_request.source_branch
    does not exist in
    %span.label.label-info= @merge_request.source_project_path
    %br
    %strong Please close this merge request and open a new merge request to change source branches.
  - else
    %span.label.label-inverse= @merge_request.target_branch
    does not exist in
    %span.label.label-info= @merge_request.target_project_path
    %br
    %strong Please close this merge request or change to another target branch.


#directory_lookup.modal.hide
  = modal_header 'tel.search.ch'

  .modal-body
    %table.table
      %tr{:style => 'border-top: none'}
        %th{:style => 'border-top: none'}= [vcard.given_name, vcard.family_name].join(" ")
        %th{:style => 'border-top: none'}= vcard.street_address
        %th{:style => 'border-top: none'}= [vcard.postal_code, vcard.locality].join(" ")

      - @seen_matches = []
      %tr
        %th{:colspan => 4}= t('directory_lookup.title')

      = render 'directory_matches', :vcard => vcard, :match_type => :great
      = render 'directory_matches', :vcard => vcard, :match_type => :family_name
      = render 'directory_matches', :vcard => vcard, :match_type => :address
      = render 'directory_matches', :vcard => vcard, :match_type => :locality

  .modal-footer
    = link_to 'Abbrechen', '#', :class => 'btn', 'data-dismiss' => 'modal'

Use translations for cancel action in vcars/directory_lookup.

#directory_lookup.modal.hide
  = modal_header 'tel.search.ch'

  .modal-body
    %table.table
      %tr{:style => 'border-top: none'}
        %th{:style => 'border-top: none'}= [vcard.given_name, vcard.family_name].join(" ")
        %th{:style => 'border-top: none'}= vcard.street_address
        %th{:style => 'border-top: none'}= [vcard.postal_code, vcard.locality].join(" ")

      - @seen_matches = []
      %tr
        %th{:colspan => 4}= t('directory_lookup.title')

      = render 'directory_matches', :vcard => vcard, :match_type => :great
      = render 'directory_matches', :vcard => vcard, :match_type => :family_name
      = render 'directory_matches', :vcard => vcard, :match_type => :address
      = render 'directory_matches', :vcard => vcard, :match_type => :locality

  .modal-footer
    = link_to t_action(:cancel), '#', :class => 'btn', 'data-dismiss' => 'modal'


- content_for :title do
  Commit Stats Over Past #{@days_ago} Days

%h2 #{@commit_set.count} commits
%table.table.table-striped.table-hover.table-bordered
  %thead
    %tr
      %th Total commits
      %th Author
      %th Breakdown by project
      %th
  %tbody
    - @commit_set.top_authors.each do |object|
      %tr
        %td= object[:commit_set].count
        %td
          %a{ href: name_to_slug(object[:author]) }= object[:author]
        %td= breakdown(object[:commit_set])
        %td
          %button.btn.btn-mini{ type: 'button',
            data: { toggle: 'modal', target: '#' + name_to_id(object[:author]) + '-details' }}
            Details
          .modal.hide.fade{ id: name_to_id(object[:author]) + '-details' }
            .modal-header
              %button(type='button' class='close' data-dismiss='modal' aria-hidden='true')
                ×
              %h3 Details for #{object[:author]}
            .modal-body
              %table.table.table-hover.table-bordered.table-condensed
                %tbody
                  - object[:commit_set].commits.each do |commit|
                    %tr
                      %td +#{commit.stat[:additions]}
                      %td -#{commit.stat[:deletions]}
                      %td
                        %code= commit.subject
                      %td [#{commit.repo.name}]
            .modal-footer
              %a(href='#' class='btn' data-dismiss='modal') Close

Allow modals to be closed with Escape key

- content_for :title do
  Commit Stats Over Past #{@days_ago} Days

%h2 #{@commit_set.count} commits
%table.table.table-striped.table-hover.table-bordered
  %thead
    %tr
      %th Total commits
      %th Author
      %th Breakdown by project
      %th
  %tbody
    - @commit_set.top_authors.each do |object|
      %tr
        %td= object[:commit_set].count
        %td
          %a{ href: name_to_slug(object[:author]) }= object[:author]
        %td= breakdown(object[:commit_set])
        %td
          %button.btn.btn-mini{ type: 'button',
            data: { toggle: 'modal', target: '#' + name_to_id(object[:author]) + '-details' }}
            Details
          .modal.hide.fade{ id: name_to_id(object[:author]) + '-details', tabindex: '-1' }
            .modal-header
              %button(type='button' class='close' data-dismiss='modal' aria-hidden='true')
                ×
              %h3 Details for #{object[:author]}
            .modal-body
              %table.table.table-hover.table-bordered.table-condensed
                %tbody
                  - object[:commit_set].commits.each do |commit|
                    %tr
                      %td +#{commit.stat[:additions]}
                      %td -#{commit.stat[:deletions]}
                      %td
                        %code= commit.subject
                      %td [#{commit.repo.name}]
            .modal-footer
              %a(href='#' class='btn' data-dismiss='modal') Close


%h3
  First Time Here?
%p
  Sign up for access as:
  %br
  = link_to("Student", signup_portal_students_path, :class=>'more')
  %br
  %a{ :href=>"/portal/teachers/new", :class=>'more' }
    Teacher
%h3
  Just want to Try the Units?
%p
  =link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}

Fix teacher signup path to use route

%h3
  First Time Here?
%p
  Sign up for access as:
  %br
  = link_to("Student", signup_portal_students_path, :class=>'more')
  %br
  = link_to("Teacher", new_portal_teacher_path, :class=>'more')
%h3
  Just want to Try the Units?
%p
  =link_to "View our unit Previews", investigation_preview_list_path, {:class=>'more'}


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

Reduce cache timeout to 1 hr

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


%table.table
  = render :partial => 'booking', :collection => collection

Add header with column withs for booking batch edit.

%table.table
  %tr
    %th(style="width: 15%")= t_attr :value_date, Booking
    %th(style="width: 15%")= t_attr :code, Booking
    %th(style="width: 15%")= t_attr :title, Booking
    %th= t_attr :credit_account, Booking
    %th(style="width: 15%")= t_attr :debit_account, Booking
    %th(style="width: 15%")= t_attr :amount, Booking

  = render :partial => 'booking', :collection => collection


%tr{ :class => "#{'overdue' if task.overdue? && task.open? } #{ 'mine' if task.assigned?(current_user) && task.open?}"}
  %td.status
    = task_status(task,:content)
  %td.name
    = link_to task.name, project_task_list_task_path(project,task_list,task)
    - unless (task.due_on.nil? && task.unassigned?) || task.closed?
      %span.assigned
        - if task.due_on
          = due_on(task)
        - unless sub_action == 'mine'
          = "-" unless task.assigned.nil? || task.due_on.nil?
          = link_to task.assigned.name, user_path(task.assigned) unless task.assigned.nil?

Fix for bug in Tender: 84-my-user-page-is-broken

%tr{ :class => "#{'overdue' if task.overdue? && task.open? } #{ 'mine' if task.assigned?(current_user) && task.open?}"}
  %td.status
    = task_status(task,:content)
  %td.name
    = link_to task.name, project_task_list_task_path(project,task_list,task)
    - unless (task.due_on.nil? && task.unassigned?) || task.closed?
      %span.assigned
        - if task.due_on
          = due_on(task)
        - unless sub_action == 'mine'
          = "-" unless task.assigned.nil? || task.due_on.nil?
          = link_to task.assigned.name, user_path(task.assigned.user) unless task.assigned.nil?


= label_tag attribute.name do
  = @resource.model.human_attribute_name(attribute.name)
  - if attribute.required?
    %span.text-muted.m-l-1
      %i.fa.fa-exclamation-circle{ 'data-toggle' => :tooltip, 'data-placement' => :right, :title => 'Required' }
  - if %w(belongs_to has_many).include?(attribute.type)
    %span.text-muted.m-l-1.uncheck-associations
      %i.fa.fa-remove{ 'data-toggle' => :tooltip, 'data-placement' => :right, :title => 'Uncheck all' }

Fix condition for uncheck associations button

= label_tag attribute.name do
  = @resource.model.human_attribute_name(attribute.name)
  - if attribute.required?
    %span.text-muted.m-l-1
      %i.fa.fa-exclamation-circle{ 'data-toggle' => :tooltip, 'data-placement' => :right, :title => 'Required' }
  - if %i(belongs_to has_many).include?(attribute.type)
    %span.text-muted.m-l-1.uncheck-associations
      %i.fa.fa-remove{ 'data-toggle' => :tooltip, 'data-placement' => :right, :title => 'Uncheck all' }


#main_div
  = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"}

Fix action_url for gtl view showing provisioned vms

#main_div
  = render :partial => "layouts/gtl", :locals => {:action_url => "show"}


= semantic_form_for :batch_activities, :url => batch_activities_path do |f|
  = f.inputs do
    = f.input :date, :label => t('attributes.date'), :input_html => {:value => @date}

  %table{:style => 'width: 100%'}
    %thead
      %th= t_attr :person, Activity
      %th= t_attr :project, Activity
      %th{:style => 'width: 5em'}= t_attr :duration, Activity
      %th= t_attr :comment, Activity

    %tbody
    - for activity in @activities
      %tr
        = fields_for 'activities[]', activity do |a|
          %td
            = link_to activity.person, activity.person
            = a.hidden_field :person_id
          %td= a.select :project_id, Project.all.map{|project| [project.to_s, project.id]}, {:prompt => t_select_prompt(Project)}, :style => 'width: 98%'
          %td= a.text_field :hours, :style => 'width: 98%'
          %td= a.text_field :comment, :style => 'width: 98%'

  = f.buttons do
    = f.commit_button

Mark date field in batch activities form for date picker etc.

= semantic_form_for :batch_activities, :url => batch_activities_path do |f|
  = f.inputs do
    = f.input :date, :as => :date_field, :label => t('attributes.date'), :input_html => {:value => @date}

  %table{:style => 'width: 100%'}
    %thead
      %th= t_attr :person, Activity
      %th= t_attr :project, Activity
      %th{:style => 'width: 5em'}= t_attr :duration, Activity
      %th= t_attr :comment, Activity

    %tbody
    - for activity in @activities
      %tr
        = fields_for 'activities[]', activity do |a|
          %td
            = link_to activity.person, activity.person
            = a.hidden_field :person_id
          %td= a.select :project_id, Project.all.map{|project| [project.to_s, project.id]}, {:prompt => t_select_prompt(Project)}, :style => 'width: 98%'
          %td= a.text_field :hours, :style => 'width: 98%'
          %td= a.text_field :comment, :style => 'width: 98%'

  = f.buttons do
    = f.commit_button


.search_bar
  .song_search_container
    %input#search{name: "search", placeholder: "Search the song library", type: "text", data: {toggle: "searchresults", list: ".song-list"} }
.song_alphabet_container
  Browse by:
  %select#letter_picker
    %option Artist name
    - ('a'..'z').each do |letter|
      %option #{letter}
%ul.song-list
  - songs.each_with_index do |song, index|
    %li.catalog_entry
      %a(href="/song/#{song["id"]}/play")
        .artist #{song["artist"]}
        .title #{song["title"]}

Reduce clickable area for song list

.search_bar
  .song_search_container
    %input#search{name: "search", placeholder: "Search the song library", type: "text", data: {toggle: "searchresults", list: ".song-list"} }
.song_alphabet_container
  Browse by:
  %select#letter_picker
    %option Artist name
    - ('a'..'z').each do |letter|
      %option #{letter}
%ul.song-list
  - songs.each_with_index do |song, index|
    %li.catalog_entry
      .artist
        %a(href="/song/#{song["id"]}/play")
          #{song["artist"]}
      .title
        %a(href="/song/#{song["id"]}/play")
          #{song["title"]}


%table
  %tr
    %th Train Line
    %th Route
    %th Run Number
    %th Operator ID
  -@schedule.each do |data|
    %tr
      %td #{data.line}
      %td #{data.route}
      %td #{data.run_number}
      %td #{data.operator}

%h3 Import a CSV
%form(action='/import' method='POST' enctype='multipart/form-data')
  %input(type='file' name='myfile')
  %input(type='submit' value='Upload' )

Add details for a successful file upload.

%table
  %tr
    %th Train Line
    %th Route
    %th Run Number
    %th Operator ID
  -@schedule.each do |data|
    %tr
      %td #{data.line}
      %td #{data.route}
      %td #{data.run_number}
      %td #{data.operator}
%hr
%h2 Import a CSV
%form(action='/import' method='POST' enctype='multipart/form-data')
  %input(type='file' name='myfile')
  %input(type='submit' value='Upload' )
%h3 Details for a successful upload:
%p You can import your own CSV via the CSV uploader! Here is the format that's needed to make this a successful upload.
%ul
  %li Each row of the CSV will contain data for the following values:Train Line (El, Metra, Amtrak), Route Name (ie. Brown Line), Run Number, Operator ID
  %li The first row of the CSV will always contain the name detailing the field for the information in the order provided.
  %li Each line of the CSV will be denoted with a combination of a new line character and carriage return: \r\n

%p Sample File Format:
%table
  %tr
    %th TRAIN_LINE,
    %th ROUTE_NAME,
    %th RUN_NUMBER,
    %th OPERATOR_ID
    %tr
      %td Metra,
      %td UPN,
      %td M405,
      %td AJohnson
    %tr
      %td Metra,
      %td UPNW,
      %td M511,
      %td YSmith
    %tr
      %td Amtrak,
      %td Hiawatha,
      %td A006,
      %td LBeck
    %tr
      %td El,
      %td RedLine,
      %td E432,
      %td LHill


= f.label belongs_to[:key].to_sym
/ TODO: Needs some kind of configuration to set up display options
= f.select belongs_to[:key].to_sym, Category.all.map { |object| [object.name, object.id] }

Make belongs_to field actually be working for every belongs_to

= f.label belongs_to[:key].to_sym
/ TODO: Needs some kind of configuration to set up display options
= f.select belongs_to[:key].to_sym, belongs_to[:entity].all.map { |object| [object.name, object.id] }


%h1#content-title= @project.name + ": Describe Experiment"

%iframe(src="#{kefed_editor_swf_url}" width="100%" height="500")
  %p Your browser does not support iframes.

Create a button to finish editing kefed

%h1#content-title= @project.name + ": Describe Experiment"

%iframe(src="#{kefed_editor_swf_url}" width="100%" height="500")
  %p Your browser does not support iframes.

.text-center
  = link_to("Save and Continue", @project, :class => 'big-button-link')


%h2 Hi there

Update to the main page to let people know who to contact with questions.

%h2 Quantum Attendance 2.0

%div
  %p
    To enter in a new class, click on the 'Enter New Class' menu item in the side bar. If you want to limit the students that you see to a particular school, select that school from the top dropdown menu.

  %p
    You can view and edit members via the side menu as well.

  %p
    If you have any comments, suggestions, or bugs, please email them to Alex Kleissner.


%table
  %tbody
    %tr
      %td.headerleft.center
        %span.name
          = RankHelper::get_rank_name(@character['race'], @character['gender'], @character['rank'])
          = @character['name']
        %span.block.title
          = GenderHelper::get_gender_name(@character['gender'])
          = RaceHelper::get_race_name(@character['race'])
          - if @character['current_title']
            = TitleHelper::get_title_name(@character['current_title'])
        %span.block.title
        %table.internal.xplum
          %tbody
            - if @character['luminance_earned'] && @character['luminance_earned'] > 0
              %tr
                %td.left
                  %span Luminance:
                %td.right
                  %span= "#{add_commas(@character['luminance_earned'].to_s)} / #{add_commas(@character['luminance_total'].to_s)}"
            %tr
              %td.left
                %span Total Experience (XP):
              %td.right
                %span= add_commas(@character['total_xp'].to_s)
      %td.headerright.center.level
        %span.block Character
        %span.block Level
        %span.block.level= @character['level']

Remove usage of helper from char_header for gender/race

%table
  %tbody
    %tr
      %td.headerleft.center
        %span.name
          = RankHelper::get_rank_name(@character['race'], @character['gender'], @character['rank'])
          = @character['name']
        %span.block.title
          = @character['gender']
          = @character['race']
          - if @character['current_title']
            = TitleHelper::get_title_name(@character['current_title'])
        %span.block.title
        %table.internal.xplum
          %tbody
            - if @character['luminance_earned'] && @character['luminance_earned'] > 0
              %tr
                %td.left
                  %span Luminance:
                %td.right
                  %span= "#{add_commas(@character['luminance_earned'].to_s)} / #{add_commas(@character['luminance_total'].to_s)}"
            %tr
              %td.left
                %span Total Experience (XP):
              %td.right
                %span= add_commas(@character['total_xp'].to_s)
      %td.headerright.center.level
        %span.block Character
        %span.block Level
        %span.block.level= @character['level']


.container
  %h1 Home
  %p
    = "Welcome, #{current_user.name} !"

  = render 'users/search'

Use h2 instead on welcome

.container
  %h1 Home
  %h2
    = "Welcome, #{current_user.name} !"
  %br
  = render 'users/search'


-#
  Parameters:
    widget -- MiqWidget object
#zoomed_chart_div
  .panel.panel-default
    .panel-heading
      %h3.panel-title
        = h(widget.title)
        %a{:title => "Close", :href => "#",
            :onclick => "miqSparkle(false);$('#lightbox-panel').fadeOut(300);"}
          %i.fa.fa-close.pull-right
    .panel-body{:style => "padding: 0"}
      = chart_remote('dashboard', :id => 'my_chart', :width => 700, :height => 500, :bgcolor => "#f2f2f2")
    = render :partial => 'widget_footer', :locals => {:widget => widget}

Adjust zoomed chart styling in modal

-#
  Parameters:
    widget -- MiqWidget object
#zoomed_chart_div
  .panel.panel-default
    .panel-heading
      %h3.panel-title
        = h(widget.title)
        %a{:title => "Close", :href => "#",
            :onclick => "miqSparkle(false);$('#lightbox-panel').fadeOut(300);"}
          %i.fa.fa-close.pull-right
    .panel-body{:style => "padding: 0"}
      = chart_remote('dashboard', :id => 'my_chart', :width => 664, :height => 450, :bgcolor => "#f2f2f2")
    = render :partial => 'widget_footer', :locals => {:widget => widget}


%pre.build-trace#build-trace
  %code.bash.js-build-output
    .build-loader-animation.js-build-refresh

Fix missing dots from the CI job log output


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

Move the flag to the name within the sidebar

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


.small.centered.rbox.dashed
  %h2 Choose an Existing<br />Experimental Design to Copy
  - for project in (Yogo::Project.all - @project)
    - design = @experimental_designs.select{|e| e.uid == project.yogo_model_uid.to_s.upcase}.first
    %h3= link_to(project.name + ': ' + design.model_name,
          kefed_editor_yogo_project_url(@project) + "?uid=#{design.uid}&editor_action=copyModel",
          :class => 'icon icon-blueprint')

    / -# for design in @experimental_designs
    /        %li=# link_to(design.model_name,
    /                    kefed_editor_yogo_project_url(@project) + "?uid=#{design.uid}&editor_action=copyModel",
    /              :class => 'button-link')
  %h2 Or

  %h3= link_to('Create A New Experimental Design',
    kefed_editor_yogo_project_url(@project, :editor_action => 'createModel'),
    :class => 'icon icon-blueprint-add')

Remove commented out haml, it is being rendered!

.small.centered.rbox.dashed
  %h2 Choose an Existing<br />Experimental Design to Copy
  - for project in (Yogo::Project.all - @project)
    - design = @experimental_designs.select{|e| e.uid == project.yogo_model_uid.to_s.upcase}.first
    %h3= link_to(project.name + ': ' + design.model_name,
          kefed_editor_yogo_project_url(@project) + "?uid=#{design.uid}&editor_action=copyModel",
          :class => 'icon icon-blueprint')

  %h2 Or

  %h3= link_to('Create A New Experimental Design',
    kefed_editor_yogo_project_url(@project, :editor_action => 'createModel'),
    :class => 'icon icon-blueprint-add')


.container
  %header.page-header
    .col-1{'ui-view' => 'col-1'}
      %a.logo{href: '/', 'ng-click' => 'reset()'}
        %img{src:"/assets/logo-hn-search.png"}
        .logo-name
          Search
          %br
          Hacker News
    .col-2{'ui-view' => 'col-2'}
    .col-3{'ui-view' => 'col-3'}
  %section.main
    %div{'ng-include' => '"_sidebar.html"'}
    %header{'ui-view' => 'main-header'}
    %section.main-content{'ui-view' => 'main-content'}
    %footer
      %ul.list-inline
        %li
          %a{href: '/about'} About
        %li
          •
        %li
          %a{href: '/settings'} Settings
        %li
          •
        %li
          %a{href: '/help'} Help
        %li
          •
        %li
          %a{href: 'https://github.com/algolia/hn-search'} GitHub
        %li
          •
        %li
          %a{href: 'http://status.algolia.com/hn'} Status
        %li
          •
        %li
          %a{href: '/cool_apps'} Cool apps
        %li
          •
        %li
          %a{href: '/api'} API

Add link to HN in the footer + reordering

.container
  %header.page-header
    .col-1{'ui-view' => 'col-1'}
      %a.logo{href: '/', 'ng-click' => 'reset()'}
        %img{src:"/assets/logo-hn-search.png"}
        .logo-name
          Search
          %br
          Hacker News
    .col-2{'ui-view' => 'col-2'}
    .col-3{'ui-view' => 'col-3'}
  %section.main
    %div{'ng-include' => '"_sidebar.html"'}
    %header{'ui-view' => 'main-header'}
    %section.main-content{'ui-view' => 'main-content'}
    %footer
      %ul.list-inline
        %li
          %a{href: '/about'} About
        %li
          •
        %li
          %a{href: '/settings'} Settings
        %li
          •
        %li
          %a{href: '/help'} Help
        %li
          •
        %li
          %a{href: '/api'} API
        %li
          •
        %li
          %a{href: 'https://news.ycombinator.com'} Hacker News
        %li
          •
        %li
          %a{href: 'https://github.com/algolia/hn-search'} Fork/Contribute
        %li
          •
        %li
          %a{href: 'http://status.algolia.com/hn'} Status
        %li
          •
        %li
          %a{href: '/cool_apps'} Cool apps


.row
  .columns.small-offset-1.small-10
    = simple_form_for [@category, @topic] do |f|
      = f.error :base
      = f.input :name
      = f.simple_fields_for :posts do |p|
        = p.input :content
      = f.button :submit

Add height to post input on create

.row
  .columns.small-offset-1.small-10
    = simple_form_for [@category, @topic] do |f|
      = f.error :base
      = f.input :name
      = f.simple_fields_for :posts do |p|
        = p.input :content, input_html: {rows: 25}
      = f.button :submit


:css
  .panel-body-fixed {
    height: 300px;
    overflow: scroll;
  }
  .component_subform {
    width: 94%;
  }

.subheader-label
  %h2 #{@asset.asset_type.name.singularize} Profile

= render 'subheader'
.row
  .col-sm-12
    .panel.panel-default
      .panel-heading
        .row
          .col-sm-10
            %h3.panel-title
              Highlights
          .col-sm-2
            = render 'actions'
      .panel-body.panel-body-fixed
        = render 'details'
.row
  .col-sm-12.col-md-2
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          Asset Summary
      .panel-body
        = render :partial => 'summary', :locals => {:asset => @asset}

  .col-sm-12.col-md-10#profile
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          Profile
      .panel-body
        = render 'profile'

.modal.fade#form-modal{:tabindex => -1, :role => 'dialog', :aria => {:hidden => true}}

=render 'show_scripts'

Change primary headers in asset tables and profile pages.

:css
  .panel-body-fixed {
    height: 300px;
    overflow: scroll;
  }
  .component_subform {
    width: 94%;
  }

  .subheader-label {
    border-bottom: 1px solid #e5e5e5;
  }

.subheader-label
  %h2 #{@asset.fta_asset_category.name.singularize} Profile

= render 'subheader'
.row
  .col-sm-12
    .panel.panel-default
      .panel-heading
        .row
          .col-sm-10
            %h3.panel-title
              Highlights
          .col-sm-2
            = render 'actions'
      .panel-body.panel-body-fixed
        = render 'details'
.row
  .col-sm-12.col-md-2
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          Asset Summary
      .panel-body
        = render :partial => 'summary', :locals => {:asset => @asset}

  .col-sm-12.col-md-10#profile
    .panel.panel-default
      .panel-heading
        %h3.panel-title
          Profile
      .panel-body
        = render 'profile'

.modal.fade#form-modal{:tabindex => -1, :role => 'dialog', :aria => {:hidden => true}}

=render 'show_scripts'


.container
  - @logs.each do |l|
    -# wrapper allows the header and detail be siblings, for the JS
    .wrapper
      .action_header{ :class => action_header_style(l) }
        %span.command
          $
          = l.name
        %span.time
          = surround '(', ')' do
            = as_length_of_build(l.start_time, l[:end_time])

      .detail{ :class => action_log_style(l) }
        - if l["out"]
          %table
            %thead
              %tr
                %th Time
                %th stdout/stderr
            %tbody
              - l["out"].each do |o|
                - if o["message"] != ""
                  %tr
                    %td
                      = as_action_timestamp(o["time"])
                    %td
                      %div{ :class => o['type'] == "out" ? "alert-message block-message success" : "alert-message block-message error" }
                        %pre
                          = o["message"]

Make the build view wider, and link to the github URL.

.container-fluid
  On github:
  = revision_link(@build.vcs_url, @build.vcs_revision)
  - @logs.each do |l|
    -# wrapper allows the header and detail be siblings, for the JS
    .wrapper
      .action_header{ :class => action_header_style(l) }
        %span.command
          $
          = l.name
        %span.time
          = surround '(', ')' do
            = as_length_of_build(l.start_time, l[:end_time])

      .detail{ :class => action_log_style(l) }
        - if l["out"]
          %table
            %thead
              %tr
                %th Time
                %th stdout/stderr
            %tbody
              - l["out"].each do |o|
                - if o["message"] != ""
                  %tr
                    %td
                      = as_action_timestamp(o["time"])
                    %td
                      %div{ :class => o['type'] == "out" ? "alert-message block-message success" : "alert-message block-message error" }
                        %pre
                          = o["message"]


%fieldset
  = f.input :type, required: true, as: :select, collection: Loadbalancing::L7rule::TYPES
  = f.input :compare_type, required: true, as: :select, collection: Loadbalancing::L7rule::COMPARE_TYPES
  = f.input :invert, as: :boolean, checked_value: true, unchecked_value: false, wrapper: :horizontal_boolean_4x8, label: 'Use inverse comparisation (NOT)'
  = f.input :key, { required: true, wrapper_html: {class: ("hidden" unless @l7rule.type == 'HEADER' or @l7rule.type == 'COOKIE')}}
  = f.input :value, required: true

=content_for :javascripts do
  :javascript
    $(document).ready(function() {
    });

Fix None object error when editing an L7Rule with 'invert' not checked

%fieldset
  = f.input :type, required: true, as: :select, collection: Loadbalancing::L7rule::TYPES
  = f.input :compare_type, required: true, as: :select, collection: Loadbalancing::L7rule::COMPARE_TYPES
  = f.input :invert, as: :boolean, wrapper: :horizontal_boolean_4x8, label: 'Use inverse comparisation (NOT)'
  = f.input :key, { required: true, wrapper_html: {class: ("hidden" unless @l7rule.type == 'HEADER' or @l7rule.type == 'COOKIE')}}
  = f.input :value, required: true

=content_for :javascripts do
  :javascript
    $(document).ready(function() {
    });


.col-xs-12.col-md-9
  .alert.alert-info
    Sorry, we couldn’t find any
    = @type == "users" ? @type : "scrapers"
    relevant to your search term
    %strong “#{@q}”.

Add 'no results with data' case to notice partial

.col-xs-12.col-md-9
  .alert.alert-info
    Sorry, we couldn’t find any
    - if @type == "users"
      users
    - else
      scrapers
      - if !@scrapers_total_count.zero? && @scrapers.total_count.zero?
        %em with data,
        that are
    relevant to your search term
    %strong “#{@q}”.


%ul.nav.navbar-nav.animated
  %li{class: ("active" if current_page.url == "/downloads/")}
    %a{href: "/downloads", onclick: "ga('send', 'event', 'link', 'click', 'Download');"}
      Download
  %li{class: ("active" if current_page.url == "/features/")}
    %a{href: "/features", onclick: "ga('send', 'event', 'link', 'click', 'Features');"}
      Features
  %li{class: ("active" if current_page.url == "/pricing/")}
    %a{href: "/pricing", onclick: "ga('send', 'event', 'link', 'click', 'Pricing');"}
      Pricing
  %li{class: ("active" if current_page.url == "/community/")}
    %a{href: "/community", onclick: "ga('send', 'event', 'link', 'click', 'Community');"}
      Community
  %li{class: ("active" if current_page.url == "/blog/")}
    %a{href: "/blog", onclick: "ga('send', 'event', 'link', 'click', 'Blog');"}
      Blog
  %li
    = partial "includes/layout/search"
  %li
    %a.sign-in-up-btn{href: "https://gitlab.com/users/sign_in", onclick: "ga('send', 'event', 'link', 'click', 'Sign in');"}
      Sign In

Set 'Blog' nav link as active when viewing a blog post

%ul.nav.navbar-nav.animated
  %li{class: ("active" if current_page.url == "/downloads/")}
    %a{href: "/downloads", onclick: "ga('send', 'event', 'link', 'click', 'Download');"}
      Download
  %li{class: ("active" if current_page.url == "/features/")}
    %a{href: "/features", onclick: "ga('send', 'event', 'link', 'click', 'Features');"}
      Features
  %li{class: ("active" if current_page.url == "/pricing/")}
    %a{href: "/pricing", onclick: "ga('send', 'event', 'link', 'click', 'Pricing');"}
      Pricing
  %li{class: ("active" if current_page.url == "/community/")}
    %a{href: "/community", onclick: "ga('send', 'event', 'link', 'click', 'Community');"}
      Community
  %li{class: ("active" if current_page.url == "/blog/" || current_page.respond_to?(:blog_data))}
    %a{href: "/blog", onclick: "ga('send', 'event', 'link', 'click', 'Blog');"}
      Blog
  %li
    = partial "includes/layout/search"
  %li
    %a.sign-in-up-btn{href: "https://gitlab.com/users/sign_in", onclick: "ga('send', 'event', 'link', 'click', 'Sign in');"}
      Sign In


%form.search{:class => (@features[:index_text_search]) ? 'has-text-search' : '', :action => url_for( :controller => controller_name, :action => :index ), :title => "#{ resource_class.respond_to?( :filter ) ? '' : 'Add :filter scope to ' + resource_class.to_s + ' to enable searching' }"}
  - if @features[:index_text_search]
    .text-search
      .wrapper
        %input{:name => "search", :type => "text", :value => params[:search], :autofocus => true }
        %button.button.only-icon{:type => "submit", :disabled => !resource_class.respond_to?( :filter ), :title => t('Search', :scope => 'admin.global')}>
          %i.icon-search
      .clear
  - if has_template? "_index.search.extras"
    .extras
      = render :partial => "index.search.extras"
      %button.button{:type => "submit", :disabled => !resource_class.respond_to?( :filter )}>
        %i.icon-search
        %span
          = t('Filter', :scope => 'admin.global')

Use clearInside within search form extras block

%form.search{:class => (@features[:index_text_search]) ? 'has-text-search' : '', :action => url_for( :controller => controller_name, :action => :index ), :title => "#{ resource_class.respond_to?( :filter ) ? '' : 'Add :filter scope to ' + resource_class.to_s + ' to enable searching' }"}
  - if @features[:index_text_search]
    .text-search
      .wrapper
        %input{:name => "search", :type => "text", :value => params[:search], :autofocus => true }
        %button.button.only-icon{:type => "submit", :disabled => !resource_class.respond_to?( :filter ), :title => t('Search', :scope => 'admin.global')}>
          %i.icon-search
      .clear
  - if has_template? "_index.search.extras"
    .extras.clearInside
      = render :partial => "index.search.extras"
      %button.button{:type => "submit", :disabled => !resource_class.respond_to?( :filter )}>
        %i.icon-search
        %span
          = t('Filter', :scope => 'admin.global')


%h2
  Vos derniers commentaires
- if @comments.empty?
  %p
    Vous n'avez posté aucun commentaire
- else
  - if @self_answer
    = link_to "Ne pas inclure les réponses à mes commentaires", :self => nil
  -else
    = link_to "Inclure les réponses à mes commentaires", :self => "1"
  %br
  %table#my_comments
    %tr
      %th Fil initiateur
      %th Sujet du commentaire
      %th Date
      %th Note
      %th <abbr title="Nb de réponses">Rép.</abbr>
      %th Dernière réponse
    - @comments.each do |comment|
      - answer = comment.last_answer
      %tr
        %td #{translate_content_type comment.content_type} : #{link_to_content comment.content}
        %td= link_to comment.title, path_for_content(comment.node.content) + "#comment-#{comment.id}"
        %td.date= comment.created_at.to_s(:posted)
        %td.number= comment.score
        %td.number
          - if answer && !answer.read_by?(current_account)
            = image_tag "/images/icones/chat.png", :alt => "Nouveaux commentaires !", :class => "thread-new-comments"
          = comment.nb_answers
        %td.date= answer ? answer.created_at.to_s(:posted) : " ".html_safe

Fix the dashboard for some very special cases

%h2
  Vos derniers commentaires
- if @comments.empty?
  %p
    Vous n'avez posté aucun commentaire
- else
  - if @self_answer
    = link_to "Ne pas inclure les réponses à mes commentaires", :self => nil
  -else
    = link_to "Inclure les réponses à mes commentaires", :self => "1"
  %br
  %table#my_comments
    %tr
      %th Fil initiateur
      %th Sujet du commentaire
      %th Date
      %th Note
      %th <abbr title="Nb de réponses">Rép.</abbr>
      %th Dernière réponse
    - @comments.each do |comment|
      - next if comment.node.nil?
      - answer = comment.last_answer
      %tr
        %td #{translate_content_type comment.content_type} : #{link_to_content comment.content}
        %td= link_to comment.title, path_for_content(comment.node.content) + "#comment-#{comment.id}"
        %td.date= comment.created_at.to_s(:posted)
        %td.number= comment.score
        %td.number
          - if answer && !answer.read_by?(current_account)
            = image_tag "/images/icones/chat.png", :alt => "Nouveaux commentaires !", :class => "thread-new-comments"
          = comment.nb_answers
        %td.date= answer ? answer.created_at.to_s(:posted) : " ".html_safe


!!!
%html
  %head
    %title Movies
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body
    .container
      .row
        .col-xs-12
          = yield

Add the viewport meta tag

!!!
%html
  %head
    %title Movies
    %meta{content: "width=device-width, initial-scale=1", name: "viewport"}

    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body
    .container
      .row
        .col-xs-12
          = yield


= interactive_iframe_tag(interactive) do

  Your browser does not support inline frames, or is currently not configured to display inline frames.
  Content can be viewed at the actual source page:
  = link_to interactive.url, interactive.url
.below_interactive
  - if interactive.save_state
    = interactive_data_div(interactive,@run)
    = save_interactive_button_tag(  @run, interactive)
    = revert_interactive_button_tag(@run, interactive)
    - content_for :extra_javascript do
      :javascript
        $(document).ready(function() {
          var saver = new IFrameSaver();
        });

Remove manual load and save buttons.

= interactive_iframe_tag(interactive) do

  Your browser does not support inline frames, or is currently not configured to display inline frames.
  Content can be viewed at the actual source page:
  = link_to interactive.url, interactive.url
.below_interactive
  - if interactive.save_state
    = interactive_data_div(interactive,@run)
    - content_for :extra_javascript do
      :javascript
        $(document).ready(function() {
          var saver = new IFrameSaver();
        });


=javascript_include_tag 'fassets_core/assets'
#catalog_list
  =render :partial => "box_catalog_list", :locals => {:selected_catalog => selected_catalog}
#box_content
  =render :partial => "box_content"
#sidebar.fassets_core.box
  =render :partial => "facet", :collection => @catalog.facets, :as => :facet

Remove an include that was missed earlier.


= semantic_form_for comic do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :name
    = f.input :homepage
    = f.input :comic_page, label: "Comic Page"
    = f.input :xpath_title, label: "Title XPath"
    = f.input :xpath_image, label: "Image XPath"
  = f.buttons do
    = f.commit_button label: "Save"

Convert new/edit comic form partial

= simple_form_for comic do |f|
  = f.input :name
  = f.input :homepage
  = f.input :comic_page, label: "Comic Page"
  = f.input :xpath_title, label: "Title XPath"
  = f.input :xpath_image, label: "Image XPath"
  = f.submit "Save"


#scaled_scenario_setup
  .selections
    .selection.new.active
      = t(:'local_scenario.start_new').html_safe
    .selection.preset
      = t(:'local_scenario.based_on_preset').html_safe

  = form_tag root_path, id: 'new_scaled_scenario' do
    .row
      .field
        %p= t("country")
        = I18n.t(Current.setting.area_code)
        .hidden
          = render "pages/root_page/country_select"
      .field
        %p= t("year")
        = (Current.setting.end_year || 2050)
        .hidden
          = render "pages/root_page/year_select"

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"

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

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"

Fix "Scale current scenario" form

#scaled_scenario_setup
  .selections
    .selection.new.active
      = t(:'local_scenario.start_new').html_safe
    .selection.preset
      = t(:'local_scenario.based_on_preset').html_safe

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

    .row
      .field
        %p= t("country")
        = I18n.t(Current.setting.area_code)
        .hidden
          = render "pages/root_page/country_select"
      .field
        %p= t("year")
        = (Current.setting.end_year || 2050)
        .hidden
          = render "pages/root_page/year_select"

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"

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

    = render partial: 'scaled_common'

    #submit
      = render "pages/root_page/start_button"


%h2= "#{@ticket.client}: #{@ticket.project} - #{@ticket}"

%ul.pills
  %li= link_to "#{t(:client)}: #{@ticket.client}", client_path(@ticket.project.client)
  %li= link_to "#{t(:project)}: #{@ticket.project}", project_path(@ticket.project)
  - if admin? || current_user.has_role?(:developer, @ticket.project)
    %li= link_to "#{t(:edit)}: #{@ticket}", edit_ticket_path
    %li= link_to t(:new_work_unit), new_ticket_work_unit_path(@ticket)

%p.ticket_metrics
  - if @ticket.estimated_hours && @ticket.percentage_complete
    = image_tag Gchart.pie(:title => "Estimated Hours vs Total Hours -- #{@ticket.percentage_complete}% complete",
      :size => '400x200', :bar_color => "364447,76959c", :data => [100 - @ticket.percentage_complete, @ticket.percentage_complete], :labels => ["Estimated Hours", "Hours Worked"])
    %br/
    %b Estimated Hours:
    = @ticket.estimated_hours
    %b Hours Worked:
    = @ticket.hours

= render "shared/work_unit_index"

= render :partial => "shared/files_and_comments", :locals => {:items => @ticket.files_and_comments.reverse, :id => 'ticket'}

Fix up pie chart a tiny bit more

%h2= "#{@ticket.client}: #{@ticket.project} - #{@ticket}"

%ul.pills
  %li= link_to "#{t(:client)}: #{@ticket.client}", client_path(@ticket.project.client)
  %li= link_to "#{t(:project)}: #{@ticket.project}", project_path(@ticket.project)
  - if admin? || current_user.has_role?(:developer, @ticket.project)
    %li= link_to "#{t(:edit)}: #{@ticket}", edit_ticket_path
    %li= link_to t(:new_work_unit), new_ticket_work_unit_path(@ticket)

%p.ticket_metrics
  - if @ticket.estimated_hours && @ticket.percentage_complete
    = image_tag Gchart.pie(:title => "Remaining Estimated Hours vs Hours Worked -- #{@ticket.percentage_complete}% complete",
      :size => '400x200', :bar_color => "364447,76959c", :data => [100 - @ticket.percentage_complete, @ticket.percentage_complete], :labels => ["Remaining Estimated", "Hours Worked"])
    %br/
    %b Estimated Hours:
    = @ticket.estimated_hours
    %b Hours Worked:
    = @ticket.hours

= render "shared/work_unit_index"

= render :partial => "shared/files_and_comments", :locals => {:items => @ticket.files_and_comments.reverse, :id => 'ticket'}


- unless smart_listing.empty?
  %table.table#liste_gestionnaire
    %thead
      %th#libelle= smart_listing.sortable 'Email', 'email'
      %th= ''

    - @gestionnaires.each do |gestionnaire|
      %tr
        %td{style:'padding-top: 11px; font-size:15px'}= gestionnaire.email
        %td{ style: 'text-align:right' }
          .delete.btn.btn-sm.fa.fa-trash

          .confirm
            = link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), {method: :delete, class: 'btn btn-sm btn-success'}
            .cancel.btn.btn-sm.btn-danger.fa.fa-minus{style: 'top: 0'}

  = smart_listing.paginate
  = smart_listing.pagination_per_page_links

- else
  %h4.center
    Aucun accompagnateur

Remove a useless string in the gestionnaires list

- unless smart_listing.empty?
  %table.table#liste_gestionnaire
    %thead
      %th#libelle= smart_listing.sortable 'Email', 'email'
      %th

    - @gestionnaires.each do |gestionnaire|
      %tr
        %td{style:'padding-top: 11px; font-size:15px'}= gestionnaire.email
        %td{ style: 'text-align:right' }
          .delete.btn.btn-sm.fa.fa-trash

          .confirm
            = link_to 'Valider', admin_gestionnaire_path(id: gestionnaire.id), {method: :delete, class: 'btn btn-sm btn-success'}
            .cancel.btn.btn-sm.btn-danger.fa.fa-minus{style: 'top: 0'}

  = smart_listing.paginate
  = smart_listing.pagination_per_page_links

- else
  %h4.center
    Aucun accompagnateur


- flash.each do |name, msg|
  - if msg.is_a?(String) and msg.present?
    .alert.alert-dismissable{class: "alert-#{name == :notice ? "success" : "danger"}"}
      %button.close{'data-dismiss' => 'alert', 'aria-hidden' => true} ×
      = msg

Change default alert css class to alert-info

- flash.each do |name, msg|
  - if msg.is_a?(String) and msg.present?
    - type = (['info', 'success', 'warning', 'danger'].include?(name.to_s) ? name : 'info')
    .alert.alert-dismissable{class: "alert-#{type}"}
      %button.close{'data-dismiss' => 'alert', 'aria-hidden' => true} ×
      = msg


-unless @user.nil?
  .u-bg-beta.u-mb-5
    .container.u-py-2

      .Grid.Grid--flush.u-t-align-center
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            All lists by
          %h2.u-m-0.u-fw-700
            =@user.name
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            Lists
          %h2.u-m-0.u-fw-700
            =@lists.count
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            Member since
          %h2.u-m-0.u-fw-700
            =distance_of_time_in_words_to_now(@user.created_at)

  .container
    =link_to user_edit_path(@user.name), class: 'Button Button--withIcon u-mb-5' do
      %i.material-icons mode_edit
      Edit your account settings

    -unless @lists.empty?
      .Grid
        -@lists.each do |list|
          .Grid-cell.1-of-2--handheld-and-up.1-of-3--desk
            =render list
    -else
      %p No lists created yet.

Add user loggedin check, reduze margin.

-unless @user.nil?
  .u-bg-beta.u-mb-3
    .container.u-py-2

      .Grid.Grid--flush.u-t-align-center
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            All lists by
          %h2.u-m-0.u-fw-700
            =@user.name
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            Lists
          %h2.u-m-0.u-fw-700
            =@lists.count
        .Grid-cell.1-of-3--handheld-and-up
          %p.u-m-0.u-t-uppercase
            Member since
          %h2.u-m-0.u-fw-700
            =distance_of_time_in_words_to_now(@user.created_at)

  .container
    -if current_user and current_user.id === @user.id
      .u-mb-3
        =link_to user_edit_path(@user.name), class: 'Button Button--withIcon' do
          %i.material-icons mode_edit
          Edit your account settings

    -unless @lists.empty?
      .Grid
        -@lists.each do |list|
          .Grid-cell.1-of-2--handheld-and-up.1-of-3--desk
            =render list
    -else
      %p No lists created yet.


- activities = investigation.activities
.activities_container
  .activity_list_header
    %span.investigation_name
      = investigation.name + " - "
    Activities
  .include_Checkbox
    Include
  %div
    %table.activity_list
      - activities.each do|activity|
        - checkbox_checked = (material.class == ::Investigation)? true : (activity.id == material.id)? true : false
        %tbody
          %tr
            %td.check_box
              = check_box_tag 'activity_id[]',activity.id,checkbox_checked, :id => 'activity_' + activity.id.to_s, :onclick=>"checkActivityToAssign(this)"
            %td
              - if clicked_from_activity
                .activity_name{:style=>"background-color:yellow"}
                  = activity.name
              - else
                .activity_name
                  = activity.name
              .activity_description
                = activity.description
                %span.clazz_count{:id=>"activity_clazz_count_#{activity.id}"}
                  - if(activity.offerings.count == 0)
                    Not used in any class.
                  - elsif(activity.offerings.count == 1)
                    Used in 1 class.
                  - else
                    Used in #{activity.offerings.count} classes.
            %td.preview
              = link_to "Preview",run_url_for(activity,{}),:class=>"button"
            %td.share
              %a{:class=>"button",:style=>"text-decoration:none;"}
                Share

Fix multiple tbody tag issue

- activities = investigation.activities
.activities_container
  .activity_list_header
    %span.investigation_name
      = investigation.name + " - "
    Activities
  .include_Checkbox
    Include
  %div
    %table.activity_list
      %tbody
        - activities.each do|activity|
          - checkbox_checked = (material.class == ::Investigation)? true : (activity.id == material.id)? true : false
          %tr
            %td.check_box
              = check_box_tag 'activity_id[]',activity.id,checkbox_checked, :id => 'activity_' + activity.id.to_s, :onclick=>"checkActivityToAssign(this)"
            %td
              - if clicked_from_activity
                .activity_name{:style=>"background-color:yellow"}
                  = activity.name
              - else
                .activity_name
                  = activity.name
              .activity_description
                = activity.description
                %span.clazz_count{:id=>"activity_clazz_count_#{activity.id}"}
                  - if(activity.offerings.count == 0)
                    Not used in any class.
                  - elsif(activity.offerings.count == 1)
                    Used in 1 class.
                  - else
                    Used in #{activity.offerings.count} classes.
            %td.preview
              = link_to "Preview",run_url_for(activity,{}),:class=>"button"
            %td.share
              %a{:class=>"button",:style=>"text-decoration:none;"}
                Share


.sms-directive
  %label
    %textarea{ng-model:"message",name:"sms",auto-complete:"",required:"",flow:"[[$parent.flowId]]",ng-required:"true",class:"sms"}
  .counter{ng-class:"{ warning: characters < 20}",ng-show:"showCounter"}
    [[characters]]
    %span{ng-show:"messages > 1"}><
        / [[messages]]

Fix message counter display in template

.sms-directive
  %label
    %textarea{ng-model:"message",name:"sms",auto-complete:"",required:"",flow:"[[$parent.flowId]]",ng-required:"true",class:"sms"}
  .counter{ng-class:"{warning: characters < 20}",ng-show:"showCounter"}
    [[characters]]
    %span{ng-show:"messages > 1"}
      \/ [[messages]]


!!! XML
!!!
%html
  %head
    %meta{'name' => 'robots', :content => 'noindex, nofollow'}
    %meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
    %meta{'http-equiv' => 'content-style-type', :content => 'text/css'}
    %meta{'http-equiv' => 'content-script-type', :content => 'text/javascript'}
    %title memository
  %body
    %h1 memository
    %form{:action => "write", :method => "post"}
      %p
        key
        %br
        %input{:type => "textfield", :name => "key"}
      %p
        memo
        %br
        %input{:type => "textarea", :name => "memo"}
      %p
        %input{:type => "submit"}
      %div= @message

Fix action url by helper method

!!! XML
!!!
%html
  %head
    %meta{'name' => 'robots', :content => 'noindex, nofollow'}
    %meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
    %meta{'http-equiv' => 'content-style-type', :content => 'text/css'}
    %meta{'http-equiv' => 'content-script-type', :content => 'text/javascript'}
    %title memository
  %body
    %h1 memository
    %form{:action => uri("/write", false, true), :method => "post"}
      %p
        key
        %br
        %input{:type => "textfield", :name => "key"}
      %p
        memo
        %br
        %input{:type => "textarea", :name => "memo"}
      %p
        %input{:type => "submit"}
      %div= @message


%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      Changes are shown from the version in the first field to the version in the second field.

    %br

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], placeholder: "from", class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], placeholder: "to", class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#from, #to").autocomplete({
    source: availableTags,
    minLength: 1
  });

  disableButtonIfEmptyField('#to', '.commits-compare-btn');

Add br for new sentense in Compare view

%div
  - unless params[:to]
    %p.slead
      Fill input field with commit id like
      %code.label-branch 4eedf23
      or branch/tag name like
      %code.label-branch master
      and press compare button for the commits list and a code diff.
      %br
      Changes are shown from the version in the first field to the version in the second field.

  = form_tag project_compare_index_path(@project), method: :post do
    .clearfix
      .pull-left
        - if params[:to] && params[:from]
          = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
        = text_field_tag :from, params[:from], placeholder: "from", class: "input-xlarge input-xpadding"
        = "..."
        = text_field_tag :to, params[:to], placeholder: "to", class: "input-xlarge input-xpadding"
      .pull-left

        = submit_tag "Compare", class: "btn btn-create commits-compare-btn"
    - if @refs_are_same
      .alert
        %span Refs are the same

:javascript
  var availableTags = #{@project.repository.ref_names.to_json};

  $("#from, #to").autocomplete({
    source: availableTags,
    minLength: 1
  });

  disableButtonIfEmptyField('#to', '.commits-compare-btn');