- content_for :title do
  Kalender

- content_for :javascript do
  :javascript
    var beginningOfTime = '#{@start_date}';
    var calendarPresets = #{@presets_json.to_json};

.row.header-sep-line
  .span4
    = render partial: 'modules/calendars/startselector', locals: { months: @months }
    .calendar-calendar
      = render partial: 'modules/calendars/calendar', locals: { single_events: @single_events }
  .span2.calendar-settings
    .calendar-head
      = image_tag('klick-den-cal.png')

    = render partial: 'modules/calendars/kddk', locals: { presets: @presets, categories: @categories }
    = render partial: 'modules/tags/calendar_tags'

    - unless user_signed_in?
      %p.not_logged_in_warning.muted
        Als
        = link_to "angemeldeter User", new_user_session_path
        kannst du deinen Kalender hier auch noch nach bestimmten Hashtags filtern

    = render 'modules/calendars/ical_popup'
    .calendar-export
      %button.btn.btn-large.btn-inverse.js-calendar-export
        %i.icon-calendar
          In meinen Kalender

    %p.suggest_link
      Fehlt ein Event? Dann
      = link_to "sag uns bescheid", new_suggestion_path
      !

    .center
      %a{class:"FlattrButton", style:"display:none;", href:"http://hacken.in"}

Remove text from icon :wink:


.header
  %h1= link_to logo_image, projects_path
  = search_bar
  = link_to "Upgrade for only $3 per month!", '', :class => 'upgrade'
  = render 'shared/global_navigation'

Remove design copywriting from the header

.header
  %h1= link_to logo_image, projects_path
  = search_bar
  = render 'shared/global_navigation'


%%tr
  %td= link_to child.to_s, [child.repository, child]
  %td= link_to child.symbols_count.to_s, [child.repository, child, :symbols]
  %td= link_to child.axioms_count.to_s, [child.repository, child, :axioms]
  %td= link_to child.theorems_count.to_s, [child.repository, child, :theorems]

Use locid for links to children subpages.

%%tr
  %td= link_to child.to_s, [child.repository, child]
  %td= link_to child.symbols_count.to_s, locid_for(child, :symbols)
  %td= link_to child.axioms_count.to_s, locid_for(child, :axioms)
  %td= link_to child.theorems_count.to_s, locid_for(child, :theorems)


%h1 My Events

  %ul
    =@events.each do |event|
      %li=event.title

Fix a haml issue with the My Events page

%h1 My Events

%ul
  -@events.each do |event|
    %li=event.title


- unless defined?(Cocoon)
  Please install
  = link_to 'cocoon', 'https://github.com/nathanvda/cocoon'
  to see this page.
- else
  = simple_form_for [:admin, order], (EffectiveOrders.simple_form_options || {}).merge(url: effective_orders.admin_orders_path) do |f|
    = f.association :user, label: 'Customer', collection: users, as: :effective_select

    - f.object.order_items.build unless f.object.order_items.present?

    .row
      .col-xs-12
        %h3 Order Items

    .row.order_items
      = f.simple_fields_for :order_items do |order_item|
        = render 'order_item_fields', f: order_item

      .col-xs-12.links
        = link_to_add_association '+ Add Product', f, :order_items, partial: 'order_item_fields'

    .form-group
      .col-xs-12
        .form-group
          .pull-right
            = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
            = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
            = link_to 'Cancel', effective_orders.admin_orders_path

Determine the type of dropdown select input on order form depending on if EffectiveFormInputs class is defined or not

- unless defined?(Cocoon)
  Please install
  = link_to 'cocoon', 'https://github.com/nathanvda/cocoon'
  to see this page.
- else
  = simple_form_for [:admin, order], (EffectiveOrders.simple_form_options || {}).merge(url: effective_orders.admin_orders_path) do |f|
    = f.association :user, label: 'Customer', collection: users, as: (defined?(EffectiveFormInputs) ? :effective_select : :select)

    - f.object.order_items.build unless f.object.order_items.present?

    .row
      .col-xs-12
        %h3 Order Items

    .row.order_items
      = f.simple_fields_for :order_items do |order_item|
        = render 'order_item_fields', f: order_item

      .col-xs-12.links
        = link_to_add_association '+ Add Product', f, :order_items, partial: 'order_item_fields'

    .form-group
      .col-xs-12
        .form-group
          .pull-right
            = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
            = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
            = link_to 'Cancel', effective_orders.admin_orders_path


%div{style: "width: 100%; height: 300px; overflow: hidden;"}
  = image_tag "list_images/resources.jpg", style: "width: 100%; margin-top: -114px;"

%p{style: "padding-top: 10px;"} Resources offer ideas and tools that help us make meaningful change.

%p Here you can share any documents, videos, or websites you consider valuable for the community. Please take a minute to clarify why you think this resource is useful, and whom it would be particularly useful for. This way people will find their way to your resource more easily.

%p However, be sure to only upload files that you have the right to share! Otherwise, refer to it with a link, so people can access it at the appropriate place.

%p Please share any resource you consider valuable for the community. However, be sure to only upload files that you have the right to share! Otherwise, refer to it with a link, so people can access it at the appropriate place.

Fix redundant text on resource form sidebar


- semantic_form_for(resource) do |f|
  = f.inputs
  = f.buttons

Make manage forms aware of manage_options

- semantic_form_for(resource, :url => resource.new_record? ? collection_path : resource_path(resource), :html => {:class => 'b-espresso-form'}) do |f|
  - if manage_options.field_sets?
    - manage_options.field_sets.each do |field_set|
      - f.inputs field_set.options do
        - field_set.each do |field|
          = f.input *field.to_input
  - else
    = f.inputs

  - f.buttons do
    = f.commit_button
    - unless resource.new_record?
      %li.commit.delete= link_to_destroy(resource)


- if @location
  - content_for :title, "Members near #{@location}"
- else content_for :title, "Find nearby members"

%p
  = form_tag(nearby_members_path, :method => :get, :class => 'form-inline') do
    = label_tag :distance, "Find members within", :class => 'control-label'
    = text_field_tag :distance, @distance, :class => 'input-mini'
    = select_tag :units, options_for_select({"miles" => :mi, "km" => :km}, @units), :class => 'input-small'
    = label_tag :location, "miles of", :class => 'control-label'
    = text_field_tag :location, @location
    = submit_tag "Search", :class => 'btn btn-primary'

- if can? :update, current_member
  %p
    = link_to "Edit your location", edit_member_registration_path(current_member)

- if !@nearby_members.empty?
  %h3 Results found
  %ul.thumbnails
    - @nearby_members.each do |member|
      %li.span2
        = render :partial => "members/thumbnail", :locals => { :member => member }
- elsif @location
  %h3 No results found

Fix "km miles of" typo.

- if @location
  - content_for :title, "Members near #{@location}"
- else content_for :title, "Find nearby members"

%p
  = form_tag(nearby_members_path, :method => :get, :class => 'form-inline') do
    = label_tag :distance, "Find members within", :class => 'control-label'
    = text_field_tag :distance, @distance, :class => 'input-mini'
    = select_tag :units, options_for_select({"miles" => :mi, "km" => :km}, @units), :class => 'input-small'
    = label_tag :location, "of", :class => 'control-label'
    = text_field_tag :location, @location
    = submit_tag "Search", :class => 'btn btn-primary'

- if can? :update, current_member
  %p
    = link_to "Edit your location", edit_member_registration_path(current_member)

- if !@nearby_members.empty?
  %h3 Results found
  %ul.thumbnails
    - @nearby_members.each do |member|
      %li.span2
        = render :partial => "members/thumbnail", :locals => { :member => member }
- elsif @location
  %h3 No results found


.contextual
  = link_to_function "Protokoll drucken", 'window.print()', :class => "icon icon-print"
  = link_to "VESR Liste", esr_files_path, :class => "icon icon-book"
  = link_to t_action(:show_all), {:show_valid => true}, :class => 'icon icon-show_all' unless params['show_valid']

%h2 VESR Protokoll vom #{l(@esr_file.updated_at.to_date)}

- if params['show_valid'].present?
  %h3 Korrekte Zahlungen
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.valid
- else
  .alert-message.block-message.fade.in.success{'data-alert' => 'alert'}
    %a.close{:href => '#'} ×
    = "%{@esr_file.esr_records.valid.count} korrekt verbucht."

- unless @esr_file.esr_records.invalid.empty?
  %h3 Falscher Betrag
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.invalid

- unless @esr_file.esr_records.missing.empty?
  %h3 Rechnung nicht gefunden
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.missing

= render :partial => 'sidebar'

Fix syntax and better wording for valid payment flash.

.contextual
  = link_to_function "Protokoll drucken", 'window.print()', :class => "icon icon-print"
  = link_to "VESR Liste", esr_files_path, :class => "icon icon-book"
  = link_to t_action(:show_all), {:show_valid => true}, :class => 'icon icon-show_all' unless params['show_valid']

%h2 VESR Protokoll vom #{l(@esr_file.updated_at.to_date)}

- if params['show_valid'].present?
  %h3 Korrekte Zahlungen
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.valid
- else
  .alert-message.block-message.fade.in.success{'data-alert' => 'alert'}
    %a.close{:href => '#'} ×
    = "#{@esr_file.esr_records.valid.count} korrekt verbuchte Zahlungen."

- unless @esr_file.esr_records.invalid.empty?
  %h3 Falscher Betrag
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.invalid

- unless @esr_file.esr_records.missing.empty?
  %h3 Rechnung nicht gefunden
  = render 'esr_records/list', :esr_records => @esr_file.esr_records.missing

= render :partial => 'sidebar'


= form_tag events_url, :remote => true, :method => :get, :id => "event_filter_form", :class => "ajax_update_main_pane" do
  %h4 Event Types
  #eventable_selectors
    - Event.group("eventable_type").map{|e| e.eventable_type }.each do |et|
      = label_tag "eventable_type[#{et}]", et.tableize.humanize
      = check_box_tag "eventable_type[#{et}]", "1", ((params[:eventable_type] && params[:eventable_type][et]) or !params[:eventable_type])
  %h4 Transitions
  #transition_selectors
    - Event.group("transition").map{|e| e.transition }.each do |tr|
      = label_tag "transition[#{tr}]", tr.to_s.humanize
      = check_box_tag "transition[#{tr}]", "1", ((params[:transition] && params[:transition][tr]) or !params[:transition])
  /= link_to "Refresh", events_url(:since => @events.first ? @events.first.event_date : @date), :remote => true, :id => "update_posts"
  = submit_tag
  /.date_select= select_date @date - 1
= javascript_tag "new Form.Observer('event_filter_form', 0.3, function(form, value){form.request()})"

Tidy this away for a bit

