- content_for :after_title, ' - Usage Stats'
%header.main-page
  .container
    %h1 Usage Stats
.container
  %section
    .section-header
      %h3
        = "Total users: #{@user_count}"
        %br
        = "OAuth users: #{@logged_in_count}"
        %br
        = "Unique program facilitators / course instructors: #{@course_instructor_count}"
        %br
        = "Unique project home wikis: #{@home_wiki_count}"
        %br
        = "Unique wikis interacted with: #{@total_wikis_touched}"
  %section
    .section-header
      Courses / Programs per wiki:
      - Wiki.find_each do |wiki|
        %li
          = "#{wiki.domain}: #{Course.where(home_wiki: wiki).count}"

  %section
    .section-header
      %button.button.dark{href: '/all_courses_csv'} Generate CSV of all programs

Fix CSV link in usage page

- content_for :after_title, ' - Usage Stats'
%header.main-page
  .container
    %h1 Usage Stats
.container
  %section
    .section-header
      %h3
        = "Total users: #{@user_count}"
        %br
        = "OAuth users: #{@logged_in_count}"
        %br
        = "Unique program facilitators / course instructors: #{@course_instructor_count}"
        %br
        = "Unique project home wikis: #{@home_wiki_count}"
        %br
        = "Unique wikis interacted with: #{@total_wikis_touched}"
  %section
    .section-header
      Courses / Programs per wiki:
      - Wiki.find_each do |wiki|
        %li
          = "#{wiki.domain}: #{Course.where(home_wiki: wiki).count}"

  %section
    .section-header
      %a.button.dark{href: '/all_courses_csv'} Generate CSV of all programs


- if can? :destroy, @scraper
  .panel.panel-danger
    .panel-heading
      %h3.panel-title Here be dragons!
    .panel-body
      %p
        %strong Watch out! These actions can't be undone.
    %ul.list-group
      %li.list-group-item
        %h4 Clear this scraper’s database
        %p All your data will be gone!
        = button_to "Clear database", clear_scraper_path(@scraper), {class: "btn btn-danger", data: {confirm: "All your data will be gone!"}}
      %li.list-group-item
        %h4 Delete this scraper
        %p Delete the entire scraper from morph.io, data and all.
        = button_to "Delete scraper", @scraper, {method: :delete, class: "btn btn-danger", data: {confirm: "Delete #{@scraper.full_name}?"}}

Reformat button helper for readability (refactor only)

- if can? :destroy, @scraper
  .panel.panel-danger
    .panel-heading
      %h3.panel-title Here be dragons!
    .panel-body
      %p
        %strong Watch out! These actions can't be undone.
    %ul.list-group
      %li.list-group-item
        %h4 Clear this scraper’s database
        %p All your data will be gone!
        = button_to "Clear database", clear_scraper_path(@scraper),
          {class: "btn btn-danger", data: {confirm: "All your data will be gone!"}}
      %li.list-group-item
        %h4 Delete this scraper
        %p Delete the entire scraper from morph.io, data and all.
        = button_to "Delete scraper", @scraper,
          {class: "btn btn-danger", method: :delete, data: {confirm: "Delete #{@scraper.full_name}?"}}


%h2 Edit donator

.row
  .col-md-9
    = simple_form_for(@donator, url: url_for(controller: "donators", action: "update"), :html => { :class => 'form' }) do |f|
      = f.input :expires_at, :as => :string, :input_html => { :value => I18n.l(@donator.expires_at, :format => :datepicker), :data => { :"datepicker-format" => "dd-mm-yyyy hh:ii", :"datepicker-nodefault" => "false" } }, :label => "Expires at"

      .col-md-offset-2
        %button.btn.btn-default{:type => :submit}
          Update

= render "datepicker_options"

Fix exception on date localization when editing a donator with no expires_at

%h2 Edit donator

.row
  .col-md-9
    = simple_form_for(@donator, url: url_for(controller: "donators", action: "update"), html: { class: 'form' }) do |f|
      = f.input :expires_at, as: :string, input_html: { value: @donator.expires_at && I18n.l(@donator.expires_at, format: :datepicker), data: { "datepicker-format": "dd-mm-yyyy hh:ii", "datepicker-nodefault": "false" } }, label: "Expires at"

      .col-md-offset-2
        %button.btn.btn-default{type: :submit}
          Update

= render "datepicker_options"


- content_for :title do
  Gallery

.row
  .col-md-12
    .embed-responsive.embed-responsive-16by9
      %a{"data-flickr-embed"=>"true", "data-context"=>"true", href: "https://www.flickr.com/photos/104068895@N07/28144578805/in/pool-hackweek/", title: "P1010240"}
        %img{src: "https://c1.staticflickr.com/8/7434/28144578805_03accc52c5_b.jpg", width: "100%", height: "768"}
      %script{async: true, src: "//embedr.flickr.com/assets/client-code.js", charset: "utf-8"}

Switch back to old flash based flickr group slideshow

- content_for :title do
  Gallery

.row
  .col-md-12
    .embed-responsive.embed-responsive-16by9
      %object
        %param{name: "flashvars", value: "offsite=true&lang=en-us&page_show_url=%2Fgroups%2Fhackweek%2Fpool%2Fshow%2F&page_show_back_url=%2Fgroups%2Fhackweek%2Fpool%2F&group_id=366038@N24&jump_to=&start_index="}
        %param{name: "movie", value: "https://www.flickr.com/apps/slideshow/show.swf?v=261948265"}
        %param{name: "allowFullScreen", value: "true"}
        %embed{type: "application/x-shockwave-flash",
               src: "https://www.flickr.com/apps/slideshow/show.swf?v=261948265",
               allowFullScreen: "true",
               flashvars: "offsite=true&lang=en-us&page_show_url=%2Fgroups%2Fhackweek%2Fpool%2Fshow%2F&page_show_back_url=%2Fgroups%2Fhackweek%2Fpool%2F&group_id=366038@N24&jump_to=&start_index=" }


.homepage
  %h2.main-header=t(:get_problems_fixed)
  .problem-form-wrapper
    .problem-form
      =t(:do_you_want_to_report)
      .problem-options
        %span.link-button
          =link_to(t(:stop_or_station), find_stop_problems_url)
        =t(:or_on_a)
        %span.link-button
          =link_to(t(:route), '')

Add link to route finding

.homepage
  %h2.main-header=t(:get_problems_fixed)
  .problem-form-wrapper
    .problem-form
      =t(:do_you_want_to_report)
      .problem-options
        %span.link-button
          =link_to(t(:stop_or_station), find_stop_problems_url)
        =t(:or_on_a)
        %span.link-button
          =link_to(t(:route), find_route_problems_url)


.box-search-schemas
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:placeholder => "Ingresa nombre de Esquema", :type => "text", :name => "text_search"}/
.container
  .row
    .col-md-2.box-col-categories
      %h3
        Categorías
      %ul
        - @categories.each do |category|
          %li
            %a(data-category="category-#{category.id}")
              = category.name
      %br
        = link_to 'Nuevo Schema', new_schema_path
    .col-md-10.schema-wrapper
      .schema-box-container
        - @schemas.each do |schema|
          .box-schema(data-categories="category-#{schema.schema_category.id}")
            .title
              %a{href: "#"}
                = truncate(schema.name, :length => 56)
            .body
              %span
                Descripción:
              = truncate(schema.description, :length => 183)

Add id attr to list

.box-search-schemas
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:placeholder => "Ingresa nombre de Esquema", :type => "text", :name => "text_search"}/
.container
  .row
    .col-md-2.box-col-categories
      %h3
        Categorías
      %ul#categories-list
        - @categories.each do |category|
          %li
            %a(data-category="category-#{category.id}")
              = category.name
      %br
        = link_to 'Nuevo Schema', new_schema_path
    .col-md-10.schema-wrapper
      .schema-box-container
        - @schemas.each do |schema|
          .box-schema(data-categories="category-#{schema.schema_category.id}")
            .title
              %a{href: "#"}
                = truncate(schema.name, :length => 56)
            .body
              %span
                Descripción:
              = truncate(schema.description, :length => 183)


%li.card.list-item.article.has-signal{ class: ('has-article-footer' unless article.tags.empty? )}
  = article.signal
  = link_to article.title, article, class: 'article-title'
  - unless article.tags.empty?
    .article-footer
      %ul.list.list--inline.list--inline--xs{ 'data-ui-component' => 'tag-list' }
        - article.tags.each do |t|
          %li.list-item= link_to t.name, tag_path(t), class: 'label label--link'

Remove unnecessary article data element

%li.card.list-item.article.has-signal{ class: ('has-article-footer' unless article.tags.empty? )}
  = article.signal
  = link_to article.title, article, class: 'article-title'
  - unless article.tags.empty?
    .article-footer
      %ul.list.list--inline.list--inline--xs
        - article.tags.each do |t|
          %li.list-item= link_to t.name, tag_path(t), class: 'label label--link'


- unless @scraper.finished_runs.empty?
  %h3 Finished Runs

  -# TODO Only show a limited number of the most recent runs
  %ul.list-group
  - @scraper.finished_runs.each do |run|
    = render partial: "runs/history", locals: {run: run}

Rename finished runs to history

- unless @scraper.finished_runs.empty?
  %h3 History

  -# TODO Only show a limited number of the most recent runs
  %ul.list-group
  - @scraper.finished_runs.each do |run|
    = render partial: "runs/history", locals: {run: run}


.col-md-3
.col-md-6
  =simple_form_for(@draft_budget_allocation) do |f|
    =f.input :amount
    =f.input :draft_budget_id, collection: @draft_budgets.collect { |o| [o.name, o.id] }, include_blank: false
    =f.input :draft_funding_request_id, as: :hidden
    =f.submit

Set default value for allocation

.col-md-3
.col-md-6
  =simple_form_for(@draft_budget_allocation) do |f|
    =f.input :amount, input_html: {value: 0}
    =f.input :draft_budget_id, collection: @draft_budgets.collect { |o| [o.name, o.id] }, include_blank: false
    =f.input :draft_funding_request_id, as: :hidden
    =f.submit


%a#yesterday.colored-text.static{href: "#"}
%a#today.colored-text.static{href: "#"}
%a#tomorrow.colored-text.static{href: "#"}
%a#last-saturday.colored-text.static{href: "#"}
%a#this-saturday.colored-text.static{href: "#"}

%span#human-today.colored-text Loading…

%a#download-background-image.colored-text.static{href: "#",
target: "_blank", download: ""} Download Image

%div.div-container
  %div
    %span#hours-today.big.time.colored-text XX:XX
    %span …today.
  %div
    %span#hours-needed-today.big.time.colored-text XX:XX
    %span …to go.
  %div
    %span Done at:
    %span#done-at.big.time.colored-text XX:XX

%ul#times-and-projects

Use colored-text class for download image button

%a#yesterday.colored-text.static{href: "#"}
%a#today.colored-text.static{href: "#"}
%a#tomorrow.colored-text.static{href: "#"}
%a#last-saturday.colored-text.static{href: "#"}
%a#this-saturday.colored-text.static{href: "#"}

%span#human-today.colored-text Loading…

%a#download-background-image.static{href: "#",
target: "_blank", download: ""} Download Image

