- content_for :title do
  - if @display == "allfriends"
    Friends of
    = @member.full_name
  - else
    Voting Record —
    = @member.full_name2

.page-header
  %h1
    = image_tag(@member.large_image_url, alt: "Photo of #{@member.name_without_title}", size: "88x115")
    = @member.full_name_no_electorate

- if @display.nil?
  = render "summary", members: @members, member: @member, display: @display
  = render "external_links", member: @member
  = render "policy_comparisons", member: @member, members: @members
  = render "interesting_votes", members: @members, member: @member
  = render "possible_friends", all_friends: false, member: @member
- elsif @display == "allfriends"
  = render "possible_friends", all_friends: true, member: @member
- elsif @display == "allvotes"
  = render "votes_attended", members: @members, member: @member
- elsif @display == "everyvote"
  = render "all_votes", members: @members

Remove allvotes as it's not used any more

- content_for :title do
  - if @display == "allfriends"
    Friends of
    = @member.full_name
  - else
    Voting Record —
    = @member.full_name2

.page-header
  %h1
    = image_tag(@member.large_image_url, alt: "Photo of #{@member.name_without_title}", size: "88x115")
    = @member.full_name_no_electorate

- if @display.nil?
  = render "summary", members: @members, member: @member, display: @display
  = render "external_links", member: @member
  = render "policy_comparisons", member: @member, members: @members
  = render "interesting_votes", members: @members, member: @member
  = render "possible_friends", all_friends: false, member: @member
- elsif @display == "allfriends"
  = render "possible_friends", all_friends: true, member: @member
- elsif @display == "everyvote"
  = render "all_votes", members: @members


- content_for :tos_form do
  %table#signup.form-table
    %thead
      %tr
        %th Accept our Terms of Service
    %tbody
      %tr#terms
        %td.odd
          Our Terms of Service have recently changed!
          Please read and agree to the
          = link_to 'Terms of Service', tos_path
          and the
          = link_to 'Privacy Policy', privacy_path
      %tr
        %th.form-table-ender{colspan: 2}= submit_tag "I agree/consent to the terms", class: 'button', name: :tos_check, id: :tos_check

- if logged_in?
  = form_for current_user, url: user_path(current_user), method: :put, name: :tos_form do
    = content_for :tos_form
- else
  = form_tag confirm_tos_path, method: :patch do
    = content_for :tos_form

Make the TOS 'I agree' text more natural

- content_for :tos_form do
  %table#signup.form-table
    %thead
      %tr
        %th Accept our Terms of Service
    %tbody
      %tr#terms
        %td.odd
          Our Terms of Service have recently changed!
          Please read and agree to the
          = link_to 'Terms of Service', tos_path
          and the
          = link_to 'Privacy Policy', privacy_path
      %tr
        %th.form-table-ender{colspan: 2}= submit_tag "I agree to the terms of service", class: 'button', name: :tos_check, id: :tos_check

- if logged_in?
  = form_for current_user, url: user_path(current_user), method: :put, name: :tos_form do
    = content_for :tos_form
- else
  = form_tag confirm_tos_path, method: :patch do
    = content_for :tos_form


.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open()}"}
  .columns.small-4
    %strong {{ hub.name }}
  .columns.small-3
    {{ hub.address.city }}
  .columns.small-1
    {{ hub.address.state | uppercase }}
  .columns.small-3{"bo-if" => "hub.active"}
    {{ hub.orders_close_at | sensible_timeframe }}
  .columns.small-3{"bo-if" => "!hub.active"}
    Orders closed
  .columns.small-1.text-right
    %i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}

Add hub icon to active table

.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open()}"}
  .columns.small-4
    %i.ofn-i_040-hub
    %strong {{ hub.name }}
  .columns.small-3
    {{ hub.address.city }}
  .columns.small-1
    {{ hub.address.state | uppercase }}
  .columns.small-3{"bo-if" => "hub.active"}
    {{ hub.orders_close_at | sensible_timeframe }}
  .columns.small-3{"bo-if" => "!hub.active"}
    Orders closed
  .columns.small-1.text-right
    %i{"ng-class" => "{'ofn-i_005-caret-down' : !open(), 'ofn-i_006-caret-up' : open()}"}


.row-content-block.second-block.center
  %p
    = icon('circle', class: 'cgreen')
    Integration is active for
    = link_to koding_project_url, target: '_blank' do
      #{current_application_settings.koding_url}

.documentation.wiki
  = markdown @markdown

Remove documentation rendering from /koding for now


- content_for :title, @member.full_name2
- set_meta_tags description: "How #{@member.name_without_title} voted on issues in parliament."

= render "member_page_header", member: @member
= render "social_share"
= render "summary", member: @member
= render "external_links", member: @member
= render "policy_comparisons", member: @member
- if @member.person.members.map{ |m| m.has_whip?}
  = render "interesting_votes", member: @member
- else
  = render "recent_votes", member: @member
= render "possible_friends", member: @member, all_friends: false

Revert "test if person has ever had a whip rather than just current member"

- content_for :title, @member.full_name2
- set_meta_tags description: "How #{@member.name_without_title} voted on issues in parliament."

= render "member_page_header", member: @member
= render "social_share"
= render "summary", member: @member
= render "external_links", member: @member
= render "policy_comparisons", member: @member
- if @member.person.has_whip?
  = render "interesting_votes", member: @member
- else
  = render "recent_votes", member: @member
= render "possible_friends", member: @member, all_friends: false


#main_div
  - if role_allows?(:feature => "ops_settings") || role_allows?(:feature => "ops_rbac", :any => true) || role_allows?(:feature => "ops_diagnostics") || role_allows?(:feature => "ops_db")
    #tab_all_tabs_div= render :partial => "all_tabs"

%script{:type => "text/javascript"}
  -# Create from/to date JS vars to limit calendar starting from
  ManageIQ.calendar.calDateFrom = miqCalendarDateConversion("#{@timezone_offset}");
  ManageIQ.calendar.calDateTo = null

  function miqOpsAfterOnload() {
  = javascript_dim("settings_tree_div", false) if role_allows?(:feature => "ops_settings")
  = javascript_dim("diagnostics_tree_div", false) if role_allows?(:feature => "ops_diagnostics")
  = javascript_dim("vmdb_tree_div", false) if role_allows?(:feature => "ops_db")
  = javascript_dim("rbac_tree_div", false) if role_allows?(:feature => "ops_rbac", :any => true)
  - if @sb[:active_tab] == "db_utilization"
    miqAsyncAjax('#{url_for_only_path(:action => @ajax_action, :id => @record)}');
  };
  ManageIQ.afterOnload = "miqOpsAfterOnload();"

Remove the unnecessary javascript_dim calls in the OPS explorer

#main_div
  - if role_allows?(:feature => "ops_settings") || role_allows?(:feature => "ops_rbac", :any => true) || role_allows?(:feature => "ops_diagnostics") || role_allows?(:feature => "ops_db")
    #tab_all_tabs_div= render :partial => "all_tabs"

%script{:type => "text/javascript"}
  -# Create from/to date JS vars to limit calendar starting from
  ManageIQ.calendar.calDateFrom = miqCalendarDateConversion("#{@timezone_offset}");
  ManageIQ.calendar.calDateTo = null

  function miqOpsAfterOnload() {
  - if @sb[:active_tab] == "db_utilization"
    miqAsyncAjax('#{url_for_only_path(:action => @ajax_action, :id => @record)}');
  };
  ManageIQ.afterOnload = "miqOpsAfterOnload();"


%table
  %tr
    %th
    %th Provider
    %th Name
    %th Account
    %th Info
  - for authentication in @authentications
    %tr
      %td
        - if authentication.info['image']
          %img{:src => authentication.info['image'], :width => 48, :height => 48}
      %td=provider_icon(authentication.provider)
      %td= authentication.info['name']
      %td= authentication.info['nickname']
      %td= link_to "Destroy", authentications_path, :confirm => 'Are you sure?', :method => :delete

Fix display of authentication metadata on /authentications

%table
  %tr
    %th
    %th Provider
    %th Name
    %th Account
    %th Info
  - for authentication in @authentications
    %tr
      %td
        - if authentication.info[:image]
          %img{:src => authentication.info[:image], :width => 48, :height => 48}
      %td=provider_icon(authentication.provider)
      %td= authentication.info[:name]
      %td= authentication.info[:nickname]
      %td= link_to "Destroy", authentications_path, :confirm => 'Are you sure?', :method => :delete


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

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

Fix last tree breadcrumbs for blob

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

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


%h1
  Featured

- render_curated_row('home').each do |item|
  %div
    %p
      = link_to item do
        = image_tag attachment_url(item, :featured_image, :fill, 300, 300, format: "jpg")

    %h3
      = link_to item[:name], item

Save the tags and styled els

%h1
  Featured

- render_curated_row('home').each do |item|
  %div
    %p
      = link_to item do
        = image_tag attachment_url(item, :featured_image, :fill, 300, 300, format: "jpg")
      = raw item.tag_list.map { |t| link_to t, tag_path(t), class: 'tag label label-info' }.join(' ')
    %h3
      = link_to item[:name], item


- unless team.description.empty?
  .markdown= team_p.description

%hr

- unless upcoming_matches.empty?
  %h5 Upcoming Matches
  %ul.list-group.list-group-flush.mb-3
    - present_collection(upcoming_matches).each do |match|
      %li.list-group-item
        = match.link

- unless active_rosters.empty?
  %h5 Active Rosters
  %ul.list-group.list-group-flush.mb-3
    - present_collection(active_rosters).each do |roster|
      %li.list-group-item
        = roster.team_listing

        = link_to edit_roster_path(roster.id), class: 'btn btn-secondary pull-right' do
          Manage
          = inline_svg_tag 'open_iconic/cog.svg', class: 'icon ml-1'

Fix Manage buttons showing for rosters regardless of permissions

- unless team.description.empty?
  .markdown= team_p.description

%hr

- unless upcoming_matches.empty?
  %h5 Upcoming Matches
  %ul.list-group.list-group-flush.mb-3
    - present_collection(upcoming_matches).each do |match|
      %li.list-group-item
        = match.link

- unless active_rosters.empty?
  %h5 Active Rosters
  %ul.list-group.list-group-flush.mb-3
    - present_collection(active_rosters).each do |roster|
      %li.list-group-item
        = roster.team_listing

        - if user_can_manage_transfers?(roster)
          = link_to edit_roster_path(roster.id), class: 'btn btn-secondary pull-right' do
            Manage
            = inline_svg_tag 'open_iconic/cog.svg', class: 'icon ml-1'


---
title: Lyon.rb | Lyon Ruby Brigade
---

%h1 Lyon.rb

%p We are Ruby developers in Lyon

%p
  We meet up every second Wednesday of the month at
  = link_to 'La Cordée Charpennes', 'http://goo.gl/maps/lP3YX'
  from 7pm till late

%p
  Please go RSVP to the
  = link_to 'next meetup', 'http://meetup.lyonrb.fr/'

%p
  You should also subscribe to the
  = link_to 'mailing list', 'https://groups.google.com/forum/?hl=en#!forum/rubylyon'

%p
  And finally, you can contribute to the
  = link_to 'talks wishlist', 'https://github.com/lyonrb/wishlist/issues'
  on GitHub.