= form_tag events_url, :remote => true, :method => :get, :id => "event_filter_form", :class => "ajax_update_main_pane" do
  %h4 Event Types
  #eventable_selectors
    - Event.group("eventable_type").map{|e| e.eventable_type }.each do |et|
      = label_tag "eventable_type[#{et}]", et.tableize.humanize
      = check_box_tag "eventable_type[#{et}]", "1", ((params[:eventable_type] && params[:eventable_type][et]) or !params[:eventable_type])
  %h4 Transitions
  #transition_selectors
    - Event.group("transition").map{|e| e.transition }.each do |tr|
      = label_tag "transition[#{tr}]", tr.to_s.humanize
      = check_box_tag "transition[#{tr}]", "1", ((params[:transition] && params[:transition][tr]) or !params[:transition])
  /= link_to "Refresh", events_url(:since => @events.first ? @events.first.event_date : @date), :remote => true, :id => "update_posts"
  = submit_tag
  /.date_select= select_date @date - 1
  /= javascript_tag "new Form.Observer('event_filter_form', 0.3, function(form, value){form.request()})"
  = link_to request.request_uri, request.request_uri


= field_set do
  = f.input :customized_type, collection: f.object.class.customizable_types.collect{|m| [Ekylibre::Record.human_name(m.to_s.underscore), m]}.sort{|a,b| a[0] <=> b[0]}
  = f.input :name
  = f.input :active
  = f.input :required
  = f.input :nature, as: :radio_buttons, show: '.{{value}}_options'
  .text_options
    = f.input :minimal_length
    = f.input :maximal_length
  .decimal_options
    = f.input :minimal_value
    = f.input :maximal_value
  .choice_options
    = f.nested_association :choices

Fix bug human_name in custom_field form

= field_set do
    = f.input :customized_type, collection: f.object.class.customizable_types.collect{|m| [::I18n.t("activerecord.models.#{m.to_s.underscore}"), m]}.sort{|a,b| a[0] <=> b[0]}
  = f.input :name
  = f.input :active
  = f.input :required
  = f.input :nature, as: :radio_buttons, show: '.{{value}}_options'
  .text_options
    = f.input :minimal_length
    = f.input :maximal_length
  .decimal_options
    = f.input :minimal_value
    = f.input :maximal_value
  .choice_options
    = f.nested_association :choices


- if champ.options?
  = form.select :primary_value,
    champ.primary_options,
    { required: champ.mandatory? },
    { data: { secondary_options: champ.secondary_options } }
  %span
    = form.label :secondary_value, "Valeur secondaire dépendant de la première", class: 'hidden'
  = form.select :secondary_value,
    champ.secondary_options[champ.primary_value],
    { required: champ.mandatory? },
    { data: { secondary: true } }

Add mandatory * to secondary value

- if champ.options?
  = form.select :primary_value,
    champ.primary_options,
    { required: champ.mandatory? },
    { data: { secondary_options: champ.secondary_options } }
  %span
    = form.label :secondary_value, class: 'hidden' do
      Valeur secondaire dépendant de la première
      - if champ.mandatory?
        %span.mandatory *
  = form.select :secondary_value,
    champ.secondary_options[champ.primary_value],
    { required: champ.mandatory? },
    { data: { secondary: true } }


- provide :title, t('.title')

.articles
  %header
    = image_tag gravatar_url("ralin.chimev@gmail.com", 80), alt: t('brand')
    %h1= t('articles.header.title')

  - if authenticated?
    = link_to t('articles.header.new').upcase, new_article_path
    = link_to t('articles.header.wip').upcase, articles_path(show: 'wip')
    = link_to t('articles.header.published').upcase, articles_path
    = link_to t('articles.header.all').upcase, articles_path(show: 'all')

  .total
    = "#{t('articles.header.number_of_posts').upcase}: #{@articles.size}"

  %ul
    = render @articles

Remove published articles filter from UI as unnecessary

- provide :title, t('.title')

.articles
  %header
    = image_tag gravatar_url("ralin.chimev@gmail.com", 80), alt: t('brand')
    %h1= t('articles.header.title')

  - if authenticated?
    = link_to t('articles.header.new').upcase, new_article_path
    = link_to t('articles.header.wip').upcase, articles_path(show: 'wip')
    = link_to t('articles.header.all').upcase, articles_path(show: 'all')

  .total
    = "#{t('articles.header.number_of_posts').upcase}: #{@articles.size}"

  %ul
    = render @articles


- unless @task.completed? or @task.cancelled?
  .btn-group.pull-right.panel-action
    %button.btn.btn-primary.btn-sm.dropdown-toggle{:data => {:toggle => 'dropdown'}}
      I want to
      %span.caret
    %ul.dropdown-menu{:role => 'menu'}
      - if current_user == @task.user or current_user.has_role? :admin
        %li
          = link_to edit_user_task_path(current_user, @task) do
            %i.fa.fa-fw.fa-edit
            = " Update this task"
        %li.divider

      %li.dropdown-submenu
        = link_to "#" do
          %i.fa.fa-fw.fa-edit
          = " Update this status..."
        %ul.dropdown-menu
          - @task.allowable_events.each do |evt|
            %li
              = link_to fire_workflow_event_task_path( @task, :event => evt), :method => "patch" do
                = evt.titleize

Use the correct HTTP verb when using Tasks actions dropdown- previously was PATCH but route is GET

- unless @task.completed? or @task.cancelled?
  .btn-group.pull-right.panel-action
    %button.btn.btn-primary.btn-sm.dropdown-toggle{:data => {:toggle => 'dropdown'}}
      I want to
      %span.caret
    %ul.dropdown-menu{:role => 'menu'}
      - if current_user == @task.user or current_user.has_role? :admin
        %li
          = link_to edit_user_task_path(current_user, @task) do
            %i.fa.fa-fw.fa-edit
            = " Update this task"
        %li.divider

      %li.dropdown-submenu
        = link_to "#" do
          %i.fa.fa-fw.fa-edit
          = " Update this status..."
        %ul.dropdown-menu
          - @task.allowable_events.each do |evt|
            %li
              = link_to fire_workflow_event_task_path( @task, :event => evt) do
                = evt.titleize


%body
  %header#myCarousel.carousel.slide
    .carousel-inner
      .item.active
        .fill
          = link_to image_tag('jumbotron.jpg')
        .carousel-caption
          %h1 So developers can track info they need
          %br
          = link_to 'Ruby Rails Info Stream', ruby_and_rails_path, class:  'btn btn-round btn-lg btn-primary'
          = link_to 'Python Info Stream', python_path, class:  'btn btn-round btn-lg btn-primary'

  .container
    .row
      .col-lg-12
        %h3
          %br
          %p Want Bit Parrot to track other info for you?
          %p Tweet Us
          %ul.list-inline
            %li
              %a{:href => "https://twitter.com/bit_parrot"}
                %i.fa.fa-2x.fa-twitter-square

Add home page button linking machine learning page.

%body
  %header#myCarousel.carousel.slide
    .carousel-inner
      .item.active
        .fill
          = link_to image_tag('jumbotron.jpg')
        .carousel-caption
          %h1 So developers can track info they need
          %br
          = link_to 'Ruby Rails Info Stream', ruby_and_rails_path, class:  'btn btn-round btn-lg btn-primary'
          = link_to 'Python Info Stream', python_path, class:  'btn btn-round btn-lg btn-primary'
          = link_to 'ML Info Stream', machine_learning_path, class:  'btn btn-round btn-lg btn-primary'

  .container
    .row
      .col-lg-12
        %h3
          %br
          %p Want Bit Parrot to track other info for you?
          %p Tweet Us
          %ul.list-inline
            %li
              %a{:href => "https://twitter.com/bit_parrot"}
                %i.fa.fa-2x.fa-twitter-square


---
title: Blog
---

- content_for :header do
  %h1.o-title= current_page.data.title

= partial 'partials/sections/blog'

Add navigation to blog page

---
title: Blog
---

- content_for :header do
  = partial 'partials/logo'
  = partial 'partials/navigation', locals: {data: data.site.nav, collapsible: true, extraclasses: 'm-navigation--inline' }

= partial 'partials/sections/blog'


.row.crop-info
  .col-md-9
    %h1
      = crop_icon(@crop)
      %strong.crop-name= @crop.name.titleize
      - unless @crop.approved?
        %badge.badge-warning=@crop.approval_status
      %small.text-muted= @crop.default_scientific_name
    - if @crop.sowing_method.present?
      %h2
        How to sow #{@crop.name}:
        = @crop.sowing_method
    - if @crop.sun_requirements.present?
      %p
        %strong Sun requirement for #{@crop}:
        Plant in #{@crop.sun_requirements}
    %p.text-muted
      - if !@crop.plantings.empty?
        #{@crop.name.titleize} has been planted
        = pluralize(@crop.plantings.size, "time")
        by #{ENV['GROWSTUFF_SITE_NAME']} members.
      - else
        Nobody is growing this yet. You could be the first!
    - if @crop.description.present?
      %p= @crop.description
  .col-md-3
    = image_tag crop_image_path(@crop),
      class: 'img-responsive shadow rounded crop-hero-photo', alt: 'photo of crop'

Change a h3 into just a <strong>

.row.crop-info
  .col-md-9
    %h1
      = crop_icon(@crop)
      %strong.crop-name= @crop.name.titleize
      - unless @crop.approved?
        %badge.badge-warning=@crop.approval_status
      %small.text-muted= @crop.default_scientific_name
    - if @crop.sowing_method.present?
      %p
        %strong How to sow #{@crop.name}:
        = @crop.sowing_method
    - if @crop.sun_requirements.present?
      %p
        %strong Sun requirement for #{@crop}:
        Plant in #{@crop.sun_requirements}
    %p.text-muted
      - if !@crop.plantings.empty?
        #{@crop.name.titleize} has been planted
        = pluralize(@crop.plantings.size, "time")
        by #{ENV['GROWSTUFF_SITE_NAME']} members.
      - else
        Nobody is growing this yet. You could be the first!
    - if @crop.description.present?
      %p= @crop.description
  .col-md-3
    = image_tag crop_image_path(@crop),
      class: 'img-responsive shadow rounded crop-hero-photo', alt: 'photo of crop'


- alternateContent ||= false
- hideResults      ||= false

- form_path = request.path == ('/') ? articles_path : request.path

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

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

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

  %ul.list.list--xs.js-search-results{ class: ( 'hide-results dn' if hideResults) }
    = render @articles

  - if alternateContent
    .js-search-alternate
      = yield

Update search placeholder to mention search is title-focused

- alternateContent ||= false
- hideResults      ||= false

- form_path = request.path == ('/') ? articles_path : request.path

.js-search
  .split.mbm
    .split-cell.form.form--inline.mbf
      = form_tag form_path, method: :get, remote: true, class: 'js-search-form' do
        = search_field_tag :search, params[:search],
          class: 'form-input js-search-input',
          placeholder: "Search #{ @articles.count } articles by title",
          data: { shortcut: 's' }

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

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

  %ul.list.list--xs.js-search-results{ class: ( 'hide-results dn' if hideResults) }
    = render @articles

  - if alternateContent
    .js-search-alternate
      = yield


- if @location != current_member.location
  - content_for :title, "Members near #{@location}"
- else
  - content_for :title, "Members near you"

%p
  = form_tag(nearby_members_path, :method => :get, :class => 'form-inline') do
    = label_tag :location, "Find members near", :class => 'control-label'
    = text_field_tag :location, @location
    = submit_tag "Search", :class => 'btn btn-primary'