%div.div-container
  %div
    %span#hours-today.big.time.colored-text XX:XX
    %span …today.
  %div
    %span#hours-needed-today.big.time.colored-text XX:XX
    %span …to go.
  %div
    %span Done at:
    %span#done-at.big.time.colored-text XX:XX

%ul#times-and-projects


-#   Copyright (c) 2010, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

%li.comment{:data=>{:guid=>comment.id}}
  -start=Time.now
  = person_image_link(person)
  - post_image_link=Time.now
  .content
    .from
      = link_to person.real_name, person
      - post_person_link=Time.now
    = markdownify(comment.text, :youtube_maps => comment[:youtube_titles])
    - markdownified=Time.now
    %div.time
      = "#{time_ago_in_words(comment.updated_at)} #{t('ago')}"
      - time_agoed=Time.now
- log_string = "event=comment_partial im_link=#{(post_image_link - start)*1000} "
- log_string << "pr_link=#{(post_person_link - post_image_link)*1000} "
- log_string << "markdown=#{(markdownified - post_image_link)*1000} "
- log_string << "time_agoed=#{(time_agoed - markdownified)*1000} "
- log_string << "total=#{(time_agoed - start)*1000} "
- log_string << "comment_id=#{comment.id}"
- Rails.logger.info(log_string)

Correct math, take out link_tos

-#   Copyright (c) 2010, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

%li.comment{:data=>{:guid=>comment.id}}
  -start=Time.now
  %a{:href => "/people/#{person.id}"}
    =person_image_tag(person)
  - post_image_link=Time.now
  .content
    .from
      %a{:href => "/people/#{person.id}", :title => person.real_name}
      = link_to person.real_name, person
      - post_person_link=Time.now
    = markdownify(comment.text, :youtube_maps => comment[:youtube_titles])
    - markdownified=Time.now
    %div.time
      = "#{time_ago_in_words(comment.updated_at)} #{t('ago')}"
      - time_agoed=Time.now
- log_string = "event=comment_partial im_link=#{(post_image_link - start)*1000} "
- log_string << "pr_link=#{(post_person_link - post_image_link)*1000} "
- log_string << "markdown=#{(markdownified - post_person_link)*1000} "
- log_string << "time_agoed=#{(time_agoed - markdownified)*1000} "
- log_string << "total=#{(time_agoed - start)*1000} "
- log_string << "comment_id=#{comment.id}"
- Rails.logger.info(log_string)


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

Add sidebar link to incidents page

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


.card
  .card-header
    %h5.card-title Find #{crop.name} seeds
  - if crop.seeds.empty?
    .card-body
      %p There are no seeds available to trade on Growstuff right now.
  - else
    %ul.list-group
      - crop.seeds.tradable.each do |seed|
        %li.list-group-item
          = link_to "#{seed.owner} will trade #{seed.tradable_to}.", seed_path(seed)
          = render 'members/location', member: seed.owner
      %li.list-group-item.d-flex.justify-content-between.align-items-center
        = link_to crop_seeds_path(crop) do
          = seed_icon
          View all #{crop.name} seeds
        %span.badge.badge-primary.badge-pill=crop.seeds.size

  %ul.list-group
    %li.list-group-item
      = link_to crop_ebay_seeds_url(crop),
               target: "_blank",
               rel: "noopener noreferrer" do
        = icon 'fas', 'money-check-alt'
        Purchase seeds via Ebay

    - if crop.approved?
      - if current_member
        %li.list-group-item
          = link_to "List #{crop.name} seeds to trade", new_seed_path(crop_id: crop.id)
      - else
        %li.list-group-item.active
          = icon 'fas', 'user'
          = render partial: 'shared/signin_signup', locals: { to: 'list your seeds to trade' }

Add icon to find seeds

.card
  .card-header
    %h5.card-title Find #{crop.name} seeds
  - if crop.seeds.empty?
    .card-body
      %p There are no seeds available to trade on Growstuff right now.
  - else
    %ul.list-group
      - crop.seeds.tradable.each do |seed|
        %li.list-group-item
          = link_to "#{seed.owner} will trade #{seed.tradable_to}.", seed_path(seed)
          = render 'members/location', member: seed.owner
      %li.list-group-item.d-flex.justify-content-between.align-items-center
        = link_to crop_seeds_path(crop) do
          = seed_icon
          View all #{crop.name} seeds
        %span.badge.badge-primary.badge-pill=crop.seeds.size

  %ul.list-group
    %li.list-group-item
      = link_to crop_ebay_seeds_url(crop),
               target: "_blank",
               rel: "noopener noreferrer" do
        = icon 'fas', 'money-check-alt'
        Purchase seeds via Ebay

    - if crop.approved?
      - if current_member
        %li.list-group-item
          = link_to new_seed_path(crop_id: crop.id) do
            = seed_icon
            List #{crop.name} seeds to trade
      - else
        %li.list-group-item.active
          = icon 'fas', 'user'
          = render partial: 'shared/signin_signup', locals: { to: 'list your seeds to trade' }


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

%h1 Lyon.rb

%p We are Ruby developers in Lyon

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

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

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

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

Change default language to French

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

%h1 Lyon.rb

%p Nous sommes des développeurs Ruby basés à Lyon

%p
  On se réunit chaque deuxième mercredi du mois à
  = link_to 'La Cordée Charpennes', 'http://goo.gl/maps/lP3YX'
  de 19h à l'heure qu'il faudra.

%p
  Pour vous inscrire au prochain meetup, rendez-vous sur notre
  = link_to 'page meetup.com', 'http://meetup.lyonrb.fr/'

%p
  Vous pouvez aussi vous inscrire à notre
  = link_to 'mailing list', 'https://groups.google.com/forum/?hl=en#!forum/rubylyon'

%p
  Enfin, n'hésitez pas à consulter et contribuer à notre
  = link_to 'wishlist de talks', 'https://github.com/lyonrb/wishlist/issues'
  sur GitHub.


- return unless @site.is_mirrored?

- object ||= nil

- en, cy = cms_mirror_options(object)
- if en && cy
  #site__mirrors{data: { 'dough-component' => 'URLToggler' }}
    .toolbar__item.pull-right
      %span.image-flag
    .toolbar__item.js-switch-mode-buttons-group.pull-right
      .toggle.toggle--on-dark
        =radio_button_tag('edit-mode', en.first, en.last == request.fullpath, class: 'toggle__control', data: { 'value' => en.last })
        =radio_button_tag('edit-mode', cy.first, cy.last == request.fullpath, class: 'toggle__control', data: { 'value' => cy.last })
        =label_tag('edit-mode_en', en.first, class: 'toggle__label-heading')
        %span.toggle__indicator
        =label_tag('edit-mode_cy', class: 'toggle__label-heading') do
          =cy.first
          %span.icon-warning.fa.fa-warning

Remove object assigns. Using local_assigns instead

- return unless @site.is_mirrored?

- en, cy = cms_mirror_options(local_assigns[:object])

- if en && cy
  #site__mirrors{data: { 'dough-component' => 'URLToggler' }}
    .toolbar__item.pull-right
      %span.image-flag
    .toolbar__item.js-switch-mode-buttons-group.pull-right
      .toggle.toggle--on-dark
        =radio_button_tag('edit-mode', en.first, en.last == request.fullpath, class: 'toggle__control', data: { 'value' => en.last })
        =radio_button_tag('edit-mode', cy.first, cy.last == request.fullpath, class: 'toggle__control', data: { 'value' => cy.last })
        =label_tag('edit-mode_en', en.first, class: 'toggle__label-heading')
        %span.toggle__indicator
        =label_tag('edit-mode_cy', class: 'toggle__label-heading') do
          =cy.first
          %span.icon-warning.fa.fa-warning


- if @fixtures.nil?
  Please Add fixtures
- else
  %ul
    - @fixtures.each do |fixture|
      %li
        = "#{fixture.date} - #{fixture.home.name} #{fixture.home_score} - #{fixture.away_score} #{fixture.away.name}"

= link_to "Add Fixtures", league_table_fixtures_path(), method: :post

Hide add fixtures button from non admins

- if @fixtures.nil?
  Please Add fixtures
- else
  %ul
    - @fixtures.each do |fixture|
      %li
        = "#{fixture.date} - #{fixture.home.name} #{fixture.home_score} - #{fixture.away_score} #{fixture.away.name}"

- if can? :manage, Fixture
  = link_to "Add Fixtures", league_table_fixtures_path(), method: :post


- form_for :search, @search do |f|
  = f.error_messages

  %p
    = f.label :location_id, '1.) Select a location'
    = collection_select(:search, :location_id, Location.all, :location_id, :name, {:prompt => "Please select a location"})
  %p
    = f.label :sheltered, '2.) Put weather into consideration?'
    = f.check_box :sheltered

  %p
    = f.label :submit, '3.)'
    = f.submit 'Where should I have lunch?'

- if @current_conditions
  %section.current_conditions
    %h2
      = image_tag WEATHER_ICON_ROOT_PATH+@current_conditions.icon, :alt => @current_conditions.condition
      Current Weather Conditions
    %p
      %strong Condition:
      = h @current_conditions.condition
    %p
      %strong Temp:
      = h @current_conditions.temp_c + '°C'
    %p
      %strong Wind:
      = h @current_conditions.wind_condition.sub /Wind: /, ''
    %p
      %strong Humidity:
      = h @current_conditions.humidity.sub /Humidity: /, ''

- if @venue
  %section.venue
    %h2 Venue Information
    %p
      %strong Venue Name:
      = h @venue.name
    %p
      = h @venue.comments
    = map_canvas("map_canvas", @venue.address)

Remove the "Please select a location" in the item. Looks weird because the combo box size changes after you click on submit

- form_for :search, @search do |f|
  = f.error_messages

  %p
    = f.label :location_id, '1.) Select a location'
    = collection_select(:search, :location_id, Location.find(:all,:order => 'name'), :location_id, :name)
  %p
    = f.label :sheltered, '2.) Put weather into consideration?'
    = f.check_box :sheltered

  %p
    = f.label :submit, '3.)'
    = f.submit 'Where should I have lunch?'

- if @current_conditions
  %section.current_conditions
    %h2
      = image_tag WEATHER_ICON_ROOT_PATH+@current_conditions.icon, :alt => @current_conditions.condition
      Current Weather Conditions
    %p
      %strong Condition:
      = h @current_conditions.condition
    %p
      %strong Temp:
      = h @current_conditions.temp_c + '°C'
    %p
      %strong Wind:
      = h @current_conditions.wind_condition.sub /Wind: /, ''
    %p
      %strong Humidity:
      = h @current_conditions.humidity.sub /Humidity: /, ''

- if @venue
  %section.venue
    %h2 Venue Information
    %p
      %strong Venue Name:
      = h @venue.name
    %p
      = h @venue.comments
    = map_canvas("map_canvas", @venue.address)


- provide(:title, generate_title("Announcements"))
.container.container--main
  .row
    .col-md-12
      = link_to "Add new", :announcement_new, class: "btn btn-default"
  - @announcements.each do |announcement|
    .panel.panel-default
      .panel-heading
        = announcement.starts_at
      .panel-body
        = announcement.content
      .panel-footer
        = button_to "Edit", announcement_edit_path(id: announcement.id), method: :get, class: 'btn btn-link'
        = button_to "Delete", announcement_destroy_path(id: announcement.id), method: :delete, class: 'btn btn-link', confirm: 'Are you sure you want to delete this announcement?'