Add a notice about us looking for a web designer

---
title: Lyon.rb | Lyon Ruby Brigade
---

%h1 Lyon.rb

%p We are Ruby developers in Lyon

%p
  We meet up every second Wednesday of the month at
  = link_to 'La Cordée Charpennes', 'http://goo.gl/maps/lP3YX'
  from 7pm till late

%p
  Please go RSVP to the
  = link_to 'next meetup', 'http://meetup.lyonrb.fr/'

%p
  You should also subscribe to the
  = link_to 'mailing list', 'https://groups.google.com/forum/?hl=en#!forum/rubylyon'

%p
  And finally, you can contribute to the
  = link_to 'talks wishlist', 'https://github.com/lyonrb/wishlist/issues'
  on GitHub.

%p
  Ho, and if you haven't noticed yet, we're desperately looking for a talented web designer...


.box.search-form
  = form_tag params, :method => :get do
    %label{:for => "search_text"}= t_title('search') + ':'
    = text_field '', :by_text, :autocomplete => 'off', 'data-autofocus' => true
    = submit_tag t_action('search')

Drop label in list text filter form.

.box.search-form
  = form_tag params, :method => :get do
    = text_field '', :by_text, :autocomplete => 'off', 'data-autofocus' => true
    = submit_tag t_action('search')


- content_for :title do
  = @glitterpost.title.titleize
#glitterposts
  .glitterpost
    .glitterpost-meta
      = avatar(User.find(@glitterpost.user_id).email)
      %p.author.padded
        Posted by #{User.find(@glitterpost.user_id).username} #{distance_of_time_in_words_to_now @glitterpost.created_at} ago
      %p.title.padded
        = @glitterpost.title
    .glitterpost-body
      = @glitterpost.content

#operations
  .operation
    = link_to 'Back', glitterposts_path
    - if logged_in? && (@glitterpost.user_id == current_user.id)
      .operation
        = link_to 'Edit', edit_glitterpost_path
      .operation
        = link_to 'Destroy', glitterpost_path, method: :delete, data: { confirm: 'Are you sure?' }

#comments
  - @glitterpost.comments.each do |c|
    = render 'comments/comment', :comment => c

#comments
  - if logged_in?
    = render 'comments/new', :comment => @comment

Fix indentation issue on glitterpost


%button{:name => "button",
        :type => "submit",
        :'ng-class' => "{btn: true, \'btn-primary\': $ctrl.primary, \'btn-default\': !$ctrl.primary, disabled: !$ctrl.enabled}",
        :'ng-click' => "$ctrl.buttonClicked()",
        :'ng-attr-title' => "{{$ctrl.title}}",
        :'ng-attr-alt' => "{{$ctrl.title}}"}
  {{$ctrl.name}}

Remove useless params in miq-button template

%button{'ng-class' => "{btn: true, \'btn-primary\': $ctrl.primary, \'btn-default\': !$ctrl.primary, disabled: !$ctrl.enabled}",
        'ng-click' => "$ctrl.buttonClicked()",
        'ng-attr-title' => "{{$ctrl.title}}",
        'ng-attr-alt' => "{{$ctrl.title}}"}
  {{$ctrl.name}}


:ruby
  if [@year_1, @year_2, @year_3].include? year
    panel_type = 'panel-selected'
    panel_bg = 'bg-selected'
  else
    panel_type = 'panel-highlight'
    panel_bg = 'bg-highlight'
  end

.col-md-1
  .panel{:class => "#{panel_type}"}
    .panel-body.plan-summary{:class => "#{panel_bg}", :style => 'padding: 5px 0 0 0;'}
      %p.text-center <strong>#{format_as_fiscal_year(year)}</strong>
      %p.text-center
        %i.fa.fa-refresh.fa-fw
        = format_as_integer(num_replace)
      %p.text-center
        %i.fa.fa-wrench.fa-fw
        = format_as_integer(num_rehab)
      %p.text-center
        %i.fa.fa-times-circle.fa-fw
        = format_as_integer(num_remove)
      %p.text-center
        = format_as_currency(cost)

Allow the user to select a caopital project year by clicking on a plan summary panel

:ruby
  if [@year_1, @year_2, @year_3].include? year
    panel_type = 'panel-selected'
    panel_bg = 'bg-selected'
  else
    panel_type = 'panel-highlight'
    panel_bg = 'bg-highlight'
  end

.col-md-1
  .panel{:class => "#{panel_type}", :data => {:action_path => capital_projects_path(:fiscal_year => year)}}
    .panel-body.plan-summary{:class => "#{panel_bg}", :style => 'padding: 5px 0 0 0;'}
      %p.text-center <strong>#{format_as_fiscal_year(year)}</strong>
      %p.text-center
        %i.fa.fa-refresh.fa-fw
        = format_as_integer(num_replace)
      %p.text-center
        %i.fa.fa-wrench.fa-fw
        = format_as_integer(num_rehab)
      %p.text-center
        %i.fa.fa-times-circle.fa-fw
        = format_as_integer(num_remove)
      %p.text-center
        = format_as_currency(cost)


%p#notice= notice
%h1 Search results
%h4= pluralize(@people.length, "result") + ' returned'

- @people.each do |person|
  .search-result
    .image-background
      = image_tag person.image
    .details
      = link_to person.name, person
      %br
      - person.memberships.each do |membership|
        = [membership.role, breadcrumbs(membership.hierarchy)].compact.join("<br/>").html_safe
      %p= person.location

Use sensible image size in search results

%p#notice= notice
%h1 Search results
%h4= pluralize(@people.length, "result") + ' returned'

- @people.each do |person|
  .search-result
    .image-background
      = image_tag person.image.medium
    .details
      = link_to person.name, person
      %br
      - person.memberships.each do |membership|
        = [membership.role, breadcrumbs(membership.hierarchy)].compact.join("<br/>").html_safe
      %p= person.location


.alert.alert-info
  %span
    Post-receive hooks for binding events.
    %br
    Read more about system hooks
    %strong #{link_to "here", help_system_hooks_path, class: "vlink"}

= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
  -if @hook.errors.any?
    .alert.alert-error
      - @hook.errors.full_messages.each do |msg|
        %p= msg
  .control-group
    = f.label :url, "URL:"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding"

      = f.submit "Add System Hook", class: "btn btn-create"
%hr

-if @hooks.any?
  %h3
    Hooks
    %small (#{@hooks.count})
  %br
  %table
    %tr
      %th URL
      %th Method
      %th
    - @hooks.each do |hook|
      %tr
        %td
          = link_to admin_hook_path(hook) do
            %strong= hook.url
          = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
        %td POST
        %td
          = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right"

Fix system hook page description

%h3.page-title
  System Hooks

%p.light
  #{link_to "System hooks ", help_system_hooks_path, class: "vlink"} can be
  used for binding events when GitLab creates a User or Project.

%hr

= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
  -if @hook.errors.any?
    .alert.alert-error
      - @hook.errors.full_messages.each do |msg|
        %p= msg
  .control-group
    = f.label :url, "URL:"
    .controls
      = f.text_field :url, class: "text_field input-xxlarge input-xpadding"

      = f.submit "Add System Hook", class: "btn btn-create"
%hr

-if @hooks.any?
  %h3
    Hooks
    %small (#{@hooks.count})
  %br
  %table
    %tr
      %th URL
      %th Method
      %th
    - @hooks.each do |hook|
      %tr
        %td
          = link_to admin_hook_path(hook) do
            %strong= hook.url
          = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
        %td POST
        %td
          = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right"


- @attributes ||= collection.first.attribute_names - ['id', 'created_at', 'updated_at']
%table.table.table-striped{:class => "#{collection.first.class.to_s.downcase.pluralize} collection"}
  %thead
    %tr
      - @attributes.each do |field|
        %th= t_attr field, collection.first.class
      %th.action-links
  %tbody
    - collection.each do |r|
      %tr
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td.action-links
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)

Fix generic index views with no entries.

- @attributes ||= resource_class.attribute_names - ['id', 'created_at', 'updated_at']
%table.table.table-striped{:class => "#{resource_class.to_s.downcase.pluralize} collection"}
  %thead
    %tr
      - @attributes.each do |field|
        %th= t_attr field, resource_class
      %th.action-links
  %tbody
    - collection.each do |r|
      %tr
        - @attributes.each do |field|
          %td= r.send(field) if r.respond_to?(field)
        %td.action-links
          = list_link_for(:edit, r)
          = list_link_for(:delete, r)


.breadcrumb.clearfix{:style => "padding:3.5px 15px;"}
  - if @next_record_path == "#"
    %i.fa.fa-chevron-circle-right.text-muted.fa-2x.navbar-right
  - else
    = link_to @next_record_path, :title => 'Next record', :remote => @row_pager_remote.nil? ? false : @row_pager_remote  do
      %i.fa.fa-chevron-circle-right.fa-2x.navbar-right

  %span.navbar-right{:style => 'padding: 5px 10px;'} Page #{@row_number} of #{@total_rows}

  - if @prev_record_path == "#"
    %i.fa.fa-chevron-circle-left.text-muted.fa-2x.navbar-right
  - else
    = link_to @prev_record_path, :title => 'Previous record', :remote => @row_pager_remote.nil? ? false : @row_pager_remote  do
      %i.fa.fa-chevron-circle-left.fa-2x.navbar-right

Rename label of pager to "Record" instead of "Page"

.breadcrumb.clearfix{:style => "padding:3.5px 15px;"}
  - if @next_record_path == "#"
    %i.fa.fa-chevron-circle-right.text-muted.fa-2x.navbar-right
  - else
    = link_to @next_record_path, :title => 'Next record', :remote => @row_pager_remote.nil? ? false : @row_pager_remote  do
      %i.fa.fa-chevron-circle-right.fa-2x.navbar-right

  %span.navbar-right{:style => 'padding: 5px 10px;'} Record #{@row_number} of #{@total_rows}

  - if @prev_record_path == "#"
    %i.fa.fa-chevron-circle-left.text-muted.fa-2x.navbar-right
  - else
    = link_to @prev_record_path, :title => 'Previous record', :remote => @row_pager_remote.nil? ? false : @row_pager_remote  do
      %i.fa.fa-chevron-circle-left.fa-2x.navbar-right


%fieldset#calculator_fields.no-border-bottom
  %legend{align: "center"}= t(:calculator)
  #preference-settings
    .row
      .alpha.four.columns
        = f.label(:calculator_type, t(:calculator), for: 'calc_type')
      .omega.twelve.columns
        = f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
    - if !@object.new_record?
      .row
        .calculator-settings
          = f.fields_for :calculator do |calculator_form|
            - preference_fields(@object.calculator, calculator_form).each do |field|
              .alpha.four.columns
                = field[:label]
              .field.twelve.eight.columns
                = field[:field]
        - if @object.calculator.respond_to?(:preferences)
          %span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)

Change translation for calculator section from Calculator to Fees

%fieldset#calculator_fields.no-border-bottom
  %legend{align: "center"}= t(:fees)
  #preference-settings
    .row
      .alpha.four.columns
        = f.label(:calculator_type, t(:calculator), for: 'calc_type')
      .omega.twelve.columns
        = f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
    - if !@object.new_record?
      .row
        .calculator-settings
          = f.fields_for :calculator do |calculator_form|
            - preference_fields(@object.calculator, calculator_form).each do |field|
              .alpha.four.columns
                = field[:label]
              .field.twelve.eight.columns
                = field[:field]
        - if @object.calculator.respond_to?(:preferences)
          %span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)


