%ul.tabs
  - conference_tab(:settings, active) do
    = link_to t(:settings), edit_conference_path
  - conference_tab(:days, active) do
    = link_to t(:days), edit_days_conference_path
  - conference_tab(:tracks, active) do
    = link_to t(:tracks), edit_tracks_conference_path
  - conference_tab(:rooms, active) do
    = link_to t(:rooms), edit_rooms_conference_path
  - conference_tab(:schedule, active) do
    = link_to t(:schedule), edit_schedule_conference_path
  - if @conference.ticket_server_enabled?
    - conference_tab(:ticket_server, active) do
      = link_to t(:ticket_server), edit_ticket_server_conference_path
  - if @conference.ticket_type == 'integrated'
    - conference_tab(:notifications, active) do
      = link_to "Notifications", edit_notifications_conference_path

Enable editing notifications for ticket server style conferences

%ul.tabs
  - conference_tab(:settings, active) do
    = link_to t(:settings), edit_conference_path
  - conference_tab(:days, active) do
    = link_to t(:days), edit_days_conference_path
  - conference_tab(:tracks, active) do
    = link_to t(:tracks), edit_tracks_conference_path
  - conference_tab(:rooms, active) do
    = link_to t(:rooms), edit_rooms_conference_path
  - conference_tab(:schedule, active) do
    = link_to t(:schedule), edit_schedule_conference_path
  - if @conference.ticket_server_enabled?
    - conference_tab(:ticket_server, active) do
      = link_to t(:ticket_server), edit_ticket_server_conference_path
  - conference_tab(:notifications, active) do
    = link_to "Notifications", edit_notifications_conference_path


= inject_enterprises
#hubs.hubs{"ng-controller" => "HubsCtrl"}
  .row
    .small-12.columns
      %h1 Shop in your local area

  #active-table-search.row.pad-top
    .small-12.columns
      %input{type: :text,
      "ng-model" => "query",
      placeholder: "Search by name or suburb...",
      "ng-debounce" => "150",
      "ofn-disable-enter" => true}

  = render partial: "home/filters"

  .row{bindonce: true}
    .small-12.columns
      .active_table
        %hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in filteredHubs = (hubs | hubs:query  | taxons:activeTaxons | shipping:shippingTypes | showProfiles:show_profiles )",
        "ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}",
        "scroll-after-load" => true,
        "ng-controller" => "HubNodeCtrl",
        id: "{{hub.hash}}"}
          .small-12.columns
            = render partial: 'home/skinny'
            = render partial: 'home/fat'

        .row{"ng-show" => "filteredHubs.length == 0"}
          .columns.small-12
            %p.no-results
              Sorry, no results found for
              %strong {{query}}.
              Try another search?

Add in class to show when hub is

= inject_enterprises
#hubs.hubs{"ng-controller" => "HubsCtrl"}
  .row
    .small-12.columns
      %h1 Shop in your local area

  #active-table-search.row.pad-top
    .small-12.columns
      %input{type: :text,
      "ng-model" => "query",
      placeholder: "Search by name or suburb...",
      "ng-debounce" => "150",
      "ofn-disable-enter" => true}

  = render partial: "home/filters"

  .row{bindonce: true}
    .small-12.columns
      .active_table
        %hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in filteredHubs = (hubs | hubs:query  | taxons:activeTaxons | shipping:shippingTypes | showProfiles:show_profiles )",
        "ng-class" => "{'is_profile' : hub.is_profile, 'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}",
        "scroll-after-load" => true,
        "ng-controller" => "HubNodeCtrl",
        id: "{{hub.hash}}"}
          .small-12.columns
            = render partial: 'home/skinny'
            = render partial: 'home/fat'

        .row{"ng-show" => "filteredHubs.length == 0"}
          .columns.small-12
            %p.no-results
              Sorry, no results found for
              %strong {{query}}.
              Try another search?


- @disable_logo_link = true
- @page_title = 'Log in'
- content_for :body_classes, 'login-page '

.grid-row.mod-heading
  .column-full
    %h1.heading-xlarge.mod-heading-border
      - if @unauthorised_login
        = t('.heading_unauthorised')
      - else
        = t('.heading')

    %p.lede
      - if @unauthorised_login
        - t('.intro_unauthorised', ttl: distance_of_time_in_words(Token.ttl)).each_line do |line|
          = line
      -else
        - t('.intro', ttl: distance_of_time_in_words(Token.ttl)).each_line do |line|
          = line

- if feature_enabled?('token_auth')
  %h2.heading-medium
    = t('.heading_other')

  = form_for (@token ||= Token.new) do |f|
    = f.text_field :user_email
    = f.hidden_field(:unauthorised_login, value: @unauthorised_login)
    = f.submit t('.log_in_email'), { class: 'button', data: token_request_analytics_attributes }

  %hr

.grid-row
  .column-full
    %h2.heading-medium
      = t('.heading_google')
    %p
      = t('.body_google')
    %p
      = link_to t('.log_in_google'), "/auth/gplus", class: 'button login-button'

Remove the sign in link for Google


%script{ type: "text/ng-template", id: "shop/shop.html" }
  .row
    .small-12.columns
      - if @order_cycles and @order_cycles.empty?
        .content
          .row
            %h4
              %i.ofn-i_012-warning
              = t :shopping_oc_closed
              %small
                %em
                  (
                  = render partial: "shopping_shared/next_order_cycle"
                  = render partial: "shopping_shared/last_order_cycle"
                  )
            %p
              = t :shopping_oc_closed_description

          - if shopfront_closed_message?
            .row
              .shopfront_closed_message
                = current_distributor.preferred_shopfront_closed_message.html_safe

      - unless require_customer?
        = render partial: "shop/products/form"

Improve layout of orders closed message

%script{ type: "text/ng-template", id: "shop/shop.html" }
  .row
    .small-12.columns
      - if @order_cycles and @order_cycles.empty?
        .content
          %h4
            %i.ofn-i_012-warning
            = t :shopping_oc_closed
            %small
              %em
                (
                = render partial: "shopping_shared/next_order_cycle"
                = render partial: "shopping_shared/last_order_cycle"
                )
          %p
            = t :shopping_oc_closed_description

          - if shopfront_closed_message?
            .shopfront_closed_message
              = current_distributor.preferred_shopfront_closed_message.html_safe

      - unless require_customer?
        = render partial: "shop/products/form"


%li.facet{:id => "facet_"+facet.id.to_s }
  .caption{:class => facet.color}
    =facet.caption
    -if user_signed_in?
      =link_to image_tag("fassets_core/edit.png"), edit_catalog_facet_path(@catalog, facet)
      %span.handle [drag me]
  %ul{:class => "#{facet.color}_lite"}
    -facet.labels.each do |label|
      -if @counts[label.id] && !@filter.include?(label.id)
        %li.label
          =link_to label.caption, catalog_path(@catalog, :filter => @filter.to_query_include(label.id))
          -if @counts[label.id] > 1
            %span.count="#{@counts[label.id]}&#215"

Change drag handle from text to icon

%li.facet{:id => "facet_"+facet.id.to_s }
  .caption{:class => facet.color}
    =facet.caption
    -if user_signed_in?
      =link_to image_tag("fassets_core/edit.png"), edit_catalog_facet_path(@catalog, facet)
      %span.handle=image_tag("fassets_core/drag.png")
  %ul{:class => "#{facet.color}_lite"}
    -facet.labels.each do |label|
      -if @counts[label.id] && !@filter.include?(label.id)
        %li.label
          =link_to label.caption, catalog_path(@catalog, :filter => @filter.to_query_include(label.id))
          -if @counts[label.id] > 1
            %span.count="#{@counts[label.id]}&#215"


%section#node-map
  %h2
    Karte:
  .map
    = image_tag("http://api.tiles.mapbox.com/v3/sozialhelden.map-iqt6py1k/#{node_map.lon},#{node_map.lat},17/359x239.png64", class: 'img-polaroid')
    %div{class: "leaflet-marker-icon public_transfer #{@node.wheelchair}"}
      .icon{id: @node.icon}
  %small.pull-right.bottom="License: ODbL OpenStreetMap"

Add size of map image.

%section#node-map
  %h2
    Karte:
  .map
    = image_tag("http://api.tiles.mapbox.com/v3/sozialhelden.map-iqt6py1k/#{node_map.lon},#{node_map.lat},17/359x239.png64", class: 'img-polaroid', width: 359, height: 239)
    %div{class: "leaflet-marker-icon public_transfer #{@node.wheelchair}"}
      .icon{id: @node.icon}
  %small.pull-right.bottom="License: ODbL OpenStreetMap"


.user{ :class => ("you" if user == current_user) }
  = raw gravatar_for(user)
  %p= link_to user, user, :title => user

Add link for user's gravatar

.user{ :class => ("you" if user == current_user) }
  = link_to gravatar_for(user).html_safe, user
  %p= link_to user, user, :title => user


- content_for :title, "Inbox"
- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Messages', notifications_path

- if @notifications.empty?
  .alert.alert-success{role: "alert"} You have no messages.
- else
  = paginate @notifications

  - @notifications.each do |n|
    .card.message
      .card-body
        .row
          .col-6.col-md-9
            %h3= link_to  n.subject, notification_path(n)
            %p
              - if n.read
                = icon 'far', 'envelope-open'
              - else
                = icon 'far', 'envelope'
                %strong unread
              = n.created_at
          .col-6.col-md-3.text-right
            = link_to n.sender do
              %h3
                /= render 'members/tiny', member: n.sender
                = n.sender
            = render 'members/follow_buttons', member: n.sender
      .card-footer
        = link_to 'Read', n, class: 'btn btn-primary'
        = link_to 'Reply', reply_link(n), class: 'btn btn-secondary'
        = link_to n, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-danger btn-xs' do
          = delete_icon
          = t('buttons.delete')
  = paginate @notifications

Handle messages from deleted members

- content_for :title, "Inbox"
- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Messages', notifications_path

- if @notifications.empty?
  .alert.alert-success{role: "alert"} You have no messages.
- else
  = paginate @notifications

  - @notifications.each do |n|
    .card.message
      .card-body
        .row
          .col-6.col-md-9
            %h3= link_to  n.subject, notification_path(n)
            %p
              - if n.read
                = icon 'far', 'envelope-open'
              - else
                = icon 'far', 'envelope'
                %strong unread
              = n.created_at
          .col-6.col-md-3.text-right
            - if n.sender.present?
              = link_to n.sender do
                %h3
                  = render 'members/tiny', member: n.sender
                  = n.sender
              = render 'members/follow_buttons', member: n.sender
            - else
              Member deleted
      .card-footer
        = link_to 'Read', n, class: 'btn btn-primary'
        = link_to 'Reply', reply_link(n), class: 'btn btn-secondary'
        = link_to n, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-danger btn-xs' do
          = delete_icon
          = t('buttons.delete')
  = paginate @notifications


- if pickup_posts.exists?
  %h2.subheading.subheading--aside.subheading--press-articles.subheading--press-articles--pickup ピックアップ記事
  %ul.pickup-articles
    - pickup_posts.includes(post: [:categories]).published.ordered.each do |pickup_post|
      = render partial: 'posts/summary_with_content', locals: {post: pickup_post.post}

Add missing scope to show published only posts as pickup

- if pickup_posts.published.exists?
  %h2.subheading.subheading--aside.subheading--press-articles.subheading--press-articles--pickup ピックアップ記事
  %ul.pickup-articles
    - pickup_posts.includes(post: [:categories]).published.ordered.each do |pickup_post|
      = render partial: 'posts/summary_with_content', locals: {post: pickup_post.post}