Adjust announcement index page design

- provide(:title, generate_title("Announcements"))
.container.container--main
  - @announcements.each do |announcement|
    .card
      .card-body
        .d-flex.w-100.justify-content-between
          %p.mb-3= announcement.content
          %small.text-muted= announcement.starts_at

        .d-flex.w-100
          = link_to "Edit", announcement_edit_path(id: announcement.id), class: 'btn btn-link text-primary'
          = button_to "Delete", announcement_destroy_path(id: announcement.id), method: :delete, class: 'btn btn-link text-danger', confirm: 'Are you sure you want to delete this announcement?'

  .row
    .col-md-12
      = link_to "Add new", :announcement_new, class: "btn btn-primary"


%ul
  = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
    = link_to admin_root_path, title: "Stats" do
      %i.icon-home
  = nav_link(controller: :projects) do
    = link_to "Projects", admin_projects_path
  = nav_link(controller: :groups) do
    = link_to "Groups", admin_groups_path
  = nav_link(controller: :users) do
    = link_to "Users", admin_users_path
  = nav_link(controller: :logs) do
    = link_to "Logs", admin_logs_path
  = nav_link(controller: :hooks) do
    = link_to "Hooks", admin_hooks_path
  = nav_link(controller: :background_jobs) do
    = link_to "Background Jobs", admin_background_jobs_path

Add broadcast messages to admin nav

%ul
  = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
    = link_to admin_root_path, title: "Stats" do
      %i.icon-home
  = nav_link(controller: :projects) do
    = link_to "Projects", admin_projects_path
  = nav_link(controller: :groups) do
    = link_to "Groups", admin_groups_path
  = nav_link(controller: :users) do
    = link_to "Users", admin_users_path
  = nav_link(controller: :logs) do
    = link_to "Logs", admin_logs_path
  = nav_link(controller: :broadcast_messages) do
    = link_to "Messages", admin_broadcast_messages_path
  = nav_link(controller: :hooks) do
    = link_to "Hooks", admin_hooks_path
  = nav_link(controller: :background_jobs) do
    = link_to "Background Jobs", admin_background_jobs_path


%h2.effective-orders-page-title= @page_title

%p.text-right= link_to 'New Order', effective_orders.new_admin_order_path, class: 'btn btn-primary'

- if @datatable.nil?
  %p Please install #{link_to 'effective_datatables', 'https://github.com/code-and-effect/effective_datatables'} to see this page.
- elsif @datatable.present?
  = render_datatable @datatable
- else
  %p There are no orders present

Rework the admin orders header

.row
  .col-sm-6
    %h2.effective-orders-page-title= @page_title
  .col-sm-6
    = link_to effective_orders.new_admin_order_path, class: 'btn btn-primary pull-right effective-orders-page-action' do
      %span.glyphicon.glyphicon-plus
      New Order

- if @datatable.nil?
  %p Please install #{link_to 'effective_datatables', 'https://github.com/code-and-effect/effective_datatables'} to see this page.
- elsif @datatable.present?
  = render_datatable @datatable
- else
  %p There are no orders present


%header
  = form_tag events_url, :method => :get, :remote => true, :id => "event_filter_form" do
    .filter
      Filter by event type buttons will go here...
      = submit_tag
    .date_select= select_date
  = javascript_tag "new Form.Observer('event_filter_form', 0.3, function(form, value){form.request()})"
#events= render @events

Make date select work even if there's no javascript

%header
  = form_tag events_url, :method => :get, :id => "event_filter_form" do
    .filter
      Filter by event type buttons will go here...
      = submit_tag
    .date_select= select_date @date - 1
  /= javascript_tag "new Form.Observer('event_filter_form', 0.3, function(form, value){form.request()})"
#events= render @events


- if current_member && current_member != member # must be logged in, can't follow yourself
  - follow = current_member.get_follow(member)
  - if !follow && can?(:create, Follow) # not already following
    = link_to 'Follow', follows_path(followed: member), method: :post, class: 'btn btn-block'
  - if follow && can?(:destroy, follow) # already following
    = link_to 'Unfollow', follow_path(follow), method: :delete, class: 'btn btn-block'

Make the follow button stand out

- if current_member && current_member != member # must be logged in, can't follow yourself
  - follow = current_member.get_follow(member)
  - if !follow && can?(:create, Follow) # not already following
    = link_to 'Follow', follows_path(followed: member), method: :post, class: 'btn btn-block btn-success'
  - if follow && can?(:destroy, follow) # already following
    = link_to 'Unfollow', follow_path(follow), method: :delete, class: 'btn btn-block'


%script{ type: "text/ng-template", id: "account/cards.html" }
  .credit_cards{"ng-controller" => "CreditCardsCtrl"}
    .row
      .small-12.medium-6.columns
        %h3
          = t(:saved_cards)
          %button.button.secondary.tiny.help-btn.ng-scope{ "help-modal" => t('.saved_cards_popover') }
            %i.ofn-i_013-help

        .saved_cards{ ng: { show: 'savedCreditCards.length > 0' } }
          = render 'saved_cards'
        .no_cards{ ng: { hide: 'savedCreditCards.length > 0' } }
          = t(:you_have_no_saved_cards)
        %button.button.primary{ ng: { click: 'showForm()', hide: 'CreditCard.visible' } }
          = t(:add_a_card)

      .small-12.medium-6.columns
        .new_card{ ng: { show: 'CreditCard.visible', class: '{visible: CreditCard.visible}' } }
          %h3= t(:add_a_new_card)
          = render 'new_card_form'
        .authorised_shops{ ng: { controller: 'AuthorisedShopsCtrl', hide: 'CreditCard.visible' } }
          %h3
            = t('.authorised_shops')
            %button.button.secondary.tiny.help-btn.ng-scope{ "help-modal" => t('.authorised_shops_popover') }
              %i.ofn-i_013-help
          = render 'authorised_shops'

Correct translation key on add card link

%script{ type: "text/ng-template", id: "account/cards.html" }
  .credit_cards{"ng-controller" => "CreditCardsCtrl"}
    .row
      .small-12.medium-6.columns
        %h3
          = t(:saved_cards)
          %button.button.secondary.tiny.help-btn.ng-scope{ "help-modal" => t('.saved_cards_popover') }
            %i.ofn-i_013-help

        .saved_cards{ ng: { show: 'savedCreditCards.length > 0' } }
          = render 'saved_cards'
        .no_cards{ ng: { hide: 'savedCreditCards.length > 0' } }
          = t(:you_have_no_saved_cards)
        %button.button.primary{ ng: { click: 'showForm()', hide: 'CreditCard.visible' } }
          = t(:add_a_card)

      .small-12.medium-6.columns
        .new_card{ ng: { show: 'CreditCard.visible', class: '{visible: CreditCard.visible}' } }
          %h3= t(:add_new_credit_card)
          = render 'new_card_form'
        .authorised_shops{ ng: { controller: 'AuthorisedShopsCtrl', hide: 'CreditCard.visible' } }
          %h3
            = t('.authorised_shops')
            %button.button.secondary.tiny.help-btn.ng-scope{ "help-modal" => t('.authorised_shops_popover') }
              %i.ofn-i_013-help
          = render 'authorised_shops'


- extends "smartmin/read.html"

- load i18n

- block read-buttons
  - if request.user.is_superuser or org_perms.orgs.org_edit
    %a.btn.btn-primary.pull-right{href:"{% url 'orgs.org_edit' %}", role:"button"}
      - trans "Edit"
  - if request.user.is_superuser or org_perms.orgs.org_manage_accounts
    %a.btn.btn-primary.pull-right.manage{href:"{% url 'orgs.org_manage_accounts' %}", role:"button"}
      - trans "Manage Users"

- block extra-style
  :css
    td.read-label {
      width: 200px;
    }

    a.manage {
      margin-right: 10px;
    }

Add button to link to the Tokens views

- extends "smartmin/read.html"

- load i18n

- block read-buttons
  - if request.user.is_superuser or org_perms.orgs.org_edit
    %a.btn.btn-primary.pull-right{href:"{% url 'orgs.org_edit' %}", role:"button"}
      - trans "Edit"
  - if request.user.is_superuser or org_perms.orgs.org_tokens
    %a.btn.btn-primary.pull-right.tokens{href:"{% url 'orgs.org_tokens' %}", role:"button"}
      - trans "API Tokens"
  - if request.user.is_superuser or org_perms.orgs.org_manage_accounts
    %a.btn.btn-primary.pull-right.manage{href:"{% url 'orgs.org_manage_accounts' %}", role:"button"}
      - trans "Manage Users"

- block extra-style
  :css
    td.read-label {
      width: 200px;
    }

    a.manage, a.tokens {
      margin-right: 10px;
    }


- @body_class = 'sidebar-right-240'
- @menu 			= 'website'
- @submenu 		= 'theme'

=render 'layouts/sub_menu'
#main
	%h1 Theme
	%p Select a theme for your site.
	#themes
		-form_for current_site, :url => set_theme_admin_theme_path do |f|
			-for theme in @themes
				.theme
					.theme_name
						=f.radio_button :mongo_theme_id, theme.id
						=theme.name
					=gridfs_image_tag(theme.latest_version.try(:thumbnail_id).to_s, :class => 'theme_thumbnail')
#sidebar
	%h2 Theme Options
	#theme_customization_options
		=render :partial => 'theme_customization', :object => current_site.theme_customization

Add theme management instructions for campaign users.

- @body_class = 'sidebar-right-240'
- @menu 			= 'website'
- @submenu 		= 'theme'

=render 'layouts/sub_menu'
#main
	%h1 Theme
	%p
		Select a theme for your site below. If the currently selected theme
		has any customization options, they will be displayed in the sidebar.
	%p
		Please note: any changes you make will be reflected on
		your site immediately. If you want to see how your site
		looks with the changes you're making,
		=link_to 'open your site in another window', current_site.root_url, :target => '_blank'
		and press refresh after each change you make.
	%br
	#themes
		-form_for current_site, :url => set_theme_admin_theme_path do |f|
			-for theme in @themes
				.theme
					.theme_name
						=f.radio_button :mongo_theme_id, theme.id
						=theme.name
					=gridfs_image_tag(theme.latest_version.try(:thumbnail_id).to_s, :class => 'theme_thumbnail')
#sidebar
	%h2 Theme Options
	#theme_customization_options
		=render :partial => 'theme_customization', :object => current_site.theme_customization


<!DOCTYPE html>
%html
  %head
    = render :partial => '/shared/head'
  %body
    %header
      = render :partial => '/shared/header'
    %nav
      = render :partial => '/shared/nav'
    #content
      .container
        .row
          .span12
            %h1= yield :h1
        .row
          .span9.pull-right
            = render partial: 'shared/flashes'
            = yield :tabnav
            = yield
          .span3.pull-left
            #sidebar
              = yield :sidebar
    %footer
      = render :partial => '/shared/footer'

Add optional h2 to two_column layout

<!DOCTYPE html>
%html
  %head
    = render :partial => '/shared/head'
  %body
    %header
      = render :partial => '/shared/header'
    %nav
      = render :partial => '/shared/nav'
    #content
      .container
        .row
          .span12
            %h1= yield :h1
            %h2= yield :h2
        .row
          .span9.pull-right
            = render partial: 'shared/flashes'
            = yield :tabnav
            = yield
          .span3.pull-left
            #sidebar
              = yield :sidebar
    %footer
      = render :partial => '/shared/footer'