= inside_layout 'editorial' do
  = content_for :toolbar_actions do
    - if can?(:create_in, @section)
      - if @node
        =link_to 'Edit', new_editorial_node_submission_path(@node)
        =link_to 'New page', prepare_editorial_nodes_path(parent: @node)
      -elsif @section
        =link_to 'New page', prepare_editorial_nodes_path(section: @section.id)

  = yield

Change to can? :update @node

= inside_layout 'editorial' do
  = content_for :toolbar_actions do

    - if @node
      - if can?(:update, @node)
        =link_to 'Edit', new_editorial_node_submission_path(@node)
      - if can?(:create_in, @section)
        =link_to 'New page', prepare_editorial_nodes_path(parent: @node)
    -elsif @section && can?(:create_in, @section)
      =link_to 'New page', prepare_editorial_nodes_path(section: @section.id)

  = yield


.article.box{ :style => ' width: 63%; height: 400px;' }
  %h2{ :style => 'text-align: center;margin-bottom: 20px;' } Welcome to October!
  %p
    %b Hmm, it looks like we don't know each other.
  %p
    You're looking at some of the newest content submitted to October. We want to
    %b customize
    it to your liking, so would you please give us a couple keywords you'd like to follow?
  = form_for('onboard', :url => keywords_url(current_user)) do |f|
    %ul#onboard_terms
    %span.help-block seperate keywords with commas
    = f.submit 'Customize!', :class => 'btn btn-primary'

Use path instead of URL for https compatibility

.article.box{ :style => ' width: 63%; height: 400px;' }
  %h2{ :style => 'text-align: center;margin-bottom: 20px;' } Welcome to October!
  %p
    %b Hmm, it looks like we don't know each other.
  %p
    You're looking at some of the newest content submitted to October. We want to
    %b customize
    it to your liking, so would you please give us a couple keywords you'd like to follow?
  = form_for('onboard', :url => keywords_path(current_user)) do |f|
    %ul#onboard_terms
    %span.help-block seperate keywords with commas
    = f.submit 'Customize!', :class => 'btn btn-primary'


- content_for :header do
  .break-word= display_name(@team)

- content_for :subheading do
  = t('teams.show.subheading', aff: @team.affiliation)

%h2.break-word= @team.division.name
%h3.break-word= pluralize(@team.solved_challenges.size, 'solved challenge')
%hr

= render partial: 'team_summary'

Add division label to team summary page

- content_for :header do
  .break-word= display_name(@team)

- content_for :subheading do
  = t('teams.show.subheading', aff: @team.affiliation)

%h2.break-word= "#{@team.division.name} Division"
%h3.break-word= pluralize(@team.solved_challenges.size, 'solved challenge')
%hr

= render partial: 'team_summary'


%a.close-reveal-modal{"ng-click" => "$close()"}
  %i.fa.fa-times-circle{'aria-hidden' => "true"}

%form#image_upload{ name: 'form', novalidate: true, enctype: 'multipart/form-data', multipart: true, ng: { controller: "ProductImageCtrl" } }
  %div.image-preview
    %img.spinner{ src: "/assets/spinning-circles.svg", ng: { hide: "!imageUploader.isUploading" }}
    %img.preview{ng: {src: "{{imagePreview}}", class: "{'faded': imageUploader.isUploading}"}}

  %label{for: 'image-upload', class: 'button'} #{t('admin.products.bulk_edit.upload_an_image')}
  %input#image-upload{hidden: true, type: 'file', 'nv-file-select' => true, uploader: "imageUploader"}

Use angular translation filter on image upload modal

%a.close-reveal-modal{"ng-click" => "$close()"}
  %i.fa.fa-times-circle{'aria-hidden' => "true"}

%form#image_upload{ name: 'form', novalidate: true, enctype: 'multipart/form-data', multipart: true, ng: { controller: "ProductImageCtrl" } }
  %div.image-preview
    %img.spinner{ src: "/assets/spinning-circles.svg", ng: { hide: "!imageUploader.isUploading" }}
    %img.preview{ng: {src: "{{imagePreview}}", class: "{'faded': imageUploader.isUploading}"}}

  %label{for: 'image-upload', class: 'button'} {{ 'admin.products.bulk_edit.upload_an_image' | t }}
  %input#image-upload{hidden: true, type: 'file', 'nv-file-select' => true, uploader: "imageUploader"}


= form_tag project_issues_path(@project), method: 'get' do
  %fieldset
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if !params[:status])}
        = link_to project_issues_path(@project, status: nil) do
          Open
      %li{class: ("active" if params[:status] == 'to_me')}
        = link_to project_issues_path(@project, status: 'to_me') do
          Assigned To Me
      %li{class: ("active" if params[:status] == 'closed')}
        = link_to project_issues_path(@project, status: 'closed') do
          Closed
      %li{class: ("active" if params[:status] == 'all')}
        = link_to project_issues_path(@project, status: 'all') do
          All

  %fieldset
    %hr
    = link_to "Reset", project_issues_path(@project), class: 'btn right'

Fix assign-to-me filter for project issues

= form_tag project_issues_path(@project), method: 'get' do
  %fieldset
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if !params[:status])}
        = link_to project_issues_path(@project, status: nil) do
          Open
      %li{class: ("active" if params[:status] == 'assigned-to-me')}
        = link_to project_issues_path(@project, status: 'assigned-to-me') do
          Assigned To Me
      %li{class: ("active" if params[:status] == 'closed')}
        = link_to project_issues_path(@project, status: 'closed') do
          Closed
      %li{class: ("active" if params[:status] == 'all')}
        = link_to project_issues_path(@project, status: 'all') do
          All

  %fieldset
    %hr
    = link_to "Reset", project_issues_path(@project), class: 'btn right'


!!!
%html
  %head
    %meta{ content: "width=device-width,initial-scale=1", name: "viewport" }
    %title
      = [content_for(:page_title), "Hound"].compact.uniq.join(" | ")
    - if content_for? :meta_description
      %meta{ content: content_for(:meta_description) }
    %link{ href: "//fonts.googleapis.com/css?family=Lato:300,400,700,900", rel: "stylesheet", type:"text/css" }
    = stylesheet_link_tag    "application", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v2/"
    = javascript_include_tag "https://checkout.stripe.com/checkout.js"
    = javascript_include_tag "application"
    = csrf_meta_tags
  %body{ class: content_for(:body_class) || "hound" }
    = render "application/header"
    - user_facing_flashes.each do |key, value|
      .flash{ class: key }
        = value

    .content{ class: content_for(:container_class) }
      = yield

    = render "application/footer"

    = javascript_tag do
      = yield :javascript

    - if analytics?
      = render "analytics"

Add `lang` attribute to `html` element

!!!
%html{ lang: I18n.locale }
  %head
    %meta{ content: "width=device-width,initial-scale=1", name: "viewport" }
    %title
      = [content_for(:page_title), "Hound"].compact.uniq.join(" | ")
    - if content_for? :meta_description
      %meta{ content: content_for(:meta_description) }
    %link{ href: "//fonts.googleapis.com/css?family=Lato:300,400,700,900", rel: "stylesheet", type:"text/css" }
    = stylesheet_link_tag    "application", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v2/"
    = javascript_include_tag "https://checkout.stripe.com/checkout.js"
    = javascript_include_tag "application"
    = csrf_meta_tags
  %body{ class: content_for(:body_class) || "hound" }
    = render "application/header"
    - user_facing_flashes.each do |key, value|
      .flash{ class: key }
        = value

    .content{ class: content_for(:container_class) }
      = yield

    = render "application/footer"

    = javascript_tag do
      = yield :javascript

    - if analytics?
      = render "analytics"


- @title = "Change Email"

.page-box.last-box.background-p50-grey.center-vertically-xs-sm
  .panel
    %h1= @title

    = form_with(model: current_user, url: settings_change_email_path, method: :patch, local: true, id: "email-form") do |form|
      = render "forms/vertical/password_field", form: form, object: current_user, key: :current_password, autocomplete: "current-password"
      = render "forms/vertical/email_field", form: form, object: current_user, key: :email, key_name: "New email"
      = render "forms/vertical/email_field", form: form, object: current_user, key: :email_confirmation

  .text-center
    = link_to "#", class: "btn btn-lg btn-success btn-shadow", data: { object: "submit", target: "#email-form"  } do
      Update email

Add help text to password field

- @title = "Change Email"

.page-box.last-box.background-p50-grey.center-vertically-xs-sm
  .panel
    %h1= @title

    = form_with(model: current_user, url: settings_change_email_path, method: :patch, local: true, id: "email-form") do |form|
      = render "forms/vertical/password_field", form: form, object: current_user, key: :current_password, autocomplete: "current-password", help_text: "At least 8 characters, including letters a-z and digits 0-9.".html_safe
      = render "forms/vertical/email_field", form: form, object: current_user, key: :email, key_name: "New email"
      = render "forms/vertical/email_field", form: form, object: current_user, key: :email_confirmation

  .text-center
    = link_to "#", class: "btn btn-lg btn-success btn-shadow", data: { object: "submit", target: "#email-form"  } do
      Update email


- @title = "Research"

- @theme = "default"

- content_for :header, @title
= render "internal/tabs"
- content_for :sidebar, render("internal/sidebar")

= render "slice/research_studies", projects: @projects

- @projects.each do |project|
  = render "slice/research_studies_popups", projects: @projects

- content_for :footer do
  .container
    - articles = Broadcast.current.published.where(category: Admin::Category.find_by(slug: "research")).order(publish_date: :desc, id: :desc).limit(3)
    - if articles.present?
      .mb-3= render "landing/orange_title_strong", title: "MyApnea Research Articles"
      .featured-articles.d-flex.flex-column.flex-md-row.justify-content-around.align-items-center.align-items-md-stretch
        - articles.each do |broadcast|
          = link_to blog_post_path(broadcast.url_hash), class: "featured-article d-flex align-items-end" do
            .featured-article-background-image{ style: "background-image: url(#{blog_cover_url(broadcast)});" }
            .featured-article-title= broadcast.title

Hide tabs and sidebar when logged out

- @title = "Research"

- @theme = "default"

- content_for :header, @title
= render "internal/tabs" if current_user
- content_for :sidebar, render("internal/sidebar") if current_user

= render "slice/research_studies", projects: @projects

- @projects.each do |project|
  = render "slice/research_studies_popups", projects: @projects

- content_for :footer do
  .container
    - articles = Broadcast.current.published.where(category: Admin::Category.find_by(slug: "research")).order(publish_date: :desc, id: :desc).limit(3)
    - if articles.present?
      .mb-3= render "landing/orange_title_strong", title: "MyApnea Research Articles"
      .featured-articles.d-flex.flex-column.flex-md-row.justify-content-around.align-items-center.align-items-md-stretch
        - articles.each do |broadcast|
          = link_to blog_post_path(broadcast.url_hash), class: "featured-article d-flex align-items-end" do
            .featured-article-background-image{ style: "background-image: url(#{blog_cover_url(broadcast)});" }
            .featured-article-title= broadcast.title