- if can? :update, current_member
  %p
    = link_to "Edit your location", edit_member_registration_path(current_member)

%h3 Results found
%ul.thumbnails
  - @nearby_members.each do |member|
    %li.span2
      .thumbnail(style="height: 190px")
        = render :partial => "members/avatar", :locals => { :member => member }
        = link_to "#{member.to_s}, #{member.location}", member

Use members thumbnail on members/near page.

- if @location != current_member.location
  - content_for :title, "Members near #{@location}"
- else
  - content_for :title, "Members near you"

%p
  = form_tag(nearby_members_path, :method => :get, :class => 'form-inline') do
    = label_tag :location, "Find members near", :class => 'control-label'
    = text_field_tag :location, @location
    = submit_tag "Search", :class => 'btn btn-primary'

- if can? :update, current_member
  %p
    = link_to "Edit your location", edit_member_registration_path(current_member)

%h3 Results found
%ul.thumbnails
  - @nearby_members.each do |member|
    %li.span2
      = render :partial => "members/thumbnail", :locals => { :member => member }


.panel.panel-info
  .panel-heading
    %h3.panel-title
      = link_to project_path(project) do
        = project.title
  .panel-body
    = truncate(project.description, length: 140)
    .user-list{:style=>"padding-top: 10px;"}
      - if project.users.empty?
        Holy moly! This project has no developer yet and is up for
        = link_to 'grabs!', join_project_path(project.id)
      - else
        - project.users.each do |user|
          = link_to user_path(user) do
            = image_tag(user.gravatar_url(:size => "48"), :class => "img-thumbnail pull-left", :title => "#{user.name}", :alt => user.name)
  .panel-footer
    .row
      .pull-left{:style=>"padding-left: 5px;"}
        = render :partial => "projects/buttons", :locals => {:project => project }
      .pull-right
        %p.text-right{:style=>"font-size: 0.8em; padding-right: 5px;"}
          an idea by
          = link_to(user_path(project.originator.id)) do
            #{project.originator.name},
          %br
          updated
          = "#{time_ago_in_words project.updates.last.created_at}"
          ago

Make it more obvious that projects are up for grabs

.panel.panel-info
  .panel-heading
    %h3.panel-title
      = link_to project_path(project) do
        = project.title
  .panel-body
    :markdown
      #{truncate(project.description, length: 140)}
    .user-list{:style=>"padding-top: 10px;"}
      - if project.users.empty?
        .alert.alert-warning
          Holy moly! This project has no developer yet and is up for
          = link_to 'grabs!', join_project_path(project.id), :class => "alert-link"
      - else
        .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)
  .panel-footer
    .row
      .pull-left{:style=>"padding-left: 5px;"}
        = render :partial => "projects/buttons", :locals => {:project => project }
      .pull-right
        %p.text-right{:style=>"font-size: 0.8em; padding-right: 5px;"}
          an idea by
          = link_to(user_path(project.originator.id)) do
            #{project.originator.name},
          %br
          updated
          = "#{time_ago_in_words project.updates.last.created_at}"
          ago


= simple_form_for @employee do |f|

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

    .span6
      %h3= t_model(PhoneNumber)
      = link_to t_action(:more), [:new_phone_number, resource.persisted? ? resource : controller_name], :remote => true, :class => 'icon-add-text', :style => 'float: right'
      .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

  %h3= t('form.person.civil')
  .row-fluid
    .span6
      = f.input :sex, :as => :select, :collection => { t('sex.male') => Person::MALE, t('sex.female') => Person::FEMALE }
      = f.input :nationality
      = f.input :date_of_birth, :as => :date_field
    .span6
      = f.association :civil_status
      = f.association :religion
      = f.input :social_security_nr

  = f.fields_for :employments, (@employments || f.object.employments.valid) do |employment|
    = employment.input :employer_id, :as => :hidden

    = render 'employments/fields', :f => employment

  = f.button :submit

Unify employees form contact section.

= simple_form_for @employee 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.person.civil')
  .row-fluid
    .span6
      = f.input :sex, :as => :select, :collection => { t('sex.male') => Person::MALE, t('sex.female') => Person::FEMALE }
      = f.input :nationality
      = f.input :date_of_birth, :as => :date_field
    .span6
      = f.association :civil_status
      = f.association :religion
      = f.input :social_security_nr

  = f.fields_for :employments, (@employments || f.object.employments.valid) do |employment|
    = employment.input :employer_id, :as => :hidden

    = render 'employments/fields', :f => employment

  = f.button :submit


- unless group.hide_members && (cannot? :update, group)
  .sub-panel#members-panel
    %h4
      = link_to group_memberships_path(group) do
        = t :members
        = "(#{ group.memberships_count })"

    %ul#users-list.clearfix
      - group.members.first(15).each do |user|
        %li{:id => user.id}
          = render 'linked_avatar', user: user, show_title: true
    %div.memberships_link
      = link_to t(:more), group_memberships_path(group), class: 'bottom-panel-link'

Fix memberships display on group page

- unless group.hide_members && (cannot? :update, group)
  .sub-panel#members-panel
    %h4
      = link_to group_memberships_path(group) do
        = t :members
        = "(#{ group.members.count })"

    %ul#users-list.clearfix
      - group.members.first(15).each do |user|
        %li{:id => user.id}
          = render 'linked_avatar', user: user, show_title: true
    %div.memberships_link
      = link_to t(:more), group_memberships_path(group), class: 'bottom-panel-link'


!!! 5
%html

  %head
    %title #{page_title} · #{Settings.name}

    %meta{charset: 'utf-8'}
    %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}

    = stylesheet_link_tag 'application', media: 'all'
    = csrf_meta_tags

  %body
    = render partial: '/shared/navbar'

    %main#content
      .container
        .row.flash-messages
          = flash_messages
        .row.flash-messages
          .alert.alert-info
            Do you want to support the development of Ontohub by testing? Visit
            = link_to 'test.ontohub.org', 'http://test.ontohub.org'
            for more information
        .row
          - if cover_visible?
            = render partial: '/shared/cover'
            .col-md-12
              = yield
          - elsif context_pane
            .col-md-8
              = yield
            .col-md-4
              - if user_signed_in?
                = render partial: '/shared/user_content'
              - else
                = render partial: '/shared/signup_invitation'
          - else
            .col-md-12
              = yield

    = render partial: '/shared/footer'

    = javascript_include_tag 'application'

Add warning if javascript is deactivated.

!!! 5
%html

  %head
    %title #{page_title} · #{Settings.name}

    %meta{charset: 'utf-8'}
    %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}

    = stylesheet_link_tag 'application', media: 'all'
    = csrf_meta_tags

  %body
    = render partial: '/shared/navbar'

    %main#content
      .container
        .row.flash-messages
          = flash_messages
        .row.flash-messages
          %noscript
            .alert.alert-danger
              JavaScript is deactivated in your browser. You might not be able to use all contents.
          .alert.alert-info
            Do you want to support the development of Ontohub by testing? Visit
            = link_to 'test.ontohub.org', 'http://test.ontohub.org'
            for more information
        .row
          - if cover_visible?
            = render partial: '/shared/cover'
            .col-md-12
              = yield
          - elsif context_pane
            .col-md-8
              = yield
            .col-md-4
              - if user_signed_in?
                = render partial: '/shared/user_content'
              - else
                = render partial: '/shared/signup_invitation'
          - else
            .col-md-12
              = yield

    = render partial: '/shared/footer'

    = javascript_include_tag 'application'


!!!
%html{ :lang => "en" }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
    %link{ :href => "/stylesheets/base.css", :title => "Base CSS", :rel => "stylesheet", :type => "text/css", :media => "screen" }
    %title AF83 ErrorNot
  %body
    %header
      %p
        %a{ :href => "/" }
          %span.hide
            ErrorNot
      - if user_signed_in?
        %ul
          %li= link_to t('layout.user_nav.profile'), edit_user_url
          %li= link_to t('layout.user_nav.logout'), destroy_user_session_url

    %nav
      - if user_signed_in?
        %ul
          %li= link_to t('layout.menu.projects'), projects_url

    #content
      = yield :summary
      = flash_to_html(flash)
      = yield

    %footer
      %p
        Created by
        %a{ :href => "http://dev.af83.com/", :target => "_blank" }
          %span
            af83

Remove reference to af83 in footer.

!!!
%html{ :lang => "en" }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
    %link{ :href => "/stylesheets/base.css", :title => "Base CSS", :rel => "stylesheet", :type => "text/css", :media => "screen" }
    %title AF83 ErrorNot
  %body
    %header
      %p
        %a{ :href => "/" }
          %span.hide
            ErrorNot
      - if user_signed_in?
        %ul
          %li= link_to t('layout.user_nav.profile'), edit_user_url
          %li= link_to t('layout.user_nav.logout'), destroy_user_session_url

    %nav
      - if user_signed_in?
        %ul
          %li= link_to t('layout.menu.projects'), projects_url

    #content
      = yield :summary
      = flash_to_html(flash)
      = yield

    %footer
      %p
        ErrorNot - That is the question


!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= content_for?(:title) ? yield(:title) : "My Application"
    %meta{:content => "#{content_for?(:description) ? yield(:description) : "My Application"}", :name => "description"}/
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    / Custom Fonts
    %link{:href => "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css", :rel => "stylesheet"}/
  %body
    %header
      = render 'layouts/navigation'
    = render 'layouts/messages'
    = yield
    = render 'shared/tweets'
    = render 'layouts/footer'

Convert app layout to variable for meta title, so all pages can have their own way of showing tab names and titles for seo.

!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
    %title= @meta_title
    %meta{:content => "#{content_for?(:description) ? yield(:description) : "My Application"}", :name => "description"}/
    = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    / Custom Fonts
    %link{:href => "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css", :rel => "stylesheet"}/
  %body
    %header
      = render 'layouts/navigation'
    = render 'layouts/messages'
    = yield
    = render 'shared/tweets'
    = render 'layouts/footer'


#header
  .logo
    %p
      = link_to "Spot.us - Community Funded Reporting", "/", :class => "logo-link", :title => "Spot.us - Community Funded Reporting"
      %strong
        Spot.Us is currently in a testing phase. Site is safe and secure, launching in full soon. Stay tuned!
  .nav-container
    %ul#main-nav
      %li.start_story= link_to "Start a Story", start_story_path
      %li.fund_story= link_to "Fund a Story", news_items_path
      %li.read_story= link_to "Read a Story", news_items_path
      %li.about_spotus= link_to "About", page_path('about')
  .clear

Revert "Desi - adding header thingy"


!!! 5
%html
  %head
    %title= "my services mod app"
    %meta{ :content => "", :name => "description" }
    %meta{ :content => "", :name => "author" }
    %meta{ :content => "3 days", :name => "revisit-after" }
    %link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
    %link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
    %link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }

  %body
    %div.content
      =yield

Delete action repaired. Missing js linked in application layout.

!!! 5
%html
  %head
    %title= "my services mod app"
    %meta{ :content => "", :name => "description" }
    %meta{ :content => "", :name => "author" }
    %meta{ :content => "3 days", :name => "revisit-after" }
    %link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
    %link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
    %link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }

  %body
    %div.content
      =yield

    = javascript_include_tag "application", "data-turbolinks-track" => true