= render :partial => 'funding_amounts_table', :locals => {:funding_source => @funding_source}

Fix bug in findiong sources view

= render :partial => 'funding_amounts_table', :locals => {:funding_source => @funding_source, :popup => true}


.upcoming-event
  = render 'front_page_lock', index: index

  .what
    = "%s @ %s" % [t_event_type(event), event.area_title]
    %br.rwd-break
    = I18n.l(event.start_time, format: :short)

  %h2
    = link_to event.title, event

  .ribbon-image-wrapper
    = link_to event do
      = background_image_helper "picture", event.image_or_default, size: :medium
      - if event.front_page_lock && (can? :manage, FrontPageLock)
        .locked-border
          = image_tag "fontawesome/lock24.svg", alt: "Padlock"
      = render 'events/corner_ribbon', event: event

  .description
    = render "events/buy_button", event: event
    %p
      = event.short_description

Use // instead of @ for event title

.upcoming-event
  = render 'front_page_lock', index: index

  .what
    = "%s // %s" % [t_event_type(event), event.area_title]
    %br.rwd-break
    = I18n.l(event.start_time, format: :short)

  %h2
    = link_to event.title, event

  .ribbon-image-wrapper
    = link_to event do
      = background_image_helper "picture", event.image_or_default, size: :medium
      - if event.front_page_lock && (can? :manage, FrontPageLock)
        .locked-border
          = image_tag "fontawesome/lock24.svg", alt: "Padlock"
      = render 'events/corner_ribbon', event: event

  .description
    = render "events/buy_button", event: event
    %p
      = event.short_description


!!!
%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 'layouts/footer'

Add render statement in app views so it has ability to be displayed on every page in the app. Put this in the haml file.

!!!
%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'


.login-box
  %h3.page_title Sing in
  %br
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Ordinary', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?

  - if Gitlab.config.gitlab.signup_enabled
    %hr
    %div
      Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)

Fix spell error in sing in

.login-box
  %h3.page_title Sign in
  %br
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Ordinary', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?

  - if Gitlab.config.gitlab.signup_enabled
    %hr
    %div
      Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)


%div.page-header
  %h1= _('All Fedora Rpms maintained by %{name}') % { :name => @name}
  %h2= link_to _('See it in a nice bubble chart'), stats_path + "/" + @name + "/user_rpms"

%table.table.table-striped.table-condensed
  %thead
    %tr
      %th= sortable _('Rpm')
      %th= _('Upstream')
      %th= _('Rawhide')
      %th= _('Git Commits')

  %tbody
    - @rpms.each do |rpm|
      %tr
        %td= link_to rpm.name, fedorarpm_path(rpm.name)
        %td= rpm.ruby_gem.version if rpm.ruby_gem
        %td= rpm.version_for 'Rawhide'
        %td= rpm.commits

Fix table view for owner.

.bs-callout-active.bs-callout
  %h2= _('All rubygems maintained by %{name}') % { :name => @name}
  = link_to _('See it in a nice bubble chart'), stats_path + "/" + @name + "/user_rpms"

%table.table.table-hover.table-condensed.table-responsive
  %thead
    %tr.warning
      %th= sortable _('Rpm')
      %th= _('Upstream')
      %th= _('Rawhide')
      %th= _('Git Commits')

  %tbody
    - @rpms.each do |rpm|
      %tr
        %td= link_to rpm.name, fedorarpm_path(rpm.name)
        %td= rpm.ruby_gem.version if rpm.ruby_gem
        %td= rpm.version_for 'Rawhide'
        %td= rpm.commits


!!! Strict
%html{ html_attrs("en_us") }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }
    %meta{ :name => "viewport", :content => "width=device-width" }
    %link{ :rel => "icon", :href => "/images/favicon.png", :type => "image/png" }

    = stylesheet_link_tag "screen",                            :media => :screen
    = stylesheet_link_tag "/thickbox/thickbox",                :media => :screen
    = stylesheet_link_tag "/jquery-ui/jquery-ui-1.7.1.custom.css", :media => :screen

    = stylesheet_link_tag "print",  :media => :print

    = javascript_include_tag "jquery-1.4.3.min.js"
    = javascript_include_tag "jquery-ui-1.7.1.custom.min.js"
    = javascript_include_tag "jquery.form-2.18.js"
    = javascript_include_tag "thickbox-compressed.js"

    = yield :head

  %body{:id=> yield(:page_id) || 'body'}

    = yield

    .clear

    %p.footer
      Powered by:
      %a{ :href => "http://wiki.tils.net/"}
        %strong tilswiki

Make root page link relative

!!! Strict
%html{ html_attrs("en_us") }
  %head
    %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "content-type" }
    %meta{ :name => "viewport", :content => "width=device-width" }
    %link{ :rel => "icon", :href => "/images/favicon.png", :type => "image/png" }

    = stylesheet_link_tag "screen",                            :media => :screen
    = stylesheet_link_tag "/thickbox/thickbox",                :media => :screen
    = stylesheet_link_tag "/jquery-ui/jquery-ui-1.7.1.custom.css", :media => :screen

    = stylesheet_link_tag "print",  :media => :print

    = javascript_include_tag "jquery-1.4.3.min.js"
    = javascript_include_tag "jquery-ui-1.7.1.custom.min.js"
    = javascript_include_tag "jquery.form-2.18.js"
    = javascript_include_tag "thickbox-compressed.js"

    = yield :head

  %body{:id=> yield(:page_id) || 'body'}

    = yield

    .clear

    %p.footer
      Powered by:
      %a{ :href => "/" }
        %strong tilswiki


= page_title "Article Subscriptions"

%main.row
  .cell.well.well--l
    %h1 Recent Article Endorsements
    %ul.list.list--xs
      = render partial: "subscription", collection: @subscriptions.decorate

Fix typo on Subscriptions page

= page_title "Article Subscriptions"

%main.row
  .cell.well.well--l
    %h1 Recent Article Subscriptions
    %ul.list.list--xs
      = render partial: "subscription", collection: @subscriptions.decorate


-if @characters.count == 0
  %span Couldn't find any characters for this ranking.
- else
  %h2.title= params[:other].split("_").map(&:capitalize).join(" ")

  %table
    %thead
      %tr
        %th Character
        %th= params[:other].split("_").map(&:capitalize).join(" ")
    %tbody
      - @characters.to_a.each do |character|
        %tr
          %td
            %a{:href => "/#{character['server']}/#{character['name']}"}= "#{character['name']} (#{character['server']})"
          %td
            - if(params[:other] == "birth" && character[params[:other]] == "???")
              = Time.at(character[params[:other]])
            - else
              = character[params[:other]]

Handle adding commas to unassigned xp

-if @characters.count == 0
  %span Couldn't find any characters for this ranking.
- else
  %h2.title= params[:other].split("_").map(&:capitalize).join(" ")

  %table
    %thead
      %tr
        %th Character
        %th= params[:other].split("_").map(&:capitalize).join(" ")
    %tbody
      - @characters.to_a.each do |character|
        %tr
          %td
            %a{:href => "/#{character['server']}/#{character['name']}"}= "#{character['name']} (#{character['server']})"
          %td
            - if(params[:other] == "birth" && character[params[:other]] == "???")
              = Time.at(character[params[:other]])
            - elsif(params["other"] == "unassigned_xp")
              = add_commas(character[params[:other]].to_i.to_s)
            - else
              = character[params[:other]]


%h2.content-subhead enter your GitHub username below
- form_tag '/repos', :class => 'pure-form', :method => 'get' do
  = flash_tag(:notice)
  = text_field_tag :username, value: params[:username], type: 'text', placeholder: 'Username'
  = submit_tag "Go!", class: 'pure-button pure-button-primary'

Add autofocus to the "Username" field on the home page

%h2.content-subhead enter your GitHub username below
- form_tag '/repos', :class => 'pure-form', :method => 'get' do
  = flash_tag(:notice)
  = text_field_tag :username, value: params[:username], type: 'text', placeholder: 'Username', autofocus: true
  = submit_tag "Go!", class: 'pure-button pure-button-primary'


%li= link_to 'Home', root_path
%li= link_to 'Team', team_path
%li= link_to 'Projects', 'https://shipped.hackclub.com'
%li= link_to 'Apply', apply_path
%li= link_to 'Donate', donate_path

Add Hack Camp to nav bar

%li= link_to 'Home', root_path
%li= link_to 'Team', team_path
%li= link_to 'Camp', 'https://camp.hackclub.com'
%li= link_to 'Projects', 'https://shipped.hackclub.com'
%li= link_to 'Apply', apply_path
%li= link_to 'Donate', donate_path


%h3
  = @member.name
  (
  %tt
    = @member.email
  )

%h5
  Voting History

%table#proposal
  %tr
    %th#proposal Title
    %th#proposal Vote
  - for vote in @member.votes
    - vote.for ? p = "for" : p = "against"
    %tr{:class => "vote_#{p}"}
      %td= vote.decision.title
      %td#vote= vote.for_or_against

%h5
  Proposal History

%table#proposal
  %tr
    %th#proposal Title
    %th#proposal Outcome
  - for proposal in @member.proposals
    - if proposal.close_date < Time.now.to_datetime
      - proposal.accepted ? p = "for" : p = "against"
    - else
      - p = "in_progress"
    %tr{:class => "vote_#{p}"}
      %td= proposal.title
      - if proposal.close_date < Time.now.to_datetime
        %td#vote= proposal.accepted_or_rejected
      - else
        %td#vote Vote in Progress

/%ul
/  - for proposal in @member.proposals
/    %li= proposal.title

Tidy classes/IDs and add links to member show page.

%h3
  = @member.name
  (
  %tt
    = @member.email
  )

%h5
  Voting History

%table.proposals
  %tr
    %th Title
    %th Vote
  - for vote in @member.votes
    - vote.for ? p = "for" : p = "against"
    %tr{:class => "vote_#{p}"}
      %td= link_to(h(vote.decision.title), resource(vote.decision))
      %td.vote= vote.for_or_against

%h5
  Proposal History

%table.proposals
  %tr
    %th Title
    %th Outcome
  - for proposal in @member.proposals
    - if proposal.close_date < Time.now.to_datetime
      - proposal.accepted ? p = "for" : p = "against"
    - else
      - p = "in_progress"
    %tr{:class => "vote_#{p}"}
      %td= link_to(h(proposal.title), resource(proposal))
      - if proposal.close_date < Time.now.to_datetime
        %td.vote= proposal.accepted_or_rejected
      - else
        %td.vote Vote in Progress

/%ul
/  - for proposal in @member.proposals
/    %li= proposal.title


- @minute.tags.each do |tag|
  = tag_label(tag)
= render partial: 'content', locals: {text: @minute.cooked_content, organization: @minute.organization}
= link_to 'Edit', edit_minute_path(@minute)
|
= link_to 'Back', minutes_path

Add header to minute page, and add link to download txt file