#footer
  %ol.support
    %li= support_link
    %li= mobile_link
    %li= help_link
  .copyright
    Project collaboration by
    = link_to 'Teambox', 'http://teambox.com'

= tracking_code

Remove left part of the footer

#footer
  %ol.support
    %li= support_link
    %li= mobile_link
    %li= help_link

= tracking_code


%section.motion{class: division.motion_edited? ? "motion-edited" : "motion-raw"}
  - if division.motion_edited?
    %p.division-edit-notice.bg-info.col-md-12
      Last edited #{relative_time division.wiki_motion.edit_date}
      by #{link_to division.wiki_motion.user.real_name, division.wiki_motion.user}

  .row
    - if division.motion_edited?
      %nav.header-actions.col-md-3
        = link_to "Edit motion", edit_division_path2(division), title: "Edit and improve this description", class: "btn btn-default btn-xs"

    %h2.col-md-9 Motion

    - if !division.motion_edited?
      %p.division-edit-notice.alert-warning.col-md-12
        %strong Unedited text
        automatically extracted from the debate.
        = link_to "Improve the page providing a summary.", edit_division_path2(division)

  -# The motion can include html.
  -# TODO Need to check what happens when the user edits the motion. What can they add?
  .motion-text
    = division.formatted_motion_text
  %p
    %b= link_to "Debate in Parliament", division.oa_debate_url, title: "Links to debate shown at www.openaustralia.org"
    |
    %b= link_to "Source", division.source_url, title: "The original record of vote as reported by Hansard"

Remove newlines to make it clearer what's happening here


%h1 Editing task

= render 'form'

= link_to 'Show', @task
\|
= link_to 'Back', tasks_path

Fix Edit Task Page Title

= provide :title, 'Editing Task'

= render 'form'

= link_to 'Show', @task
\|
= link_to 'Back', tasks_path


%h3.page_title= "Edit Team #{@team.name}"
%hr
= form_for @team, url: teams_path do |f|
  - if @team.errors.any?
    .alert.alert-error
      %span= @team.errors.full_messages.first
  .clearfix
    = f.label :name do
      Team name is
    .input
      = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"

  .clearfix
    = f.label :path do
      Team path is
    .input
      = f.text_field :path, placeholder: "opensource", class: "xxlarge left"
  .form-actions
    = f.submit 'Save team changes', class: "btn btn-primary"
    = link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn btn-remove pull-right"

Fix crash on team update

%h3.page_title= "Edit Team #{@team.name}"
%hr
= form_for @team, url: team_path(@team) do |f|
  - if @team.errors.any?
    .alert.alert-error
      %span= @team.errors.full_messages.first
  .clearfix
    = f.label :name do
      Team name is
    .input
      = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"

  .clearfix
    = f.label :path do
      Team path is
    .input
      = f.text_field :path, placeholder: "opensource", class: "xxlarge left"
  .form-actions
    = f.submit 'Save team changes', class: "btn btn-primary"
    = link_to 'Delete team', team_path(@team), method: :delete, confirm: "You are shure?", class: "btn btn-remove pull-right"


.col-lg-9
  .widget
    .widget-title
      = icon :users
      Latest users

    .widget-body
      .table-responsive
        %table.table.users
          %thead
            %tr
              %th #
              %th GitHub
              %th E-Mail
              %th Projects
              - @languages.each do |language|
                %th= language
              %th w/ badges
              %th first signin
              %th last signin
          %tbody
            - @users.each do |user|
              %tr{:class => created_at_classes(user)}
                %td= user.id
                %td= link_to(user.user_name, "https://github.com/#{user.user_name}", :target => '_blank', :class => 'external')
                %td= user.email
                %td= link_to_user_projects(user)
                - @languages.each do |language|
                  %td= link_to_user_projects(user, language)
                %td= user.projects.select { |p| p.default_branch.latest_revision.try(:badge_in_readme?) }.size
                %td= user.created_at
                %td= user.last_signin_at

Fix nil error in admin/users

.col-lg-9
  .widget
    .widget-title
      = icon :users
      Latest users

    .widget-body
      .table-responsive
        %table.table.users
          %thead
            %tr
              %th #
              %th GitHub
              %th E-Mail
              %th Projects
              - @languages.each do |language|
                %th= language
              %th w/ badges
              %th first signin
              %th last signin
          %tbody
            - @users.each do |user|
              %tr{:class => created_at_classes(user)}
                %td= user.id
                %td= link_to(user.user_name, "https://github.com/#{user.user_name}", :target => '_blank', :class => 'external')
                %td= user.email
                %td= link_to_user_projects(user)
                - @languages.each do |language|
                  %td= link_to_user_projects(user, language)
                %td= user.projects.select { |p| p.default_branch.try(:latest_revision).try(:badge_in_readme?) }.size
                %td= user.created_at
                %td= user.last_signin_at


.grid-row
  %h2.bold-medium
    = fee.section_header('external_users.claims.basic_fees.basic_fee_uncalculated_fields')
  .column-one-half.fee-type
    = fee.section_hint('external_users.claims.basic_fees.basic_fee_uncalculated_fields')

  .column-one-quarter.fee-quantity
    = f.adp_text_field :quantity,
                        label: t('.quantity'),
                        input_classes:'quantity',
                        input_type: 'number',
                        value: fee.quantity,
                        errors: @error_presenter

  .column-one-quarter.fee-rate
    = f.adp_text_field :amount,
                        label: t('.total'),
                        input_classes:'total',
                        input_type: 'currency',
                        value: number_with_precision(f.object.rate, precision: 2),
                        errors: @error_presenter

Fix uncalculated fees not showing on draft edit.

.grid-row
  %h2.bold-medium
    = fee.section_header('external_users.claims.basic_fees.basic_fee_uncalculated_fields')
  .column-one-half.fee-type
    = fee.section_hint('external_users.claims.basic_fees.basic_fee_uncalculated_fields')

  .column-one-quarter.fee-quantity
    = f.adp_text_field :quantity,
                        label: t('.quantity'),
                        input_classes:'quantity',
                        input_type: 'number',
                        value: fee.quantity,
                        errors: @error_presenter

  .column-one-quarter.fee-rate
    = f.adp_text_field :amount,
                        label: t('.total'),
                        input_classes:'total',
                        input_type: 'currency',
                        value: number_with_precision(fee.fee.amount, precision: 2),
                        errors: @error_presenter


.action_menu
  .action_menu_header
    .action_menu_header_left
      = form_tag url_for(:action => "index", :page => session[:page] || 1 ), :method => 'get' do
        = content_tag :label do
          = text_field_tag :search, params[:search], :size => 20
        %input{ :type => "submit", :value => "Search"}
        - if defined? extra_collection_search_fields
          %p= extra_collection_search_fields
      - if collection
        %p= page_entries_info collection, :model => collection_class.display_name
      %p.paginator
        = will_paginate collection
    .action_menu_header_right
      %ul.menu
        - if !@projects || policy(Admin::Project).create?
          %li= link_to "create #{collection_class.display_name}", :controller => collection_class.name.underscore.pluralize, :action => :new
        %li= toggle_all "#{collection_class.display_name} descriptions"

Make policy check cover all collection types.

.action_menu
  .action_menu_header
    .action_menu_header_left
      = form_tag url_for(:action => "index", :page => session[:page] || 1 ), :method => 'get' do
        = content_tag :label do
          = text_field_tag :search, params[:search], :size => 20
        %input{ :type => "submit", :value => "Search"}
        - if defined? extra_collection_search_fields
          %p= extra_collection_search_fields
      - if collection
        %p= page_entries_info collection, :model => collection_class.display_name
      %p.paginator
        = will_paginate collection
    .action_menu_header_right
      %ul.menu
        - if policy(collection_class).create?
          %li= link_to "create #{collection_class.display_name}", :controller => collection_class.name.underscore.pluralize, :action => :new
        %li= toggle_all "#{collection_class.display_name} descriptions"


%button.graph-button{"ng-class" => "{open: tt_isOpen}"}
  / %i.ofn-i_058-graph

Fix issue with button submitting form instead of opening popup

%button.graph-button{"ng-class" => "{open: tt_isOpen}", type: 'button'}
  / %i.ofn-i_058-graph


.well
  %p
    =title
    %i.icon-flag.tip{title: tooltip_text}
  %table.table.table-striped.table-bordered(cellpadding="0" cellspacing="0" border="0")
    %thead
      %tr
        %th
          Search Term
          %i.icon-flag.tip{title: tx("search_term_table_header_flag")}
        %th
          Gene
          %i.icon-flag.tip{title: tx("gene_table_header_flag")}
        %th
          Drug
          %i.icon-flag.tip{title: tx("drug_table_header_flag")}
        %th
          Interaction Type
          %i.icon-flag.tip{title: tx("interaction_table_header_flag")}
        %th
          Source
          %i.icon-flag.tip{title: tx("source_table_header_flag")}
    %tbody
      =render partial: 'interaction_claims/interaction_table_row', collection: interactions

Fix formatting of box headers

.well
  %p
    %h3
      =title
      %i.icon-flag.tip{title: tooltip_text}
  %table.table.table-striped.table-bordered(cellpadding="0" cellspacing="0" border="0")
    %thead
      %tr
        %th
          Search Term
          %i.icon-flag.tip{title: tx("search_term_table_header_flag")}
        %th
          Gene
          %i.icon-flag.tip{title: tx("gene_table_header_flag")}
        %th
          Drug
          %i.icon-flag.tip{title: tx("drug_table_header_flag")}
        %th
          Interaction Type
          %i.icon-flag.tip{title: tx("interaction_table_header_flag")}
        %th
          Source
          %i.icon-flag.tip{title: tx("source_table_header_flag")}
    %tbody
      =render partial: 'interaction_claims/interaction_table_row', collection: interactions


%nav{class: "navbar navbar-fixed-top"}
  .container
    .navbar-header
      %a{class: "navbar-brand", href: "/"}
        bio
        %strong
          boxes
    %div{id: "navbar"}
      %ul{class: "nav navbar-nav navbar-right"}
        %li
          %a{href: "/contribute/how-to-contribute/" }
            Contribute

Add navigation link to getting started page

%nav{class: "navbar navbar-fixed-top"}
  .container
    .navbar-header
      %a.navbar-brand{href: "/"}
        bio
        %strong
          boxes
    %div{id: "navbar"}
      %ul{class: "nav navbar-nav navbar-right"}
        %li
          %a{href: "/getting-started/" }
            Getting Started
        %li
          %a{href: "/contribute/how-to-contribute/" }
            Contribute


%div.row.talk-title
  %div.small-10.push-1
    %h1 #{@event.title}

%div.row
  %div.small-10.push-1
    .event_details
      .name Organizer: #{@organizer.username}

%div.row
  %div.small-10.push-1.talk-list
    .button.radius=link_to "Submit Talk", new_public_event_talk_path(@event)
    %div Event Talks:
    %ul.talks
      -@talks.each do |talk|
        %li.talk-information
          .topic=talk.topic
          .details
            .description=talk.description

Add more event detail on the event show page

%div.row.talk-title
  %div.small-10.push-1
    %h1 #{@event.title}