#burndown-chart

%script(type="text/javascript" src="https://www.google.com/jsapi")

:javascript
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);

  function drawChart() {
    var jsonData = $.parseJSON($.ajax({
      url: "#{metrics_burndown_path(@burndown, format: :json)}",
      dataType: "json",
      async: false
    }).responseText);

    console.log(typeof jsonData);

    var data = google.visualization.arrayToDataTable(jsonData);

    options = {
      isStacked: true,
      hAxis: { title: "Day" }
    };

    var chart = new google.visualization.ColumnChart(document.getElementById('burndown-chart'));
    chart.draw(data, options);
  }

Set proper colours for the burndown

#burndown-chart

%script(type="text/javascript" src="https://www.google.com/jsapi")

:javascript
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);

  function drawChart() {
    var jsonData = $.parseJSON($.ajax({
      url: "#{metrics_burndown_path(@burndown, format: :json)}",
      dataType: "json",
      async: false
    }).responseText);

    console.log(typeof jsonData);

    var data = google.visualization.arrayToDataTable(jsonData);

    options = {
      isStacked: true,
      // Unstarted, Started, Finished, Delivered, Accepted, Rejected
      colors: ['#3751A8', '#4AB2D5', '#FBE151', '#C3E94F', '#93BC17', '#F93C3C'],
      hAxis: { title: "Day" }
    };

    var chart = new google.visualization.ColumnChart(document.getElementById('burndown-chart'));
    chart.draw(data, options);
  }


!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:title) ? yield(:title) : "Flareteam"
    = csrf_meta_tags
    / Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
    = stylesheet_link_tag "application", :media => "all"
    %link(href="images/apple-touch-icon.png" rel="apple-touch-icon")
    %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72")
    %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114")

  %body
    = render "shared/navbar"
    .container
      .content
        .row
          .span12
            = yield

    %footer.footer
      .container
        %p.pull-right © Flareteam 2012
    /
      Javascripts
      \==================================================
    / Placed at the end of the document so the pages load faster
    = javascript_include_tag "application"

Add GA to devise layout

!!! 5
%html(lang='en')
  %head
    %meta(charset='utf-8')
    %meta(name='viewport' content='width=device-width, initial-scale=1.0')
    %title= content_for?(:title) ? yield(:title) : 'Flareteam'
    = csrf_meta_tags
    -# Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag 'http://html5shim.googlecode.com/svn/trunk/html5.js'
    = stylesheet_link_tag 'application', :media => 'all'
    %link(href='images/apple-touch-icon.png' rel='apple-touch-icon')
    %link(href='images/apple-touch-icon-72x72.png' rel='apple-touch-icon' sizes='72x72')
    %link(href='images/apple-touch-icon-114x114.png' rel='apple-touch-icon' sizes='114x114')

  %body
    = render 'shared/navbar'
    .container
      .content
        .row
          .span12
            = yield

    %footer.footer
      .container
        %p.pull-right © Flareteam 2012
    -# Javascripts
    -# ==================================================
    -# Placed at the end of the document so the pages load faster
    = javascript_include_tag 'application'
    = render partial: 'shared/google_analytics' if Rails.env.production?


- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_or_null_user.can_create?(Machine)
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")
      - else
        = link_to new_machine_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine

Fix machine user and tooltip

- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_user
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")
      - else
        = link_to new_machine_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine


.form-group
  - CustomField.all.each do |field|
    = label_tag dom_id(field), field.name
    = text_field_tag "person[fields][#{field.id}]", @person.fields[field.id], class: 'form-control', id: dom_id(field)

Change form input for different field formats

- CustomField.all.each do |field|
  .form-group
    = label_tag dom_id(field), field.name
    - name = "person[fields][#{field.id}]"
    - case field.format
    - when 'string'
      = text_field_tag name, @person.fields[field.id], class: 'form-control', id: dom_id(field)
    - when 'number'
      = number_field_tag name, @person.fields[field.id], class: 'form-control', id: dom_id(field)
    - when 'boolean'
      = hidden_field_tag name, '0'
      = check_box_tag name, '1', @person.fields[field.id] == '1', class: 'checkbox', id: dom_id(field)
    - when 'date'
      .input-group
        .input-group-btn
          %button{ type: 'button', class: 'btn btn-info date-picker-btn' }
            = icon 'fa fa-calendar'
        = date_field_tag name, @person.fields[field.id], class: 'form-control', id: dom_id(field)


= form_for @project, html: {class: 'form-horizontal'} do |f|

  - if @project.errors.any?
    #error_explanation
      %h3
        = pluralize(@project.errors.count, "error")
        prohibited this project from being saved
      %ul
        - @project.errors.full_messages.each do |msg|
          %li= msg

  .form-group
    = f.label :name, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :name, class: 'form-control'

  .form-group
    = f.label :status, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :status, class: 'form-control'

  .form-group
    .col-sm-offset-2.col-sm-10
      = f.submit 'Create', class: 'btn btn-primary'

Fix project form submit label.

= form_for @project, html: {class: 'form-horizontal'} do |f|

  - if @project.errors.any?
    #error_explanation
      %h3
        = pluralize(@project.errors.count, "error")
        prohibited this project from being saved
      %ul
        - @project.errors.full_messages.each do |msg|
          %li= msg

  .form-group
    = f.label :name, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :name, class: 'form-control'

  .form-group
    = f.label :status, class: 'col-sm-2 control-label'
    .col-sm-10
      = f.text_field :status, class: 'form-control'

  .form-group
    .col-sm-offset-2.col-sm-10
      = f.submit class: 'btn btn-primary'