- location = @minute.location.present? ? @minute.location : "???"
- dtstart = @minute.dtstart.strftime("%Y-%m-%d %H:%M:%S") rescue "???"
- dtend = @minute.dtend.strftime("%Y-%m-%d %H:%M:%S") rescue "???"
%h2
  = user_avatar_icon_tag(@minute.author)
  = @minute.title + " at " + location
  = link_to minute_path(@minute, "txt"), title: "Download txt", download: @minute.title + ".txt" do
    %i.fa.fa-download
%h4
  = dtstart + " 〜 " + dtend

- @minute.tags.each do |tag|
  = tag_label(tag)
= render partial: 'content', locals: {text: @minute.cooked_content, organization: @minute.organization}
= link_to 'Edit', edit_minute_path(@minute)
|
= link_to 'Back', minutes_path


%table.list#people_list
  %tr
    %th= t_attr :full_name
    %th
    %th.action-links

  = render collection

Drop action link column from people list header.

%table.list#people_list
  %tr
    %th= t_attr :full_name
    %th

  = render collection


- @logs.each do |content_data|
  - file_name = content_data[:file_name]
  - commit = content_data[:commit]
  - next unless commit

  :plain
    var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}");
    row.find("td.tree-time-ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}');
    row.find("td.tree-commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}');

- if @more_log_url
  :plain
    if($('#tree-slider').length) {
      // Load more commit logs for each file in tree
      // if we still on the same page
      var url = "#{escape_javascript(@more_log_url)}";
      gl.utils.ajaxGet(url);
    }

:plain
  gl.utils.localTimeAgo($('.js-timeago', 'table.table_#{@hex_path} tbody'));

Remove EE-specific code from logs tree dropdown

- @logs.each do |content_data|
  - file_name = content_data[:file_name]
  - commit = content_data[:commit]
  - next unless commit

  :plain
    var row = $("table.table_#{@hex_path} tr.file_#{hexdigest(file_name)}");
    row.find("td.tree-time-ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}');
    row.find("td.tree-commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}');

  = render_if_exists 'projects/refs/logs_tree_lock_label', lock_label: content_data[:lock_label]

- if @more_log_url
  :plain
    if($('#tree-slider').length) {
      // Load more commit logs for each file in tree
      // if we still on the same page
      var url = "#{escape_javascript(@more_log_url)}";
      gl.utils.ajaxGet(url);
    }

:plain
  gl.utils.localTimeAgo($('.js-timeago', 'table.table_#{@hex_path} tbody'));


%p= t(:"email.thread_mailer.motion_closing_soon")
%h4= link_to @motion.name, motion_url(@motion, @utm_hash)

%table
  %tr
    %td
      = render 'motion_pie', motion: @motion
    %td
      = render_rich_text(@motion.description, false)

- unless @motion.user_has_voted?(@recipient)
  %h4= t(:"help.have_your_say")
  =render 'vote_buttons', motion: @motion

= render "footer", link: motion_url(@motion, @utm_hash)

Add positions to motion closing soon email

%p= t(:"email.thread_mailer.motion_closing_soon")

%table
  %tr
    %td
      = render 'motion_with_positions', motion: @motion
    %td
      = render_rich_text(@motion.description, false)

- unless @motion.user_has_voted?(@recipient)
  %h4= t(:"help.have_your_say")
  =render 'vote_buttons', motion: @motion

= render "footer", link: motion_url(@motion, @utm_hash)


.admin-login
  %h2= 'Admin login'
  = form_for admin, url: admin_login_path, method: :post do |f|
    = f.text_field :email, placeholder: 'email@email.com'
    = f.password_field :password, placeholder: '********'
    = f.submit 'Login'

Add admin-auth class to views

.admin-auth.login
  %h2= 'Admin login'
  = form_for admin, url: admin_login_path, method: :post do |f|
    = f.text_field :email, placeholder: 'email@email.com'
    = f.password_field :password, placeholder: '********'
    = f.submit 'Login'


!!!
%html
  %head
    %title= "#{@election.name} | Voxe"
    = stylesheet_link_tag "embed/elections"
    = javascript_include_tag "embed/elections"
    = render "layouts/partials/google_analytics"
    = render "layouts/partials/chartbeat_header"
  %body
    = render 'layouts/partials/facebook.html'
    :javascript
      $(function() {
        new VoxeElection({
          electionId: '#{@election.id}',
          defaultCandidacyIds: #{params['candidacyIds'].split(',').to_json},
          defaultTagId: #{params['tagId'].to_json}
        });
      });

    #touch{style: "display: none"}
      .container
        = link_to image_tag('icons/16.png', valign: 'middle'), root_url, target: "_blank"
        = link_to "Voxe.org", root_url, target: "_blank"
      .market= link_to_app_store image_tag("embed/elections/apple-app-store.png")
      .market= link_to_android_market image_tag("embed/elections/google-app-store.png")

    #app

    #templates
      = render 'templates.mustache'

    = render "layouts/partials/chartbeat_body"
    = render 'layouts/partials/twitter.html'

EMBED fix null candidacyIds bug

!!!
%html
  %head
    %title= "#{@election.name} | Voxe"
    = stylesheet_link_tag "embed/elections"
    = javascript_include_tag "embed/elections"
    = render "layouts/partials/google_analytics"
    = render "layouts/partials/chartbeat_header"
  %body
    = render 'layouts/partials/facebook.html'
    :javascript
      $(function() {
        new VoxeElection({
          electionId: '#{@election.id}',
          defaultCandidacyIds: #{params['candidacyIds'].try(:split, ',').to_json},
          defaultTagId: #{params['tagId'].to_json}
        });
      });

    #touch{style: "display: none"}
      .container
        = link_to image_tag('icons/16.png', valign: 'middle'), root_url, target: "_blank"
        = link_to "Voxe.org", root_url, target: "_blank"
      .market= link_to_app_store image_tag("embed/elections/apple-app-store.png")
      .market= link_to_android_market image_tag("embed/elections/google-app-store.png")

    #app

    #templates
      = render 'templates.mustache'

    = render "layouts/partials/chartbeat_body"
    = render 'layouts/partials/twitter.html'


%table.table.table-striped.table-bordered
  %thead
    %tr
      %th
      %th= translate_helper("run_name_column")
      %th= translate_helper("run_date_column")
      %th= translate_helper("run_start_time_column")
      %th= translate_helper("run_end_time_column")
      %th= translate_helper("run_vehicle_column")
      %th= translate_helper("run_driver_column")
  %tbody
    - @runs.each do |run|
      %tr
        %td
          = link_to(translate_helper("view"), repeating_run_path(run)) if can?(:show, run)
        %td
          = run.name
        %td
          = run.date.to_s(:long)
        %td
          = run.scheduled_start_time.try(:to_s,:time_only)
        %td
          = run.scheduled_end_time.try(:to_s,:time_only)
        %td
          = run.vehicle ? run.vehicle.name : translate_helper('no_vehicle')
        %td
          = run.driver  ? run.driver.name : translate_helper('no_driver')

Remove date column from subscription runs list

%table.table.table-striped.table-bordered
  %thead
    %tr
      %th
      %th= translate_helper("run_name_column")
      %th= translate_helper("run_start_time_column")
      %th= translate_helper("run_end_time_column")
      %th= translate_helper("run_vehicle_column")
      %th= translate_helper("run_driver_column")
  %tbody
    - @runs.each do |run|
      %tr
        %td
          = link_to(translate_helper("view"), repeating_run_path(run)) if can?(:show, run)
        %td
          = run.name
        %td
          = run.scheduled_start_time.try(:to_s,:time_only)
        %td
          = run.scheduled_end_time.try(:to_s,:time_only)
        %td
          = run.vehicle ? run.vehicle.name : translate_helper('no_vehicle')
        %td
          = run.driver  ? run.driver.name : translate_helper('no_driver')


%table.responsive.nofeatures_default_score_dynatable.no_radius
  %thead
    %tr
      %th Sent
      %th Title
      %th Abstract
      %th Author
      %th Read
  %tbody
    - @announcements.each do |announcement|
      - cache ["v1", announcement] do
        %tr
          %td= announcement.created_at.strftime("%A, %B %d, %Y, at %l:%M%p")
          %td= link_to announcement.title, announcement_path(announcement)
          %td= announcement.abstract
          %td= announcement.author.public_name
          %td

Remove the default sort for announcements

%table.responsive.nofeatures.no_radius
  %thead
    %tr
      %th Sent
      %th Title
      %th Abstract
      %th Author
      %th Read
  %tbody
    - @announcements.each do |announcement|
      - cache ["v1", announcement] do
        %tr
          %td= announcement.created_at.strftime("%A, %B %d, %Y, at %l:%M%p")
          %td= link_to announcement.title, announcement_path(announcement)
          %td= announcement.abstract
          %td= announcement.author.public_name
          %td


!!! 5

%html
%head
    %title PunchCard

    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true

    /= stylesheet_link_tag 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'
    = stylesheet_link_tag 'https://bootswatch.com/cerulean/bootstrap.min.css'

    = javascript_include_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'

    = stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"

    = csrf_meta_tags

%body
    .container
        .row
            .col-md-10.col-md-offset-1
                // NAVBAR
                = render 'layouts/navbar'

                // ALERTS
                = render 'layouts/alerts'

                // CONTENT
                .panel.panel-default
                    .panel-body
                        = yield

                // FOOTER
                = render 'layouts/footer'

Add Cal-Heat map plugin CDNs

!!! 5

%html
%head
    %title PunchCard

    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true

    /= stylesheet_link_tag 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'
    = stylesheet_link_tag 'https://bootswatch.com/cerulean/bootstrap.min.css'

    = javascript_include_tag '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'

    = stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"

    // Cal-Heat Map CDN
    = javascript_include_tag '//d3js.org/d3.v3.min.js'
    = javascript_include_tag '//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js'
    = stylesheet_link_tag '//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.css'

    = csrf_meta_tags

%body
    .container
        .row
            .col-md-10.col-md-offset-1
                // NAVBAR
                = render 'layouts/navbar'

                // ALERTS
                = render 'layouts/alerts'

                // CONTENT
                .panel.panel-default
                    .panel-body
                        = yield

                // FOOTER
                = render 'layouts/footer'


-if @fta_asset_class.code.in? ["bus", "rail_car", "ferry", "other_passenger_vehicle"]
  %h2 Revenue Vehicles
  = render :partial => 'transit_assets/revenue_vehicle_index_table'
  = render :partial => 'transit_assets/rail_car_index_table'
  = render :partial => 'transit_assets/ferry_index_table'
  = render :partial => 'transit_assets/other_passenger_vehicle_index_table'
-elsif @fta_asset_class.name.in? ["track", "guideway", "power_signal"]
  %h2 Infrastructure
  = render :partial => 'transit_assets/track_index_table'
  = render :partial => 'transit_assets/guideway_index_table'
  = render :partial => 'transit_assets/power_signal_index_table'
-else
  =@fta_asset_class.name

Use code and not name to identify infrastructure table.

-if @fta_asset_class.code.in? ["bus", "rail_car", "ferry", "other_passenger_vehicle"]
  %h2 Revenue Vehicles
  = render :partial => 'transit_assets/revenue_vehicle_index_table'
  = render :partial => 'transit_assets/rail_car_index_table'
  = render :partial => 'transit_assets/ferry_index_table'
  = render :partial => 'transit_assets/other_passenger_vehicle_index_table'
-elsif @fta_asset_class.code.in? ["track", "guideway", "power_signal"]
  %h2 Infrastructure
  = render :partial => 'transit_assets/track_index_table'
  = render :partial => 'transit_assets/guideway_index_table'
  = render :partial => 'transit_assets/power_signal_index_table'
-else
  =@fta_asset_class.name


.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
  .fade-left= icon('angle-left')
  .fade-right= icon('angle-right')
  %ul.nav-links.event-filter.scrolling-tabs.nav.nav-tabs
    = event_filter_link EventFilter.all, _('All'), s_('EventFilterBy|Filter by all')
    - if event_filter_visible(:repository)
      = event_filter_link EventFilter.push, _('Push events'), s_('EventFilterBy|Filter by push events')
    - if event_filter_visible(:merge_requests)
      = event_filter_link EventFilter.merged, _('Merge events'), s_('EventFilterBy|Filter by merge events')
    - if event_filter_visible(:issues)
      = event_filter_link EventFilter.issue, _('Issue events'), s_('EventFilterBy|Filter by issue events')
    - if comments_visible?
      = event_filter_link EventFilter.comments, _('Comments'), s_('EventFilterBy|Filter by comments')
    = event_filter_link EventFilter.team, _('Team'), s_('EventFilterBy|Filter by team')

Add flex to tabs container

.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller.flex-fill
  .fade-left= icon('angle-left')
  .fade-right= icon('angle-right')
  %ul.nav-links.event-filter.scrolling-tabs.nav.nav-tabs
    = event_filter_link EventFilter.all, _('All'), s_('EventFilterBy|Filter by all')
    - if event_filter_visible(:repository)
      = event_filter_link EventFilter.push, _('Push events'), s_('EventFilterBy|Filter by push events')
    - if event_filter_visible(:merge_requests)
      = event_filter_link EventFilter.merged, _('Merge events'), s_('EventFilterBy|Filter by merge events')
    - if event_filter_visible(:issues)
      = event_filter_link EventFilter.issue, _('Issue events'), s_('EventFilterBy|Filter by issue events')
    - if comments_visible?
      = event_filter_link EventFilter.comments, _('Comments'), s_('EventFilterBy|Filter by comments')
    = event_filter_link EventFilter.team, _('Team'), s_('EventFilterBy|Filter by team')


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

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

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

  = f.buttons do
    = f.commit_button

Drop inline styles in batch activity form.

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

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

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

  = f.buttons do
    = f.commit_button


= semantic_form_for @salary_template do |f|
  = f.semantic_errors
  = f.inputs do
    .row
      .span8= f.input :title, :input_html => {"data-autofocus" => true}
      .span8= f.input :person, :collection => Employee.all
    .row
      .span16= f.input :remarks, :input_html => {:rows => 2, :class => 'span12'}

  = render 'salary_items/list_form', :f => f

  = f.buttons do
    = f.commit_button

Use combobox for employee in salary_template form.

= semantic_form_for @salary_template do |f|
  = f.semantic_errors
  = f.inputs do
    .row
      .span8= f.input :title, :input_html => {"data-autofocus" => true}
      .span8= f.input :person, :as => :combobox, :collection => Employee.all
    .row
      .span16= f.input :remarks, :input_html => {:rows => 2, :class => 'span12'}

  = render 'salary_items/list_form', :f => f

  = f.buttons do
    = f.commit_button


.panel.panel-default
	.panel-heading
		%h4.panel-title= 'The $' + budgetpp.to_s + ' budget per person menu includes:'
	.panel-body
		-item_types.each do |item_type|
			= item_counts[item_type].to_s + ' ' + item_type + '(s)'

Fix spacing for budget description

.panel.panel-default
	.panel-heading
		%h4.panel-title= 'The $' + budgetpp.to_s + ' budget per person menu includes:'
	.panel-body
		-item_types.each do |item_type|
			%div= item_counts[item_type].to_s + ' ' + item_type + '(s)'


.story-index.panel.panel-default.active
  .panel-heading
    Story Index
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    /- if defined? edit
    %a.btn.btn-default.btn-primary{ href: new_chapter_path(@story) }
      Add Chapter

Fix New Chapter helper path

.story-index.panel.panel-default.active
  .panel-heading
    Story Index
    %button.close{type: "button", "aria-label" => "Close"}
      %span{"aria-hidden" => "true"}
        &times
  .panel-body
    /- if defined? edit
    %a.btn.btn-default.btn-primary{ href: new_story_chapter_path(@story) }
      Add Chapter


= form_for [@project, @label], html: { class: 'form-horizontal label-form' } do |f|
  -if @label.errors.any?
    .row
      .col-sm-10.col-sm-offset-2
        .bs-callout.bs-callout-danger
          - @label.errors.full_messages.each do |msg|
            %span= msg
            %br

  .form-group
    = f.label :title, class: 'control-label'
    .col-sm-10
      = f.text_field :title, class: "form-control", required: true
  .form-group
    = f.label :color, "Background Color", class: 'control-label'
    .col-sm-10
      .input-group
        .input-group-addon.label-color-preview
        = f.text_field :color, placeholder: "#AA33EE", class: "form-control"
      .help-block
        6 character hex values starting with a # sign.
        %br
        Or you can choose one of suggested colors below

      .suggest-colors
        - suggested_colors.each do |color|
          = link_to '#', style: "background-color: #{color}", data: { color: color } do

  .form-actions
    = f.submit 'Save', class: 'btn btn-save js-save-button'
    = link_to "Cancel", project_labels_path(@project), class: 'btn btn-cancel'

Change label color text field type to "color"

= form_for [@project, @label], html: { class: 'form-horizontal label-form' } do |f|
  -if @label.errors.any?
    .row
      .col-sm-10.col-sm-offset-2
        .bs-callout.bs-callout-danger
          - @label.errors.full_messages.each do |msg|
            %span= msg
            %br

  .form-group
    = f.label :title, class: 'control-label'
    .col-sm-10
      = f.text_field :title, class: "form-control", required: true
  .form-group
    = f.label :color, "Background Color", class: 'control-label'
    .col-sm-10
      .input-group
        .input-group-addon.label-color-preview
        = f.color_field :color, placeholder: "#AA33EE", class: "form-control"
      .help-block
        6 character hex values starting with a # sign.
        %br
        Or you can choose one of suggested colors below

      .suggest-colors
        - suggested_colors.each do |color|
          = link_to '#', style: "background-color: #{color}", data: { color: color } do

  .form-actions
    = f.submit 'Save', class: 'btn btn-save js-save-button'
    = link_to "Cancel", project_labels_path(@project), class: 'btn btn-cancel'


.banner.banner-metrics
  .container
    %h3 This week at morph.io
    - cache 'vanity_stats', :expires_in => 1.hour do
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_pages_scraped_in_last_week)
        web pages scraped
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_database_rows_updated_in_last_week)
        rows of data collected
      .metric-box.col-sm-4
        %strong= number_with_delimiter(Morph::VanityStats.total_api_queries_in_last_week)
        downloads & API queries

Comment out statistic on web pages scraped on landing page because it's currently broken

.banner.banner-metrics
  .container
    %h3 This week at morph.io
    - cache 'vanity_stats', :expires_in => 1.hour do
      -# Commented out until collection of web pages stats is working again
      -# .metric-box.col-sm-4
      -#   %strong= number_with_delimiter(Morph::VanityStats.total_pages_scraped_in_last_week)
      -#   web pages scraped
      .metric-box.col-sm-6
        %strong= number_with_delimiter(Morph::VanityStats.total_database_rows_updated_in_last_week)
        rows of data collected
      .metric-box.col-sm-6
        %strong= number_with_delimiter(Morph::VanityStats.total_api_queries_in_last_week)
        downloads & API queries


= f_form_for current_order, url: main_app.update_checkout_path,
  html: {name: "checkout",
    id: "checkout_form",
    novalidate: true,
    name: "checkout"} do |f|

  :javascript
    angular.module('Darkswarm').value('order', #{render "checkout/order"})

  -#%pre
    -#{{ Order.order}}

  .small-12.columns
    %h3.text-center.pad-top
      Checkout from
      = current_distributor.name

    = render partial: "checkout/details", locals: {f: f}
    = render partial: "checkout/billing", locals: {f: f}
    = render partial: "checkout/shipping", locals: {f: f}
    = render partial: "checkout/payment", locals: {f: f}
    %p
      %input.button.primary{type: :submit,
      value: "Place order now",
      "ng-click" => "purchase($event)",
      "ng-show" => "checkout.$valid"}

Update behaviour on Place Order Now button so it is disabled but not hidden when unavailable

= f_form_for current_order, url: main_app.update_checkout_path,
  html: {name: "checkout",
    id: "checkout_form",
    novalidate: true,
    name: "checkout"} do |f|

  :javascript
    angular.module('Darkswarm').value('order', #{render "checkout/order"})

  -#%pre
    -#{{ Order.order}}

  %div
    %h3.text-center.pad-top
      Checkout from
      = current_distributor.name

    = render partial: "checkout/details", locals: {f: f}
    = render partial: "checkout/billing", locals: {f: f}
    = render partial: "checkout/shipping", locals: {f: f}
    = render partial: "checkout/payment", locals: {f: f}
    %p
      %button.button.primary{type: :submit,
      "ng-click" => "purchase($event)",
      "ng-disabled" => "checkout.$invalid"}
        Place order now
      / {{ checkout.$valid }}


!!! 5
%html{ lang: "en"}
  = render "layouts/head"
  %body.ui_basic.login-page
    = render "layouts/flash"
    .container
      .content
        .login-title
          %h1= brand_title
    %hr
    .container
      .content
        .row
          .col-sm-7
            .brand-image
              = brand_image
            .brand_text
              = brand_text
          .col-sm-5
            = yield

Improve login page for small screens

!!! 5
%html{ lang: "en"}
  = render "layouts/head"
  %body.ui_basic.login-page
    = render "layouts/flash"
    .container
      .content
        .login-title
          %h1= brand_title
    %hr
    .container
      .content
        .row
          .col-md-7
            .brand-image
              = brand_image
            .brand_text
              = brand_text
          .col-md-5
            = yield


%ul.nav.nav-list
  %li.nav-header= t('bookyt.main_navigation.accounting')
  %li= link_to t_title(:new, Booking), new_booking_path
  - BookingTemplate.where(:type => nil).limit(5).find_each do |template|
    -# TODO: quick fix for leftover booking template in feature spec
    %li= link_to template, [:new_booking, template] unless template.to_s.nil?

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

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

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

Revert "Fix for corner case of booking template with nil title; fixes feature spec with leftover booking template."

%ul.nav.nav-list
  %li.nav-header= t('bookyt.main_navigation.accounting')
  %li= link_to t_title(:new, Booking), new_booking_path
  - BookingTemplate.where(:type => nil).limit(5).each do |template|
    %li= link_to template, [:new_booking, template]

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

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

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


= semantic_form_for @profile, url: [@profile.group, :profile] do |f|
  = f.inputs do
    = f.input :description
    = f.input :loc_json, as: :hidden
    %li.input
      = f.semantic_errors :location
      = render partial: "shared/edit_map", locals: { resource: @profile, location: @profile.location }
    = f.input :picture, as: :file
    = f.input :retained_picture, as: :hidden
    = f.input :logo, as: :file
    = f.input :retained_logo, as: :hidden
    = f.input :joining_instructions, hint: t("formtastic.hints.group_profile.joining_instructions", application_name: @site_config.application_name)
    = f.input :new_user_email, placeholder: t("formtastic.placeholders.group_profile.new_user_email", application_name: @site_config.application_name, application_domain: @site_config.email_domain)
  = f.actions

Add fallback location for new groups

= semantic_form_for @profile, url: [@profile.group, :profile] do |f|
  = f.inputs do
    = f.input :description
    = f.input :loc_json, as: :hidden
    %li.input
      = f.semantic_errors :location
      = render partial: "shared/edit_map", locals: { resource: @profile, location: @profile.location || @start_location }
    = f.input :picture, as: :file
    = f.input :retained_picture, as: :hidden
    = f.input :logo, as: :file
    = f.input :retained_logo, as: :hidden
    = f.input :joining_instructions, hint: t("formtastic.hints.group_profile.joining_instructions", application_name: @site_config.application_name)
    = f.input :new_user_email, placeholder: t("formtastic.placeholders.group_profile.new_user_email", application_name: @site_config.application_name, application_domain: @site_config.email_domain)
  = f.actions


- backups = resource.backups
- if backups.empty?
  = boot_no_entry_alert
  .backups.collection
- else
  = render 'backups/list', :collection => backups

.form-actions
  = icon_link_to :backup, tenant_backups_path(resource), :method => :post, :remote => true

Add icon to backup button in tenant view.

- backups = resource.backups
- if backups.empty?
  = boot_no_entry_alert
  .backups.collection
- else
  = render 'backups/list', :collection => backups

.form-actions
  = icon_link_to :backup, tenant_backups_path(resource), :icon => 'download-alt', :method => :post, :remote => true


!!! 5
%html
  %head
    %title Cloudsdale
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    = favicon_link_tag "favicons/48by48.ico"
    = csrf_meta_tags
    %meta{:content => "user-scalable=no, width=device-width", :name => "viewport", :id => "view"}
    = yield :head

  %body{ :class => "#{params[:controller].to_s.parameterize} #{params[:action].to_s.parameterize}", :data => { :controller => params[:controller], :action => params[:action]} }
    = render :partial => 'layouts/topbar'
    .bg-container
      .bg-main

    .container-fluid.body
      = render partial: 'layouts/alert'
      .content{ :data => { 'pjax-container' => ''} }
        = yield

    = render :partial => 'layouts/bottombar'

Set viewport width to 760px

!!! 5
%html
  %head
    %title Cloudsdale
    = stylesheet_link_tag "application"
    = javascript_include_tag "application"
    = favicon_link_tag "favicons/48by48.ico"
    = csrf_meta_tags
    %meta{:content => "user-scalable=no, width=760", :name => "viewport", :id => "view"}
    = yield :head

  %body{ :class => "#{params[:controller].to_s.parameterize} #{params[:action].to_s.parameterize}", :data => { :controller => params[:controller], :action => params[:action]} }
    = render :partial => 'layouts/topbar'
    .bg-container
      .bg-main

    .container-fluid.body
      = render partial: 'layouts/alert'
      .content{ :data => { 'pjax-container' => ''} }
        = yield

    = render :partial => 'layouts/bottombar'


%section.node-streetview
  %h2=t('.streetview')
  = image_tag("//maps.googleapis.com/maps/api/streetview?size=640x426&location=#{node_streetview.lat},#{node_streetview.lon}&sensor=false", alt: "Streetview: #{node_streetview.headline}")
  %small.pull-right
    - if node_streetview.osm_id < 0
      = link_to t('nodes.show.show-in-osm'), "http://openstreetmap.org/browse/way/#{node_streetview.osm_id.abs}"
    - else
      = link_to t('nodes.show.show-in-osm'), "http://openstreetmap.org/browse/node/#{node_streetview.osm_id}"

Fix styling of google street view image and OSM link.

%section.node-streetview
  %h2=t('.streetview')
  %p
    = image_tag("//maps.googleapis.com/maps/api/streetview?size=640x426&location=#{node_streetview.lat},#{node_streetview.lon}&sensor=false", alt: "Streetview: #{node_streetview.headline}")
  .pull-right
    %p
      %small
        - if node_streetview.osm_id < 0
          = link_to t('nodes.show.show-in-osm'), "http://openstreetmap.org/browse/way/#{node_streetview.osm_id.abs}"
        - else
          = link_to t('nodes.show.show-in-osm'), "http://openstreetmap.org/browse/node/#{node_streetview.osm_id}"


%fieldset#payment
  %ng-form{"ng-controller" => "PaymentCtrl", name: "payment"}

    %h5{"ng-class" => "{valid: payment.$valid, dirty: details.$dirty}"}
      %span.right
        %label.label.round.alert
          %i.ofn-i_009-close
        %label.label.round.success
          %i.ofn-i_051-check-big
      Payment

    %accordion-group{"is-open" => "accordion.payment",
      "ng-class" => "{valid: payment.$valid, open: accordion.payment}"}
      %accordion-heading
        .row
          .small-11.columns
            %em
              %small
                {{ Order.paymentMethod().name }}
          .small-1.columns.right
            %span.accordion-up.right
              %i.ofn-i_006-caret-up
            %span.accordion-down.right
              %i.ofn-i_005-caret-down

      - current_order.available_payment_methods.each do |method|
        .row
          .small-12.columns
            %label
              = radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
                required: true,
                "ng-model" => "order.payment_method_id"
              = method.name
        .row{"ng-show" => "order.payment_method_id == #{method.id}"}
          .small-12.columns
            = render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }

Add class right to icons

%fieldset#payment
  %ng-form{"ng-controller" => "PaymentCtrl", name: "payment"}

    %h5{"ng-class" => "{valid: payment.$valid, dirty: details.$dirty}"}
      %span.right
        %label.label.round.alert.right
          %i.ofn-i_009-close
        %label.label.round.success.right
          %i.ofn-i_051-check-big
      Payment

    %accordion-group{"is-open" => "accordion.payment",
      "ng-class" => "{valid: payment.$valid, open: accordion.payment}"}
      %accordion-heading
        .row
          .small-11.columns
            %em
              %small
                {{ Order.paymentMethod().name }}
          .small-1.columns.right
            %span.accordion-up.right
              %i.ofn-i_006-caret-up
            %span.accordion-down.right
              %i.ofn-i_005-caret-down

      - current_order.available_payment_methods.each do |method|
        .row
          .small-12.columns
            %label
              = radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, false,
                required: true,
                "ng-model" => "order.payment_method_id"
              = method.name
        .row{"ng-show" => "order.payment_method_id == #{method.id}"}
          .small-12.columns
            = render partial: "spree/checkout/payment/#{method.method_type}", :locals => { :payment_method => method }


.col-xs-2
  %a#title-navbar{ href: root_path }
    .row#home
      .col-lg-6.no-padding
        = image_tag('marianne.svg', class: 'logo')
      .col-lg-6.no-padding#tps-title
        demarches-simplifiees.fr

.col-xs-10.no-padding
  #navbar-body
    .row
      %div{ style: "vertical-align: middle;float:left;position:absolute;line-height: 60px;z-index:2;" }
        Besoin d'aide ? #{CONTACT_PHONE} ou #{CONTACT_EMAIL}
      -# BEST WTF EVER
      -# this begin rescue hides potentials bugs by displaying another navbar
      - begin
        = render partial: @navbar_url
      - rescue
        = render partial: 'layouts/navbars/navbar_default'

      = render partial: 'layouts/navbars/navbar_log_options'

Remove mailto contact DS into admin header

.col-xs-2
  %a#title-navbar{ href: root_path }
    .row#home
      .col-lg-6.no-padding
        = image_tag('marianne.svg', class: 'logo')
      .col-lg-6.no-padding#tps-title
        demarches-simplifiees.fr

.col-xs-10.no-padding
  #navbar-body
    .row
      %div{ style: "vertical-align: middle;float:left;position:absolute;line-height: 60px;z-index:2;" }
        Besoin d'aide ? #{CONTACT_PHONE} ou par email
      -# BEST WTF EVER
      -# this begin rescue hides potentials bugs by displaying another navbar
      - begin
        = render partial: @navbar_url
      - rescue
        = render partial: 'layouts/navbars/navbar_default'

      = render partial: 'layouts/navbars/navbar_log_options'


%tr
  %td=node_type.localized_name
  %td=image_tag("/marker/yes/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/limited/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/no/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/unknown/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/icons/#{node_type.icon}", :size => '22x22')
  %td=link_to "#{node_type.osm_key}=#{node_type.osm_value}", "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}"
  %td=number_with_delimiter(node_type.pois.count)

Fix routing error for icons on node_types page

%tr
  %td=node_type.localized_name
  %td=image_tag("/marker/yes/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/limited/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/no/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/marker/unknown/#{node_type.icon}", :size => '32x37')
  %td=image_tag("/assets/icons/#{node_type.icon}", :size => '22x22')
  %td=link_to "#{node_type.osm_key}=#{node_type.osm_value}", "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}"
  %td=number_with_delimiter(node_type.pois.count)


-if current_user == @user
  .row
    .col.s12
      =link_to user_list_edit_path(current_user.name, @list), class: 'waves-effect waves-light btn' do
        %i.material-icons.left mode_edit
        Edit this list
-if @list
  .row
    .col.s12
      %p.flow-text=@list.title
      %p
        by
        =link_to @user.name, user_path(@user.name)
      %p=@list.description
  -if @list.tags
    .row
      .col.s12
        =render partial: "tags/tag", collection: @list.tags
  .row
    .col.s12
      %ul.collection
        =render partial: "lists/list_item", collection: @list.list_items
-else
  .row
    %p No list found.

-if current_user == @user
  .row
    .col.s12
      =link_to user_list_edit_path(current_user.name, @list), class: 'waves-effect waves-light btn' do
        %i.material-icons.left mode_edit
        Edit this list

Remove materialize, add delete button.

-if current_user == @user
  =link_to 'Edit', user_list_edit_path(current_user.name, @list)
  =link_to 'Delete', user_list_destroy_path(current_user.name, @list), method: :delete

-if @list
  %p=@list.title
  %p
    by
    =link_to @user.name, user_path(@user.name)
  %p=@list.description

  -if @list.tags
    =render partial: "tags/tag", collection: @list.tags

  =render partial: "lists/list_item", collection: @list.list_items
-else
  .row
    %p No list found.

-if current_user == @user
  =link_to 'Edit this list', user_list_edit_path(current_user.name, @list)


= form_for resource, :html => { :class => 'form-horizontal' } do |f|
  .control-group
    = f.label :name, :class => 'control-label'
    .controls
      = f.text_field :name, :class => 'text_field'

  .form-actions

    = f.submit nil, :class => 'btn btn-primary'

    = cancel_resource_path

Fix from submission path in groups settings

= form_for [:settings, resource], :html => { :class => 'form-horizontal' } do |f|
  .control-group
    = f.label :name, :class => 'control-label'
    .controls
      = f.text_field :name, :class => 'text_field'

  .form-actions

    = f.submit nil, :class => 'btn btn-primary'

    = cancel_resource_path


%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.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox, :style => 'width: 94%', :wrapper => :inline
    %td.span1= f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox, :style => 'width: 94%', :wrapper => :inline

    %td{:style => 'display:none'}= f.hidden_field :id

    .span6

Drop sneaked in .span6 breaking accounts/edit_bookings.


- classes = [ "", "", "" ]
- checked = [ false, false, false ]
- selected = viz || 0
- classes[selected] = "active"
- checked[selected] = true
.btn-group.btn-group-lg.btn-group-toggle{"data-toggle" => "buttons"}
  %label.btn.btn-secondary{ title: "Visible on your public Cutouts page", class: classes[0] }
    %input{ type: "radio", name: "visibility", value: "0", checked: checked[0] }
      %span Public
      %span.align-middle= fa_icon("globe", class: "fa-2x")
  %label.btn.btn-secondary{ title: "Invisible on your public Cutouts page, but you can still share the link to the cutout", class: classes[1] }
    %input{ type: "radio", name: "visibility", value: "1", checked: checked[1] }
      %span Unlisted
      %span= fa_icon("unlock", class: "fa-2x")
  %label.btn.btn-secondary{ title: "Visible only to you", class: classes[2] }
    %input{ type: "radio", name: "visibility", value: "2", checked: checked[2] }
      %span Private
      %span= fa_icon("lock", class: "fa-2x")

Convert to integer before selecting active visibility

- classes = [ "", "", "" ]
- checked = [ false, false, false ]
- selected = viz.to_i || 0
- classes[selected] = "active"
- checked[selected] = true
.btn-group.btn-group-lg.btn-group-toggle{"data-toggle" => "buttons"}
  %label.btn.btn-secondary{ title: "Visible on your public Cutouts page", class: classes[0] }
    %input{ type: "radio", name: "visibility", value: "0", checked: checked[0] }
      %span Public
      %span.align-middle= fa_icon("globe", class: "fa-2x")
  %label.btn.btn-secondary{ title: "Invisible on your public Cutouts page, but you can still share the link to the cutout", class: classes[1] }
    %input{ type: "radio", name: "visibility", value: "1", checked: checked[1] }
      %span Unlisted
      %span= fa_icon("unlock", class: "fa-2x")
  %label.btn.btn-secondary{ title: "Visible only to you", class: classes[2] }
    %input{ type: "radio", name: "visibility", value: "2", checked: checked[2] }
      %span Private
      %span= fa_icon("lock", class: "fa-2x")


%header.contain-to-grid
  - if staging_users_should_be_warned
    .alert-box.alert.text-center
      %h3
        = raw t('modules.common.topbar.test_environment_warning')
        %a.close{href: "#"}×
  %nav.top-bar{ data: { topbar: true } }

    %ul.left
      %li.sidebar-toggle
        %a.left-off-canvas-toggle
          %span
            %i.fa.fa-bars

    %ul.title-area
      %li.name
        = image_tag asset_path("logo/hacken_in-32-white.png"), class: "hacken-logo"
        %h1
          = link_to 'hacken.in', :root

    %section.top-bar-section
      - if current_region.present?
        %ul.right.show-for-medium-up
          = form_tag search_path(region: current_region), :method => 'get' do
            %li.search-form
              .row
                .search-field
                  = text_field_tag :search, params[:search], placeholder: t('modules.common.topbar.search_form.field_placeholder')
                .search-button
                  %a.button{href: "#"}= t('modules.common.topbar.search_form.button')
        %ul.right.show-for-small-only
          %li.search-icon
            %a{href: search_path(region: current_region)}
              %i.fa.fa-search

Add dropdown for choosing another city

%header.contain-to-grid
  - if staging_users_should_be_warned
    .alert-box.alert.text-center
      %h3
        = raw t('modules.common.topbar.test_environment_warning')
        %a.close{href: "#"}×
  %nav.top-bar{ data: { topbar: true } }

    %ul.left
      %li.sidebar-toggle
        %a.left-off-canvas-toggle
          %span
            %i.fa.fa-bars

    %ul.title-area
      %li.name
        = image_tag asset_path("logo/hacken_in-32-white.png"), class: "hacken-logo"
        %h1
          = link_to 'hacken.in', :root

    %section.top-bar-section
      %ul.left
        %li.has-dropdown
          = link_to "Berlin", "#"
          = link_to "Koeln", "#"
          = link_to "Muenchen", "#"
      - if current_region.present?
        %ul.right.show-for-medium-up
          = form_tag search_path(region: current_region), :method => 'get' do
            %li.search-form
              .row
                .search-field
                  = text_field_tag :search, params[:search], placeholder: t('modules.common.topbar.search_form.field_placeholder')
                .search-button
                  %a.button{href: "#"}= t('modules.common.topbar.search_form.button')
        %ul.right.show-for-small-only
          %li.search-icon
            %a{href: search_path(region: current_region)}
              %i.fa.fa-search


%label.mdl-checkbox.mdl-js-checkbox.mdl-js-ripple-effect{ for: @model[:node]["id"] }
  = @model[:form].check_box 'data[value]', { checked: @model[:node]["id"], class: 'mdl-checkbox__input', id: @model[:node]["id"] }
  = @model[:form].label :data, @model[:child].to_s + " " + @model[:node]["node"]["name"], class: 'mdl-checkbox__label'

- if @model[:node]["children"].any?
  - @model[:node]["children"].each do |child|
    = cell('cortex/field_types/core/tree/checkbox', node: child, form: @model[:form], child: @model[:child].to_s + " " + "->").(:checkbox)

Add ability to track all inputs into a tree from the same form

%label.mdl-checkbox.mdl-js-checkbox.mdl-js-ripple-effect{ for: @model[:node]["id"] }
  = @model[:form].check_box "data[values][#{@model[:node]['id']}]", { checked: @model[:node]["id"], class: 'mdl-checkbox__input', id: @model[:node]["id"] }
  = @model[:form].label :data, @model[:child].to_s + " " + @model[:node]["node"]["name"], class: 'mdl-checkbox__label'

- if @model[:node]["children"].any?
  - @model[:node]["children"].each do |child|
    = cell('cortex/field_types/core/tree/checkbox', node: child, form: @model[:form], child: @model[:child].to_s + " " + "->").(:checkbox)


.navbar
  %nav.footer
    %div
      = link_to controller: "help", action: "syntax" do
        Syntax Help
      •
      = link_to controller: "help", action: "rules" do
        Rules
      •
      = link_to controller: "help", action: "contact" do
        Contact
      •
      %a{href: "https://fenhl.net/disc"}
        Disclaimer / Impressum
    %div
      = link_to controller: "set", action: "index" do
        Sets
      •
      = link_to controller: "artist", action: "index" do
        Artists
      •
      = link_to controller: "format", action: "index" do
        Formats
      •
      = link_to controller: "sealed", action: "index" do
        Sealed
      •
      = link_to controller: "deck", action: "index" do
        Decks
      •
      = link_to controller: "deck", action: "visualize" do
        View Your Deck
      •
      = link_to controller: "event", action: "index" %do
        Events
      •
      %a{href: "/download"}
        Downloads

Fix syntax error in footer

.navbar
  %nav.footer
    %div
      = link_to controller: "help", action: "syntax" do
        Syntax Help
      •
      = link_to controller: "help", action: "rules" do
        Rules
      •
      = link_to controller: "help", action: "contact" do
        Contact
      •
      %a{href: "https://fenhl.net/disc"}
        Disclaimer / Impressum
    %div
      = link_to controller: "set", action: "index" do
        Sets
      •
      = link_to controller: "artist", action: "index" do
        Artists
      •
      = link_to controller: "format", action: "index" do
        Formats
      •
      = link_to controller: "sealed", action: "index" do
        Sealed
      •
      = link_to controller: "deck", action: "index" do
        Decks
      •
      = link_to controller: "deck", action: "visualize" do
        View Your Deck
      •
      = link_to controller: "event", action: "index" do
        Events
      •
      %a{href: "/download"}
        Downloads


= article_for poll do |c|
  - c.title = "#{link_to "Sondage", "/sondages"} #{link_to poll.title, poll}".html_safe
  - c.body  = render("polls/answers_#{poll_current_or_archived poll}", :poll => poll)
  - c.actions = capture do
    - if current_account && current_account.can_update?(poll)
      = link_to("Modifier", edit_moderation_poll_path(poll), :class => 'action')
    - if poll.answerable_by?(request.remote_ip)
      = link_to("Afficher les résultats", :results => 1)

Fix link for showing results of a poll

= article_for poll do |c|
  - c.title = "#{link_to "Sondage", "/sondages"} #{link_to poll.title, poll}".html_safe
  - c.body  = render("polls/answers_#{poll_current_or_archived poll}", :poll => poll)
  - c.actions = capture do
    - if current_account && current_account.can_update?(poll)
      = link_to("Modifier", edit_moderation_poll_path(poll), :class => 'action')
    - if poll.answerable_by?(request.remote_ip)
      = link_to("Afficher les résultats", :controller => "polls", :action => "show", :id => poll.to_param, :results => 1)


.page-header
  %h1 Boards

%ul.unstyled
  - @boards.each do |board|
    %li= link_to board.name, board_path(board)

= simple_form_for AllAboard::Board.new do |f|
  = f.input :name
  = f.button :submit, "Create"

Make Board creation form a little more bootstrappy.

.page-header
  %h1 Boards

%ul.unstyled
  - @boards.each do |board|
    %li= link_to board.name, board_path(board)

.well.span3
  = simple_form_for AllAboard::Board.new do |f|
    %legend Create Board

    = f.input :name
    = f.button :submit, "Create", class: "btn btn-primary"


- content_for :title, "Using PhantomJS"
:markdown
  ## PhantomJS

  In most circumstances web scraping is done by downloading a web page using your programming language and a library.
  However in some cases you need to simulate a web browser.
  This could be because the web site is poorly programmed or because it makes extensive use of JavaScript.

  You can do this with [PhantomJS](http://phantomjs.org/) on morph.io. It is essentially a headless browser that you can control from your scraper using JavaScript or a wrapper library.

  ### Using
  #{render "language_tabs", id_prefix: "using_phantomjs", path: "documentation/phantomjs"}

  ### Examples
  #{render "missing_documentation"}

Switch to HAML. Not much advantage to using Markdown here

- content_for :title, "Using PhantomJS"
:markdown
  ## PhantomJS

  In most circumstances web scraping is done by downloading a web page using your programming language and a library.
  However in some cases you need to simulate a web browser.
  This could be because the web site is poorly programmed or because it makes extensive use of JavaScript.

  You can do this with [PhantomJS](http://phantomjs.org/) on morph.io. It is essentially a headless browser that you can control from your scraper using JavaScript or a wrapper library.

%h3 Using
= render "language_tabs", id_prefix: "using_phantomjs", path: "documentation/phantomjs"

%h3 Examples
= render "missing_documentation"


- if can?(:edit, planting)
  .btn-group.planting-actions
    = render 'shared/buttons/edit', path: edit_planting_path(planting)
    = render 'shared/buttons/add_photo', path: new_photo_path(id: planting.id, type: 'planting')

    - if planting.active?
      = render 'shared/buttons/finish_planting', planting: planting
      = render 'shared/buttons/harvest_planting', planting: planting
      = render 'shared/buttons/save_seeds', planting: planting

  - if can? :destroy, planting
    = render 'shared/buttons/delete', path: planting

Move planting delete action into the bar