%div.row
  %div.small-10.push-1
    .event_details
      .description=@event.description
      .date When: #{@event.date} at #{@event.start_time}
      .name Organizer: #{@organizer.username}

%div.row
  %div.small-10.push-1.talk-list
    .button.radius=link_to "Submit Talk", new_public_event_talk_path(@event)
    - if @talks.empty?
      %div No Talks Submitted! #{link_to "Be the first!", new_public_event_talk_path(@event)}
    - else
      %div Check out these awesome submitted talks!
      %ul.talks
        -@talks.each do |talk|
          %li.talk-information
            .topic=talk.topic
            .details
              .description=talk.description


.tags
  %ul
    - context.tags.each do |tag|
      %li.tag= tag.name
  = link_to t(".edit_tags"), "#", rel: "edit-tags"

Add the tag links on the shared panel.

.tags
  %ul
    - context.tags.each do |tag|
      %li.tag= link_to tag.name, tag_path(tag)
  = link_to t(".edit_tags"), "#", rel: "edit-tags"


%ul.list-unstyled
  - [3, 7, 14, 30, 60, 90].each do |count|
    %li
      - if @days == count
        #{count} days
      - else
        %a{ href: "#{request.path_info}?days=#{count}" }
          #{count} days</a>

Add 180 day interval to "day links" menu

%ul.list-unstyled
  - [3, 7, 14, 30, 60, 90, 180].each do |count|
    %li
      - if @days == count
        #{count} days
      - else
        %a{ href: "#{request.path_info}?days=#{count}" }
          #{count} days</a>


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

Save the new footer placement

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


%h4.project-list-item{:id => "project-#{index}"}
  = link_to project_path(@episode, project) do
    = image_tag(project.avatar.url(:thumb), width: '20')
    = project.title

%p{:style=>"margin-top: -10px"}
  %small
    = project.state_name
    by
    = link_to(user_path(project.originator.id)) do
      #{project.originator.name}
      = project.like_button
:markdown
  #{truncate(project.description, length: 140)}
- unless project.users.empty?
  .well.well-sm
    - project.users.each do |user|
      = link_to user_path(user) do
        = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
%span.help-block
  %small
    = project.updated_at
    = project.kudos
    = project.grab_it_link

Revert "Replace partial rendering with decorator calls in projects/list_item"

%h4.project-list-item{:id => "project-#{index}"}
  = link_to project_path(@episode, project) do
    = image_tag(project.avatar.url(:thumb), width: '20')
    = project.title

%p{:style=>"margin-top: -10px"}
  %small
    = render :partial => "projects/state_name", :locals => {:project => project }
    by
    = link_to(user_path(project.originator.id)) do
      #{project.originator.name}
      = render :partial => "projects/like_button", :locals => {:project => project }
:markdown
  #{truncate(project.description, length: 140)}
- unless project.users.empty?
  .well.well-sm
    - project.users.each do |user|
      = link_to user_path(user) do
        = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
%span.help-block
  %small
    = render :partial => "projects/info", :locals => {:project => project }


%strong Protip:
sweeps for this project can be triggered programmatically
%pre.small
  :plain
    curl --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --data '{ "title": "Deploy #1", "description": "Release Notes: Fixed layout bug", "delay_seconds": 10 }' \
     #{trigger_project_sweeps_url(@project)}

Add email to curl protip

%strong Protip:
sweeps for this project can be triggered programmatically
%pre.small
  :plain
    curl --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --data '{ "title": "Deploy #1", "description": "Release Notes: Fixed layout bug", "email": "username@example.com", "delay_seconds": 10 }' \
     #{trigger_project_sweeps_url(@project)}


---
title: Brand Guidelines
---

%h2 Logo Usage

%ul
  %li
    Please do not stretch or distort the logo. Use the “seal”
    version of the logo when needing to use a square image (like avatars).

  %li
    If you have to put the logo on a busy/colorful background, please use one
    of the reversed (on white) logos.

 %p= link_to "Download vector logos", "/assets/img/styleguide/sass-logo.zip", class: "button primary"

.logos
  %h3 Standard
  %ul.list-columns
    %li= image_tag "styleguide/color.png", height: "80"
    %li= image_tag "styleguide/seal-color.png", height: "80"

  %h3 White
  %ul.list-tiled
    %li.swatch-color-background-shade= image_tag "styleguide/white.png", height: "80"
    %li.swatch-color-background-shade= image_tag "styleguide/seal-color-reversed.png", height: "80"
    %li.swatch-color-background-shade= image_tag "styleguide/seal-black-reversed.png", height: "80"

  %h3 Black
  %ul.list-columns
    %li= image_tag "styleguide/black.png", height: "80"
    %li= image_tag "styleguide/seal-black.png", height: "80"

Fix a syntax error in styleguide/brand.


= semantic_form_for @clothing do |f|
  -if @clothing.errors.any?
    #error_explanation
      %h2= "#{pluralize(@clothing.errors.count, "error")} prohibited this clothing from being saved:"
      %ul
        - @clothing.errors.full_messages.each do |msg|
          %li= msg
  = f.inputs do
    = f.input :name, :input_html => { :autofocus => true }
    .clearfix
      = label_tag :tag_list, "Tags"
      .input= f.text_field :tag_list
    = f.input :clothing_type
    = f.input :image
    = f.input :colour
    = f.input :status
    = f.input :cost
    = f.input :notes, :as => :text
  .actions
    = f.submit I18n.t('app.general.save'), :class => 'btn primary'
    - if !@clothing.new_record? and can? :delete, @clothing
      = link_to I18n.t('app.general.delete'), clothing_path(@clothing), :method => :delete, :confirm => I18n.t('app.general.are_you_sure'), :class => 'btn'
    = link_to 'Cancel', clothing_index_path

Remove clothing color from edit screen

= semantic_form_for @clothing do |f|
  -if @clothing.errors.any?
    #error_explanation
      %h2= "#{pluralize(@clothing.errors.count, "error")} prohibited this clothing from being saved:"
      %ul
        - @clothing.errors.full_messages.each do |msg|
          %li= msg
  = f.inputs do
    = f.input :name, :input_html => { :autofocus => true }
    .clearfix
      = label_tag :tag_list, "Tags"
      .input= f.text_field :tag_list
    = f.input :clothing_type
    = f.input :image
    = f.input :status
    = f.input :cost
    = f.input :notes, :as => :text
  .actions
    = f.submit I18n.t('app.general.save'), :class => 'btn primary'
    - if !@clothing.new_record? and can? :delete, @clothing
      = link_to I18n.t('app.general.delete'), clothing_path(@clothing), :method => :delete, :confirm => I18n.t('app.general.are_you_sure'), :class => 'btn'
    = link_to 'Cancel', clothing_index_path


.row
  .col-xs-12
    %hr

    %footer.text-center
      %ul
        Created by
        %a{href: 'http://github.com/kostyadubinin', target: '_blank'} Kostya Dubinin
        %span>.

Fix footer alignment and style

.row
  .col-xs-12
    %hr

    %footer.text-center
      %span.text-muted
        created by
        = link_to 'http://github.com/kostyadubinin', target: '_blank' do
          Kostya Dubinin


%html
  %body
    %p
      Bonjour,

    %p
      = "Vous avez été invité par #{@avis.claimant.email} à donner votre avis sur le dossier nº #{@avis.dossier.id} de la procédure \"#{@avis.dossier.procedure.libelle}\"."

    %p
      Message de votre interlocuteur :
      %br
      %span{ style: 'font-style: italic;' }
        = @avis.introduction

    - if @avis.gestionnaire.present?
      %p
        = link_to "Connectez-vous pour donner votre avis", gestionnaire_dossier_url(@avis.dossier.procedure, @avis.dossier)
    - else
      %p
        = link_to "Inscrivez-vous pour donner votre avis", sign_up_gestionnaire_avis_url(@avis.id, @avis.email)

    Bonne journée,
    %br
    %br
    L'équipe demarches-simplifiees.fr
    %br
    %br
    %hr
    %br
    Merci de ne pas répondre à cet email. Postez directement vos questions dans votre dossier sur la plateforme.

Remove extra markup from the avis invitation email


.well
  %ul.nav.nav-list
    %li.nav-header= 'Menu'
    %li
      = link_to '#' do
        %i.icon-chevron-right
        = 'Map'
    %li
      = link_to '#' do
        %i.icon-chevron-right
        = 'Incidents'
    %li.divider
    %li
      = link_to '#' do
        %i.icon-chevron-right
        = 'My reports'

Add sidebar links to create/view reports

.well
  %ul.nav.nav-list
    %li.nav-header= 'Menu'
    %li
      = link_to '#' do
        %i.icon-chevron-right
        = 'Map'
    %li
      = link_to '#' do
        %i.icon-chevron-right
        = 'Incidents'
    %li.divider
    %li
      = link_to user_path(current_user) do
        %i.icon-chevron-right
        = 'My reports'
    %li
      = link_to new_report_path do
        %i.icon-chevron-right
        = 'Report from the web'


= simple_form_for @article do |f|

  = f.input :title
  = link_to "Markdown Cheat Sheet", image_path("markdown-cheat-sheet.png"), target: "_blank", class: "markdown-cheat"
  = f.input :content
  = f.input :tag_tokens, label: "Tags", input_html: { data: {load: @tags} }
  - if current_user.try(:id) == 1
    = f.input :author_id, as: :select, collection: User.all, include_blank: "Select Author"
    = f.input :editor_id, as: :select, collection: User.all, include_blank: "Select Editor"
    = f.input :created_at, as: :string
    = f.input :updated_at, as: :string
  - else
    - if @article.author.blank?
      = f.input :author_id, as: :hidden, input_html: { value: current_user.try(:id) }
    = f.input :editor_id, as: :hidden, input_html: { value: current_user.try(:id) }
  = f.button :submit, class: "btn-a"

Allow admin debugging in dev.

= simple_form_for @article do |f|

  = f.input :title
  = link_to "Markdown Cheat Sheet", image_path("markdown-cheat-sheet.png"), target: "_blank", class: "markdown-cheat"
  = f.input :content
  = f.input :tag_tokens, label: "Tags", input_html: { data: {load: @tags} }
  - if current_user.try(:id) == 1 || Rails.env.development?
    = f.input :author_id, as: :select, collection: User.all, include_blank: "Select Author"
    = f.input :editor_id, as: :select, collection: User.all, include_blank: "Select Editor"
    = f.input :created_at, as: :string
    = f.input :updated_at, as: :string
  - else
    - if @article.author.blank?
      = f.input :author_id, as: :hidden, input_html: { value: current_user.try(:id) }
    = f.input :editor_id, as: :hidden, input_html: { value: current_user.try(:id) }
  = f.button :submit, class: "btn-a"


!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay.reset-z-index

    #nav-bar-container.fixed.bring-front
      %nav#nav-bar
        %header
          = link_to root_path do
            %strong Tahi
            Dashboard
        %section
          %ul
            - if current_user
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Flow Manager', flow_manager_path
                %li.nav-bar-item= active_link_to 'Admin', rails_admin_path
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield

    .backdrop.text-center
      = image_tag @task.paper.journal.logo.url
      %h2 Nothing to see here.
      %p.center Take a look at your dashboard for tasks needing your attention.

    :javascript
      $(document).ready(function() {
        $('a:hidden').click();
      });