.social-share
  %ul
    %li
      %a.twitter{ href: 'javascript: void(0)', title: 'Share on Twitter', onClick: 'window.open("https://twitter.com/intent/tweet?text='+title+'&url='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=500");' }
        = render 'partials/icons/twitter'
        = _('Share on Twitter')
    %li
      %a.facebook{ href: 'javascript: void(0)', title: 'Share on Facebook', onClick: 'window.open("https://www.facebook.com/dialog/share?app_id=818301894905112&display=popup&href='+request.original_url+'&redirect_uri='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=325");' }
        = render 'partials/icons/facebook'
        = _('Share on Facebook')
    %li
      %a.gplus{ href: 'javascript: void(0)', title: 'Share on Google Plus', onClick: 'window.open("https://plus.google.com/share?url='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=500");' }
        = render 'partials/icons/gplus'
        = _('Share on Google Plus')

Add support for social sharing through custom Facebook apps

.social-share
  %ul
    %li
      %a.twitter{ href: 'javascript: void(0)', title: 'Share on Twitter', onClick: 'window.open("https://twitter.com/intent/tweet?text='+title+'&url='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=500");' }
        = render 'partials/icons/twitter'
        = _('Share on Twitter')
    %li
      %a.facebook{ href: 'javascript: void(0)', title: 'Share on Facebook', onClick: "window.open(\"https://www.facebook.com/dialog/share?app_id=#{ENV['FACEBOOK_ID']}&display=popup&href="+request.original_url+'&redirect_uri='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=325");' }
        = render 'partials/icons/facebook'
        = _('Share on Facebook')
    %li
      %a.gplus{ href: 'javascript: void(0)', title: 'Share on Google Plus', onClick: 'window.open("https://plus.google.com/share?url='+request.original_url+'","sharer","toolbar=0,status=0,width=548,height=500");' }
        = render 'partials/icons/gplus'
        = _('Share on Google Plus')


.row
  .alpha.five.columns
    = f.field_container :email do
      = f.label :email, t(".email")
      = f.email_field :email, class: "fullwidth"
      = error_message_on :user, :email
    .field
      = label_tag nil, t(".roles")
      %ul
        - @roles.each do |role|
          %li
            = check_box_tag "user[spree_role_ids][]", role.id, @user.spree_roles.include?(role), id: "user_spree_role_#{role.name}"
            = label_tag role.name
      = hidden_field_tag "user[spree_role_ids][]", ""
    = f.field_container :enterprise_limit do
      = f.label :enterprise_limit, t(".enterprise_limit")
      = f.text_field :enterprise_limit, class: "fullwidth"
  .omega.five.columns
    = f.field_container :password do
      = f.label :password, t(".password")
      = f.password_field :password, class: "fullwidth"
      = f.error_message_on :password
    = f.field_container :password do
      = f.label :password_confirmation, t(".confirm_password")
      = f.password_field :password_confirmation, class: "fullwidth"
      = f.error_message_on :password_confirmation
    = f.field_container :disabled do
      = f.label :disabled, t(".disabled")
      = f.check_box :disabled
      = f.error_message_on :disabled

Disable auto fill option for password on /admin/users/[ID] page

.row
  .alpha.five.columns
    = f.field_container :email do
      = f.label :email, t(".email")
      = f.email_field :email, class: "fullwidth"
      = error_message_on :user, :email
    .field
      = label_tag nil, t(".roles")
      %ul
        - @roles.each do |role|
          %li
            = check_box_tag "user[spree_role_ids][]", role.id, @user.spree_roles.include?(role), id: "user_spree_role_#{role.name}"
            = label_tag role.name
      = hidden_field_tag "user[spree_role_ids][]", ""
    = f.field_container :enterprise_limit do
      = f.label :enterprise_limit, t(".enterprise_limit")
      = f.text_field :enterprise_limit, class: "fullwidth"
  .omega.five.columns
    = f.field_container :password do
      = f.label :password, t(".password")
      = f.password_field :password, class: "fullwidth", autocomplete: "new-password"
      = f.error_message_on :password
    = f.field_container :password do
      = f.label :password_confirmation, t(".confirm_password")
      = f.password_field :password_confirmation, class: "fullwidth"
      = f.error_message_on :password_confirmation
    = f.field_container :disabled do
      = f.label :disabled, t(".disabled")
      = f.check_box :disabled
      = f.error_message_on :disabled


!!! 5
%HTML{lang: "en"}

  = partial "_header"

  %body
    .container
      .banner
        .description
          .logo-background
            .logo-padding
            .logo
            .logo-title
              %h1
                bio
                %strong
                  boxes
          .tagline
            %h2
              a standard for creating interchangable bioinformatics software containers
      .menus
        .left-menu
          %h3
            Documentation
          %ul
            %li
              %a{:href => "/manifesto/"}
                Manifesto
            %li
              %a{:href => "/guide/user/"}
                User Guide
            %li
              %a{:href => "/how-to-create-a-biobox/"}
                Create a Biobox
            %li
              %a{:href => "/contribute/getting-started/"}
                How to Help
        .right-menu
          %h3
            Community
          %ul
            - data.guides.community.each do |name, url|
              %li
                %a{:href => url}
                  = name

Add developer guide link to front page

!!! 5
%HTML{lang: "en"}

  = partial "_header"

  %body
    .container
      .banner
        .description
          .logo-background
            .logo-padding
            .logo
            .logo-title
              %h1
                bio
                %strong
                  boxes
          .tagline
            %h2
              a standard for creating interchangable bioinformatics software containers
      .menus
        .left-menu
          %h3
            Documentation
          %ul
            %li
              %a{:href => "/manifesto/"}
                Manifesto
            %li
              %a{:href => "/guide/user/"}
                User Guide
            %li
              %a{:href => "/guide/developer/"}
                Developer Guide
            %li
              %a{:href => "/contribute/getting-started/"}
                How to Help
        .right-menu
          %h3
            Community
          %ul
            - data.guides.community.each do |name, url|
              %li
                %a{:href => url}
                  = name


---
title: thank you!
---

%section.gray
  .row
    .col-md-4.mobile-center
      %h2 Contact
    .col-md-8
      %p
        Thanks for completing our contact form. We'll respond as soon as possible.

Update thankyou page layout, add 'Roger That!' heading

---
title: thank you!
---

%section.main-headline.white-bg
  .container-fluid
    .row
      .col-md-7.no-pad.text-left.header-caps
        %h2.black.font2bold
          Roger That!
        %h3.grey.font3
          Thanks for completing our contact form. We'll respond as soon as possible.


%table
	%tr
		%th Type
		%th Description
		%th Corner Value
		%th Characters
		%th When
		%th Submitted By
		-if @allow_edit
			%th
		-if @allow_approval
			%th
	- @events.each do |event|
		%tr
			%td= event.event_type
			%td= event.description
			%td= event.corner_value
			%td
				- event.characters.each do |character|
					%span.tooltipable{:title => character.player.name, "data-toggle" => "tooltip", "data-placement" => "top"}
						=character.name

			%td= event.getFormatDateTime()
			%td= event.submission.player.name
			-if @allow_edit
				%td
					%a{:href => $base_url + '/edit_event/' + event.id.to_s + "/"} Edit
			-if @allow_approval
				%td
					%a{:href => $base_url + '/approve_event/' + event.id.to_s + "/"} Approve

Use commas to space the characters in an event

%table
	%tr
		%th Type
		%th Description
		%th Corner Value
		%th Characters
		%th When
		%th Submitted By
		-if @allow_edit
			%th
		-if @allow_approval
			%th
	- @events.each do |event|
		%tr
			%td= event.event_type
			%td= event.description
			%td= event.corner_value
			%td
				- doneRow = false
				- event.characters.each do |character|
					- if doneRow
						,
					- doneRow = true
					%span.tooltipable{:title => character.player.name, "data-toggle" => "tooltip", "data-placement" => "top"}
						=character.name

			%td= event.getFormatDateTime()
			%td= event.submission.player.name
			-if @allow_edit
				%td
					%a{:href => $base_url + '/edit_event/' + event.id.to_s + "/"} Edit
			-if @allow_approval
				%td
					%a{:href => $base_url + '/approve_event/' + event.id.to_s + "/"} Approve


!!! 5
%html
  %head
    %meta{charset: 'UTF-8'}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
    %script{src: '/assets/jquery-1.8.3.min.js'}
    %script{src: '/assets/bootstrap.min.js'}
    %link{href: "/assets/bootstrap.min.css", rel: "stylesheet"}
    %link{href: "/assets/bootstrap-responsive.min.css", rel: "stylesheet"}
    %link{href: "/assets/admin.css", rel: "stylesheet", media: "screen"}
    - if @title
      %title #{@title} - Days Admin
    - else
      %title Days Admin
  %body
    .navbar.navbar-inverse.navbar-fixed-top#navbar
      .navbar-inner
        .container
          %a.btn.btn-navbar{data: {toggle: 'collapse', target: '.nav-collapse'}}
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar
          %a.brand{href: '/admin/'} Days
          %form.navbar-form.pull-right{action: "/admin/logout", method: "POST"}
            != csrf_tag
            %button.btn.btn-link{type: 'submit'} Log out

          %div.nav-collapse.collapse
            %ul.nav
              %li
                %a{href: '/admin/entries'} Entries
              %li
                %a{href: '/admin/categories'} Categories
              %li
                %a{href: '/admin/users'} Users
    != yield

Fix style, Add new entry button

!!! 5
%html
  %head
    %meta{charset: 'UTF-8'}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
    %link{href: "/assets/bootstrap.min.css", rel: "stylesheet"}
    %link{href: "/assets/admin.css", rel: "stylesheet", media: "screen"}
    %link{href: "/assets/bootstrap-responsive.min.css", rel: "stylesheet"}
    %script{src: '/assets/jquery-1.8.3.min.js'}
    %script{src: '/assets/bootstrap.min.js'}
    - if @title
      %title #{@title} - Days Admin
    - else
      %title Days Admin
  %body
    .navbar.navbar-inverse.navbar-fixed-top
      .navbar-inner
        .container
          %a.btn.btn-navbar{data: {toggle: 'collapse', target: '.nav-collapse'}}
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar
          %a.brand{href: '/admin/'} Days
          %form.navbar-form.pull-right{action: "/admin/logout", method: "POST"}
            != csrf_tag
            %button.btn.btn-link{type: 'submit'} Log out
            %a.btn.btn-primary{href: '/admin/entries/new'} New Entry

          %div.nav-collapse.collapse
            %ul.nav
              %li
                %a{href: '/admin/entries'} Entries
              %li
                %a{href: '/admin/categories'} Categories
              %li
                %a{href: '/admin/users'} Users
    != yield


.mastfoot
  .inner
    %p
      = markdown t("shared.footer")

    %p
      - if current_user
        = link_to current_user.display_name, user_path(current_user)
        = "|"
        = link_to "Sign out", signout_path
      - else
        = link_to "Sign in with GitHub", signin_path

        |
        = link_to "Contact", "http://trivelop.de/imprint/"
        |
        = link_to "Imprint", "http://trivelop.de/imprint/"
        |
        = link_to "Blog", "http://trivelop.de/imprint/"

Fix blog link in footer

.mastfoot
  .inner
    %p
      = markdown t("shared.footer")

    %p
      - if current_user
        = link_to current_user.display_name, user_path(current_user)
        = "|"
        = link_to "Sign out", signout_path
      - else
        = link_to "Sign in with GitHub", signin_path

        |
        = link_to "Contact", "http://trivelop.de/imprint/"
        |
        = link_to "Imprint", "http://trivelop.de/imprint/"
        |
        = link_to "Blog", "http://trivelop.de/"


%section#node-map
  %h2=t('.map')
  .map
    =link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom:   cookies[:last_zoom]}.to_param), title: '' do
      = image_tag("http://api.tiles.mapbox.com/v3/sozialhelden.map-iqt6py1k/#{node_map.lon},#{node_map.lat},17/359x239.png64", class: 'img-polaroid', size: '359x239')
    %div{class: "leaflet-marker-icon public_transfer #{@node.wheelchair}"}
      .icon{id: @node.icon}
  %small.pull-right.bottom= link_to "© OpenStreetMap contributors", I18n.locale == :de ? "http://www.openstreetmap.org/copyright" : "http://www.openstreetmap.org/copyright/en"

Fix missing icon in detail page map.

%section#node-map
  %h2=t('.map')
  .map
    =link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom:   cookies[:last_zoom]}.to_param), title: '' do
      = image_tag("http://api.tiles.mapbox.com/v3/sozialhelden.map-iqt6py1k/#{node_map.lon},#{node_map.lat},17/359x239.png64", class: 'img-polaroid', size: '359x239')
    %div{class: "leaflet-marker-icon public_transfer #{@node.wheelchair}"}
      .marker-icon{class: "marker-icon-#{@node.icon}"}
  %small.pull-right.bottom= link_to "© OpenStreetMap contributors", I18n.locale == :de ? "http://www.openstreetmap.org/copyright" : "http://www.openstreetmap.org/copyright/en"


- click_remove = true if click_remove.nil?
- div_num ||= ""
- top_pad ||= false
- bottom_pad ||= false

%div{:id => "flash_msg_div#{div_num}", :style => ("display: none" unless @flash_array)}
  - if top_pad
    %div{:style => "padding-top: #{top_pad}px;"}
  - if @flash_array
    %div{:id      => "flash_text_div#{div_num}",
         :onclick => click_remove ? javascript_hide("flash_msg_div#{div_num}") : "",
         :title   => click_remove ? _("Click to remove messages") : ""}
      - @flash_array.each do |fl|
        - case fl[:level]
        - when :error
          .alert.alert-danger
            %span.pficon.pficon-error-circle-o
            %strong= h(fl[:message])
        - when :warning
          .alert.alert-warning
            %span.pficon-warning-triangle-o
            %strong= h(fl[:message])
        - when :info
          = render :partial => "layouts/info_msg",
                   :locals => {:message => h(fl[:message])}
        - else
          .alert.alert-success
            %span.pficon.pficon-ok
            %strong= h(fl[:message])
  - if bottom_pad
    %div{:style => "padding-top: #{bottom_pad}px;"}

Use PatternFly close button in flash messages

- click_remove = true if click_remove.nil?
- div_num ||= ""
- top_pad ||= false
- bottom_pad ||= false

%div{:id => "flash_msg_div#{div_num}", :style => ("display: none" unless @flash_array)}
  - if top_pad
    %div{:style => "padding-top: #{top_pad}px;"}
  - if @flash_array
    %div{:id      => "flash_text_div#{div_num}"}
      - @flash_array.each do |fl|
        - case fl[:level]
        - when :error
          .alert.alert-danger.alert-dismissable
            %button.close{:data => {:dismiss => "alert"}}
              %span.pficon.pficon-close
            %span.pficon.pficon-error-circle-o
            %strong= h(fl[:message])
        - when :warning
          .alert.alert-warning.alert-dismissable
            %button.close{:data => {:dismiss => "alert"}}
              %span.pficon.pficon-close
            %span.pficon-warning-triangle-o
            %strong= h(fl[:message])
        - when :info
          = render :partial => "layouts/info_msg",
                   :locals => {:message => h(fl[:message])}
        - else
          .alert.alert-success.alert-dismissable
            %button.close{:data => {:dismiss => "alert"}}
              %span.pficon.pficon-close
            %span.pficon.pficon-ok
            %strong= h(fl[:message])
  - if bottom_pad
    %div{:style => "padding-top: #{bottom_pad}px;"}


.container-sm
  %h1= t('devise.sessions.new.title')

  .strong
    = simple_form_for(resource, url: user_session_path, html: { role: 'form' }, wrapper_mappings: { boolean: :vertical_boolean }) do |f|
      = f.input :email, input_html: { class: 'input-lg' }, autofocus: true, hint: link_to(t('devise.sessions.new.hints.confirmation'), new_user_confirmation_path)
      = f.input :password, input_html: { class: 'input-lg' }, hint: link_to(t('devise.sessions.new.hints.password'), new_user_password_path)
      = f.input :remember_me, as: :boolean

      .form-actions
        %button.btn.btn-lg.btn-primary(type='submit')
          = t('devise.sessions.new.submit')

Customize title of sign in page

- provide :title, t('devise.sessions.new.title')

.container-sm
  %h1= t('devise.sessions.new.title')

  .strong
    = simple_form_for(resource, url: user_session_path, html: { role: 'form' }, wrapper_mappings: { boolean: :vertical_boolean }) do |f|
      = f.input :email, input_html: { class: 'input-lg' }, autofocus: true, hint: link_to(t('devise.sessions.new.hints.confirmation'), new_user_confirmation_path)
      = f.input :password, input_html: { class: 'input-lg' }, hint: link_to(t('devise.sessions.new.hints.password'), new_user_password_path)
      = f.input :remember_me, as: :boolean

      .form-actions
        %button.btn.btn-lg.btn-primary(type='submit')
          = t('devise.sessions.new.submit')


= f.inputs title do
  - if hint
    %p.inline-hint= hint
  %div{:id => association_name.to_s}
    = f.semantic_fields_for association_name do |association_form|
      = render association_name.to_s.singularize + "_fields", :f => association_form
    .links
      = add_association_link t(:add_association, :name => t("activerecord.models." + association_name.to_s.singularize)), f, association_name

Change id attribute in dynamic associations to class attribute

= f.inputs title do
  - if hint
    %p.inline-hint= hint
  %div{:class => association_name.to_s}
    = f.semantic_fields_for association_name do |association_form|
      = render association_name.to_s.singularize + "_fields", :f => association_form
    .links
      = add_association_link t(:add_association, :name => t("activerecord.models." + association_name.to_s.singularize)), f, association_name


.module
  .bar Servers
  %table{:cellpadding => 0, :cellspacing => 0}
    %tr
      %th Name
      %th Address
      - if can? :manage, Server
        %th{:colspan => 2} Options
    - @servers.each do |s|
      %tr
        %td= s.title
        %td= s.address
        - if can? :manage, Server
          %td= link_to "Edit", [:edit, s]
          %td= link_to "Remove", s, :method => :delete

- if can? :manage, Server
  .links
    = link_to "New Server", new_resource_path

Add confirmation to server's remove link

.module
  .bar Servers
  %table{:cellpadding => 0, :cellspacing => 0}
    %tr
      %th Name
      %th Address
      - if can? :manage, Server
        %th{:colspan => 2} Options
    - @servers.each do |s|
      %tr
        %td= s.title
        %td= s.address
        - if can? :manage, Server
          %td= link_to "Edit", [:edit, s]
          %td= link_to "Remove", s, :method => :delete, :confirm => "Are you absolutely sure?"

- if can? :manage, Server
  .links
    = link_to "New Server", new_resource_path


- if @mr.open? or @mr.needs_rebase? or @mr.general_comments?
  %h2.comment General Comments

- has_many_versions = patches.count > 1
- patches.each_with_index do |patch, i|
  - if i != 0 and has_many_versions and should_show_patch_comment_divisor(patch, @patch)
    %h3.comment-patch-update
      %span
        Patch updated, #{patch_name(patch)}
  - patch.comments.includes(:user).general.each do |comment|
    = render partial: 'comment', locals: { comment: comment }

.comment-box
  %textarea.comment{ name: 'comments[0]' }

Allow general comments to be blocker comments.

- if @mr.open? or @mr.needs_rebase? or @mr.general_comments?
  %h2.comment General Comments

- has_many_versions = patches.count > 1
- patches.each_with_index do |patch, i|
  - if i != 0 and has_many_versions and should_show_patch_comment_divisor(patch, @patch)
    %h3.comment-patch-update
      %span
        Patch updated, #{patch_name(patch)}
  - patch.comments.includes(:user).general.each do |comment|
    = render partial: 'comment', locals: { comment: comment }

.comment-box
  %textarea.comment{ name: 'comments[0]' }
  .comment-controls
    %span{ data: { balloon: "Merge requests can't be accepted with open blocker issues.", balloon_pos: 'right' } }
      %input#blocker_0{ type: 'checkbox', value: 1, name: 'blockers[0]' }
      %label{ for: 'blocker_0' } Blocker issue?


%input.input.input--text{ id: properties[:id], name: properties[:name], value: properties[:value] || "", placeholder: properties[:placeholder], data: properties[:data], maxlength: properties[:maxlength] }

Add ability to specify another input type (such as password).

- type = properties[:type] || 'text'
%input.input{ class: "input--#{type}", id: properties[:id], name: properties[:name], value: properties[:value] || "", type: type, placeholder: properties[:placeholder], data: properties[:data], maxlength: properties[:maxlength] }


.file-holder.file
  .file-title
    .editor-ref
      %i.fa.fa-code-fork
      = ref
    %span.editor-file-name
      - if @path
        %span.monospace
          = @path

      - if current_action?(:new) || current_action?(:create)
        \/
        = text_field_tag 'file_name', params[:file_name], placeholder: "sample.rb",
          required: true, class: 'form-control new-file-name'
        .pull-right
          = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control'

  .file-content.code
    %pre.js-edit-mode-pane#editor
      = params[:content] || local_assigns[:blob_data]
    - if local_assigns[:path]
      .js-edit-mode-pane#preview.hide
        .center
          %h2
            %i.icon-spinner.icon-spin

Improve web editor filename placeholder

.file-holder.file
  .file-title
    .editor-ref
      %i.fa.fa-code-fork
      = ref
    %span.editor-file-name
      - if @path
        %span.monospace
          = @path

      - if current_action?(:new) || current_action?(:create)
        \/
        = text_field_tag 'file_name', params[:file_name], placeholder: "File name",
          required: true, class: 'form-control new-file-name'
        .pull-right
          = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control'

  .file-content.code
    %pre.js-edit-mode-pane#editor
      = params[:content] || local_assigns[:blob_data]
    - if local_assigns[:path]
      .js-edit-mode-pane#preview.hide
        .center
          %h2
            %i.icon-spinner.icon-spin


= simple_form_for @booking do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :value_date, :as => :date_field
  .row-fluid
    .span6
      = f.input :amount, :as => :string
    - if @booking.respond_to? :code
      .span6
        = f.input :code

  .row-fluid
    .span6
      = f.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
    .span6
      = f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox

  .row-fluid
    .span12
      = f.input :comments, :input_html => {:rows => 4, :class => 'span12'}

  .row-fluid
    .span12
      = f.input :reference_type, :as => :hidden, :input_html => {:value => 'Invoice'}
      //= f.association :reference, :collection => suggested_invoices_for_booking(@booking, :include_all => true), :as => :combobox, :include_blank => true

  .form-actions
    = f.button :submit

Drop hidden field for reference_type in bookings form.

= simple_form_for @booking do |f|
  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :value_date, :as => :date_field
  .row-fluid
    .span6
      = f.input :amount, :as => :string
    - if @booking.respond_to? :code
      .span6
        = f.input :code

  .row-fluid
    .span6
      = f.association :credit_account, :collection => accounts_as_collection(Account.all), :as => :combobox
    .span6
      = f.association :debit_account, :collection => accounts_as_collection(Account.all), :as => :combobox

  .row-fluid
    .span12
      = f.input :comments, :input_html => {:rows => 4, :class => 'span12'}

  .row-fluid
    .span12
      //= f.input :reference_type, :as => :hidden, :input_html => {:value => 'Invoice'}
      //= f.association :reference, :collection => suggested_invoices_for_booking(@booking, :include_all => true), :as => :combobox, :include_blank => true

  .form-actions
    = f.button :submit


#tutorial_wrapper
  -# a table makes things simpler with fancybox
  %table
    %tr
      - if @vimeo_id_for_section.present?
        %td
          .movie
            = smart_video_player @vimeo_id_for_section, :height => 260,
              :width => 450, :id => 'left_video'
            %h3=raw t("#{to_yml_syntax(@section)}")
      - if @vimeo_id_for_category.present?
        %td
          .movie
            = smart_video_player @vimeo_id_for_category, :height => 260,
              :width => 450, :id => 'right_video'
            %h3=raw t("sidebar_item.#{to_yml_syntax(@category)}")

Correct lookup of tutorial title translations.

#tutorial_wrapper
  -# a table makes things simpler with fancybox
  %table
    %tr
      - if @vimeo_id_for_section.present?
        %td
          .movie
            = smart_video_player @vimeo_id_for_section, :height => 260,
              :width => 450, :id => 'left_video'
            %h3=raw t("sidebar_items.#{to_yml_syntax(@section)}")
      - if @vimeo_id_for_category.present?
        %td
          .movie
            = smart_video_player @vimeo_id_for_category, :height => 260,
              :width => 450, :id => 'right_video'
            %h3=raw t("sidebar_items.#{to_yml_syntax(@category)}")


- content_for :javascript do
  != map_javascript_include_tags
- cache("stop_area_#{@stop_area.id}") do
  = render :partial => 'shared/location_map_js', :locals => { :locations => [@stop_area] }
  #map-col
    #map
    .extra-info
      - if StopAreaType.primary_types.include? @stop_area.area_type
        = render :partial => "shared/route_list", :locals => { :stop_or_station => @stop_area }
      - else
        The following stops are here:
        - @stop_area.stops.each do |stop|
          .stop
            = link_to("#{stop.name_with_long_indicator}", stop_url(stop.locality, stop))
            - if !stop.routes.empty?
              = render :partial => 'shared/route_list', :locals => {:stop_or_station => stop}
  .stop-area
    %a{:href => location_url(@stop_area, :format => 'atom'), :class => 'rss-link campaign-rss'}
      %span= t(:feed)
      %img{:src => "/images/feed.png", :title => t(:feed), :alt => t(:campaigns_feed) }
    %h3.name= @stop_area.full_name
    .details
      - if !@stop_area.area.blank?
        %span.locality= "In #{@stop_area.area}"

Add problem reporting link to stop areas

- content_for :javascript do
  != map_javascript_include_tags
- cache("stop_area_#{@stop_area.id}") do
  = render :partial => 'shared/location_map_js', :locals => { :locations => [@stop_area] }
  #map-col
    #map
    .extra-info
      - if StopAreaType.primary_types.include? @stop_area.area_type
        = render :partial => "shared/route_list", :locals => { :stop_or_station => @stop_area }
      - else
        The following stops are here:
        - @stop_area.stops.each do |stop|
          .stop
            = link_to("#{stop.name_with_long_indicator}", stop_url(stop.locality, stop))
            - if !stop.routes.empty?
              = render :partial => 'shared/route_list', :locals => {:stop_or_station => stop}
  .stop-area
    %a{:href => location_url(@stop_area, :format => 'atom'), :class => 'rss-link campaign-rss'}
      %span= t(:feed)
      %img{:src => "/images/feed.png", :title => t(:feed), :alt => t(:campaigns_feed) }
    %h3.name= @stop_area.full_name
    .details
      - if !@stop_area.area.blank?
        %span.locality= "In #{@stop_area.area}"
= render :partial => 'shared/location_content', :locals => { :location => @stop_area }


.league.clearfix.live
  .league-name #{league.name}#{" #{stream['id']}" if stream['id']}
  %a.live-banner{href: stream['url'], target: '_blank'} STREAMING NOW ⏵

Update stream link text for league to be same as match

.league.clearfix.live
  .league-name #{league.name}#{" #{stream['id']}" if stream['id']}
  %a.live-banner{href: stream['url'], target: '_blank'} WATCH LIVE NOW ➔


= CSVHelper::generate do |csv|
  - csv << [User.human_attribute_name(:name), User.human_attribute_name(:username), User.human_attribute_name(:email)]
  - @users.each{ |user| csv << [user.name, user.username, user.email] }

Fix failing tests for bulk_email_controller

= CSVHelper::CSV.generate do |csv|
  - csv << [User.human_attribute_name(:name), User.human_attribute_name(:username), User.human_attribute_name(:email)]
  - @users.each{ |user| csv << [user.name, user.username, user.email] }


%ofn-modal{title: "{{ producer.name }}"}
  #producer_modal
    .row
      .small-12.columns
        %img{"ng-src" => "producer.promo_image"}
        %h3 {{ producer.name }}
    .row
      .small-6.columns
        %p
          {{ producer.description }}
      .small-6.columns
        Stay in touch with {{ producer.name }}

Revert "Producers modal styling and markup"

/ %ofn-modal{title: "{{ producer.name }}"}
/   #producer_modal
/     .row
/       .small-12.columns
/         %img{"ng-src" => "producer.promo_image"}
/         %h3 {{ producer.name }}
/     .row
/       .small-6.columns
/         %p
/           {{ producer.description }}
/       .small-6.columns
/         Stay in touch with {{ producer.name }}
/   %a.close-reveal-modal{"ng-click" => "$close()"} ×

%ofn-modal{title: "{{producer.name}}"}
  .row
    .columns.small-12
      %img.product-img{"ng-src" => "{{producer.promo_image.images[0].large_url}}"}
      %h3 {{ producer.name }}
  .row
    .columns.small-12.large-6
      %p {{ producer.description }}
    .columns.small-12.large-6
      Stay in touch with {{ producer.name }}
  / %pre
  /   {{ producer | json }}
  %a.close-reveal-modal{"ng-click" => "$close()"} ×


- content_for :title do
  Thermostat Settings

.row{ style: "margin-top: 0.5em;" }
  .col-md-6.col-md-offset-3
    %h1 Thermostat Settings
    = render partial: "form", locals: { thermostat: @thermostat }

Add back button on edit form

- content_for :title do
  Thermostat Settings

.row{ style: "margin-top: 0.5em;" }
  .col-md-6.col-md-offset-3
    = link_to root_path do
      %i.fa.fa-arrow-left
      Back
    %h1 Thermostat Settings
    = render partial: "form", locals: { thermostat: @thermostat }


= content_for :splash_nav do
  %li
    %a{ href: '#sponsors' } Sponsors
%div.container#sponsors.text-center
  %div.row
    %div.col-md-12
      %h2 Sponsors
      -if !@conference.sponsor_description.blank?
        %p #{ @conference.sponsor_description }
      -if !@conference.sponsor_email.blank?
        %h3= mail_to "#{ @conference.sponsor_email }", 'Become a Sponsor'
  - if !@conference.sponsorship_levels.blank?
    - @conference.sponsorship_levels.each do |l|
      - if !l.sponsors.blank?
        %div.row
          %h4 #{l.title}
          - l.sponsors.each_with_index do |r,index|
            %div.col-md-4
              - if !r.logo.blank?
                = link_to image_tag(r.logo(:large), class: 'img-responsive', alt: "#{r.name} Logo", title: "#{r.description}"), "http://#{r.website_url}"
            - unless index == 0
              - if index%2 == 0
                %div.clearfix.visible-md.visible-lg

Fix sponsor images alignment based on count

= content_for :splash_nav do
  %li
    %a{ href: '#sponsors' } Sponsors
%div.container#sponsors.text-center
  %div.row
    %div.col-md-12
      %h2 Sponsors
      -if !@conference.sponsor_description.blank?
        %p #{ @conference.sponsor_description }
      -if !@conference.sponsor_email.blank?
        %h3= mail_to "#{ @conference.sponsor_email }", 'Become a Sponsor'
  - if !@conference.sponsorship_levels.blank?
    - @conference.sponsorship_levels.each do |l|
      - if !l.sponsors.blank?
        %div.row.text-center
          %h4 #{l.title}
          - l.sponsors.each_with_index do |r,index|
            %div.text-center{ class: (l.sponsors.count.to_i <= 2 ? "col-md-#{12/l.sponsors.count.to_i}" : "col-md-4") }
              - if !r.logo.blank?
                = link_to image_tag(r.logo(:large), alt: "#{r.name} Logo", title: "#{r.description}"), "http://#{r.website_url}"
            - unless index == 0
              - if index%2 == 0
                %div.clearfix.visible-md.visible-lg


= scrivito_tag :h1,  @obj, :title
= scrivito_tag :div, @obj, :body
= form_tag session_path, role: 'form' do
  .form-group
    = label_tag      :email, 'メールアドレス'
    = text_field_tag :email, '', class: 'form-control', placeholder: ''
  .form-group
    = label_tag          :password, 'パスワード'
    = password_field_tag :password, '', class: 'form-control', placeholder: ''
  %button.btn.btn-default{:type => "submit"} ログイン
- if Rails.env.development?
  %hr/
  = scrivito_tag_list :ul, @obj, :toclist do |list, child|
    = list.tag :li do
      = link_to child.display_title, scrivito_path(child)

Add cover photo to Login page

%body
  %header.intro-header{:style => "padding-top: 300px; background-image: url('cover.png')"}

= scrivito_tag :h1,  @obj, :title
= scrivito_tag :div, @obj, :body
= form_tag session_path, role: 'form' do
  .form-group
    = label_tag      :email, 'メールアドレス'
    = text_field_tag :email, '', class: 'form-control', placeholder: ''
  .form-group
    = label_tag          :password, 'パスワード'
    = password_field_tag :password, '', class: 'form-control', placeholder: ''
  %button.btn.btn-default{:type => "submit"} ログイン
- if Rails.env.development?
  %hr/
  = scrivito_tag_list :ul, @obj, :toclist do |list, child|
    = list.tag :li do
      = link_to child.display_title, scrivito_path(child)


%tr
  - klass = cycle('even', 'odd')
  %td.padding-10.board-title{class: klass}= link_to board.name, board_path(board)
  %td.padding-10.board-authors{class: klass}
    - if board.open_to_anyone?
      Anyone
    - else
      = board.writers.sort_by{ |author| author.username.downcase }.map { |u| link_to u.username, user_path(u) }.join(', ').html_safe
  %td.padding-10.board-time{class: klass}= pretty_time(board.posts.ordered.first.try(:tagged_at))

Hide deleted users on board list

%tr
  - klass = cycle('even', 'odd')
  %td.padding-10.board-title{class: klass}= link_to board.name, board_path(board)
  %td.padding-10.board-authors{class: klass}
    - if board.open_to_anyone?
      Anyone
    - else
      = board.writers.sort_by{ |author| author.username.downcase }.sort_by(&:deleted?).map { |u| user_link(u) }.join(', ').html_safe
  %td.padding-10.board-time{class: klass}= pretty_time(board.posts.ordered.first.try(:tagged_at))


- model_class = Email
.page-header
  %h1=t '.title', :default => model_class.model_name.human

%p
  %strong From:
  = link_to @email.from, emails_path(:from => @email.from)
%p
  %strong To:
  = @email.to.map{|e| link_to e, emails_path(to: e)}.join(", ").html_safe
%hr
- if @email.data.nil?
  %em
    Full text of email is not available
- else
  %p
    = @email.data.gsub("\r\n", "<br\>").html_safe if @email.data
%hr
%p
  %strong Received:
  = time_ago_in_words(@email.created_at)
  ago (#{@email.created_at})
%p
  - if @email.delivered == true
    %strong Delivered succesfully
  - elsif @email.delivered == false
    %strong Not delivered
  - else
    %strong Delivery status unknown

- unless @email.postfix_log_lines.empty?
  %pre= @email.postfix_log_lines.map{|l| l.text}.join

.form-actions
  = link_to t('.back', :default => t("helpers.links.back")), emails_path, :class => 'btn'

Add a carriage return back into the display of the log lines

- model_class = Email
.page-header
  %h1=t '.title', :default => model_class.model_name.human

%p
  %strong From:
  = link_to @email.from, emails_path(:from => @email.from)
%p
  %strong To:
  = @email.to.map{|e| link_to e, emails_path(to: e)}.join(", ").html_safe
%hr
- if @email.data.nil?
  %em
    Full text of email is not available
- else
  %p
    = @email.data.gsub("\r\n", "<br\>").html_safe if @email.data
%hr
%p
  %strong Received:
  = time_ago_in_words(@email.created_at)
  ago (#{@email.created_at})
%p
  - if @email.delivered == true
    %strong Delivered succesfully
  - elsif @email.delivered == false
    %strong Not delivered
  - else
    %strong Delivery status unknown

- unless @email.postfix_log_lines.empty?
  %pre= @email.postfix_log_lines.map{|l| l.text}.join("\n")

.form-actions
  = link_to t('.back', :default => t("helpers.links.back")), emails_path, :class => 'btn'


- content_for :top_menu_items do
  =link_to(TOP_LEVEL_CONTAINER_NAME_PLURAL, investigations_path)

- if current_project.nil?
  You need to create a project object for this portal. One way to do this is run
  %pre
    bin/rake app:setup:new_app
- else
  =render :partial => 'sessions/new'
  .padded_content
    - unless current_project.home_page_content.blank?
      = current_project.home_page_content.html_safe
    - else
      - render_project_info
      = content_for :project_info

Modify view for guest users

- content_for :top_menu_items do
  =link_to(TOP_LEVEL_CONTAINER_NAME_PLURAL, investigations_path)

- if current_project.nil?
  You need to create a project object for this portal. One way to do this is run
  %pre
    bin/rake app:setup:new_app
- else
  .padded_content
    - unless current_project.home_page_content.blank?
      = current_project.home_page_content.html_safe
    - else
      - render_project_info
      = content_for :project_info


---
title: Home
---
-# coding: utf-8
%section.calendar
  - blog('writings').articles.sort_by { |a| a.date }.reverse.each do |article|
    .post
      %h2
        %a{:href => article.url}
          =article.data['title']
      %div
        =article.app.render_template(article.source_file)

Sort by source file name, which preserves order for every build

---
title: Home
---
-# coding: utf-8
%section.calendar
  - blog('writings').articles.sort_by { |a| a.source_file }.reverse.each do |article|
    .post
      %h2
        %a{:href => article.url}
          =article.data['title']
      %div
        =article.app.render_template(article.source_file)


%table.table.table-striped.simpleTable
  %thead
    %tr
      %th.sortable{"data-sort" => "string"} #{term_for :student}
      %th.sortable{"data-sort" => "string"} #{term_for :badges}
  %tbody
    - User::SharedEarnedBadge.where(course: current_course).group_by(&:user_id).each do |user_id, sebs|
      %tr
        %td= link_to sebs[0].student_name, student_path(sebs[0].user_id)
        %td
          - sebs.each do |seb|
            = image_tag seb.icon, :alt => seb.name, :width => '40'

Remove `User::` from `SharedEarnedBadge` query.

%table.table.table-striped.simpleTable
  %thead
    %tr
      %th.sortable{"data-sort" => "string"} #{term_for :student}
      %th.sortable{"data-sort" => "string"} #{term_for :badges}
  %tbody
    - SharedEarnedBadge.where(course: current_course).group_by(&:user_id).each do |user_id, sebs|
      %tr
        %td= link_to sebs[0].student_name, student_path(sebs[0].user_id)
        %td
          - sebs.each do |seb|
            = image_tag seb.icon, :alt => seb.name, :width => '40'


- content_for :page_title do
  = t('admin.ip_blocks.title')

- content_for :header_tags do
  = javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'

- if can?(:create, :ip_block)
  - content_for :heading_actions do
    = link_to t('admin.ip_blocks.add_new'), new_admin_ip_block_path, class: 'button'

= form_for(@form, url: batch_admin_ip_blocks_path) do |f|
  = hidden_field_tag :page, params[:page] || 1

  .batch-table
    .batch-table__toolbar
      %label.batch-table__toolbar__select.batch-checkbox-all
        = check_box_tag :batch_checkbox_all, nil, false
      .batch-table__toolbar__actions
        - if can?(:destroy, :ip_block)
          = f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
    .batch-table__body
      - if @ip_blocks.empty?
        = nothing_here 'nothing-here--under-tabs'
      - else
        = render partial: 'ip_block', collection: @ip_blocks, locals: { f: f }

= paginate @ip_blocks

Fix IP blocks in admin panel

- content_for :page_title do
  = t('admin.ip_blocks.title')

- if can?(:create, :ip_block)
  - content_for :heading_actions do
    = link_to t('admin.ip_blocks.add_new'), new_admin_ip_block_path, class: 'button'

= form_for(@form, url: batch_admin_ip_blocks_path) do |f|
  = hidden_field_tag :page, params[:page] || 1

  .batch-table
    .batch-table__toolbar
      %label.batch-table__toolbar__select.batch-checkbox-all
        = check_box_tag :batch_checkbox_all, nil, false
      .batch-table__toolbar__actions
        - if can?(:destroy, :ip_block)
          = f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
    .batch-table__body
      - if @ip_blocks.empty?
        = nothing_here 'nothing-here--under-tabs'
      - else
        = render partial: 'ip_block', collection: @ip_blocks, locals: { f: f }

= paginate @ip_blocks


%h1 Linked accounts on other sites

- if @authentications
  - unless @authentications.empty?
    .authentications
    - @authentications.each do |authentication|
      .authentication
        = image_tag "#{authentication.provider}_64.png", :size => "64x64"
      .provider
        = authentication.provider.titleize
      .uid
        = authentication.uid
      = link_to "X", authentication, :confirm => "Are you sure you want to remove this authentication?", :method => :delete, :class => "remove"
    .clear
    %p
      %strong Link another external account:
  - else
    %p
      %strong Link to an external account:

= link_to image_tag("twitter_64.png", :size => "64x64"), "/auth/twitter", :class => "auth_provider"

Make the authentication into a link to your Twitter page.

%h1 Linked accounts on other sites

- if @authentications
  - unless @authentications.empty?
    .authentications
    - @authentications.each do |authentication|
      %a{ :href => "http://twitter.com/#{authentication.name}" }
        .authentication
          = image_tag "#{authentication.provider}_64.png", :size => "64x64"
        .provider
          = authentication.provider.titleize
        .name
          = authentication.name
      = link_to "X", authentication, :confirm => "Are you sure you want to remove this authentication?", :method => :delete, :class => "remove"
    .clear
    %p
      %strong Link another external account:
  - else
    %p
      %strong Link to an external account:

= link_to image_tag("twitter_64.png", :size => "64x64"), "/auth/twitter", :class => "auth_provider"


.container
  %h1=I18n.t('header.title')
  %h1=I18n.t('community_support_form.new.form.title')
  %p=I18n.t('community_support_form.new.form.header_text')
  .support-form
    = semantic_form_for(@support_request, :url => community_support_index_path ) do |f|
      = f.input :name
      = f.input :email, hint: ""
      = f.input :message, as: :text , label: I18n.t('community_support_form.new.form.describe')
      = f.action :submit

Implement 3 form questions in views

.container
  .support-form
    %h1=I18n.t('community_support_form.new.form.title')
    %p=I18n.t('community_support_form.new.form.header_text')
    %ul
      %li=I18n.t('community_support_form.new.form.questions.0')
      %li=I18n.t('community_support_form.new.form.questions.1')
      %li=I18n.t('community_support_form.new.form.questions.2')
    %p=I18n.t('community_support_form.new.form.note')
    = semantic_form_for(@support_request, :url => community_support_index_path ) do |f|
      = f.input :name
      = f.input :email, hint: ""
      = f.input :message, as: :text , label: I18n.t('community_support_form.new.form.describe')
      = f.action :submit


!!!
%html
  %head
    %title Ledger Web
    %meta{'name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'}
    %meta{'name' => 'apple-mobile-web-app-capable', 'content' => 'yes'}
    %link{ rel: "stylesheet", type: "text/css", href: stylesheet_path('application') }
    %script{ src: javascript_path('application') }
    %script{ src: "https://github.com/livereload/livereload-js/raw/master/dist/livereload.js?host=localhost" }
  %body

Use an existing DOM element for all ledger-web views

!!!
%html
  %head
    %title Ledger Web
    %meta{'name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'}
    %meta{'name' => 'apple-mobile-web-app-capable', 'content' => 'yes'}
    %link{ rel: "stylesheet", type: "text/css", href: stylesheet_path('application') }
    %script{ src: javascript_path('application') }
    %script{ src: "https://github.com/livereload/livereload-js/raw/master/dist/livereload.js?host=localhost" }
  %body
    #ledger_web


%h3 Heroes
%table.table
  %tr
    %th Name
    %th Archetype
    %th User
  - heroes.each do |hero|
    %tr
      %td= hero.name
      %td
        = hero.archetype
      %td
        = hero.user

Add action buttons to hero's list.

%h3 Heroes

- if policy(Hero.new(campaign: campaign)).new?
  %p{ style: 'margin-top: 2em; margin-bottom: 2em;' }
    = link_to new_campaign_hero_path(campaign, hero), class: 'btn btn-success' do
      Add hero

      %span.glyphicon.glyphicon-user

%table.table
  %tr
    %th Name
    %th Archetype
    %th User
    %th
  - heroes.each do |hero|
    %tr
      %td= hero.name
      %td
        = hero.archetype
      %td
        = hero.user
      %td
        - if policy(hero).edit?
          = link_to edit_campaign_hero_path(campaign, hero), class: 'btn btn-primary' do
            %span.glyphicon.glyphicon-pencil

            Edit
        - if policy(hero).destroy?
          = link_to campaign_hero_path(campaign, hero), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' do
            Destroy

            %span.glyphicon.glyphicon-trash


.container
  %h1 New scraper

  = simple_form_for @scraper do |f|
    .row
      .col-sm-6
        = f.input :original_language_key, collection: Morph::Language.languages_supported.map{|l| [l.human, l.key, {"data-content" => "#{image_tag(l.image_path, size: '20x20')} #{l.human}"}]}, include_blank: false, hint: "The language you would like to write your scraper in. You can change this later.", label: "Language"
    .row
      .col-sm-2
        = f.input :owner_id, collection: current_user.all_owners.map{|o| [o.nickname, o.id, {"data-content" => "#{owner_image(o, 20, false)} #{o.nickname}"}]}, include_blank: false
      .col-sm-6
        -# Using long-winded form here because simple_form doesn't directly support prepends
        = f.input :name do
          .input-group
            %span.input-group-addon /
            = f.input_field :name, class: "form-control", placeholder:"city_of_sydney_development_applications"
          %span.help-block Name to give the scraper here and on GitHub

    = f.input :description, label: "What data will your scraper collect?"

    = f.button :submit

Include a tip for what to include in the description.

.container
  %h1 New scraper

  = simple_form_for @scraper do |f|
    .row
      .col-sm-6
        = f.input :original_language_key, collection: Morph::Language.languages_supported.map{|l| [l.human, l.key, {"data-content" => "#{image_tag(l.image_path, size: '20x20')} #{l.human}"}]}, include_blank: false, hint: "The language you would like to write your scraper in. You can change this later.", label: "Language"
    .row
      .col-sm-2
        = f.input :owner_id, collection: current_user.all_owners.map{|o| [o.nickname, o.id, {"data-content" => "#{owner_image(o, 20, false)} #{o.nickname}"}]}, include_blank: false
      .col-sm-6
        -# Using long-winded form here because simple_form doesn't directly support prepends
        = f.input :name do
          .input-group
            %span.input-group-addon /
            = f.input_field :name, class: "form-control", placeholder:"city_of_sydney_development_applications"
          %span.help-block Name to give the scraper here and on GitHub

    = f.input :description, label: "What data will your scraper collect?"
    %p.help-block
      %strong Tip:
      Remember to include key words like the common name for this data and the source where it comes from.
      What would you enter in a search engine to find this data? Use those key terms.

    = f.button :submit


= form_for @goal do |f|
  -if @goal.errors.any?
    #errors
      %ul
        - @goal.errors.full_messages.each do |msg|
          %li= msg

  = f.label "Write a goal here:"
  = f.text_field :description

  = f.label "Pick if this goal is a day, week, or phase goal:"
  = f.select "duration", [['Day', 'Day'], ['Week', 'Week'], ['Phase', 'Phase']]

  = f.label "Enter in a due date:"
  = f.datetime_select :due_date, :ampm => true

  = f.submit "Dream Forward"

Revert "made a tweek on the datetime select form"

= form_for @goal do |f|
  -if @goal.errors.any?
    #errors
      %ul
        - @goal.errors.full_messages.each do |msg|
          %li= msg

  = f.label "Write a goal here:"
  = f.text_field :description

  = f.label "Pick if this goal is a day, week, or phase goal:"
  = f.select "duration", [['Day', 'Day'], ['Week', 'Week'], ['Phase', 'Phase']]

  = f.label "Enter in a due date:"
  = f.date_field :due_date

  = f.submit "Dream Forward"


- cache cache_key_for(Crop, 'homepage'), expires_in: 1.day do
  - Crop.interesting.includes(:scientific_names, :photos).shuffle.first(12).each do |crop|
    .col-6.col-md-3= render 'crops/thumbnail', crop: crop

Move crop photos into row

- cache cache_key_for(Crop, 'homepage'), expires_in: 1.day do
  .row
    - Crop.interesting.includes(:scientific_names, :photos).shuffle.first(12).each do |crop|
      .col-6.col-md-3
        = render 'crops/thumbnail', crop: crop


= form_for @user do |f|
  -if @user.errors.any?
    #error_explanation
      %h2= "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:"
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg

  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :email
    = f.text_field :email
  .field
    = f.label :password
    = f.text_field :password
  .field
    = f.label :password_confirmation
    = f.text_field :password_confirmation
  .actions
    = f.submit 'Save'

Fix HAML indentation and password fields type

= form_for @user do |f|
  - if @user.errors.any?
    #error_explanation
    %h2= "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:"
    %ul
      - @user.errors.full_messages.each do |msg|
        %li= msg

  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :email
    = f.text_field :email
  .field
    = f.label :password
    = f.password_field :password
  .field
    = f.label :password_confirmation
    = f.password_field :password_confirmation
  .actions
    = f.submit 'Save'


- content_for(:title, 'Invitation à donner votre avis')
- avis_link = @avis.gestionnaire.present? ? gestionnaire_avis_url(@avis) : sign_up_gestionnaire_avis_url(@avis.id, @avis.email)

- content_for(:footer) do
  Merci de ne pas répondre à cet email. Donnez votre avis
  = link_to("sur demarches-simplifiees.fr", avis_link)
  ou
  = succeed '.' do
    = mail_to(@avis.claimant.email, "contactez la personne qui vous a invité")

%p
  Bonjour,

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

%p
  = "#{@avis.claimant.email} vous a écrit :"
  %br
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 16px;" }
  = @avis.introduction

- if @avis.gestionnaire.present?
  %p
    = link_to "Connectez-vous pour donner votre avis", avis_link
- else
  %p
    = link_to "Inscrivez-vous pour donner votre avis", avis_link

= render partial: "layouts/mailers/signature"

Improve the style of the avis invitation email

- content_for(:title, 'Invitation à donner votre avis')
- avis_link = @avis.gestionnaire.present? ? gestionnaire_avis_url(@avis) : sign_up_gestionnaire_avis_url(@avis.id, @avis.email)

- content_for(:footer) do
  Merci de ne pas répondre à cet email. Donnez votre avis
  = link_to("sur demarches-simplifiees.fr", avis_link)
  ou
  = succeed '.' do
    = mail_to(@avis.claimant.email, "contactez la personne qui vous a invité")

%p
  Bonjour,

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

%p
  = "#{@avis.claimant.email} vous a écrit :"
  %br
%p{ style: "padding: 8px; color: #333333; background-color: #EEEEEE; font-size: 14px;" }
  = @avis.introduction

- if @avis.gestionnaire.present?
  %p
    = link_to "Connectez-vous pour donner votre avis", avis_link
- else
  %p
    = link_to "Inscrivez-vous pour donner votre avis", avis_link

= render partial: "layouts/mailers/signature"


- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render_quadicon(@record, :mode => :icon, :size => 72, :typ => :listnav)

    = miq_accordion_panel(_("Properties"), false, "ems_middleware_prop") do
      %ul.nav.nav-pills.nav-stacked
        = li_link(:if => true,
           :text => _('Summary'),
           :record => @record,
           :display => 'main',
           :title => _("Show Summary"))
    = miq_accordion_panel(_("Relationships"), false, "ems_middleware_rel") do
      %ul.nav.nav-pills.nav-stacked
        - %w(middleware_domain middleware_server middleware_deployment middleware_datasource middleware_messaging).each do |ent|
          = multiple_relationship_link(@record, ent)

Remove extra :if => true. from a listnav

- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render_quadicon(@record, :mode => :icon, :size => 72, :typ => :listnav)

    = miq_accordion_panel(_("Properties"), false, "ems_middleware_prop") do
      %ul.nav.nav-pills.nav-stacked
        = li_link(:text => _('Summary'),
           :record => @record,
           :display => 'main',
           :title => _("Show Summary"))
    = miq_accordion_panel(_("Relationships"), false, "ems_middleware_rel") do
      %ul.nav.nav-pills.nav-stacked
        - %w(middleware_domain middleware_server middleware_deployment middleware_datasource middleware_messaging).each do |ent|
          = multiple_relationship_link(@record, ent)


%h3
  = t(".customer_greeting", name: @order.bill_address.firstname)
%h4
  = t(".instructions")
%span.clear

%p

= t(".order_summary_canceled")
= render 'order_summary'
= render 'signoff'

Add connect with us footer to order cancelation email

%h3
  = t(".customer_greeting", name: @order.bill_address.firstname)
%h4
  = t(".instructions")
%span.clear

%p

= t(".order_summary_canceled")
= render 'order_summary'
= render 'signoff'
= render 'shared/mailers/social_and_contact'


= simple_form_for(@question, html: { ng_controller: 'QuestionFormCtrl', name: "new_question", dirtyconfirm: "new_question", dirtyconfirmmessage:"You have unsaved changes.", ng_submit: 'submit()' } ) do |f|
  = f.input :body, placeholder: "Write your question...", label_html: {class: 'sr-only'},
    input_html: { rows: 3 }, as: :charlimited
  = f.input :is_anonymous, label: false, inline_label: 'Ask question anonymously'
  = f.submit "Ask question", class: 'btn btn-primary', data: {disable_with: 'Ask question'}

Remove anonymous option from question form

= simple_form_for(@question, html: { ng_controller: 'QuestionFormCtrl', name: "new_question", dirtyconfirm: "new_question", dirtyconfirmmessage:"You have unsaved changes.", ng_submit: 'submit()' } ) do |f|
  = f.input :body, placeholder: "Write your question...", label_html: {class: 'sr-only'},
    input_html: { rows: 3 }, as: :charlimited
  = f.submit "Ask question", class: 'btn btn-primary', data: {disable_with: 'Ask question'}


= semantic_form_for current_user, :url => terms_user_path(current_user) do |form|

  %iframe{:align => 'center', :src => 'http://blog.wheelmap.org/was-ist-wheelmap/terms/', :width => '100%', :height => '300', :frameborder => '1', :seamless => 'seamless'}

  = form.input :terms

  %iframe{:align => 'center', :src => 'http://blog.wheelmap.org/was-ist-wheelmap/privacy/', :width => '100%', :height => '300', :frameborder => '0', :seamless => 'seamless'}

  = form.input :privacy_policy
  = form.actions do
    = form.action :submit, :label => t('formtastic.labels.save')

Fix urls to terms and privacy pages.

= semantic_form_for current_user, :url => terms_user_path(current_user) do |form|

  - terms_blog_url = I18n.locale == :de ? 'http://wheelmap.org/impressum/nutzungsbedingungen/' : 'http://wheelmap.org/en/imprint/terms-of-use/'
  %iframe{:align => 'center', :src => terms_blog_url, :width => '100%', :height => '300', :frameborder => '0', :seamless => 'seamless'}

  = form.input :terms

  - privacy_blog_url = I18n.locale == :de ? 'http://wheelmap.org/impressum/datenschutzerklarung/' : 'http://wheelmap.org/en/imprint/privacy/'
  %iframe{:align => 'center', :src => privacy_blog_url, :width => '100%', :height => '300', :frameborder => '0', :seamless => 'seamless'}

  = form.input :privacy_policy
  = form.actions do
    = form.action :submit, :label => t('formtastic.labels.save')


#author.panel.panel-primary.col-xs-12.col-sm-6.col-md-8.col-sm-offset-3.col-md-offset-2
  .center
    %a{ href: 'http://masatoshinishiguchi.blogspot.com/', target: '_blank' }
      = gravatar_for "nishiguchi.masa@gmail.com", size: 120
    %p
      %i.fa.fa-envelope-o
      %a{ href: "mailto:masatoshi.nishiguchi@udc.edu"} masatoshi.nishiguchi@udc.edu

    %ul.list-unstyled.list-inline.list-social-icons
      %li#btn-facebook
        %a{ href: "#" }
          %i.fa.fa-facebook-square.fa-2x
      %li
        %a{ href: "https://www.linkedin.com/profile/view?id=101724080", target: '_blank' }
          %i.fa.fa-linkedin-square.fa-2x
      %li
        %a{ href: "https://twitter.com/MNishiguchiDC", target: '_blank' }
          %i.fa.fa-twitter-square.fa-2x
      %li
        %a{ href: 'https://github.com/mnishiguchi', target: '_blank' }
          %i.fa.fa-github-square.fa-2x
      / %li
      /   %a{ href: 'https://bitbucket.com/mnishiguchi', target: '_blank' }

Add link to stack overflow

#author.panel.panel-primary.col-xs-12.col-sm-6.col-md-8.col-sm-offset-3.col-md-offset-2
  .center
    %a{ href: 'http://masatoshinishiguchi.blogspot.com/', target: '_blank' }
      = gravatar_for "nishiguchi.masa@gmail.com", size: 120
    %p
      %i.fa.fa-envelope-o
      %a{ href: "mailto:masatoshi.nishiguchi@udc.edu"} masatoshi.nishiguchi@udc.edu

    %ul.list-unstyled.list-inline.list-social-icons
      %li#btn-facebook
        %a{ href: "#" }
          %i.fa.fa-facebook-square.fa-2x
      %li
        %a{ href: "https://www.linkedin.com/profile/view?id=101724080", target: '_blank' }
          %i.fa.fa-linkedin-square.fa-2x
      %li
        %a{ href: "https://twitter.com/MNishiguchiDC", target: '_blank' }
          %i.fa.fa-twitter-square.fa-2x
      %li
        %a{ href: 'https://github.com/mnishiguchi', target: '_blank' }
          %i.fa.fa-github-square.fa-2x
      %li
        %a{ href: 'http://stackoverflow.com/users/3837223/mnishiguchi', target: '_blank' }
          %i.fa.fa-stack-overflow.fa-2x


#job-application
  = form_for @job_application do |f|
    #apply-description
      %h3= @already_applied ? t('job_applications.forms.edit.heading') : t('job_applications.forms.new.heading')

      %p
        = t('job_applications.forms.new.motivational_question')
      %p
        = t('job_applications.forms.new.application_explanation')
      %p
        = t('job_applications.forms.new.prioritation_explanation')

    != f.hidden_field :job_id, value: @job_application.job_id
    .textarea-wrapper
      %p
        = f.text_area :motivation, id: "motivation"#, value: (@already_applied ? nil : @job.default_motivation_text)
      %p.submit-button-container
        = submit_tag (@already_applied and !@job_application.withdrawn) ? t('job_applications.forms.edit.submit') : t('job_applications.forms.new.submit')

- if @already_applied and !@job_application.withdrawn
  = link_to @job_application, { method: :delete, style:"position:relative; top:-53px; left:180px", class: "sexybutton sexysimple sexyred", id: "delete_job_application", confirm: t('crud.confirm') } do
    = t('job_applications.forms.edit.withdraw')

Add rows to job application form

#job-application
  = form_for @job_application do |f|
    #apply-description
      %h3= @already_applied ? t('job_applications.forms.edit.heading') : t('job_applications.forms.new.heading')

      %p
        = t('job_applications.forms.new.motivational_question')
      %p
        = t('job_applications.forms.new.application_explanation')
      %p
        = t('job_applications.forms.new.prioritation_explanation')

    != f.hidden_field :job_id, value: @job_application.job_id
    .textarea-wrapper
      %p
        = f.text_area :motivation, id: "motivation", value: (@already_applied ? nil : @job.default_motivation_text), rows: 9
      %p.submit-button-container
        = submit_tag (@already_applied and !@job_application.withdrawn) ? t('job_applications.forms.edit.submit') : t('job_applications.forms.new.submit')

- if @already_applied and !@job_application.withdrawn
  = link_to @job_application, { method: :delete, style:"position:relative; top:-53px; left:180px", class: "sexybutton sexysimple sexyred", id: "delete_job_application", confirm: t('crud.confirm') } do
    = t('job_applications.forms.edit.withdraw')


.file-content.code.js-syntax-highlight{ class: user_color_scheme }
  .line-numbers
    - if blob.data.present?
      - blob.data.lines.each_index do |index|
        - offset = defined?(first_line_number) ? first_line_number : 1
        - i = index + offset
        -# We're not using `link_to` because it is too slow once we get to thousands of lines.
        %a{href: "#L#{i}", id: "L#{i}", 'data-line-number' => i}
          %i.fa.fa-link
          = i
  .blob-content{data: {blob_id: blob.id}}
    :preserve
      #{highlight(blob.name, blob.data)}

Use less memory while counting lines

.file-content.code.js-syntax-highlight{ class: user_color_scheme }
  .line-numbers
    - if blob.data.present?
      - blob.data.each_line.each_with_index do |_, index|
        - offset = defined?(first_line_number) ? first_line_number : 1
        - i = index + offset
        -# We're not using `link_to` because it is too slow once we get to thousands of lines.
        %a{href: "#L#{i}", id: "L#{i}", 'data-line-number' => i}
          %i.fa.fa-link
          = i
  .blob-content{data: {blob_id: blob.id}}
    :preserve
      #{highlight(blob.name, blob.data)}


%h2 Upcoming Work

.row
  .small-12.columns
    %p
      These are the items which we plan on working on very soon.

    %ul
      %li Set up logrotate
      %li Set up https encryption as the default/only
      %li automatic e-mail to Robin whenever new translations are stored by translators (so that they can be reviewed and deployed)
      %li Improve the "Expert Heat" competiton-choosing experience for 100m/etc
      %li Improve ability to import/export results/scores
      %li Improve Code Quality using rubocop

Allow Sign-Up to redirect to Sign-in if we already know this user

%h2 Upcoming Work

.row
  .small-12.columns
    %p
      These are the items which we plan on working on very soon.

    %ul
      %li Set up https encryption as the default/only
      %li automatic e-mail to Robin whenever new translations are stored by translators (so that they can be reviewed and deployed)
      %li Improve the "Expert Heat" competiton-choosing experience for 100m/etc
      %li Improve ability to import/export results/scores
      %li Improve Code Quality using rubocop


- partial_type = (page_view == 'list') ? 'characters/list_section' : 'characters/icon_view'
- skip_grouped_templates = false unless defined?(:skip_grouped_templates)
- if characters.try(:exists?)
  - template_ids = characters.group(:template_id).pluck(:template_id).uniq.compact
  - templates = ActiveRecord::Base::Template.where(id: template_ids).order('name asc').each do |template|
    - next if skip_grouped_templates && template.characters.where('character_group_id is not null').exists?
    = render partial: partial_type, locals: {name: template, characters: template.characters.order('name asc')}
  - if characters.where(template_id: nil).exists?
    = render partial: partial_type, locals: {name: 'No Template', characters: characters.where(template_id: nil).order('name asc'), show_new_character_button: @user.id == current_user&.id}
- else
  %tr
    %td.centered.padding-5{class: cycle('even', 'odd'), colspan: 6} — No characters yet —

Fix character lists with character groups

- partial_type = (page_view == 'list') ? 'characters/list_section' : 'characters/icon_view'
- skip_grouped_templates = false unless defined?(:skip_grouped_templates)
- if characters.try(:exists?)
  - template_ids = characters.group(:template_id).pluck(:template_id).uniq.compact
  - templates = ::Template.where(id: template_ids).order('name asc').each do |template|
    - next if skip_grouped_templates && template.characters.where('character_group_id is not null').exists?
    = render partial: partial_type, locals: {name: template, characters: template.characters.order('name asc')}
  - if characters.where(template_id: nil).exists?
    = render partial: partial_type, locals: {name: 'No Template', characters: characters.where(template_id: nil).order('name asc'), show_new_character_button: @user.id == current_user&.id}
- else
  %tr
    %td.centered.padding-5{class: cycle('even', 'odd'), colspan: 6} — No characters yet —


= render 'navigation/mobile/profile'
:ruby
  notification_count = Notification.for(current_user).where(new: true).count
  notification_count = nil if notification_count.zero?
  notifications_icon = notification_count.nil? ? 'bell-o' : 'bell'
%nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block#rs-mobile-nav{ role: :navigation }
  .container{ class: ios_web_app? ? 'ios-web-app' : '' }
    %ul.nav.navbar-nav.navbar-icon-row
      = nav_entry t('views.navigation.timeline'), root_path, icon: 'home', icon_only: true
      = nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count, icon: 'inbox', icon_only: true
      - if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
        = nav_entry t('views.navigation.discover'), discover_path, icon: 'compass', icon_only: true
      = nav_entry t('views.navigation.notifications'), '/notifications', badge: notification_count, icon: notifications_icon, icon_only: true
      %li.nav-item.profile--image-dropdown
        %a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-profile' }, aria: { controls: 'rs-mobile-nav-profile', expanded: 'false' } }
          %img.avatar-md.d-inline{ src: current_user.profile_picture.url(:small) }

Use notification_count helper to get notification count for icon badge

= render 'navigation/mobile/profile'
- notifications_icon = notification_count.nil? ? 'bell-o' : 'bell'
%nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block#rs-mobile-nav{ role: :navigation }
  .container{ class: ios_web_app? ? 'ios-web-app' : '' }
    %ul.nav.navbar-nav.navbar-icon-row
      = nav_entry t('views.navigation.timeline'), root_path, icon: 'home', icon_only: true
      = nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count, icon: 'inbox', icon_only: true
      - if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
        = nav_entry t('views.navigation.discover'), discover_path, icon: 'compass', icon_only: true
      = nav_entry t('views.navigation.notifications'), '/notifications', badge: notification_count, icon: notifications_icon, icon_only: true
      %li.nav-item.profile--image-dropdown
        %a.nav-link{ href: '#', data: { toggle: 'dropdown', target: '#rs-mobile-nav-profile' }, aria: { controls: 'rs-mobile-nav-profile', expanded: 'false' } }
          %img.avatar-md.d-inline{ src: current_user.profile_picture.url(:small) }


#verifier_list{data: {verifiers: @verifier_list.to_json}}
.row
  .column.small-12
    %table
      %thead
        %tr
          %th Day
          %th Task
          %th Hours
          %th Start Time
          %th End Time
          %th Status
          - if current_user == @user
            %th
            %th
      %tbody
        - workshift_assignments.each do |workshift_assignment|
          %tr{id: "assignment_#{workshift_assignment.id}"}
            %td= workshift_assignment.date.strftime('%A, %m/%e')
            %td= link_to(workshift_assignment.task, workshift_assignment.workshift)
            %td= workshift_assignment.hours
            %td= workshift_assignment.formatted_start_time
            %td= workshift_assignment.formatted_end_time
            %td= workshift_assignment.status
            - if current_user == @user
              %td
              = form_tag assignment_check_off_path(workshift_assignment) do
                = text_field_tag :verifier_name, nil
                = hidden_field_tag :verifier, nil
                = submit_tag "Check Off", class: 'button success small radius'
              %td
                = form_tag put_on_market_path(workshift_assignment) do
                  = submit_tag "Sell", class: 'button alert small radius', data: { confirm: 'Are you sure you want to sell your shift?' }

Fix current workshift assignments table due to merge autofill_resident_names.

#verifier_list{data: {verifiers: @verifier_list.to_json}}
.row
  .column.small-12
    %table
      %thead
        %tr
          %th Day
          %th Task
          %th Hours
          %th Start Time
          %th End Time
          %th Status
          - if current_user == @user
            %th
            %th
      %tbody
        - workshift_assignments.each do |workshift_assignment|
          %tr{id: "assignment_#{workshift_assignment.id}"}
            %td= workshift_assignment.date.strftime('%A, %m/%e')
            %td= link_to(workshift_assignment.task, workshift_assignment.workshift)
            %td= workshift_assignment.hours
            %td= workshift_assignment.formatted_start_time
            %td= workshift_assignment.formatted_end_time
            %td= workshift_assignment.status
            - if current_user == @user
              %td
                = form_tag assignment_check_off_path(workshift_assignment) do
                  = text_field_tag :verifier_name, nil, class: 'verifier-name'
                  = hidden_field_tag :verifier, nil
                  = submit_tag "Check Off", class: 'button success small radius'
              %td
                = form_tag put_on_market_path(workshift_assignment) do
                  = submit_tag "Sell", class: 'button alert small radius', data: { confirm: 'Are you sure you want to sell your shift?' }


%div.ko_context
  - @args.each do |k,v|
    %div.model{:"data-model-name" => "#{k}", :"data-model-value" => v.to_json}
    %div{"data-bind" => "with: model"}
      = @inner_html

Fix bug with extra indentation.


%ul.nav
  %li
    %a{:href => "#{site.base_url}/docs"} Back to Documentation Home
  %li.active
    %a{:href => "#postgresql-resource"} PostgreSQL Resource
    %ul.nav
      %li.active
        %a{:href => "#features"} Features
      %li
        %a{:href => "#configuration"} Configuration
      %li
        %a{:href => "#rest-api"} REST API
      %li
        %a{:href => "#listing-tables"} Listing tables (collections)
      %li
        %a{:href => "#creating-a-table"} Creating a table
      %li
        %a{:href => "#retrieving-a-table-schema"} Retrieving a table schema
      %li
        %a{:href => "#dropping-a-table"} Dropping a Table
      %li
        %a{:href => "#create-records"} Creating records
      %li
        %a{:href => "#update-records"} Updating records
      %li
        %a{:href => "#delete-records"} Deleting records
      %li
        %a{:href => "#retrieving-data"} Retrieving data
      %li
        %a{:href => "#bulk-operations"} Bulk operations
      %li
        %a{:href => "#miscellaneous"} Miscellaneous

Fix back button on postgresql page

%ul.nav
  %li
    %a.btn.btn-default{:href => "#{site.base_url}/docs"}
      %i.fa.fa-arrow-left
      Back to documentation
  %li.active
    %a{:href => "#postgresql-resource"} PostgreSQL Resource
    %ul.nav
      %li.active
        %a{:href => "#features"} Features
      %li
        %a{:href => "#configuration"} Configuration
      %li
        %a{:href => "#rest-api"} REST API
      %li
        %a{:href => "#listing-tables"} Listing tables (collections)
      %li
        %a{:href => "#creating-a-table"} Creating a table
      %li
        %a{:href => "#retrieving-a-table-schema"} Retrieving a table schema
      %li
        %a{:href => "#dropping-a-table"} Dropping a Table
      %li
        %a{:href => "#create-records"} Creating records
      %li
        %a{:href => "#update-records"} Updating records
      %li
        %a{:href => "#delete-records"} Deleting records
      %li
        %a{:href => "#retrieving-data"} Retrieving data
      %li
        %a{:href => "#bulk-operations"} Bulk operations
      %li
        %a{:href => "#miscellaneous"} Miscellaneous


%h1 Imports

%ul
  - for import_result in import_results
    %li= link_to import_result.name, import_path(import_result.import)

Add link to create new import

%p.float-right= link_to 'New Import', new_import_path, { class: 'btn btn-primary' }

%h1 Imports

%ul
  - for import_result in import_results
    %li= link_to import_result.name, import_path(import_result.import)


%tr
  %td{colspan:"2"}
  %td
    = button_tag :class => 'secondary radius expand small', :id => 'update-button' do
      %i.ofn-i_023-refresh
      = t(:update)
  %td
  %td#empty-cart.text-center
    %span#clear_cart_link{"data-hook" => ""}
      = link_to t(:orders_form_empty_cart), main_app.empty_cart_path, method: :put, :class => 'not-bold small'

Refactor cart update button syntax

%tr
  %td{colspan:"2"}
  %td
    %button#update-button.secondary.radius.expand.small
      %i.ofn-i_023-refresh
      = t(:update)
  %td
  %td#empty-cart.text-center
    %span#clear_cart_link{"data-hook" => ""}
      = link_to t(:orders_form_empty_cart), main_app.empty_cart_path, method: :put, :class => 'not-bold small'


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

Fix date format browser computability issue (using a supported date string format)

- if current_user.timesheets.exists?
  %li.dropdown.purple
    %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
      = fa_icon "clock-o 3x"
      %p Timesheets
    %ul.dropdown-menu
      %li
        = link_to "All your timesheets", user_timesheets_path(current_user)
      - if current_user.current_timesheet
        %li
          = link_to "Your current timesheet", [:edit, current_user, current_user.current_timesheet]
          .current-timesheet-ending-time.hidden= current_user.current_timesheet.end_date.strftime("%Y/%m/%d")


.text-center.page-alert.fixed{ "ofn-page-alert" => true }
  .alert-box
    %a.alert-cta{href: "http://www.openfoodnetwork.org", target: "_blank"}
      %h6
        Interested in selling food on the Open Food Network?
        %strong
          Start here
          %i.ofn-i_054-point-right
    %a.close{ ng: { click: "close()" } } ×

Update link for uber-style sell food dropdown

.text-center.page-alert.fixed{ "ofn-page-alert" => true }
  .alert-box
    %a.alert-cta{href: registration_path, target: "_blank"}
      %h6
        Interested in selling food on the Open Food Network?
        %strong
          Start here
          %i.ofn-i_054-point-right
    %a.close{ ng: { click: "close()" } } ×


= tag "meta", charset: "utf-8"
= tag "meta", "http-equiv" => 'X-UA-Compatible', content: 'IE=edge;chrome=1'
= tag "meta", name: "viewport", content: "width=device-width, initial-scale=1"

= favicon_tag "favicon.png"
= tag "link", rel: "apple-touch-icon", href: "images/apple-touch-icon.png"

= stylesheet_link_tag "site"
= javascript_include_tag  "all", async: true

%title
  #{current_page.data.title + ' - ' unless current_page.data.title.nil?} Nathan & Katelin Day
= feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed"

Change Javascript include from "all" to :bundle

= tag "meta", charset: "utf-8"
= tag "meta", "http-equiv" => 'X-UA-Compatible', content: 'IE=edge;chrome=1'
= tag "meta", name: "viewport", content: "width=device-width, initial-scale=1"

= favicon_tag "favicon.png"
= tag "link", rel: "apple-touch-icon", href: "images/apple-touch-icon.png"

= stylesheet_link_tag "site"
= javascript_include_tag :bundle, async: true

%title
  #{current_page.data.title + ' - ' unless current_page.data.title.nil?} Nathan & Katelin Day
= feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed"


.row
  .column
    .next-blurb At the next CleRb...
    %h2
      %a{:href => event.permalink, :title => event.title}= event.title

    .content
      %span.presenter
        != precede "Presented by " do
          %strong= event.presenter_name
      != precede "– " do
        = event.blurb

.row
  .upcoming-events-teaser.column
    %a(href="/events") See all of our events
    != partial :ical_link
  .event-date.column
    %a.event-button{ :href => event.permalink, :title => event.title }
      != succeed " @ " do
        = pretty_date(event.date)
      = event.location_name

Hide Presented By text when no presenter

.row
  .column
    .next-blurb At the next CleRb...
    %h2
      %a{:href => event.permalink, :title => event.title}= event.title

    .content
      - with_presenter(event) do
        %span.presenter
          != surround "Presented by ", "–" do
            %strong= event.presenter_name
      != event.blurb

.row
  .upcoming-events-teaser.column
    %a(href="/events") See all of our events
    != partial :ical_link
  .event-date.column
    %a.event-button{ :href => event.permalink, :title => event.title }
      != succeed " @ " do
        = pretty_date(event.date)
      = event.location_name


- @page_title = @fabulator_edition.name + ' Edition - ' + default_page_title

- body_classes << "reversed"

- render_region :main do |main|
  - main.show_header do
    %h1= 'Edition - ' + @fabulator_edition.name
  - main.show_form do
    %p
      Size:
      = @fabulator_edition.file_size

    %p
      Download:
      %a{:href => api_edition_url(:id => @fabulator_edition.id)}
        = @fabulator_edition.filename

Add right download filename for showing an edition

- @page_title = @fabulator_edition.name + ' Edition - ' + default_page_title

- body_classes << "reversed"

- render_region :main do |main|
  - main.show_header do
    %h1= 'Edition - ' + @fabulator_edition.name
  - main.show_form do
    %p
      Size:
      = @fabulator_edition.file_size

    %p
      Download:
      %a{:href => api_edition_url(:id => @fabulator_edition.id)}
        = @fabulator_edition.download_filename + ".tgz"


.row
  .col-md-12
    .page-header{:style => 'margin-top: -20px;'}
      %h1 Transit Agency Dashboard
.row
  .col-md-11
    .col-md-12
      - Report.show_in_dashboard.each do |report|
        = dialog_tag(report.name, {:icon => report.report_type.display_icon_name, :link_text => "View", :link_path => report_path(report)}) do
          %div{:id => "report_#{report.id}", :style => 'height: 200px;'}

    .row
      .col-md-6
        .row
          .col-md-12
            = render :partial => 'activities_summary'
          .col-md-12
            = render :partial => 'new_messages_summary'
      .col-md-3
        = render :partial => 'tasks_summary'

        = render :partial => 'notices_summary'

  .col-md-1
    = render 'shared/quick_links'

= render 'index_scripts'

Fix a brojken dashbopard link

.row
  .col-md-12
    .page-header{:style => 'margin-top: -20px;'}
      %h1 Transit Agency Dashboard
.row
  .col-md-11
    .col-md-12
      - Report.show_in_dashboard.each do |report|
        = dialog_tag(report.name, {:icon => report.report_type.display_icon_name, :link_text => "View", :link_path => report_path(report)}) do
          %div{:id => "report_#{report.id}", :style => 'height: 200px;'}

    .row
      .col-md-6
        .row
          .col-md-12
            = render :partial => 'activities_summary'
          .col-md-12
            = render :partial => 'new_messages_summary'
      .col-md-3
        = render :partial => 'tasks_summary'

        = render :partial => 'shared/notices'

  .col-md-1
    = render 'shared/quick_links'

= render 'index_scripts'


- provide :title, 'About'

%h1 About
%p Diffux is a tool that takes snapshots of web pages and creates a diff from a baseline snapshot.
%p
  Github:
  = link_to 'https://github.com/trotzig/diffux'

Fix link to github repo from About page

- provide :title, 'About'

%h1 About
%p Diffux is a tool that takes snapshots of web pages and creates a diff from a baseline snapshot.
%p
  Github:
  - link = 'https://github.com/trotzig/diffux'
  = link_to link, link


#ab_form
  #policy_bar
    - if @resolve[:uri] && Hash[*@resolve[:target_classes].flatten].invert[@resolve[:new][:target_class]] == @edit[:new][:target_class]
      = link_to({:action => "resolve", :button => "paste"},
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        :remote                => true,
        "data-method"          => :post,
        :class                 => 'btn btn-default',
        :title                 => _("Paste object details for use in a Button.")) do
        %i.fa.fa-clipboard
    - else
      %button.btn.btn-default.disabled{:title => _("Paste is not available, no object information has been copied from the Simulation screen")}
        %i.fa.fa-clipboard
  = render :partial => "layouts/flash_msg"

  #custom_button_tabs
    %ul.nav.nav-tabs
      = miq_tab_header('ab_options_tab', @sb[:active_tab]) do
        = _('Options')
      = miq_tab_header('ab_advanced_tab', @sb[:active_tab]) do
        = _('Advanced')
    .tab-content
      = miq_tab_content('ab_options_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_options_form"
      = miq_tab_content('ab_advanced_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_advanced_form"

  :javascript
    miq_tabs_init('#custom_button_tabs');

Enable 'Paste' button if the coppied data are in the session

#ab_form
  #policy_bar
    - if session[:resolve_object].present?
      = link_to({:action => "resolve", :button => "paste"},
        "data-miq_sparkle_on"  => true,
        "data-miq_sparkle_off" => true,
        :remote                => true,
        "data-method"          => :post,
        :class                 => 'btn btn-default',
        :title                 => _("Paste object details for use in a Button.")) do
        %i.fa.fa-clipboard
    - else
      %button.btn.btn-default.disabled{:title => _("Paste is not available, no object information has been copied from the Simulation screen")}
        %i.fa.fa-clipboard
  = render :partial => "layouts/flash_msg"

  #custom_button_tabs
    %ul.nav.nav-tabs
      = miq_tab_header('ab_options_tab', @sb[:active_tab]) do
        = _('Options')
      = miq_tab_header('ab_advanced_tab', @sb[:active_tab]) do
        = _('Advanced')
    .tab-content
      = miq_tab_content('ab_options_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_options_form"
      = miq_tab_content('ab_advanced_tab', @sb[:active_tab]) do
        = render :partial => "shared/buttons/ab_advanced_form"

  :javascript
    miq_tabs_init('#custom_button_tabs');


%h1 Edit Dedication and Consent for Digital Wall of Founders

= form_tag dedication_path(@dedication), :method => :put do

  %h2 Dedication
  = label :dedication, :dedication, 'Write a dedication for your donation'
  = text_field :dedication, 'dedication'

  %h2 Digital Wall of Founders
  = label :dedication, :status, 'I want my dedication to appear on the Digital Wall of Founders'
  = check_box :dedication, 'status', {}, 'true', 'false'

  %p We want to keep the Digital Wall of Founders as close to the physical Walls of Founders
  in hospitals as possible, so once you "Publish" your dedication you must contact an admin to change it.
  Until you publish your dedication it will not appear on the Digital Wall of Founders.
  = submit_tag 'Save'
  = submit_tag 'Publish', name: 'publish'

Fix layout for dedication edit page

.container
  .devise
    %h1 Edit Dedication and Consent for Digital Wall of Founders

    = form_tag dedication_path(@dedication), :method => :put do

      %h2 Dedication
      = label :dedication, :dedication, 'Write a dedication for your donation'
      = text_field :dedication, 'dedication'

      %h2 Digital Wall of Founders
      = label :dedication, :status, 'I want my dedication to appear on the Digital Wall of Founders'
      = check_box :dedication, 'status', {}, 'true', 'false'

      %p We want to keep the Digital Wall of Founders as close to the physical Walls of Founders
      in hospitals as possible, so once you "Publish" your dedication you must contact an admin to change it.
      Until you publish your dedication it will not appear on the Digital Wall of Founders.
      = submit_tag 'Save'
      = submit_tag 'Publish', name: 'publish'