- urls = %r{(?:https?|ftp|mailto)://\S+}i
.row
  = render 'layouts/search_large'
%div.row
  .col-md-12
    %h2.text-center
      Most Recent
    %ul.block-grid-sm-1
      - @emails.each do |email|
        %li
          %strong
            = link_to Newsletter.find(email.newsletter_id).name, email
          %span
            |
          = link_to email.subject, email
          %span
            |
          %small
            = link_to 'Links from newsletter', link_path(email)
          %p
            = strip_tags email.body.split(" ").first(70).join(" ").gsub(/(?:f|ht)tps?:\/[^\s]+/, '') + "..."
= paginate @emails

Save the change on emails

- urls = %r{(?:https?|ftp|mailto)://\S+}i
.row
  = render 'layouts/search_large'
%div.row
  .col-md-12
    %h2.text-center
      Most Recent
    %ul.block-grid-sm-1
      - @emails.each do |email|
        %li
          %strong
            = link_to Newsletter.find(email.newsletter_id).name, Newsletter.find(email.newsletter_id)
          %span
            |
          = link_to email.subject, email
          %span
            |
          %small
            = link_to 'Links from newsletter', link_path(email)
          %p
            = strip_tags email.body.split(" ").first(70).join(" ").gsub(/(?:f|ht)tps?:\/[^\s]+/, '') + "..."
= paginate @emails


:ruby
  canonical_url = @category.canonical_url(@posts)
  page_title = @category.page_title(@posts)

- @class_category_id = "category-" + @category.order.to_s
- @class_page_name = "category-index"

- content_for(:rel_next_prev_link_tags) { rel_next_prev_link_tags(@posts) }
- content_for(:canonical_tag) do
  %link{rel: :canonical, href: canonical_url}
- if @posts.current_page > 1
  - breadcrumb :page_num, @posts.current_page, category: @category
- else
  - breadcrumb :category, @category
- set_meta_tags title: page_title, og: @category.to_og_params
- set_meta_tags og: {url: canonical_url, title: "#{page_title} | #{current_site.name}"}

%section
  %h1.category-header= @category.name
  %p.category-description= raw render_markdown(@category.description)

  = render 'banner', position: :press_articles_top
  %ul
    - @posts.each do |post|
      = render 'posts/summary_with_content', post: post
    = render 'native_ad', position: :press_articles_bottom

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

Use <div> instead of <p> because rendered HTML may include <p>

:ruby
  canonical_url = @category.canonical_url(@posts)
  page_title = @category.page_title(@posts)

- @class_category_id = "category-" + @category.order.to_s
- @class_page_name = "category-index"

- content_for(:rel_next_prev_link_tags) { rel_next_prev_link_tags(@posts) }
- content_for(:canonical_tag) do
  %link{rel: :canonical, href: canonical_url}
- if @posts.current_page > 1
  - breadcrumb :page_num, @posts.current_page, category: @category
- else
  - breadcrumb :category, @category
- set_meta_tags title: page_title, og: @category.to_og_params
- set_meta_tags og: {url: canonical_url, title: "#{page_title} | #{current_site.name}"}

%section
  %h1.category-header= @category.name
  .category-description= raw render_markdown(@category.description)

  = render 'banner', position: :press_articles_top
  %ul
    - @posts.each do |post|
      = render 'posts/summary_with_content', post: post
    = render 'native_ad', position: :press_articles_bottom

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


%div#footer
  %p{ class: "copyright col-md-push-#{12-main_container_size} col-md-#{main_container_size} col-lg-push-#{12-main_container_size} col-lg-#{main_container_size} text-muted small" }
    = link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
    = Time.now.year
    \-
    = link_to 'Nouveautés', 'https://github.com/sgmap/tps/releases', target: '_blank'
    \-
    = link_to 'CGU / Mentions légales', cgu_path
    \-
    = link_to 'Contact', "mailto:"+t('dynamics.contact_email')

Add a link to the Stats page in the footer

%div#footer
  %p{ class: "copyright col-md-push-#{12-main_container_size} col-md-#{main_container_size} col-lg-push-#{12-main_container_size} col-lg-#{main_container_size} text-muted small" }
    = link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
    = Time.now.year
    \-
    = link_to 'Nouveautés', 'https://github.com/sgmap/tps/releases', target: '_blank'
    \-
    = link_to 'Statistiques', stats_path
    \-
    = link_to 'CGU / Mentions légales', cgu_path
    \-
    = link_to 'Contact', "mailto:"+t('dynamics.contact_email')


%ul{:class => ("threads" unless preview.parent)}
  %li#comment_new.comment.score1
    %h2
      = link_to spellcheck(preview.title), "#", class: "title"
    %p.meta
      = posted_by(preview)
      Évalué à
      %span.score>= preview.bound_score
    %figure.image
      = avatar_img(current_user)
    .content
      = spellcheck(preview.body)
      - if current_user.signature.present? && !current_account.try(:hide_signature?)
        %p.signature
          = current_user.signature
    %footer.actions

- if preview.parent.try(:user_id) == current_account.user_id
  = image_tag "/images/dessins/geekscottes_005.png", alt: "Autosatisfaction récursive", title: "Autosatisfaction récursive - © Johann 'nojhan' Dréo : 2005-03-25 - Licence CC By-Sa 2.5"
- elsif preview.parent.try(:depth).to_i > 10
  = image_tag "/images/dessins/discussion.png", alt: "Discussion", title: "Discussion - © Boug metoogotmy.net : 2012 - Licence CC By-Sa 2.0 Fr"

Fix preview of new comments

%ul{:class => ("threads" unless preview.parent)}
  %li#comment_new.comment.score10
    %h2
      = link_to spellcheck(preview.title), "#", class: "title"
    %p.meta
      = posted_by(preview)
      Évalué à
      %span.score>= preview.bound_score
    %figure.image
      = avatar_img(current_user)
    .content
      = spellcheck(preview.body)
      - if current_user.signature.present? && !current_account.try(:hide_signature?)
        %p.signature
          = current_user.signature
    %footer.actions

- if preview.parent.try(:user_id) == current_account.user_id
  = image_tag "/images/dessins/geekscottes_005.png", alt: "Autosatisfaction récursive", title: "Autosatisfaction récursive - © Johann 'nojhan' Dréo : 2005-03-25 - Licence CC By-Sa 2.5"
- elsif preview.parent.try(:depth).to_i > 10
  = image_tag "/images/dessins/discussion.png", alt: "Discussion", title: "Discussion - © Boug metoogotmy.net : 2012 - Licence CC By-Sa 2.0 Fr"


:ruby
  description ||= ''
  role_mapping = { admin: 'administrator' }
  requires_role = %w[admin moderator].include?(privilege)
  checked = requires_role ? user.has_role?(role_mapping.fetch(privilege, privilege).to_sym) : user.public_send("#{privilege}?")
%li.list-group-item{ id: "privilege-#{privilege}" }
  .media
    .pull-left
      %input{ type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: :off }
    .media-body
      .list-group-item-heading= privilege.capitalize
      - unless description.blank?
        .list-group-item-text.text-muted= description

Fix quote style in user privilege item partial

:ruby
  description ||= ""
  role_mapping = { admin: "administrator" }
  requires_role = %w[admin moderator].include?(privilege)
  checked = requires_role ? user.has_role?(role_mapping.fetch(privilege, privilege).to_sym) : user.public_send("#{privilege}?")
%li.list-group-item{ id: "privilege-#{privilege}" }
  .media
    .pull-left
      %input{ type: :checkbox, name: "check-your-privileges", data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: :off }
    .media-body
      .list-group-item-heading= privilege.capitalize
      - unless description.blank?
        .list-group-item-text.text-muted= description


-# -*- coding: utf-8 -*-
!!!
%html
  %head
    %meta{charset: 'utf-8'}
    = stylesheet_tag 'app'
    = javascript_tag 'app'
    %title めいぼ
  %body
    %nav.navbar.navbar-inverse.navbar-static-top
      %div.container
        %div.navbar-header
          %a.navbar-brand{href: brand['uri']}= brand['name']
        %div.collapse.navbar-collapse
          %ul.nav.navbar-nav
            %li
              %a{href: absolute_uri()} 一覧
          %form.navbar-form.navbar-right{action: absolute_uri(), role: 'search'}
            %input.form-control{type: :search, name: 'q'}
            %input.btn.btn-primary{type: :submit, value: '検索'}
    - if remote_user
      %a{href: absolute_uri(remote_user)}= remote_user
    %div.container-fluid
      %div.row
        %div.col-xs-8.col-xs-offset-2
          = yield

Move remote_user to top navbar

-# -*- coding: utf-8 -*-
!!!
%html
  %head
    %meta{charset: 'utf-8'}
    = stylesheet_tag 'app'
    = javascript_tag 'app'
    %title めいぼ
  %body
    %nav.navbar.navbar-inverse.navbar-static-top
      %div.container
        %div.navbar-header
          %a.navbar-brand{href: brand['uri']}= brand['name']
        %div.collapse.navbar-collapse
          %ul.nav.navbar-nav
            %li
              %a{href: absolute_uri()} 一覧
            - if remote_user
              %li
                %a{href: absolute_uri(remote_user)}= remote_user
          %form.navbar-form.navbar-right{action: absolute_uri(), role: 'search'}
            %input.form-control{type: :search, name: 'q'}
            %input.btn.btn-primary{type: :submit, value: '検索'}
    %div.container-fluid
      %div.row
        %div.col-xs-8.col-xs-offset-2
          = yield


%td.left= a.organization
%td.left= a.asset_subtype
%td.left= a.asset_tag
%td.left= a.description

%td.left= link_to(a.parent.name, inventory_path(a.parent) ) unless a.parent.nil?
%td.right= format_as_date(a.in_service_date)
%td.right= format_as_integer(a.age)
%td.center= format_as_decimal(a.reported_condition_rating, 1)
%td.center= a.service_status_type.code unless a.service_status_type.nil?

%td.center= format_as_fiscal_year(a.scheduled_rehabilitation_year)
%td.center= format_as_fiscal_year(a.scheduled_replacement_year)

Change asset index to show in service fiscal year not date

%td.left= a.organization
%td.left= a.asset_subtype
%td.left= a.asset_tag
%td.left= a.description

%td.left= link_to(a.parent.name, inventory_path(a.parent) ) unless a.parent.nil?
%td.right= format_as_fiscal_year(a.in_service_date.year)
%td.right= format_as_integer(a.age)
%td.center= format_as_decimal(a.reported_condition_rating, 1)
%td.center= a.service_status_type.code unless a.service_status_type.nil?

%td.center= format_as_fiscal_year(a.scheduled_rehabilitation_year)
%td.center= format_as_fiscal_year(a.scheduled_replacement_year)


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

Fix 500 error on page with submodules

%tr{ class: "tree-item" }
  %td.tree-item-file-name
    = image_tag "submodule.png"
    %span
      = link_to truncate(submodule_item.name, length: 40), '#'
    @
    %span.monospace #{submodule_item.id[0..10]}
  %td
  %td
  %td


%h1= header
- item.each do |i|
  %ul
    - if i[:current]
      %li= i[:name]
    - else
      %li
        %a{:href => i[:url]}= i[:name]
- if item.empty?
  %p The list is empty.

Make the Haml template the same as ERB.

%h1= header
- if not item.empty?
  %ul
    - for i in item
      - if i[:current]
        %li
          %strong= i[:name]
      - else
        %li
          %a{:href => i[:url]}= i[:name]
- if item.empty?
  %p The list is empty.


.student_management
  %ul.students
    - course.students.each do |student|
      %li[student]
        = button_to "Remove", { :controller => 'courses/students', :action => 'destroy', :course_id => course.id, :id => student.id }, :confirm => "Are you sure you want to remove #{student.name} from #{course.name}?", :method => :delete
        = render :partial => "people/person", :locals => {:person => student.person}

  - form_tag course_students_path(course), :method => :post, :class => "add_student" do
    = select_tag 'student_id', options_from_collection_for_select(course.eligible_students, :id, :name_and_village)
    = submit_tag "Add"

:javascript
  $('document').ready(function() {
    $('.students .button-to').ajaxDelete('.student_management');
    $('.add_student').each(function(index, element) {
      element = $(element);
      var course_element = element.closest('.student_management');
      element.ajaxForm({
        url: element.attr('action') + ".js",
        success: function(responseText) {
          var data = $(responseText);
          course_element.html(data);
          ajax_up_add_student_form(data.find('.add_student'));
        }
      });
    })
  });

Fix js for adding/removing students

.student_management
  %ul.people
    - course.students.each do |student|
      %li[student]
        = button_to "Remove", { :controller => 'courses/students', :action => 'destroy', :course_id => course.id, :id => student.id }, :confirm => "Are you sure you want to remove #{student.name} from #{course.name}?", :method => :delete
        = render :partial => "people/person", :locals => {:person => student.person}

  - form_tag course_students_path(course), :method => :post, :class => "add_student" do
    = select_tag 'student_id', options_from_collection_for_select(course.eligible_students, :id, :name_and_village)
    = submit_tag "Add"

:javascript
  $('document').ready(function() {
    $('.people .button-to').ajaxDelete('.student_management');
    $('.add_student').each(function(index, element) {
      element = $(element);
      var course_element = element.closest('.student_management');
      element.ajaxForm({
        url: element.attr('action') + ".js",
        success: function(responseText) {
          var data = $(responseText);
          course_element.html(data);
          ajax_up_add_student_form(data.find('.add_student'));
        }
      });
    })
  });


%label{ :for => "source_plates" } Source plates
= text_area_tag "source_plates", '', :rows => 5,:cols => 17

:javascript
 $('#source_plates').focus();
 $('#source_plates').trigger('change');

Add a live count - number of barcodes scanned - goes red when over limit - also (20 max.) in brackets to show the limit

%label{ :for => "source_plates" } Source plates (20 max.)
= text_area_tag "source_plates", '', :rows => 5,:cols => 17
.live_results#barcodes_scanned 0 barcodes

:javascript
  $('#source_plates').focus();
  $('#source_plates').trigger('change');
  $('#source_plates').keyup(recalcNumBarcodes);

  function recalcNumBarcodes(){
    const num_barcodes = find_number_barcodes($('#source_plates').val());
    const colour = num_barcodes > 20 ? 'red' : 'black';

    $('#barcodes_scanned').text(num_barcodes + ' barcodes').css('color', colour);
  }

  function find_number_barcodes(text){
    const barcodes_list_no_blanks = text.split(/\s+/).filter(barcode => Boolean(barcode));
    const barcodes_list_unique = [...new Set(barcodes_list_no_blanks)];
    return barcodes_list_unique.length;
  }


- content_for :title, "Email Clients in the last 7 days"

.page-header
  %h1= yield :title
  %p
    Deduce the email clients that people are using from the user agent of open events. Currently,
    not dedecting web mail clients other than Gmail.

  %p
    Note that if people have image loading disabled or are using a text-only email clients they are
    not included in these results.

Update wording a little on clients page

- content_for :title, "Email Clients"

.page-header
  %h1= yield :title
  %p
    Email clients that people are using, figured out from the user agent of open events.
    Currently, it doesn't detect web mail clients other than Gmail.

  %p
    Note that if people have image loading disabled or are using a text-only
    email clients they are not included in these results.
    Also, only the first open event is included for each email.


- if user_signed_in?
  %li= link_to t_title(:timeline, Event), timeline_events_path
  %li= link_to t_model(Event), :events
  %li= link_to t_model(Team), :teams
  %li= link_to t_model(Member), :members
  %li= link_to t_model(Mentor), :mentors
  - if can?(:manage, User)
    %li= link_to t_model(User), :users

Add navigation item for dashboard

- if user_signed_in?
  %li= link_to t_title(:timeline, Event), timeline_events_path
  %li= link_to t_title(:dashboard, Rating), mentor_dashboard_index_path(current_user) if can? :manage, Rating
  %li= link_to t_model(Event), :events
  %li= link_to t_model(Team), :teams
  %li= link_to t_model(Member), :members
  %li= link_to t_model(Mentor), :mentors
  - if can?(:manage, User)
    %li= link_to t_model(User), :users


%div
  .main.panel.section
    .header
      %h2 Resend unlock instructions
    .body
      = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
        = devise_error_messages!
        .form-group.inline
          = f.label :email
          = f.email_field :email, autofocus: true
        .form-submit-inline
          = f.submit "Resend unlock instructions", :id => "submit-signup", :class => "input-submit"
      = render "users/shared/links"

Make Devise unlock email field use application CSS

%div
  .main.panel.section
    .header
      %h2 Resend unlock instructions
    .body
      = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
        = devise_error_messages!
        .form-group.inline
          = f.label :email
          = f.email_field :email, autofocus: true, :class => "input-text big"
        .form-submit-inline
          = f.submit "Resend unlock instructions", :id => "submit-signup", :class => "input-submit"
      = render "users/shared/links"


- if current_version
  .pull-right
    .btn-group
      - if show_evaluate?
        .btn-group
          %button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
            Evaluate
            %span.caret
          %ul.dropdown-menu{role: 'menu'}
            - if show_oops?
              %li= link_to 'design with OOPS', repository_ontology_ontology_version_oops_request_path(*resource_chain, current_version), method: 'post'
      - if can? :write, resource.parent
        = link_to 'Edit', [:edit, *resource_chain], class: 'btn btn-default'
      - if Settings.format_selection
        .btn-group
          %button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
            Formats
            %span.caret
          %ul.dropdown-menu{role: 'menu'}
            - %w(xml json).each do |f|
              %li= link_to f.upcase, format: f

Test ability on repository, not parent (distributed) ontology.

- if current_version
  .pull-right
    .btn-group
      - if show_evaluate?
        .btn-group
          %button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
            Evaluate
            %span.caret
          %ul.dropdown-menu{role: 'menu'}
            - if show_oops?
              %li= link_to 'design with OOPS', repository_ontology_ontology_version_oops_request_path(*resource_chain, current_version), method: 'post'
      - if can? :write, resource.repository
        = link_to 'Edit', [:edit, *resource_chain], class: 'btn btn-default'
      - if Settings.format_selection
        .btn-group
          %button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
            Formats
            %span.caret
          %ul.dropdown-menu{role: 'menu'}
            - %w(xml json).each do |f|
              %li= link_to f.upcase, format: f


- content_for :title do
  Policy history for “#{@policy.name}”

.page-header.row
  %nav.header-actions.col-md-3
    =link_to_if(@policy, "Edit", edit_policy_path(@policy), :title => "Change title and definition of policy", :class => "btn btn-default btn-xs")
    =link_to "New policy", new_policy_path, :class => "btn btn-primary btn-xs"
  -# TODO This title is just a stop-gap. Make it not suck.
  %h1.col-md-9= yield :title

%ul
  - PaperTrail::Version.where(policy_id: @policy.id).order(created_at: :desc).each do |version|
    %li= version_sentence(version)

Tweak title for policy history page

- content_for :title do
  Recent history for “#{@policy.name}”

.page-header.row
  %nav.header-actions.col-md-3
    =link_to_if(@policy, "Edit", edit_policy_path(@policy), :title => "Change title and definition of policy", :class => "btn btn-default btn-xs")
    =link_to "New policy", new_policy_path, :class => "btn btn-primary btn-xs"
  -# TODO This title is just a stop-gap. Make it not suck.
  %h1.col-md-9= yield :title

%ul
  - PaperTrail::Version.where(policy_id: @policy.id).order(created_at: :desc).each do |version|
    %li= version_sentence(version)


- page_title "Keys", @user.name, "Users"
= render 'admin/users/head'
= render 'profiles/keys/key_table', admin: true

Improve consistency of SSH Keys title in administration area

- page_title "SSH Keys", @user.name, "Users"
= render 'admin/users/head'
= render 'profiles/keys/key_table', admin: true


#form_login
  = image_tag('logo-tps.png')
  %br
  %h2#login_user Connexion

  %a.btn_fc#btn_fcp{href: '/france_connect/particulier'}
    = image_tag 'franceconnect_logo.png'

  %br
  %a.text-info{href: '#', target: '_blank'}
    Qu’est-ce que FranceConnect ?

  %hr
  = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
    %h4
      = f.label :email
    .input-group
      .input-group-addon
        %span.fa.fa-user
      = f.email_field :email, class: 'form-control'
    %br
    %h4
      = f.label :password
    .input-group
      .input-group-addon
        %span.fa.fa-asterisk
      = f.password_field :password, autocomplete: "off", class: 'form-control'
    %br
    %br
    .actions
      = f.submit "Se connecter", class:'btn btn-primary'
    %br

  = render "users/shared/links"

  %div{style:'text-align:center'}
    \-
    %br
    %a{href: '/gestionnaires/sign_in'}
      = 'Accompagnateur'
    %br
    %a{href: '/administrateurs/sign_in'}
      = 'Administrateur'

Add link for "Qu'est ce que FranceConnect?"

#form_login
  = image_tag('logo-tps.png')
  %br
  %h2#login_user Connexion

  %a.btn_fc#btn_fcp{href: '/france_connect/particulier'}
    = image_tag 'franceconnect_logo.png'

  %br
  %a.text-info{href: 'https://fcp.integ01.dev-franceconnect.fr/a-propos', target: '_blank'}
    Qu’est-ce que FranceConnect ?

  %hr
  = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
    %h4
      = f.label :email
    .input-group
      .input-group-addon
        %span.fa.fa-user
      = f.email_field :email, class: 'form-control'
    %br
    %h4
      = f.label :password
    .input-group
      .input-group-addon
        %span.fa.fa-asterisk
      = f.password_field :password, autocomplete: "off", class: 'form-control'
    %br
    %br
    .actions
      = f.submit "Se connecter", class:'btn btn-primary'
    %br

  = render "users/shared/links"

  %div{style:'text-align:center'}
    \-
    %br
    %a{href: '/gestionnaires/sign_in'}
      = 'Accompagnateur'
    %br
    %a{href: '/administrateurs/sign_in'}
      = 'Administrateur'


- content_for :title, 'Welcome Page'
.site-wrapper
  .site-wrapper-inner
    .cover-container
      .masthead.clearfix
        .inner
          %h3.masthead-brand= t(".generic")
          %ul.nav.masthead-nav
            %li.active
              %a{:href => "#"}= t(".home")
            %li
              %a{:href => "#"}= t(".about_us")
            %li
              %a{:href => "#"}= t(".contact")
      .inner.cover
        %h1.cover-heading= t(".demo_application")
        %p.lead= t(".demo_app_description")
        %p.lead
          %a.btn.btn-lg.btn-primary{:href => new_user_session_path}= t(".sign_in")
      .mastfoot
        .inner
          %p
            = t(".all_rights_reserved")
            = succeed "," do
              %a.test-auto-prefixer{:href => "#"}= t(".generic")

:javascript
  RailsFoo.welcome.setup()

Add sign_out button to main page after sign in

- content_for :title, 'Welcome Page'
.site-wrapper
  .site-wrapper-inner
    .cover-container
      .masthead.clearfix
        .inner
          %h3.masthead-brand= t(".generic")
          %ul.nav.masthead-nav
            - if user_signed_in?
              %li
                = "You are logged in as #{current_user.email}"
              %li.active
                = link_to t('navigation.logout'), destroy_user_session_path, :method=>'delete'
            - else
              %li.active
                %a{:href => "#"}= t(".home")
              %li
                %a{:href => "#"}= t(".about_us")
              %li
                %a{:href => "#"}= t(".contact")
      .inner.cover
        %h1.cover-heading= t(".demo_application")
        %p.lead= t(".demo_app_description")
        %p.lead
          %a.btn.btn-lg.btn-primary{:href => new_user_session_path}= t(".sign_in")
      .mastfoot
        .inner
          %p
            = t(".all_rights_reserved")
            = succeed "," do
              %a.test-auto-prefixer{:href => "#"}= t(".generic")

:javascript
  RailsFoo.welcome.setup()


%h4.prepend-top-20
  = s_('ClusterIntegration|Enter the details for your cluster')
%p
  = s_('ClusterIntegration|Please make sure that your Google account meets the following requirements:')
%ul
  %li
    - link_to_kubernetes_engine = link_to(s_('ClusterIntegration|access to Google Kubernetes Engine'), 'https://console.cloud.google.com', target: '_blank', rel: 'noopener noreferrer')
    = s_('ClusterIntegration|Your account must have %{link_to_kubernetes_engine}').html_safe % { link_to_kubernetes_engine: link_to_kubernetes_engine }
    %li
      - link_to_requirements = link_to(s_('ClusterIntegration|meets the requirements'), 'https://cloud.google.com/kubernetes-engine/docs/quickstart', target: '_blank', rel: 'noopener noreferrer')
      = s_('ClusterIntegration|Make sure your account %{link_to_requirements} to create clusters').html_safe % { link_to_requirements: link_to_requirements }
    %li
      - link_to_container_project = link_to(s_('ClusterIntegration|Google Kubernetes Engine project'), target: '_blank', rel: 'noopener noreferrer')
      = s_('ClusterIntegration|This account must have permissions to create a cluster in the %{link_to_container_project} specified below').html_safe % { link_to_container_project: link_to_container_project }

Add url to link in new GCP cluster header partial

%h4.prepend-top-20
  = s_('ClusterIntegration|Enter the details for your cluster')
%p
  = s_('ClusterIntegration|Please make sure that your Google account meets the following requirements:')
%ul
  %li
    - link_to_kubernetes_engine = link_to(s_('ClusterIntegration|access to Google Kubernetes Engine'), 'https://console.cloud.google.com', target: '_blank', rel: 'noopener noreferrer')
    = s_('ClusterIntegration|Your account must have %{link_to_kubernetes_engine}').html_safe % { link_to_kubernetes_engine: link_to_kubernetes_engine }
    %li
      - link_to_requirements = link_to(s_('ClusterIntegration|meets the requirements'), 'https://cloud.google.com/kubernetes-engine/docs/quickstart', target: '_blank', rel: 'noopener noreferrer')
      = s_('ClusterIntegration|Make sure your account %{link_to_requirements} to create clusters').html_safe % { link_to_requirements: link_to_requirements }
    %li
      - link_to_container_project = link_to(s_('ClusterIntegration|Google Kubernetes Engine project'), 'https://console.cloud.google.com/home/dashboard', target: '_blank', rel: 'noopener noreferrer')
      = s_('ClusterIntegration|This account must have permissions to create a cluster in the %{link_to_container_project} specified below').html_safe % { link_to_container_project: link_to_container_project }


.topbar-wrapper
  .topbar{"data-dropdown" => "dropdown"}
    .topbar-inner
      .container-fluid
        %h3
          = link_to "Circle", root_path, :class => :brand

        = render :partial => 'topbar_middle'

        %ul.nav.secondary-nav
          %li.dropdown
            = link_to current_user.email, '#', :class => "dropdown-toggle"
            %ul.dropdown-menu
              %li
                = link_to('Add more projects', join_path)
              %li
                = link_to('Logout', destroy_user_session_path, :method => :delete)

-# - if user_signed_in?
-#   %li
-#     = link_to('Logout', destroy_user_session_path, :method=>'delete')
-# - else
-#   %li
-#     = link_to('Login', new_user_session_path)

-#- if user_signed_in?
-#  %li
-#    = link_to('Edit account', edit_user_registration_path)

-# -else
-#   %li
-#     = link_to('Sign up', new_user_registration_path)

Remove dead code in shared/navigation.


- if flash[:error]
  .highlight--box.highlight--caution__soft
    %p= flash[:error]

%p= t('.search_by_postcode')

= form_tag(path, method: :post) do
  .form-group
    = hidden_field_tag('previous_path', request.env['PATH_INFO'])
    = hidden_field_tag('constituency_id', @constituency.graph_id) if @constituency
    = hidden_field_tag('person_id', @person.graph_id) if @person
    = text_field_tag('postcode', @postcode)
    - submit_text = @person.nil? && @constituency.nil? ? "Find" : "Check"
    = submit_tag(submit_text, class: 'btn--secondary')

%p= t('.do_not_know_postcode', link: link_to(t('.do_not_know_postcode_link'), 'http://www.royalmail.com/find-a-postcode', target: '_blank', title: t('open_new_window'))).html_safe

Add label to postcode input

- if flash[:error]
  .highlight--box.highlight--caution__soft
    %p= flash[:error]

= form_tag(path, method: :post) do
  .form-group
    = hidden_field_tag('previous_path', request.env['PATH_INFO'])
    = hidden_field_tag('constituency_id', @constituency.graph_id) if @constituency
    = hidden_field_tag('person_id', @person.graph_id) if @person
    = label_tag 'postcode', t('.search_by_postcode')
    = text_field_tag('postcode', @postcode)
    - submit_text = @person.nil? && @constituency.nil? ? "Find" : "Check"
    = submit_tag(submit_text, class: 'btn--secondary')

%p= t('.do_not_know_postcode', link: link_to(t('.do_not_know_postcode_link'), 'http://www.royalmail.com/find-a-postcode', target: '_blank', title: t('open_new_window'))).html_safe


.recipient
  - @messages.each do |user, threads|
    %h2
      %a{:href => "./#{user}/"}
        - if @addresses.has_key? user
          = @addresses[user]['label']
        - else
          = user

Send link on chan list

.recipient
  - @messages.each do |user, threads|
    %h2
      %a{:href => "./#{user}/"}
        - if @addresses.has_key? user
          = @addresses[user]['label']
        - else
          = user
      %a{:href => "/messages/compose/?to=#{CGI.escape(user)}"}
        [send]


= simple_form_for @person, :html => {:multipart => true} do |f|
  %fieldset
    = f.error_notification
    .form-group
      = f.input :given_name, as: :string
    .form-group
      = f.input :surname, as: :string
    .form-group
      = f.input :location, as: :string
    .form-group
      = f.input :phone, as: :string
    .form-group
      = f.input :mobile, as: :string
    .form-group
      = f.input :email, as: :string
    .form-group
      = f.input :description

    .form-group
      %label.form-label-bold Working days
      - Person::DAYS_WORKED.each do |day|
        = f.input day, as: :boolean, label: day_name(day), label_html: { class: 'block-label' }
    .form-group
      = f.input :image, as: :file
    .form-group
      = f.button :submit

    - unless @person.new_record?
      .form-group
        = link_to 'Delete this record', @person, method: :delete
      %p= link_to 'Back', @person

Add prompt text to working days on edit profile

= simple_form_for @person, :html => {:multipart => true} do |f|
  %fieldset
    = f.error_notification
    .form-group
      = f.input :given_name, as: :string
    .form-group
      = f.input :surname, as: :string
    .form-group
      = f.input :location, as: :string
    .form-group
      = f.input :phone, as: :string
    .form-group
      = f.input :mobile, as: :string
    .form-group
      = f.input :email, as: :string
    .form-group
      = f.input :description

    .form-group
      %label.form-label-bold Working days
      Select all that apply
      - Person::DAYS_WORKED.each do |day|
        = f.input day, as: :boolean, label: day_name(day), label_html: { class: 'block-label' }
    .form-group
      = f.input :image, as: :file
    .form-group
      = f.button :submit

    - unless @person.new_record?
      .form-group
        = link_to 'Delete this record', @person, method: :delete
      %p= link_to 'Back', @person


- content_for :actions do
  %li
    = link_to 'delete drink', @drink, method: :delete, confirm: "Really delete drink #{@drink.name}?"

= semantic_form_for @drink, :html => { :class => 'form-horizontal' } do |f|
  = f.semantic_errors
  = f.inputs  do
    = f.input :name, hint:'the label says…'
    = f.input :price, as: :number, hint:'e.g. 1.50'
    = f.input :bottle_size, hint: '0.5 or 0.33?'
    = f.input :caffeine, hint: 'in mg/100 ml'
    = f.input :logo, hint: 'make it look pretty'
    = f.input :active
  = f.actions do
    = f.action :submit

Disable the price field in the edit drink form.

- content_for :actions do
  %li
    = link_to 'delete drink', @drink, method: :delete, confirm: "Really delete drink #{@drink.name}?"

= semantic_form_for @drink, :html => { :class => 'form-horizontal' } do |f|
  = f.semantic_errors
  = f.inputs  do
    = f.input :name, hint:'the label says…'
    = f.input :price, as: :number, hint:'e.g. 1.50; locked due to vandalism', :input_html => { :disabled => true }
    = f.input :bottle_size, hint: '0.5 or 0.33?'
    = f.input :caffeine, hint: 'in mg/100 ml'
    = f.input :logo, hint: 'make it look pretty'
    = f.input :active
  = f.actions do
    = f.action :submit


.row
  .col-xs-12
    %h1 Movies

    = render 'movie_filters_nav'

.row
  - @movies.each do |movie|
    .col-xs-6.col-sm-4.col-md-3.col-lg-2
      = link_to movie_path(movie.id), class: 'thumbnail' do
        = image_tag(poster_url(movie), alt: movie.title)

Fix broken grid for images with different height

.row
  .col-xs-12
    %h1 Movies

    = render 'movie_filters_nav'

.row
  - @movies.each_with_index do |movie, i|
    .col-xs-6.col-sm-4.col-md-3.col-lg-2
      = link_to movie_path(movie.id), class: 'thumbnail' do
        = image_tag poster_url(movie), alt: movie.title
    - if (i + 1) % 6 == 0
      .clearfix.visible-lg-block
    - if (i + 1) % 4 == 0
      .clearfix.visible-md-block
    - if (i + 1) % 3 == 0
      .clearfix.visible-sm-block
    - if i.odd?
      .clearfix.visible-xs-block


.page-header
    %h2= @record.punchcard.name

%h4
    = @record.date.strftime("%A %B %d %Y")
    %small
        %i.fa.fa-clock-o
        = @record.hours

= simple_format h markdown(@record.description)

%hr

= link_to root_path do
    %i.fa.fa-arrow-left
    Back

Add edit and delete options to record show view

.page-header
    %h2= @record.punchcard.name

%h4
    = @record.date.strftime("%A %B %d %Y")
    %small
        %i.fa.fa-clock-o
        = @record.hours

= simple_format h markdown(@record.description)

.text-center
    %ul.list-inline
        %li
            = link_to [:edit, @card, @record] do
                %i.fa.fa-pencil
                Edit Record
        %li
            = link_to [@card, @record], method: :delete, data: { confirm: 'Are you sure?' } do
                %i.fa.fa-trash
                Delete Record

%hr

= link_to root_path do
    %i.fa.fa-arrow-left
    Back


- breadcrumb_title "Cluster"
- page_title _("Login")

.row.prepend-top-default
  .col-sm-4
    = render 'projects/clusters/sidebar'
  .col-sm-8
    = render 'projects/clusters/dropdown', dropdown_text: s_('ClusterIntegration|Create cluster on Google Kubernetes Engine')
    = render 'header'
.row
  .col-sm-8.col-sm-offset-4.signin-with-google
    - if @authorize_url
      = link_to @authorize_url do
        = image_tag('auth_buttons/signin_with_google.png', width: '191px')
      = s_('ClusterIntegration|or create a new')
      = link_to('Google account', 'https://accounts.google.com/SignUpWithoutGmail?service=cloudconsole&continue=https%3A%2F%2Fconsole.cloud.google.com%2Ffreetrial%3Futm_campaign%3D2018_cpanel%26utm_source%3Dgitlab%26utm_medium%3Dreferral', target: '_blank', rel: 'noopener noreferrer')
    - else
      - link = link_to(s_('ClusterIntegration|properly configured'), help_page_path("integration/google"), target: '_blank', rel: 'noopener noreferrer')
      = s_('Google authentication is not %{link_to_documentation}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_to_documentation: link }

Change link for creating a new Google account

- breadcrumb_title "Cluster"
- page_title _("Login")

.row.prepend-top-default
  .col-sm-4
    = render 'projects/clusters/sidebar'
  .col-sm-8
    = render 'projects/clusters/dropdown', dropdown_text: s_('ClusterIntegration|Create cluster on Google Kubernetes Engine')
    = render 'header'
.row
  .col-sm-8.col-sm-offset-4.signin-with-google
    - if @authorize_url
      = link_to @authorize_url do
        = image_tag('auth_buttons/signin_with_google.png', width: '191px')
      = _('or')
      = link_to('create a new Google account', 'https://accounts.google.com/SignUpWithoutGmail?service=cloudconsole&continue=https%3A%2F%2Fconsole.cloud.google.com%2Ffreetrial%3Futm_campaign%3D2018_cpanel%26utm_source%3Dgitlab%26utm_medium%3Dreferral', target: '_blank', rel: 'noopener noreferrer')
    - else
      - link = link_to(s_('ClusterIntegration|properly configured'), help_page_path("integration/google"), target: '_blank', rel: 'noopener noreferrer')
      = s_('Google authentication is not %{link_to_documentation}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_to_documentation: link }


%table.head-wrap{ bgcolor: "#fdfdfd" }
  %tr
    %td
    %td.header.container

      .content
        %table{ bgcolor: "#fdfdfd" }
          %tr
            %td
              = image_tag 'https://raw.githubusercontent.com/codebar/assets/master/logo/png/logotype.png', alt: "codebar logo"
            %td{ align: "right"}
              %h6.collapse= title
    %td

Fix the logo in email header

%table.head-wrap{ bgcolor: "#fdfdfd" }
  %tr
    %td
    %td.header.container

      .content
        %table{ bgcolor: "#fdfdfd" }
          %tr
            %td
              = image_tag 'https://github.com/codebar/assets/blob/master/logo/png/160x160px/logotype-160.png', alt: "codebar logo"
            %td{ align: "right"}
              %h6.collapse= title
    %td


/ XXX: Pull out the labels from a config file.
.row.pull-right.align-right
  = link_to new_patient_path, class: "btn btn-success" do
    <i class="fa fa-male"></i> Nuevo paciente

%table.table.table-striped
  %thead
    %tr
      %th Historia
      %th Apellidos
      %th Nombres
      %th Sexo
      %th Fecha Nacimiento
  %tbody
  - @patients.each do |patient|
    %tr
      %td= patient.medical_history
      %td= patient.last_name
      %td= patient.first_name
      %td= patient.gender
      %td= patient.birthdate.strftime("%Y-%m-%d")

Remove icon from new patient button

/ XXX: Pull out the labels from a config file.
.row.pull-right.align-right
  = link_to "Nuevo paciente", new_patient_path, class: "btn btn-success"

%table.table.table-striped
  %thead
    %tr
      %th Historia
      %th Apellidos
      %th Nombres
      %th Sexo
      %th Fecha Nacimiento
  %tbody
  - @patients.each do |patient|
    %tr
      %td= patient.medical_history
      %td= patient.last_name
      %td= patient.first_name
      %td= patient.gender
      %td= patient.birthdate.strftime("%Y-%m-%d")


%h4.center Et voilà!
.row
  .col.s12.l6.offset-l3.m8.offset-m2
    .card
      .card-content
        %p
          Ton mot de passe a été changé pour toutes les applications de la communauté ainsi que pour ton
          %b compte mail Google Gadz.org
          si tu en as un.

        %p La synchronisation des mots de passe va mettre quelques minutes à se faire, patience !

        /%p À partir de maintenant, pour te connecter sur #{ link_to "le site de la SOCE", 'http://www.arts-et-metiers.asso.fr/index.php/user/login'}, pense à utiliser l'"Authentification universelle".

        / %h3 Ton avis nous intéresse
        / %p Qu'as-tu pensé du nouveau système de récupération de mot de passe?
        / %p => sondage here!

Add link to status page

%h4.center Et voilà!
.row
  .col.s12.l6.offset-l3.m8.offset-m2
    .card
      .card-content
        %p
          Ton mot de passe Arts et Métiers Alumni a été changé ainsi que pour ton
          %b compte mail Google Gadz.org
          si tu en as un.
        %br

        %p La synchronisation des mots de passe peu mettre quelques minutes, patience !
        %br
        %p En cas de doutes sur le bon fonctionnement des services, tu peux visiter la page de status :
          = link_to "status.gadz.org", "https://status.gadz.org/", target: "_blank", rel: "nofollow"

        /%p À partir de maintenant, pour te connecter sur #{ link_to "le site de la SOCE", 'http://www.arts-et-metiers.asso.fr/index.php/user/login'}, pense à utiliser l'"Authentification universelle".

        / %h3 Ton avis nous intéresse
        / %p Qu'as-tu pensé du nouveau système de récupération de mot de passe?
        / %p => sondage here!


= render partial: "group/tabs"

%header
- if @group.prefs.notify_membership_requests && @group.prefs.membership_secretary.nil? && @group.email.blank?
  %p.warning
    = image_tag 'warning-24.png'
    = t ".no_email_warning"
  %h2= t ".title"

%section
  = render "form"

Tweak form to pass test that checks for title.


- if @organization.events.future.empty?
  .alert.alert-info
    There are no upcoming events.  You should #{link_to 'add an event', '/events/new?event[organization_id]=' + @organization.id.to_s} or #{link_to 'import event(s)', new_organization_source_path(@organization)}.

%h1= @organization.name

%p
  %b URL:
  = source_url_link @organization

- unless @organization.topics.blank?
  %p
    %b Topics:
    = render :partial => 'shared/topics', :locals => {:topics => @organization.topics}

%p
  %b Events:
  = render :partial => 'events/list', :locals => { :events =>  @organization.events }

- content_for :sidebar do
  .box
    %ul
      %li= link_to 'Add an event', '/events/new?event[organization_id]=' + @organization.id.to_s
      -# XXX TODO - last line is a hack.  Should use something like new_event_url after updating routes.rb,
      -#              or figure out how to set params to pass org id.
      %li= link_to 'Import event or calendar', new_organization_source_path(@organization)
      %li= link_to 'Edit this organization', edit_organization_url
  -# link_to 'Destroy', @organization, :confirm => 'Are you sure?', :method => :delete

Sort events by date when viewing Organization.

- if @organization.events.future.empty?
  .alert.alert-info
    There are no upcoming events.  You should #{link_to 'add an event', '/events/new?event[organization_id]=' + @organization.id.to_s} or #{link_to 'import event(s)', new_organization_source_path(@organization)}.

%h1= @organization.name

%p
  %b URL:
  = source_url_link @organization

- unless @organization.topics.blank?
  %p
    %b Topics:
    = render :partial => 'shared/topics', :locals => {:topics => @organization.topics}

%p
  %b Events:
  = render :partial => 'events/list', :locals => { :events =>  @organization.events.sort_by(&:start_time) }

- content_for :sidebar do
  .box
    %ul
      %li= link_to 'Add an event', '/events/new?event[organization_id]=' + @organization.id.to_s
      -# XXX TODO - last line is a hack.  Should use something like new_event_url after updating routes.rb,
      -#              or figure out how to set params to pass org id.
      %li= link_to 'Import event or calendar', new_organization_source_path(@organization)
      %li= link_to 'Edit this organization', edit_organization_url
  -# link_to 'Destroy', @organization, :confirm => 'Are you sure?', :method => :delete


%h2 Forgot your password?
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
  = devise_error_messages!
  %div
    = f.label :email
    %br/
    = f.email_field :email
  %div= f.submit "Send me reset password instructions"
= render :partial => "devise/shared/links"

Reset password form now uses Bootstrap.

%h2 Forgot your password?
= bootstrap_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
  = devise_error_messages!
  %div
    = f.email_field :email
  %div= f.submit "Send me reset password instructions"
= render :partial => "devise/shared/links"


%nav.nav.navbar-default.constraint{:role => "navigation"}
  / Brand and toggle get grouped for better mobile display
  .navbar-header
    %a#logo.toiletLogo{:href => "/"}
    = link_to 'Welcome Home', root_path, class: 'navbar-brand'
    %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
      %span.sr-only Toggle navigation
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
  / Collect the nav links, forms, and other content for toggling
  #bs-example-navbar-collapse-1.collapse.navbar-collapse
    %ul.nav.navbar-nav
      %li= link_to "Submit a New Home", new_home_path
      %li= link_to 'Contact', contact_path
  / /.navbar-collapse

Remove toilet logo from navigation

%nav.nav.navbar-default.constraint{:role => "navigation"}
  / Brand and toggle get grouped for better mobile display
  .navbar-header
    = link_to 'Welcome Home', root_path, class: 'navbar-brand'
    %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
      %span.sr-only Toggle navigation
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
  / Collect the nav links, forms, and other content for toggling
  #bs-example-navbar-collapse-1.collapse.navbar-collapse
    %ul.nav.navbar-nav
      %li= link_to "Submit a New Home", new_home_path
      %li= link_to 'Contact', contact_path
  / /.navbar-collapse


!!! 5
%html
  %head
    %title Radvent
    %meta{"http-equiv"=>"X-UA-Compatible", :content=>"IE=Edge"}
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    %link{:href=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css", :rel=>"stylesheet"}
    %script{:src=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"}
    %link{:href=>"//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/flatly/bootstrap.min.css", :rel=>"stylesheet"}
    %link{:href=>"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css", :rel=>"stylesheet"}
    %link{:href=>"//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/default.min.css", :rel=>"stylesheet"}
    %script{:src=>"//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"}
    :javascript
      hljs.initHighlightingOnLoad()
  %body
    = yield

Change page title to lowercase

!!! 5
%html
  %head
    %title radvent
    %meta{"http-equiv"=>"X-UA-Compatible", :content=>"IE=Edge"}
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
    %link{:href=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css", :rel=>"stylesheet"}
    %script{:src=>"//netdna.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"}
    %link{:href=>"//maxcdn.bootstrapcdn.com/bootswatch/3.3.0/flatly/bootstrap.min.css", :rel=>"stylesheet"}
    %link{:href=>"//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css", :rel=>"stylesheet"}
    %link{:href=>"//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/default.min.css", :rel=>"stylesheet"}
    %script{:src=>"//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"}
    :javascript
      hljs.initHighlightingOnLoad()
  %body
    = yield


%h2 Harvests

- if can? :edit, @planting
  %a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
    = harvest_icon
    Record harvest

  .dropdown-menu.dropdown-secondary
    - PlantPart.all.each do |plant_part|
      = link_to harvests_path(return: 'planting', harvest: {crop_id: @planting.crop_id, planting_id: @planting.id, plant_part_id: plant_part.id}), method: :post, class: 'dropdown-item' do
        = plant_part.name

- if @planting.harvests.empty?
  %p No harvests recorded
  - if !planting.finished? && can?(:edit, planting) && can?(:create, Harvest)
    %p Record your harvests here to improve crop predictions, and you'll be able to compare with your garden next season.
- else
  .index-cards
    - @planting.harvests.each do |harvest|
      = render 'harvests/thumbnail', harvest: harvest

Use planting, not @planting, in plantings/harvests view

%h2 Harvests

- if can? :edit, planting
  %a.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
    = harvest_icon
    Record harvest

  .dropdown-menu.dropdown-secondary
    - PlantPart.all.each do |plant_part|
      = link_to harvests_path(return: 'planting', harvest: {crop_id: planting.crop_id, planting_id: planting.id, plant_part_id: plant_part.id}), method: :post, class: 'dropdown-item' do
        = plant_part.name

- if planting.harvests.empty?
  %p No harvests recorded
  - if !planting.finished? && can?(:edit, planting) && can?(:create, Harvest)
    %p Record your harvests here to improve crop predictions, and you'll be able to compare with your garden next season.
- else
  .index-cards
    - planting.harvests.each do |harvest|
      = render 'harvests/thumbnail', harvest: harvest


%tr
  = f.fields_for "", edit_booking do |f|
    %td.span2= f.text_field :value_date, :style => 'width: 96%'
    %td.span6
      = f.text_field :title, :style => 'width: 98%'
      = f.text_field :comments, :style => 'width: 98%'
    %td.span1= f.text_field :amount, :style => 'width: 94%'
    %td.span1= f.text_field :credit_account_code, :style => 'width: 94%'
    %td.span1= f.text_field :debit_account_code, :style => 'width: 94%'
    %td{:style => 'display:none'}= f.hidden_field :id

Add reference field to booking edit sheet in account view.

%tr
  = f.fields_for "", edit_booking do |f|
    %td.span2= f.text_field :value_date, :style => 'width: 96%'
    %td.span6
      = f.text_field :title, :style => 'width: 98%'
      = f.text_field :comments, :style => 'width: 98%'
      = f.hidden_field :reference_type, :value => 'Invoice'
      = f.select :reference_id, suggested_invoices_for_booking(f.object), :include_blank => true, :style => 'width: 98%', :class => 'combobox'
    %td.span1= f.text_field :amount, :style => 'width: 94%'
    %td.span1= f.text_field :credit_account_code, :style => 'width: 94%'
    %td.span1= f.text_field :debit_account_code, :style => 'width: 94%'
    %td{:style => 'display:none'}= f.hidden_field :id


%section#node-streetview
  %h2
    Streetview:
  = image_tag("http://maps.googleapis.com/maps/api/streetview?size=625x416&location=#{node_streetview.lat},#{node_streetview.lon}&sensor=false", alt: "Streetview: #{node_streetview.headline}")

Use the largest possible version of street view image.

%section#node-streetview
  %h2
    Streetview:
  = image_tag("http://maps.googleapis.com/maps/api/streetview?size=640x426&location=#{node_streetview.lat},#{node_streetview.lon}&sensor=false", alt: "Streetview: #{node_streetview.headline}")