Add Tahi.currentUser to overlay layout js.

!!!
%html
  %head
    %title Tahi
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    #overlay.reset-z-index

    #nav-bar-container.fixed.bring-front
      %nav#nav-bar
        %header
          = link_to root_path do
            %strong Tahi
            Dashboard
        %section
          %ul
            - if current_user
              - if current_user.admin?
                %li.nav-bar-item= active_link_to 'Flow Manager', flow_manager_path
                %li.nav-bar-item= active_link_to 'Admin', rails_admin_path
              %li.nav-bar-text= link_to 'Sign out', destroy_user_session_path, method: :delete
              %li.nav-bar-text Welcome back, #{current_user.username}

    = yield

    .backdrop.text-center
      = image_tag @task.paper.journal.logo.url
      %h2 Nothing to see here.
      %p.center Take a look at your dashboard for tasks needing your attention.

    :javascript
      window.Tahi.currentUser = {id: #{current_user.id}, fullName: "#{current_user.full_name}", imageUrl: "#{current_user.image_url}"};

      $(document).ready(function() {
        $('a:hidden').click();
      });


---
pageable: true
per_page: 4
---
= if prev_page
  %p.forward-backward-links= link_to '← Previous page', prev_page

- page_articles.each_with_index do |article, i|
  %article.article
    %h2.article__post-title= link_to article.title, article
    %p.article__date-author
      = 'Posted on ' + article.date.strftime('%B %e, %G')
      = 'by ' + article.data.author unless article.data.author.nil?
    = article.body

- if paginate
  - if next_page
    %p.forward-backward-links= link_to 'Next page →', next_page

Fix Haml typo that was causing a 0 to show up in pagination view

---
pageable: true
per_page: 4
---
- if prev_page
  %p.forward-backward-links= link_to '← Previous page', prev_page

- page_articles.each_with_index do |article, i|
  %article.article
    %h2.article__post-title= link_to article.title, article
    %p.article__date-author
      = 'Posted on ' + article.date.strftime('%B %e, %G')
      = 'by ' + article.data.author unless article.data.author.nil?
    = article.body

- if paginate
  - if next_page
    %p.forward-backward-links= link_to 'Next page →', next_page


%table.table.table-hover#assets_datatable
  %thead
    %tr
      - SystemConfig.transam_module_names.each do |mod|
        = render :partial => "#{mod}_asset_dt_head" rescue nil
      %th.center Mileage
      %th.center

  %tbody
    - assets.each do |a|
      %tr{:data => {:action_path => inventory_path(a)}}
        - SystemConfig.transam_module_names.each do |mod|
          = render :partial => "#{mod}_asset_dt_columns", :locals => {:a => a } rescue nil
        %td.center= format_as_integer(a.reported_mileage)
        %td.center= render :partial => 'assets/asset_info_detail_popup', :locals => {:asset => a}

= render :partial => 'shared/datatable_javascript', :locals => {:id => 'assets_datatable'}

:javascript
  $('.popup-details').popover({
    trigger: 'hover',
    container: 'body',
    placement: 'left',
    animation: 'true',
    html: 'true'
  });

Fix transit server side asset info popups

%table.table.table-hover#assets_datatable
  %thead
    %tr
      - SystemConfig.transam_module_names.each do |mod|
        = render :partial => "#{mod}_asset_dt_head" rescue nil
      %th.right Mileage
      %th.center

  %tbody
    - assets.each do |a|
      %tr{:data => {:action_path => inventory_path(a)}}
        - SystemConfig.transam_module_names.each do |mod|
          = render :partial => "#{mod}_asset_dt_columns", :locals => {:a => a } rescue nil

        %td.right= format_as_integer(a.reported_mileage)
        %td.center= render :partial => 'assets/asset_info_detail_popup', :locals => {:asset => a}

= render :partial => 'shared/datatable_javascript', :locals => {:id => 'assets_datatable'}

:javascript
$(document).ready(function() {
  $('.popup-details').bind({
    mouseenter: function() {
      var el=$(this);
      $.ajax({
        type: "GET",
        url: el.attr("data-url"),
        dataType: "html",
        success: function(data) {
          el.attr("data-content", data);
          el.popover('show');
        }
      });
    },
    mouseleave: function() {
      var el=$(this);
      el.popover('hide');
    }
  });
});


- @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
  .row.commits-row
    .col-md-2
      %h4
        %i.icon-calendar
        %span= day.stamp("28 Aug, 2010")
      %p= pluralize(commits.count, 'commit')
    .col-md-10
      %ul.well-list
        = render commits, project: @project
  %hr.lists-separator

Use more compact bordered-list for commits page

- @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
  .row.commits-row
    .col-md-2
      %h4
        %i.icon-calendar
        %span= day.stamp("28 Aug, 2010")
      %p= pluralize(commits.count, 'commit')
    .col-md-10
      %ul.bordered-list
        = render commits, project: @project
  %hr.lists-separator


.col-sm-12.trip_result-filter{style: 'padding: 5px;'}
  = f.label :trip_result_id, translate_helper(:trip_result)
  = f.collection_check_boxes :trip_result_id, [[TripResult::SHOW_ALL_ID, 'Show All']] + TripResult.by_provider(current_provider).order(:name).pluck(:id, :name) + [[TripResult::UNSCHEDULED_ID, 'Pending']], :first, :last, { checked: session[trip_result_session_name] }, {class: 'trip-result-filter', style: 'vertical-align: initial;'} do |b|
    .col-sm-12
      = b.check_box + " " + b.text

:javascript
  $(function() {
    var show_all_id = "#{TripResult::SHOW_ALL_ID}";
    $('.trip-result-filter[value=' + show_all_id+ ']').change(function() {
      $('.trip-result-filter[value!=' + show_all_id + ']').prop('checked', $(this).is(':checked'));
    });
  });

Update trip result filter sorting order

- trip_result_codes = [[TripResult::SHOW_ALL_ID, 'Show All']] + (TripResult.by_provider(current_provider).order(:name).pluck(:id, :name) + [[TripResult::UNSCHEDULED_ID, 'Pending']]).sort_by{|tr| tr[1]}
.col-sm-12.trip_result-filter{style: 'padding: 5px;'}
  = f.label :trip_result_id, translate_helper(:trip_result)
  = f.collection_check_boxes :trip_result_id, trip_result_codes, :first, :last, { checked: session[trip_result_session_name] }, {class: 'trip-result-filter', style: 'vertical-align: initial;'} do |b|
    .col-sm-12
      = b.check_box + " " + b.text

:javascript
  $(function() {
    var show_all_id = "#{TripResult::SHOW_ALL_ID}";
    $('.trip-result-filter[value=' + show_all_id+ ']').change(function() {
      $('.trip-result-filter[value!=' + show_all_id + ']').prop('checked', $(this).is(':checked'));
    });
  });


= simple_form_for resource do |f|

  %h3= t('form.person.address')
  = render 'vcards/form', :f => f

  %h3= t_model(PhoneNumber)
  .nested-form.list.contacts
    = f.fields_for :vcard do |vcard|
      - vcard.object.contacts.build_defaults
      - vcard.fields_for :contacts do |contact|
        = render 'phone_numbers/form', :item => contact
  = link_to [:new_phone_number, resource.persisted? ? resource : controller_name], :remote => true, :class => 'btn' do
    %i.icon-plus
    =t_action(:more)

  %h3= t('form.bank.money_transfer')
  = f.input :swift
  = f.input :clearing

  = f.button :submit

Update Bank for to match common styles.

= simple_form_for resource do |f|
  .row-fluid
    .span6
      %h3= t('form.person.address')
      = render 'vcards/form', :f => f

    .span6
      %h3= t_model(PhoneNumber)
      .nested-form.list.contacts
        = f.fields_for :vcard do |vcard|
          - vcard.object.contacts.build_defaults
          - vcard.fields_for :contacts do |contact|
            = render 'phone_numbers/form', :item => contact
      = link_to [:new_phone_number, resource.persisted? ? resource : controller_name], :remote => true, :class => 'btn' do
        %i.icon-plus
        =t_action(:more)

  %h3= t('form.bank.money_transfer')
  .row-fluid
    .span6
      = f.input :swift
    .span6
      = f.input :clearing

  = f.button :submit


- content_for :header_title do
  Application Status

.pull-right
  Last commit
  = link_to @head_commit[0..6] , "https://github.com/theodi/open-data-certificate/commit/#{@head_commit}", class: 'badge'

%h1
  Job queue

%p
  %strong= pluralize @job_count, 'jobs'
  queued

%hr.heavy

%h1
  Surveys

%p
  %strong= pluralize Certificate.counts[:all], 'surveys'
  started

%hr.heavy

.embedded

  %h1
    Embedded certificates

  %p
    %strong= pluralize EmbedStat.all.count, 'certificates'
    embedded

  %p
    =link_to "Download list of embedded certificates", embed_stats_path(format: "csv")

  %hr.heavy

%h1 Published datasets with certificates

= render partial: "home/stats", locals: {type: "published"}

%h1 Published and draft datasets with certificates

= render partial: "home/stats", locals: {type: "all"}

%p.data
  = link_to("Download legacy data", "legacy_stats.csv")

Add stats to status page

- content_for :header_title do
  Application Status

.pull-right
  Last commit
  = link_to @head_commit[0..6] , "https://github.com/theodi/open-data-certificate/commit/#{@head_commit}", class: 'badge'

%h1
  Job queue

%p
  %strong= pluralize @job_count, 'jobs'
  queued

%hr.heavy

%h1
  Surveys

%p
  %strong= pluralize Certificate.counts[:all], 'surveys'
  started

%hr.heavy

.embedded

  %h1
    Embedded certificates

  %p
    %strong= pluralize EmbedStat.unique_datasets, 'certificates'
    embedded on
    %strong= pluralize EmbedStat.all.count, 'webpages'
    and
    %strong= pluralize EmbedStat.unique_domains, 'domains'

  %p
    =link_to "Download list of embedded certificates", embed_stats_path(format: "csv")

  %hr.heavy

%h1 Published datasets with certificates

= render partial: "home/stats", locals: {type: "published"}

%h1 Published and draft datasets with certificates

= render partial: "home/stats", locals: {type: "all"}

%p.data
  = link_to("Download legacy data", "legacy_stats.csv")


!!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %meta{:charset => 'utf-8'}/
    %meta{:content => "Simon Huerlimann <simon.huerlimann@cyt.ch>", :name => "author"}/

    = stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
    = stylesheet_link_tag 'compiled/print.css', :media => 'print'
    /[if lt IE 8]
      = stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'

    = javascript_include_tag :defaults
    = csrf_meta_tag
    %title
      = "CyBook - #{controller.action_name.capitalize}"
  %body
    #container
      #header
        #main-menu
          %ul
            %li
              = link_to "Abrechnung", :controller => "day", :action => :cash_up
            %li
              = link_to "Neue Buchung", :controller => "bookings", :action => :new
            %li
              = link_to "Balance Sheet", :controller => "balance"
            %li
              = link_to "Profit Sheet", :controller => "profit"
            %li
              = link_to "Konten", accounts_path
            %li
              = link_to "Buchungen", bookings_path

      #content
        - if flash[:notice]
          #flash.flash.notice
            = flash[:notice]
        = yield

      #sidebar
        = yield :sidebar

Fix link to new daily cash up.

!!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
  %head
    %meta{:charset => 'utf-8'}/
    %meta{:content => "Simon Huerlimann <simon.huerlimann@cyt.ch>", :name => "author"}/

    = stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
    = stylesheet_link_tag 'compiled/print.css', :media => 'print'
    /[if lt IE 8]
      = stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'

    = javascript_include_tag :defaults
    = csrf_meta_tag
    %title
      = "CyBook - #{controller.action_name.capitalize}"
  %body
    #container
      #header
        #main-menu
          %ul
            %li
              = link_to "Abrechnung", new_day_path
            %li
              = link_to "Neue Buchung", new_booking_path
            %li
              = link_to "Balance Sheet", :controller => "balance"
            %li
              = link_to "Profit Sheet", :controller => "profit"
            %li
              = link_to "Konten", accounts_path
            %li
              = link_to "Buchungen", bookings_path

      #content
        - if flash[:notice]
          #flash.flash.notice
            = flash[:notice]
        = yield

      #sidebar
        = yield :sidebar


!!! 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)

Add alert about transition to new bare metal server.

!!! 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
        .alert.alert-danger.l-align-center
          %strong
            We're currently transistioning to our new bare metal server provided by
            = succeed '.' do
              = link_to 'RubyTune', 'http://rubytune.com/'
            Therefore, benchmark results may not be accurate during this period.

        = yield

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


!!! 5
%html.report
  %head
    %title= t("meta.title")
    %meta(content='text/html; charset=utf-8' http-equiv="Content-Type")
    %meta{:description => "#{ t('meta.description') }" }

    = stylesheet_link_tag 'report', media: 'all'
    = csrf_meta_tag

  %body.report
    = yield

    = javascript_include_tag 'application'
    = render 'layouts/etm/javascript_globals'
    = javascript_include_tag 'etm'

    = render 'output_elements/chart_template'

    :javascript
      I18n.defaultLocale = "#{ I18n.default_locale }";
      I18n.locale = "#{ I18n.locale }";

      jQuery(function () {
        window.App = App = new AppView();
        App.settings.set(globals.settings, { silent: true });
        App.bootstrap();
      });

    - if Rails.env.production?
      = render 'layouts/etm/ga' unless APP_CONFIG[:standalone]

Include "app" JS pack on report page

!!! 5
%html.report
  %head
    %title= t("meta.title")
    %meta(content='text/html; charset=utf-8' http-equiv="Content-Type")
    %meta{:description => "#{ t('meta.description') }" }

    = stylesheet_link_tag 'report', media: 'all'
    = csrf_meta_tag

  %body.report
    = yield

    = javascript_include_tag 'application'
    = render 'layouts/etm/javascript_globals'
    = javascript_include_tag 'etm'
    = javascript_pack_tag 'app'

    = render 'output_elements/chart_template'

    :javascript
      I18n.defaultLocale = "#{ I18n.default_locale }";
      I18n.locale = "#{ I18n.locale }";

      jQuery(function () {
        window.App = App = new AppView();
        App.settings.set(globals.settings, { silent: true });
        App.bootstrap();
      });

    - if Rails.env.production?
      = render 'layouts/etm/ga' unless APP_CONFIG[:standalone]


- content_for :header do
  %ul.links
    %li= link_to("Repositories", repositories_path)

.projects
  %ul
    - @projects.each do |project|
      %li.build-info
        = link_to(project.name, project_path(project))
        \-
        %span.state{:class => 'build-' + project.builds.last.try(:state).to_s}=  project.builds.last.try(:state).to_s.capitalize

Remove state of last project run from projects index


.container-fluid
  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      .page-header
        %h1 Edit Idea

  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      = form_for @current, class: 'form-inline', url: admin_current_path do |f|
        = render partial: 'admin/currents/form', :locals => { :f => f }

  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      = link_to 'Show', @current
      \|
      = link_to 'Index', admin_currents_path

Fix Admin Currents edit form url

.container-fluid
  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      .page-header
        %h1 Edit Idea

  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      = form_for @current, class: 'form-inline', url: admin_current_path(@current) do |f|
        = render partial: 'admin/currents/form', :locals => { :f => f }

  .row
    .col-lg-12.col-md-12.col-sm-12.col-xs-12
      = link_to 'Show', @current
      \|
      = link_to 'Index', admin_currents_path


%header#branding.masthead.hidden-print(role="banner")
  %section
    %h1
      = link_to http_prefix do
        - if data.site.logo
          = image_tag data.site.logo, id: "rhlogo", class: "logo", alt: data.site.name
        - else
          = data.site.name

    = partial :nav, locals: { source: "navigation", nav_class: "" }

- if current_page.url == "/"
  = partial "subheader-front"
- else
  = partial "subheader"

Fix test in header layout to take http_prefix into account.

%header#branding.masthead.hidden-print(role="banner")
  %section
    %h1
      = link_to http_prefix do
        - if data.site.logo
          = image_tag data.site.logo, id: "rhlogo", class: "logo", alt: data.site.name
        - else
          = data.site.name

    = partial :nav, locals: { source: "navigation", nav_class: "" }

- if current_page.url == http_prefix
  = partial "subheader-front"
- else
  = partial "subheader"


= render :partial => "notice"

.landing-container
  .home-page-content
    - render_project_info
    = content_for :project_info
  .signup-box
    = render partial: "home/signup"
= render partial: "home/featured_content"

- if !@portal_student
  = render :partial => "project_cards"

Fix bug where signup box displayed for teachers sometimes.

= render :partial => "notice"

.landing-container
  .home-page-content
    - render_project_info
    = content_for :project_info
  - if current_visitor.anonymous?
    .signup-box
      = render partial: "home/signup"
= render partial: "home/featured_content"

- if !@portal_student
  = render :partial => "project_cards"


%h1= @tag
- unless @tag.articles.empty?
  %ul
    - @tag.articles.each do |article|
      %li= link_to article, article

Integrate initial Tags Show styles

%main.row
  .cell.cell--s.well.well--l
    %h1.mbs= @tag

    - unless @tag.articles.empty?
      %ul.list
        - @tag.articles.each do |article|
          - # TODO: Add Article fresh/stale/rotten signals
          %li.card.list-item.article
            = link_to article, article


%footer#app-footer
  %p
    A
    project
    developed as part of the 2014 EUHackathon.

    Open-source @ Github

Add URL about transparency register

%footer#app-footer
  %p
    A
    project
    developed as part of the 2014 EUHackathon.

    Open-source @ Github

    Information about companies is taken from the Transparency Register.


%ul.nav.nav-list
  %li.nav-header Vorlagen
  - BookingTemplate.limit(5).each do |template|
    %li= link_to template, [:new_booking, template]

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

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

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

Move info section to bottom of sidebar.

%ul.nav.nav-list
  %li.nav-header Vorlagen
  - BookingTemplate.limit(5).each do |template|
    %li= link_to template, [:new_booking, template]

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

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

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


- asset.field_groups.each do |field_group|
  - fg = field_group.fields.without_pairs
  - if fg.select{|f| asset.send(f.name).present? }.any?
    %div
      - unless field_group.name == 'custom_fields'
        .caption #{field_group.label_i18n}
      - fg.each do |field|
        - if (value = field.render_value(asset)).present?
          == #{field.label}:
 #{truncate(value, :length => 35)}

Optimize Opportunity Sidebar Sampling information: will display message if no info entered

- asset.field_groups.each do |field_group|
  - fg = field_group.fields.without_pairs
  - if fg.select{|f| asset.send(f.name).present? }.any?
    %div
      - unless field_group.name == 'custom_fields'
        .caption #{field_group.label_i18n}
      - fg.each do |field|
        - if (value = field.render_value(asset)).present?
          == #{field.label}:
 #{truncate(value, :length => 35)}

  - else
    %div
    - unless field_group.name == 'custom_fields'
      .caption #{field_group.label_i18n}
      = "No " + field_group.name + " information"


%footer
  .block
    %p
      Copyright © #{Time.now.year} Sacha Chua -
      - if session
        - if mobile?
          = link_to I18n.t('app.layout.full'), params.merge(:layout => 'full')
        - else
          = link_to I18n.t('app.layout.mobile'), params.merge(:layout => 'mobile')
        \-
      = link_to "Privacy, terms, etc.", page_path("terms_privacy")
      \-
      = feedback_link "Send feedback"
      \-
      = link_to 'Source', 'https://github.com/sachac/quantified'
      - if @account
        - if @account.settings.timezone
          \- Current timezone:
          = @account.settings.timezone
          = link_to '(Change?)', edit_user_path(@account)
        - else
          = link_to '(Set timezone)', edit_user_path(@account)
- if Rails.env.development?
  .alert.warning This is the development site.
- else
  .alert.warning This site is in beta. Please send me feedback if you run into anything that doesn't work or can be improved!
- flash.discard

Add blog link to footer

%footer
  .block
    %p
      Copyright © #{Time.now.year} Sacha Chua -
      - if session
        - if mobile?
          = link_to I18n.t('app.layout.full'), params.merge(:layout => 'full')
        - else
          = link_to I18n.t('app.layout.mobile'), params.merge(:layout => 'mobile')
        \-
      = link_to "Privacy, terms, etc.", page_path("terms_privacy")
      \-
      = link_to "Blog", "http://sachachua.com/blog/category/quantified"
      \-
      = feedback_link "Send feedback"
      \-
      = link_to 'Source', 'https://github.com/sachac/quantified'
      - if @account
        - if @account.settings.timezone
          \- Current timezone:
          = @account.settings.timezone
          = link_to '(Change?)', edit_user_path(@account)
        - else
          = link_to '(Set timezone)', edit_user_path(@account)
- if Rails.env.development?
  .alert.warning This is the development site.
- else
  .alert.warning This site is in beta. Please send me feedback if you run into anything that doesn't work or can be improved!
- flash.discard


%h2 Login

=# TODO The login does not seem to work anymore.

= form_tag session_path(resource), class: 'form-horizontal' do
  .control-group
    = label_tag :username, 'Username', class: 'control-label'
    .controls
      = text_field_tag :username, '', autofocus: true

  .control-group
    = label_tag :domain_id, 'Domain', class: 'control-label'
    .controls
      = select_tag :domain_id, options_from_collection_for_select(Domain.all, 'id', 'name')

  .control-group
    = label_tag :password, 'Password', type: 'password', class: 'control-label'
    .controls
      = text_field_tag :password, '', type: 'password'

  .control-group
    .controls
      = submit_tag 'Login', class: 'btn'

Use correct path helper despite the other one functioning.

%h2 Login

=# TODO The login does not seem to work anymore.

= form_tag mailbox_session_path(resource), class: 'form-horizontal' do
  .control-group
    = label_tag :username, 'Username', class: 'control-label'
    .controls
      = text_field_tag :username, '', autofocus: true

  .control-group
    = label_tag :domain_id, 'Domain', class: 'control-label'
    .controls
      = select_tag :domain_id, options_from_collection_for_select(Domain.all, 'id', 'name')

  .control-group
    = label_tag :password, 'Password', type: 'password', class: 'control-label'
    .controls
      = text_field_tag :password, '', type: 'password'

  .control-group
    .controls
      = submit_tag 'Login', class: 'btn'


= simple_form_for [parent, @activity].compact do |f|
  .row-fluid
    .span6= f.association :person, :as => :combobox
    .span6= f.association :project, :as => :combobox
  .row-fluid
    .span6= f.input :date, :as => :date_field
    .span6= f.input :duration, :as => :string

  .row-fluid
    .span12= f.input :remarks, :input_html => {:rows => 2}

  = f.button :submit

Switch columns for date and duration in activity form.

= simple_form_for [parent, @activity].compact do |f|
  .row-fluid
    .span6= f.association :person, :as => :combobox
    .span6= f.association :project, :as => :combobox
  .row-fluid
    .span6= f.input :duration, :as => :string
    .span6= f.input :date, :as => :date_field

  .row-fluid
    .span12= f.input :remarks, :input_html => {:rows => 2}

  = f.button :submit


.container
  .row
    .col-lg-12
      %h1.page-header
        Resources
        %small Helpful Links
  .row
    .col-md-3
      .list-group
        = link_to 'Ruby Doc', "http://www.datasimply.com", class: 'list-group-item'
        = link_to 'Rails Doc', "http://www.datasimply.com", class: 'list-group-item'
        = link_to 'ruby Gems', "http://www.datasimply.com", class: 'list-group-item'
        = link_to 'Something Else', "http://www.datasimply.com", class: 'list-group-item'

Add links to Resources section

.container
  .row
    .col-md-3
      %h1.page-header
        Resources
        -#%small Helpful Links
.row
  .col-md-3
  .list-group
    = link_to 'Ruby Doc', "http://ruby-doc.org/", class: 'list-group-item'
    = link_to 'Ruby on Rails Guides', "http://guides.rubyonrails.org/", class: 'list-group-item'
    = link_to 'Ruby Gems', "https://rubygems.org/", class: 'list-group-item'


-# locals:
-#  spaces (array of Space)

#filter-total.resource-filter-total
  .resource-filter-with-text
    = t('.filter_count_with_text', :count => "#{spaces.count}".html_safe, :value => "".html_safe).html_safe
  .resource-filter-without-text
    = t('.filter_count_empty', :count => spaces.count)

- if spaces.count > 0

  - for space in spaces
    - if space.disabled?
      = render :partial => 'disabled_space', :locals => { :space => space }
    - else
      = render :partial => 'enabled_space', :locals => { :space => space }

  - nav = page_navigation_links spaces
  - unless nav.nil?
    .content-block-footer= nav

Correct space count in manage controller

-# locals:
-#  spaces (array of Space)

#filter-total.resource-filter-total
  .resource-filter-with-text
    = t('.filter_count_with_text', :count => "#{spaces.count}".html_safe, :value => "".html_safe).html_safe
  .resource-filter-without-text
    = t('.filter_count_empty', :count => spaces.size)

- if spaces.count > 0

  - for space in spaces
    - if space.disabled?
      = render :partial => 'disabled_space', :locals => { :space => space }
    - else
      = render :partial => 'enabled_space', :locals => { :space => space }

  - nav = page_navigation_links spaces
  - unless nav.nil?
    .content-block-footer= nav


%h1= @data.page.title
= form_tag url: abc_frontend.email_signups_path, method: :post do
  = submit_tag "Sign up"

Correct route helper inside email submission form and add email field.

%h1= @data.page.title
= form_tag(abc_frontend.email_signups_path, :method => :post) do
  = text_field_tag "Email"
  = submit_tag "Sign up"


#details.block.wide
  %h3 Personal Details
  #top_button
  %dl
    %dt Name:
    %dd= @topic.name
    %dt Birth Date:
    %dd.last= @topic.date_of_birth.strftime("%d %B %Y") + " (Age #{@topic.age})"
    %dt Address:
    %dd= raw ((@topic.address or ["Unknown"]) + [@topic.town,@topic.postcode.gsub(/ /," ")]).reject{|x|x.blank?}.join(", ")
    %dt Mobile:
    %dd= @topic.mobile_number or "-"
    %dt Next of Kin:
    %dd= @topic.next_of_kin or "-"
    - if @topic.tutor
      %dt Tutor
      %dd= link_to_if @user.staff?, @topic.tutor.name, @topic.tutor
  - if @topic == @user
    %p{:style => "margin:3px 0 0 0;clear:both"}
      Are any of your personal details incorrect?
      = link_to "Notify us...", Settings.notify_details_change_url

Handle some missing data from personal details

#details.block.wide
  %h3 Personal Details
  #top_button
  %dl
    %dt Name:
    %dd= @topic.name
    %dt Birth Date:
    - if @topic.date_of_birth
      %dd.last= @topic.date_of_birth.strftime("%d %B %Y") + " (Age #{@topic.age})"
    - else

    %dt Address:
    %dd= raw ((@topic.address or ["Unknown"]) + [@topic.town,@topic.postcode]).reject{|x|x.blank?}.join(", ")
    %dt Mobile:
    %dd= @topic.mobile_number or "-"
    %dt Next of Kin:
    %dd= @topic.next_of_kin or "-"
    - if @topic.tutor
      %dt Tutor
      %dd= link_to_if @user.staff?, @topic.tutor.name, @topic.tutor
  - if @topic == @user
    %p{:style => "margin:3px 0 0 0;clear:both"}
      Are any of your personal details incorrect?
      = link_to "Notify us...", Settings.notify_details_change_url


%li
  %h4.snippet-title
    = link_to reliable_snippet_path(snippet) do
      = truncate(snippet.title, length: 60)
    %span.cgray.monospace.tiny.pull-right
      = snippet.file_name

  %small.pull-right.cgray
    Expires:
    - if snippet.expires_at
      = snippet.expires_at.to_date.to_s(:short)
    - else
      Never

  .snippet-info
    = "##{snippet.id}"
    %span
      by
      = image_tag avatar_icon(snippet.author_email), class: "avatar avatar-inline s16"
      = snippet.author_name
      %span.light
        #{time_ago_with_tooltip(snippet.created_at)}

Remove snippet expiration date from UI

%li
  %h4.snippet-title
    = link_to reliable_snippet_path(snippet) do
      = truncate(snippet.title, length: 60)
    %span.cgray.monospace.tiny.pull-right
      = snippet.file_name

  .snippet-info
    = "##{snippet.id}"
    %span
      by
      = image_tag avatar_icon(snippet.author_email), class: "avatar avatar-inline s16"
      = snippet.author_name
      %span.light
        #{time_ago_with_tooltip(snippet.created_at)}


!!!
%html
  %head
    %meta{charset: 'utf-8'}
    %title League Schedule

    %meta{name: 'HandheldFriendly', content: 'true'}
    %meta{name: 'viewport', content: 'width=device-width, height=device-height, user-scalable=no'}

    :css
      #{include('css/icons.css')}
      #{include('css/filters.css')}
      #{include('css/style.css')}

    :javascript
      #{include('js/times.js')}
      #{include('js/js.js')}
      #{include('js/filters.js')}
      #{include('js/links.js')}
      #{include('js/reveals.js')}

    <!-- Page generated #{generated}, data file generated #{data_generated} -->
  %body
    #page-wrapper
      != partial('filters', { source: source })

      - source.leagues.select { |league| league.stream_url }.each do |league|
        != partial('league_stream', { league: league })
      - source.matches.sort_by { |match| Time.parse(match.time) }.reverse_each do |match|
        != partial('match', { match: match })
      #no-results.match
        %div There are no matches that fit all the filters you have applied.

Hide no results information unless there are no results

!!!
%html
  %head
    %meta{charset: 'utf-8'}
    %title League Schedule

    %meta{name: 'HandheldFriendly', content: 'true'}
    %meta{name: 'viewport', content: 'width=device-width, height=device-height, user-scalable=no'}

    :css
      #{include('css/icons.css')}
      #{include('css/filters.css')}
      #{include('css/style.css')}

    :javascript
      #{include('js/times.js')}
      #{include('js/js.js')}
      #{include('js/filters.js')}
      #{include('js/links.js')}
      #{include('js/reveals.js')}

    <!-- Page generated #{generated}, data file generated #{data_generated} -->
  %body
    #page-wrapper
      != partial('filters', { source: source })

      - source.leagues.select { |league| league.stream_url }.each do |league|
        != partial('league_stream', { league: league })
      - source.matches.sort_by { |match| Time.parse(match.time) }.reverse_each do |match|
        != partial('match', { match: match })
      #no-results.match.filter-no-match
        %div There are no matches that fit all the filters you have applied.


:ruby
  classes = %w[snapshot-card thumbnail]
  classes << 'snapshot-card-pending' if snapshot.pending?
  data = {
    keyboard_focusable: true,
    auto_refresh_type: 'snapshot',
    auto_refresh_id:   snapshot.id,
  }
  link_options = { class: classes, title: snapshot.title, data: data }
  link_options['aria-selected'] = true if local_assigns[:active]

= link_to snapshot_path(snapshot), link_options do
  - if snapshot.image?
    = image_tag snapshot.image.url(:thumb)
  - else
    .glyphicon.glyphicon-time

  .snapshot-indicator.snapshot-color-icon.glyphicon{ class: glyphicon_for(snapshot) }

  .caption
    = time_tag snapshot.created_at, class: 'text-muted' do
      = t(:time_ago, time: time_ago_in_words(snapshot.created_at))
    - if diff = snapshot.snapshot_diff
      %meter{ max: 100, optimum: 0, low: 5, high: 20, value: diff.diff_in_percent }<
        %span.text-warning<
          = t('.diff',
              diff: number_to_percentage(diff.diff_in_percent, precision: 2))

Improve alt text of snapshot thumbnails

:ruby
  classes = %w[snapshot-card thumbnail]
  classes << 'snapshot-card-pending' if snapshot.pending?
  data = {
    keyboard_focusable: true,
    auto_refresh_type: 'snapshot',
    auto_refresh_id:   snapshot.id,
  }
  link_options = { class: classes, title: snapshot.title, data: data }
  link_options['aria-selected'] = true if local_assigns[:active]

= link_to snapshot_path(snapshot), link_options do
  - if snapshot.image?
    = image_tag snapshot.image.url(:thumb),
      alt: "#{snapshot.title} @ #{snapshot.viewport}"
  - else
    .glyphicon.glyphicon-time

  .snapshot-indicator.snapshot-color-icon.glyphicon{ class: glyphicon_for(snapshot) }

  .caption
    = time_tag snapshot.created_at, class: 'text-muted' do
      = t(:time_ago, time: time_ago_in_words(snapshot.created_at))
    - if diff = snapshot.snapshot_diff
      %meter{ max: 100, optimum: 0, low: 5, high: 20, value: diff.diff_in_percent }<
        %span.text-warning<
          = t('.diff',
              diff: number_to_percentage(diff.diff_in_percent, precision: 2))


!!! 5
%html
  %head
    %title Hi
  %body
    %h1
      :D
    %p
      #{greeting}
    %form
      %label
        = "reply: "
        %input{placeholder: "comment"}

Fix test fixture filter erorr

!!! 5
%html
  %head
    %title Hi
  %body
    %h1
      hi
    %p
      #{greeting}
    %form
      %label
        = "reply: "
        %input{placeholder: "comment"}