%h1= "Welcome #{current_user.name}!"
%p
  Hi there,
  = current_user.name
  We haven't seen you before, would you like to add yourself to the directory?
%a{:href => new_person_path} Of course!
%a{:href => root_path} Not now, let me browse.

Fix "add myself" form on welcome page

%h1= "Welcome #{current_user.name}!"
%p
  Hi there,
  = current_user.name
  We haven't seen you before, would you like to add yourself to the directory?
=form_tag(people_path, :method => :post) do
  =hidden_field_tag :from_twitter, current_user.login
  =submit_tag "Of course!"
%a{:href => root_path} Not now, let me browse.


%head
  %meta{:charset => "utf-8"}/
  %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
  %title exercism.io
  %meta{:content => "", :name => "description"}/
  %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
  %link{:href =>  link_to("/css/bootstrap.min.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/bootstrap-theme.min.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/main.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/hacks.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/pygments.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/language-colors.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/easydropdown.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/favicon.ico"), :rel => "shortcut icon"}/
  %script{:src => link_to("/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js")}
  %script{:src => link_to("/js/vendor/jquery.easydropdown.min.js")}

Add jquery to v1.0 layout

%head
  %meta{:charset => "utf-8"}/
  %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/
  %title exercism.io
  %meta{:content => "", :name => "description"}/
  %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
  %link{:href =>  link_to("/css/bootstrap.min.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/bootstrap-theme.min.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/main.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/hacks.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/pygments.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/language-colors.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/css/easydropdown.css"), :rel => "stylesheet"}/
  %link{:href =>  link_to("/favicon.ico"), :rel => "shortcut icon"}/
  %script{:src => link_to("/js/vendor/jquery-1.10.1.min.js")}
  %script{:src => link_to("/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js")}
  %script{:src => link_to("/js/vendor/jquery.easydropdown.min.js")}


%h1 Add scraper

%p This is where you will be able to pick a repository from your GitHub to add as a scraper

%p
  For the time being scrapers are restricted to using Ruby. They need to have a file in the root
  directory called "scraper.rb" and they should create an sqlite database in the current working
  directory called "scraperwiki.sqlite". The code needs to live in the master branch of the repository.

%p
  Other than this you can pretty much do whatever you want.

-# TODO Don't show repos that we've already added

= semantic_form_for @scraper do |f|
  = f.inputs do
    = f.input :name, as: :select, collection: @repos.map{|r| r.name}, label: "GitHub Repository", include_blank: false
  = f.actions do
    = f.action :submit, label: "Add Scraper"

Update instructions with a little more detail

%h1 Add scraper

%p This is where you will be able to pick a repository from your GitHub to add as a scraper

%p
  For the time being scrapers are restricted to using Ruby. They need to have a file in the root
  directory called "scraper.rb" and they should create an sqlite database in the current working
  directory called "scraperwiki.sqlite". The main data should be written into a table called "swdata".
  The code needs to live in the master branch of the repository.

-# TODO Don't show repos that we've already added

= semantic_form_for @scraper do |f|
  = f.inputs do
    = f.input :name, as: :select, collection: @repos.map{|r| r.name}, label: "GitHub Repository", include_blank: false
  = f.actions do
    = f.action :submit, label: "Add Scraper"


!!!
%html
  %head
    %meta{ charset: "utf-8" }
    %title Screen Concept CMS
    = stylesheet_link_tag 'kuhsaft/cms/application.css', :media => 'screen, projection'
    = stylesheet_link_tag 'kuhsaft/cms/customizations.css', :media => 'screen, projection'
    = csrf_meta_tag

  %body{ :class => "#{controller_name}" }
    .navbar.navbar-fixed-top
      .navbar-inner
        .container
          = render 'main_navigation'

      #toolbar
    .container.cms
      .row
        .span12
          = render 'content_language_switch'
          = render 'flash', :flash => flash
          = yield
    = javascript_include_tag 'kuhsaft/cms/application.js'
    = javascript_include_tag 'kuhsaft/cms/customizations.js'

Initialize window.I18n in application layout

!!!
%html
  %head
    %meta{ charset: "utf-8" }
    %title Screen Concept CMS
    = stylesheet_link_tag 'kuhsaft/cms/application.css', :media => 'screen, projection'
    = stylesheet_link_tag 'kuhsaft/cms/customizations.css', :media => 'screen, projection'
    = csrf_meta_tag

  %body{ :class => "#{controller_name}" }
    .navbar.navbar-fixed-top
      .navbar-inner
        .container
          = render 'main_navigation'

      #toolbar
    .container.cms
      .row
        .span12
          = render 'content_language_switch'
          = render 'flash', :flash => flash
          = yield

    :coffee
      window.I18n = "#{escape_javascript params[:content_locale]}"

    = javascript_include_tag 'kuhsaft/cms/application.js'
    = javascript_include_tag 'kuhsaft/cms/customizations.js'


- if @projects.any?
  .prepend-left-10.project-item-select-holder
    = project_select_tag :project_path, class: "project-item-select", data: { include_groups: local_assigns[:include_groups] }
    %a.btn.btn-new.new-project-item-select-button
      = icon('plus')
      = local_assigns[:label]
      %b.caret

  :javascript
    $('.new-project-item-select-button').on('click', function() {
      $('.project-item-select').select2('open');
    });

    var relativePath = '#{local_assigns[:path]}';

    $('.project-item-select').on('click', function() {
      window.location = $(this).val() + '/' + relativePath;
    });

    new ProjectSelect()

Sort projects by last activity for new issue dropdown

- if @projects.any?
  .prepend-left-10.project-item-select-holder
    = project_select_tag :project_path, class: "project-item-select", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at' }
    %a.btn.btn-new.new-project-item-select-button
      = icon('plus')
      = local_assigns[:label]
      %b.caret

  :javascript
    $('.new-project-item-select-button').on('click', function() {
      $('.project-item-select').select2('open');
    });

    var relativePath = '#{local_assigns[:path]}';

    $('.project-item-select').on('click', function() {
      window.location = $(this).val() + '/' + relativePath;
    });

    new ProjectSelect()


%h2 Groups / Regions
%p These are the organisations and relationships between hubs which make up the Open Food Network.
%p Some groups are clustered by location or council, others by non-geographic similarities.
%a.close-reveal-modal{"ng-click" => "cancel()"} ×

Add groups icon to modal

%h2
  %i.ofn-i_035-groups
  Groups / Regions
%p These are the organisations and relationships between hubs which make up the Open Food Network.
%p Some groups are clustered by location or council, others by non-geographic similarities.
%a.close-reveal-modal{"ng-click" => "cancel()"} ×


%footer.site-info
  %hr
  %p
    View the #{link_to "source on GitHub", "https://github.com/pbyrne/cron-checker/"}
    or #{link_to "submit an issue", "https://github.com/pbyrne/cron-checker/issues"} if something is amiss.
  %p Copyright © 2009–#{Date.today.year} #{link_to "Patrick Byrne", "http://patrickbyrne.net"}.

Add Guages tracking code, if key is present

%footer.site-info
  %hr
  %p
    View the #{link_to "source on GitHub", "https://github.com/pbyrne/cron-checker/"}
    or #{link_to "submit an issue", "https://github.com/pbyrne/cron-checker/issues"} if something is amiss.
  %p Copyright © 2009–#{Date.today.year} #{link_to "Patrick Byrne", "http://patrickbyrne.net"}.

- if ENV["GUAGES_KEY"]
  :javascript
    var _gauges = _gauges || [];
    (function() {
      var t   = document.createElement('script');
      t.type  = 'text/javascript';
      t.async = true;
      t.id    = 'gauges-tracker';
      t.setAttribute('data-site-id', '#{ENV["GUAGES_KEY"]}');
      t.src = '//secure.gaug.es/track.js';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(t, s);
    })();


- page_title "Report abuse"
%h3.page-title Report abuse
%p Please use this form to report users who create spam issues, comments or behave inappropriately.
%hr
= form_for @abuse_report, html: { class: 'form-horizontal'} do |f|
  = f.hidden_field :user_id
  - if @abuse_report.errors.any?
    .alert.alert-danger
      - @abuse_report.errors.full_messages.each do |msg|
        %p= msg
  .form-group
    = f.label :user_id, class: 'control-label'
    .col-sm-10
      - name = "#{@abuse_report.user.name} (@#{@abuse_report.user.username})"
      = text_field_tag :user_name, name, class: "form-control", readonly: true
  .form-group
    = f.label :message, class: 'control-label'
    .col-sm-10
      = f.text_area :message, class: "form-control", rows: 2, required: true
      .help-block
        Explain the problem with this user. If appropriate, provide a link to the relevant issue or comment.

  .form-actions
    = f.submit "Send report", class: "btn btn-create"

Add js-requires-input and js-quick-submit to abuse report form

- page_title "Report abuse"
%h3.page-title Report abuse
%p Please use this form to report users who create spam issues, comments or behave inappropriately.
%hr
= form_for @abuse_report, html: { class: 'form-horizontal js-requires-input'} do |f|
  = f.hidden_field :user_id
  - if @abuse_report.errors.any?
    .alert.alert-danger
      - @abuse_report.errors.full_messages.each do |msg|
        %p= msg
  .form-group
    = f.label :user_id, class: 'control-label'
    .col-sm-10
      - name = "#{@abuse_report.user.name} (@#{@abuse_report.user.username})"
      = text_field_tag :user_name, name, class: "form-control", readonly: true
  .form-group
    = f.label :message, class: 'control-label'
    .col-sm-10
      = f.text_area :message, class: "form-control js-quick-submit", rows: 2, required: true
      .help-block
        Explain the problem with this user. If appropriate, provide a link to the relevant issue or comment.

  .form-actions
    = f.submit "Send report", class: "btn btn-create"


.drawings-wrapper{ class: drawings_class }
  .drawing
    .image.center-block
      = link_to (image_tag drawing.image.url(:medium), class:'img-responsive'),
                 drawing_path(drawing)
    .drawing-bottom
      .caption
        .caption-content
          .drawing-description
            = drawing.description
          .user-name
            Uploaded by:
            = drawing.user.email
          .time-ago
            uploaded
            = time_ago_in_words drawing.created_at
            ago
          .country
            - if drawing.country.present?
              drawn in
              = ISO3166::Country.find_country_by_alpha2(drawing.country).name
          .drawing-status-pending
            = drawing.status.upcase

Add all form info into view page. Whole page needs UX input but getting the data in there at least.

.drawings-wrapper{ class: drawings_class }
  .drawing
    .image.center-block
      = link_to (image_tag drawing.image.url(:medium), class:'img-responsive'),
                 drawing_path(drawing)
    .drawing-bottom
      .caption
        .caption-content
          .drawing-row
            %strong
              = drawing.description
          .drawing-row
            %em
              Uploaded by
              .user-name
                = drawing.user.email
          .drawing-row.time-ago
            %em
              Created
              = time_ago_in_words drawing.created_at
              ago
          .drawing-row.time-ago
            %em
              Updated
              = time_ago_in_words drawing.updated_at
              ago
          .drawing-row.drawing-status-pending
            = drawing.status.upcase
          .drawing-details
            %h3 Details of Drawing
            .drawing-row
              %strong Country Drawn In:
              - if drawing.country.present?
                = ISO3166::Country.find_country_by_alpha2(drawing.country).name
              - else
                n/a
            .drawing-row
              %strong Subject Matter:
              = drawing.subject_matter
            .drawing-row
              %strong Mood Rating:
              = drawing.mood_rating

          .artist-details
            %h3 Details of Artist
            .drawing-row
              %strong Age:
              = drawing.age
            .drawing-row
              %strong Gender:
              = drawing.gender.humanize
            .drawing-row
              %strong Context / Story:
              = drawing.story


!!! 5
%html
  %head
    %meta(charset="utf-8")
    %link(rel="stylesheet" type="text/css" href="/main.css")
  %body
    .row
      %img.team__icon
      .team__name
        tsuibami
    .row
      %input.post__title(type="input")
    .row
      %textarea.post__body
    .row.menu
      .menu__link
        %a.esa__link(href="#" target="_blank") 前回保存した記事をesaで開く
      .menu__post
        %input#post-with-clear.esa__post_with-clear(type="checkbox")
        %label(for="post-with-clear") Saveしたらタイトルと本文をクリアする
        %button.esa__post_button(type="button") Save as WIP
    .row
      .message
        .message__body
  %script(src="/lib/bluebird.min.js")
  %script(src="/lib/jquery-2.1.4.min.js")
  %script(src="/lib/jquery.selection.js")
  %script(src="/lib/jquery.esarea.js")
  %script(src="/lib/lodash.js")
  %script(src="/index.js")

Add autofocus attribute to title inputbox

!!! 5
%html
  %head
    %meta(charset="utf-8")
    %link(rel="stylesheet" type="text/css" href="/main.css")
  %body
    .row
      %img.team__icon
      .team__name
        tsuibami
    .row
      %input.post__title(type="input" autofocus)
    .row
      %textarea.post__body
    .row.menu
      .menu__link
        %a.esa__link(href="#" target="_blank") 前回保存した記事をesaで開く
      .menu__post
        %input#post-with-clear.esa__post_with-clear(type="checkbox")
        %label(for="post-with-clear") Saveしたらタイトルと本文をクリアする
        %button.esa__post_button(type="button") Save as WIP
    .row
      .message
        .message__body
  %script(src="/lib/bluebird.min.js")
  %script(src="/lib/jquery-2.1.4.min.js")
  %script(src="/lib/jquery.selection.js")
  %script(src="/lib/jquery.esarea.js")
  %script(src="/lib/lodash.js")
  %script(src="/index.js")


!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %title Packrat
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  - if current_leader.nil?
    %body
      = render 'layouts/flash'
      = yield
  - else
    %body.with-top-navbar
      = render 'layouts/flash'
      %nav.navbar.navbar-inverse.navbar-fixed-top
        .container.container-spacious
          .navbar-header
            %button{type: 'button', class: 'navbar-toggle collapsed',
             'data-toggle': 'collapse', 'data-target': '#navbar',
             'aria-expanded': 'false', 'aria-controls': 'navbar'}
              %span.sr-only Toggle navigation
              %span.icon-bar
              %span.icon-bar
              %span.icon-bar
            = link_to root_path, class: 'navbar-brand navbar-brand-emphasized' do
              %span.icon.icon-line-graph.navbar-brand-icon
              Labs
          #navbar.navbar-collapse.collapse
            = render 'layouts/nav_items'

      .container.container-spacious
        = yield

Change page title to "hackEDU Labs"

!!!
%html
  %head
    %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
    %title hackEDU Labs
    = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  - if current_leader.nil?
    %body
      = render 'layouts/flash'
      = yield
  - else
    %body.with-top-navbar
      = render 'layouts/flash'
      %nav.navbar.navbar-inverse.navbar-fixed-top
        .container.container-spacious
          .navbar-header
            %button{type: 'button', class: 'navbar-toggle collapsed',
             'data-toggle': 'collapse', 'data-target': '#navbar',
             'aria-expanded': 'false', 'aria-controls': 'navbar'}
              %span.sr-only Toggle navigation
              %span.icon-bar
              %span.icon-bar
              %span.icon-bar
            = link_to root_path, class: 'navbar-brand navbar-brand-emphasized' do
              %span.icon.icon-line-graph.navbar-brand-icon
              Labs
          #navbar.navbar-collapse.collapse
            = render 'layouts/nav_items'

      .container.container-spacious
        = yield


!!! 5
%html{ lang: 'ja' }
  %head
    %script{ type: 'text/javascript',
             src:  'http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true' }
    %meta{ charset: 'utf-8' }
    %title SharePla
    %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
    = stylesheet_link_tag    "application", media: "all", 'data-turbolinks-track' => true
    = javascript_include_tag "application", 'data-turbolinks-track' => true
    = csrf_meta_tags
    :javascript
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-45591022-1', 'sharepla.herokuapp.com');
      ga('send', 'pageview');
  %body
    .wrap
      = render 'layouts/header'
      = yield
      -# layout/_footer.html.erb -->

Apply css to the PDF.

!!! 5
%html{ lang: 'ja' }
  %head
    %script{ type: 'text/javascript',
             src:  'http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true' }
    %meta{ charset: 'utf-8' }
    = wicked_pdf_stylesheet_link_tag 'custom','plans'
    %title SharePla
    %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
    = stylesheet_link_tag    "application", media: "all", 'data-turbolinks-track' => true
    = javascript_include_tag "application", 'data-turbolinks-track' => true
    = csrf_meta_tags
    :javascript
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-45591022-1', 'sharepla.herokuapp.com');
      ga('send', 'pageview');
  %body
    .wrap
      = render 'layouts/header'
      = yield
      -# layout/_footer.html.erb -->


- project = project || @project

.git-clone-holder.js-git-clone-holder.input-group
  .input-group-prepend
    - if allowed_protocols_present?
      .input-group-text.clone-dropdown-btn.btn
        %span.js-clone-dropdown-label
          = enabled_project_button(project, enabled_protocol)
    - else
      %a#clone-dropdown.input-group-text.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
        %span.js-clone-dropdown-label
          = default_clone_protocol.upcase
        = icon('caret-down')
      %ul.dropdown-menu.dropdown-menu-selectable.clone-options-dropdown
        %li
          = ssh_clone_button(project)
        %li
          = http_clone_button(project)

  = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' }
  .input-group-append
    = clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")

Resolve CE/EE diffs in _clone_panel

- project = project || @project

.git-clone-holder.js-git-clone-holder.input-group
  .input-group-prepend
    - if allowed_protocols_present?
      .input-group-text.clone-dropdown-btn.btn
        %span.js-clone-dropdown-label
          = enabled_project_button(project, enabled_protocol)
    - else
      %a#clone-dropdown.input-group-text.btn.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
        %span.js-clone-dropdown-label
          = default_clone_protocol.upcase
        = icon('caret-down')
      %ul.dropdown-menu.dropdown-menu-selectable.clone-options-dropdown
        %li
          = ssh_clone_button(project)
        %li
          = http_clone_button(project)
        = render_if_exists 'shared/kerberos_clone_button', project: project

  = text_field_tag :project_clone, default_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' }
  .input-group-append
    = clipboard_button(target: '#project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard")

    = render_if_exists 'shared/geo_modal_button'

= render_if_exists 'shared/geo_modal', project: project


%h1 Diffuxes
%p These are the URLs currently configured to take snapshots.

%table.table
  %thead
    %tr
      %th Address
      %th Screen width
      %th
      %th
      %th

  %tbody
    - @urls.each do |url|
      %tr
        %td= url.address
        %td= pluralize(url.viewport_width, 'pixel')
        %td= link_to pluralize(url.snapshots.count, 'snapshot'), url
        %td
          = link_to edit_url_path(url) do
            %i.icon-edit
        %td
          = link_to url, method: :delete, data: { confirm: 'Are you sure?' } do
            %i.icon-remove

= link_to new_url_path do
  %i.icon-plus
  Add new URL

Add name column to URLs screen

%h3 URL configurations
%p These are the URLs currently scheduled for snapshots.

%table.table.table-striped
  %thead
    %tr
      %th Name
      %th Address
      %th Screen width
      %th
      %th
      %th

  %tbody
    - @urls.each do |url|
      %tr
        %td= url.name
        %td= url.address
        %td= pluralize(url.viewport_width, 'pixel')
        %td= link_to pluralize(url.snapshots.count, 'snapshot'), url
        %td
          = link_to edit_url_path(url) do
            %i.icon-edit
        %td
          = link_to url, method: :delete, data: { confirm: 'Are you sure?' } do
            %i.icon-remove

= link_to new_url_path do
  %i.icon-plus
  Add new URL


- title "hello"
.container
  %h2 splits i/o
  %h5
    upload
    - if user_signed_in?
      %a{href: user_path(current_user)} all
    - else
      %u all
    the splits
  = render partial: 'shared/alerts'
  - if user_signed_in? && current_user.runs.present?
    = render partial: 'shared/follows' if ab_test(:show_follows)
    = render partial: 'shared/run_table', locals: {runs: current_user.runs}
  - else
    Save your splits to a file using your favorite splitting program, then
    drag that file anywhere on this page.

Fix some weird bug with someone having a nil username

- title "hello"
.container
  %h2 splits i/o
  %h5
    upload
    - if user_signed_in? && current_user.name.present?
      %a{href: user_path(current_user)} all
    - else
      %u all
    the splits
  = render partial: 'shared/alerts'
  - if user_signed_in? && current_user.runs.present?
    = render partial: 'shared/follows' if ab_test(:show_follows)
    = render partial: 'shared/run_table', locals: {runs: current_user.runs}
  - else
    Save your splits to a file using your favorite splitting program, then
    drag that file anywhere on this page.


#main_div
  = "Hello Button Group"
  = @record.name

Add Summary screen for Custom Button Group

#main_div
  - if @record && @record.kind_of?(CustomButtonSet)
    -# don't need basic info box for Unassigned button group
    %h3
      = _('Basic Information')
    .form-horizontal.static
      .form-group
        %label.control-label.col-md-2
          = _('Text')
        .col-md-8
          = @record.name.split('|').first
          - display = @record.set_data.key?(:display) ? @record.set_data[:display] : true

          .checkbox-inline
            %label{:style => "font-weight: normal"}
              = check_box_tag(display, true, display, :disabled => true)
              = _('Display on Button')

      .form-group
        %label.control-label.col-md-2
          = _('Hover Text')
        .col-md-8
          = @record.description
      .form-group
        %label.control-label.col-md-2
          = _('Image')
        .col-md-8
          %span{:class => @record.set_data[:button_icon], :style => @record.set_data.key?(:button_color) ? "color: #{@record.set_data[:button_color]};" : nil}


%h1 Breeders
- if @breeders.present?
  %table.table
    %thead
      %tr
        %th #
        %th Breeder Name
        %th City
        %th State
        %th Distance  (miles)
    %tbody
      - @breeders.each_with_index do |breeder, index|
        %tr
          %th{:scope => "row"}= index + 1
          %td= breeder.name
          %td= breeder.city
          %td= breeder.state
          %td= breeder.distance.round(2)
- else
  %p No Breeders Available :(

Fix for rouding distance issue

%h1 Breeders
- if @breeders.present?
  %table.table
    %thead
      %tr
        %th #
        %th Breeder Name
        %th City
        %th State
        %th Distance  (miles)
    %tbody
      - @breeders.each_with_index do |breeder, index|
        %tr
          %th{:scope => "row"}= index + 1
          %td= breeder.name
          %td= breeder.city
          %td= breeder.state
          %td= (breeder.distance.to_i).round(2)
- else
  %p No Breeders Available :(


.topbar-wrapper
  .topbar{"data-dropdown" => "dropdown"}
    .topbar-inner
      .container-fluid
        %h3
          %a.brand{:href => '#'}
            Circle

        = render :partial => 'topbar_middle'

        %ul.nav.secondary-nav
          %li.dropdown
            %a.dropdown-toggle{:href => '#'}
              = current_user.email
            %ul.dropdown-menu
              %li
                = link_to('Logout', destroy_user_session_path, :method => :delete)

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

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

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

Add a link to the join app to add more projects.

.topbar-wrapper
  .topbar{"data-dropdown" => "dropdown"}
    .topbar-inner
      .container-fluid
        %h3
          %a.brand{:href => '#'}
            Circle

        = render :partial => 'topbar_middle'

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

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

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

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


- activities = investigation.activities
.activities_container
  .activity_list_header
    %span.investigation_name
      = investigation.name + " - "
    Activities
  %div
    Include
  %div
    %table.activity_list
      - activities.each do|activity|
        - checkbox_checked = (material.class == ::Investigation)? true : (activity.id == material.id)? true : false
        %tr
          %td.check_box
            = check_box_tag 'activity_id[]',activity.id,checkbox_checked, :id => 'activity_' + activity.id.to_s, :onclick=>"checkActivityToAssign(this)"
          %td
            .activity_name
              = activity.name
            .activity_description
              = activity.description
          %td.preview
            = link_to "Preview",run_url_for(activity,{}),:class=>"button"
          %td.share
            %a{:class=>"button"}
              Share

Add tbody tag to assist feature test

- activities = investigation.activities
.activities_container
  .activity_list_header
    %span.investigation_name
      = investigation.name + " - "
    Activities
  %div
    Include
  %div
    %table.activity_list
      - activities.each do|activity|
        - checkbox_checked = (material.class == ::Investigation)? true : (activity.id == material.id)? true : false
        %tbody
          %tr
            %td.check_box
              = check_box_tag 'activity_id[]',activity.id,checkbox_checked, :id => 'activity_' + activity.id.to_s, :onclick=>"checkActivityToAssign(this)"
            %td
              .activity_name
                = activity.name
              .activity_description
                = activity.description
            %td.preview
              = link_to "Preview",run_url_for(activity,{}),:class=>"button"
            %td.share
              %a{:class=>"button"}
                Share


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

#aspect_stream_header
  #sort_by
    = t('.recently')
    %span.controls
      = link_to_if(session[:sort_order] == 'created_at', t('.commented_on'), aspects_path(:a_ids => params[:a_ids], :sort_order => 'updated_at'))
      ·
      = link_to_if(session[:sort_order] == 'updated_at', t('.posted'), aspects_path(:a_ids => params[:a_ids], :sort_order => 'created_at' ))

  %h3
    - if all_aspects_selected?
      = t('.stream')
    - else
      = @aspects.to_sentence

= render 'shared/publisher', :aspect => aspect, :aspect_ids => aspect_ids

#main_stream.stream{:data => {:guids => aspect_ids.join(',')}}
  - if current_user.contacts.size < 2
    = render 'aspects/no_posts_message'

  - if posts.length > 0
    = render 'shared/stream', :posts => posts
    #pagination
      =link_to(t('more'), next_page_path, :class => 'paginate')

Move no_posts_message rendering above the stream, so that it doesn't get pushed down by new posts.

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

#aspect_stream_header
  #sort_by
    = t('.recently')
    %span.controls
      = link_to_if(session[:sort_order] == 'created_at', t('.commented_on'), aspects_path(:a_ids => params[:a_ids], :sort_order => 'updated_at'))
      ·
      = link_to_if(session[:sort_order] == 'updated_at', t('.posted'), aspects_path(:a_ids => params[:a_ids], :sort_order => 'created_at' ))

  %h3
    - if all_aspects_selected?
      = t('.stream')
    - else
      = @aspects.to_sentence

= render 'shared/publisher', :aspect => aspect, :aspect_ids => aspect_ids

- if current_user.contacts.size < 2
  = render 'aspects/no_posts_message'

#main_stream.stream{:data => {:guids => aspect_ids.join(',')}}
  - if posts.length > 0
    = render 'shared/stream', :posts => posts
    #pagination
      =link_to(t('more'), next_page_path, :class => 'paginate')


%div.highlighted-data{class: user_color_scheme_class}
  .line-numbers
    - blob.data.lines.size.times do |index|
      - offset = defined?(first_line_number) ? first_line_number : 1
      - i = index + offset
      = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do
        %i.icon-link
        = i
  .highlight
    %pre
      %code
        = blob.data

Fix 500 error in Ruby 1.9.

%div.highlighted-data{class: user_color_scheme_class}
  .line-numbers
    - blob.data.lines.to_a.size.times do |index|
      - offset = defined?(first_line_number) ? first_line_number : 1
      - i = index + offset
      = link_to "#L#{i}", id: "L#{i}", rel: "#L#{i}" do
        %i.icon-link
        = i
  .highlight
    %pre
      %code
        = blob.data


- content_for(:title) do
  = t :orders_show_title

= inject_enterprise_and_relatives if current_distributor.present?

.darkswarm
  - content_for :order_cycle_form do
    %strong.avenir
      = t :orders_show_time
      - if @order.order_cycle
        = @order.order_cycle.pickup_time_for(@order.distributor)
      - else
        = @order.distributor.next_collection_at

  = render "shopping_shared/details" if current_distributor.present?

  %fieldset#order_summary.footer-pad{"data-hook" => ""}
    .row
      .columns.large-12.text-center
        %h2
          = t :orders_show_number
          = " #" + @order.number

    #order{"data-hook" => ""}
      - if params.has_key? :checkout_complete
        %h1= t(:thank_you_for_your_order)

      = render 'spree/shared/order_details', order: @order

      .row
        .columns.large-12
          = link_to t(:back_to_store), main_app.shop_path, :class => "button"
          - unless params.has_key? :checkout_complete
            - if try_spree_current_user && respond_to?(:spree_account_path)
              = link_to t(:my_account), spree_account_path, :class => "button"

= render partial: "shared/footer"

Remove unused code from order confirmation page

- content_for(:title) do
  = t :orders_show_title

= inject_enterprise_and_relatives if current_distributor.present?

.darkswarm
  = render "shopping_shared/details" if current_distributor.present?

  %fieldset#order_summary.footer-pad{"data-hook" => ""}
    .row
      .columns.large-12.text-center
        %h2
          = t :orders_show_number
          = " #" + @order.number

    #order{"data-hook" => ""}
      - if params.has_key? :checkout_complete
        %h1= t(:thank_you_for_your_order)

      = render 'spree/shared/order_details', order: @order

      .row
        .columns.large-12
          = link_to t(:back_to_store), main_app.shop_path, :class => "button"
          - unless params.has_key? :checkout_complete
            - if try_spree_current_user && respond_to?(:spree_account_path)
              = link_to t(:my_account), spree_account_path, :class => "button"

= render partial: "shared/footer"


#navbar
  = link_to(play_path) do
    = image_tag 'reports/back.svg'
    = t('report.return_to_scenario')
  %ul.controls
    %li
      %a(href="javascript:window.print()")
        = image_tag 'reports/print.svg'
        = t('report.print')
    %li
      - if Rails.env.development? && APP_CONFIG[:report_pdf_host].blank?
        %span.disabled
          = image_tag 'reports/download.svg'
          = t('report.pdf')
      - else
        = link_to report_path(format: 'pdf') do
          = image_tag 'reports/download.svg'
          = t('report.pdf')
  .loading
    .bar

#report
  #title.loading
    %h1== #{ t('report.loading.header') }…
    %p= t('report.loading.message')

%script(id="report-template" language="text/liquid")
  = @report.html_safe

- content_for :scripts do
  - Dir["app/views/output_elements/table_templates/*"].each do |file|
    = render file: Rails.root.join(file).to_s

  = render 'output_elements/chart_template'
  :javascript
    $(function(){
      window.App = App = new AppView();
      App.settings.set(globals.settings, {silent : true});
      App.bootstrap();
    })

Remove PDF option from reports

#navbar
  = link_to(play_path) do
    = image_tag 'reports/back.svg'
    = t('report.return_to_scenario')
  %ul.controls
    %li
      %a(href="javascript:window.print()")
        = image_tag 'reports/print.svg'
        = t('report.print')
  .loading
    .bar

#report
  #title.loading
    %h1== #{ t('report.loading.header') }…
    %p= t('report.loading.message')

%script(id="report-template" language="text/liquid")
  = @report.html_safe

- content_for :scripts do
  - Dir["app/views/output_elements/table_templates/*"].each do |file|
    = render file: Rails.root.join(file).to_s

  = render 'output_elements/chart_template'
  :javascript
    $(function(){
      window.App = App = new AppView();
      App.settings.set(globals.settings, {silent : true});
      App.bootstrap();
    })


%p Your account is set up to require the use of a one-time password in order to log in.
%p You currently have #{recovery_code_count} unused recovery codes.
= link_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-danger', method: 'delete',
          data: { confirm: t('views.settings.security.2fa.detach_confirm') }
= link_to 'Re-generate recovery codes', reset_user_recovery_codes_path, class: 'btn btn-primary', method: 'delete',
          data: { confirm: 'Are you sure? This will disable your previous set of recovery codes.' }

Use `button_to` instead of `link_to` for post in security settings

%p Your account is set up to require the use of a one-time password in order to log in.
%p You currently have #{recovery_code_count} unused recovery codes.
= button_to t('views.actions.remove'), destroy_user_2fa_path, class: 'btn btn-danger', method: 'delete',
          data: { confirm: t('views.settings.security.2fa.detach_confirm') }
= button_to 'Re-generate recovery codes', reset_user_recovery_codes_path, class: 'btn btn-primary', method: 'delete',
          data: { confirm: 'Are you sure? This will disable your previous set of recovery codes.' }


%fieldset#provider_type
  = label_tag "Provider: "
  = select(:provider_account, :provider_id, options_for_select(@providers.map{ |p| [p.name, p.id] }, :selected => @selected_provider.id))
  = restful_submit_tag "Choose", 'set_selected_provider',set_selected_provider_provider_accounts_path, 'GET', :class => 'button'
  = label_tag "Cloud type: "
  = @selected_provider.provider_type.name
  - unless @selected_provider.provider_type.codename.nil?
    = render :partial => "provider_form", :locals => { :provider_type => @selected_provider.provider_type}
  - else
    = flash.now[:warning] = "You don't have any provider yet"

:javascript
  $(document).ready(function(){
      var selected_provider;
      $("#provider_account_provider_id").change(function()
      {
          selected_provider = $("option:selected").attr('value');
          $.get("#{set_selected_provider_provider_accounts_url}", {'provider_account[provider_id]':selected_provider},
            function(result) {
              $("#provider_type").html(result);
            }
          );

       });
  });

Fix JS method for selecting Provider in New ProviderAccount view

%fieldset#provider_type
  = label_tag "Provider: "
  = select(:provider_account, :provider_id, options_for_select(@providers.map{ |p| [p.name, p.id] }, :selected => @selected_provider.id))
  = restful_submit_tag "Choose", 'set_selected_provider',set_selected_provider_provider_accounts_path, 'GET', :class => 'button'
  = label_tag "Cloud type: "
  = @selected_provider.provider_type.name
  - unless @selected_provider.provider_type.codename.nil?
    = render :partial => "provider_form", :locals => { :provider_type => @selected_provider.provider_type}
  - else
    = flash.now[:warning] = "You don't have any provider yet"

:javascript
  $(document).ready(function(){
      var selected_provider;
      $("#provider_account_provider_id").change(function()
      {
          selected_provider = $(this).find("option:selected").attr('value');
          $.get("#{set_selected_provider_provider_accounts_url}", {'provider_account[provider_id]':selected_provider},
            function(result) {
              $("#provider_type").html(result);
            }
          );

       });
  });


%div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"}
  %h3.thirteen.columns.alpha My Enterprises
  - if @enterprises.any?
    %a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" }
      CREATE NEW
  - else
    %a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } What's this?

Hide 'Create New' enterprise link on dashboard when user has reached limit

%div.header.sixteen.columns.alpha{ :class => "#{@enterprises.count > 0 ? "" : "red"}"}
  %h3.thirteen.columns.alpha My Enterprises
  - if @enterprises.any?
    - if spree_current_user.can_own_more_enterprises?
      %a.three.columns.omega.icon-plus.button.blue.white-bottom{ href: "#{main_app.new_admin_enterprise_path}" }
        CREATE NEW
  - else
    %a.with-tip{ title: "Enterprises are Producers and/or Hubs and are the basic unit of organisation within the Open Food Network." } What's this?


%footer.site-footer
  .container
    .row
      %p.footer-msg.col-md-8
        An
        = link_to "OpenAustralia Foundation", "http://www.openaustraliafoundation.org.au/"
        project

      %ul.social-nav.nav.nav-pills.col-md-4
        %li.twitter= link_to "Twitter", "http://twitter.com/openaustralia"
        %li.blog= link_to "Blog", "https://www.openaustraliafoundation.org.au/blog/"
        %li.email= mail_to "contact@openaustraliafoundation.org.au", "Contact"
        %li.help= link_to "Help / FAQ", help_faq_path

      %ul.col-md-8.list-unstyled
        %li
          This data and software are
          = link_to "free and open source", help_licencing_path
        %li= link_to "API - Get the data", help_data_path

    .row#oaf-projects
      %p.col-md-12
        Explore our other projects
        #{link_to "OpenAustralia.org", "http://www.openaustralia.org"},
        #{link_to "Election Leaflets", "http://www.electionleaflets.org.au"},
        #{link_to "Right To Know", "http://www.righttoknow.org.au"} and
        #{link_to "PlanningAlerts", "http://www.planningalerts.org.au"}

Split footer into two main sections

%footer.site-footer
      %p.footer-msg.col-md-8
  .footer-main
    .container
        An
        = link_to "OpenAustralia Foundation", "http://www.openaustraliafoundation.org.au/"
        project

      %ul.social-nav.nav.nav-pills.col-md-4
        %li.twitter= link_to "Twitter", "http://twitter.com/openaustralia"
        %li.blog= link_to "Blog", "https://www.openaustraliafoundation.org.au/blog/"
        %li.email= mail_to "contact@openaustraliafoundation.org.au", "Contact"
        %li.help= link_to "Help / FAQ", help_faq_path

      %ul.col-md-8.list-unstyled
        %li
          This data and software are
          = link_to "free and open source", help_licencing_path
        %li= link_to "API - Get the data", help_data_path
  .author-projects
    .container

      %p.col-md-12
        Explore our other projects
        #{link_to "OpenAustralia.org", "http://www.openaustralia.org"},
        #{link_to "Election Leaflets", "http://www.electionleaflets.org.au"},
        #{link_to "Right To Know", "http://www.righttoknow.org.au"} and
        #{link_to "PlanningAlerts", "http://www.planningalerts.org.au"}
    .row


!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:title) ? yield(:title) : "Wikis"
    = csrf_meta_tags
    = stylesheet_link_tag "application", :media => "all"
    = javascript_include_tag "application"
    / Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"

  %body
    .navbar.navbar-default.navbar-static-top
      .container
        %button.navbar-toggle(type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse")
          %span.icon-bar
          %span.icon-bar
          %span.icon-bar
        %a.navbar-brand(href="#") Big Gollum
        .navbar-collapse.collapse.navbar-responsive-collapse

    .container
      .row
        .col-lg-12
          = bootstrap_flash
          = yield

      %footer

Bring back the logout link

!!! 5
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %title= content_for?(:title) ? yield(:title) : "Wikis"
    = csrf_meta_tags
    = stylesheet_link_tag "application", :media => "all"
    = javascript_include_tag "application"
    / Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"

  %body
    .navbar.navbar-default.navbar-static-top
      .container
        %button.navbar-toggle(type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse")
          %span.icon-bar
          %span.icon-bar
          %span.icon-bar
        %a.navbar-brand(href="#") Big Gollum
        .navbar-collapse.collapse.navbar-responsive-collapse
          - if user_signed_in?
            %ul.nav.navbar-nav.navbar-right
              %li
                %a= current_user.email if current_user
              %li
                = link_to('Logout', destroy_user_session_path, method: :delete)

    .container
      .row
        .col-lg-12
          = bootstrap_flash
          = yield

      %footer


%section#node-similar-locations
  - if (similar_pois = node_similar.sorted_similar_pois[0..5]).length > 0
    %h2=t('.similar', name: node_similar.node_type.name)
    %ul.unstyled
      - similar_pois.each do |s|
        %li
          %span{:class => "wheelchair #{s.wheelchair}"}
          = link_to s.headline, node_path(s)
          %span.distance
            = "#{node_similar.distance_to_in_meter(s).round}m"
= link_to_landing_page(t("nodes.show.link.listing", :type => @node.node_type.localized_name, :city => @node.region.name), @node.region, @node.wheelchair, @node.node_type, :class => 'right') if @node.region

Add location arrow icon in front of distance.

%section#node-similar-locations
  - if (similar_pois = node_similar.sorted_similar_pois[0..5]).length > 0
    %h2=t('.similar', name: node_similar.node_type.name)
    %ul.unstyled
      - similar_pois.each do |s|
        %li
          %span{:class => "wheelchair #{s.wheelchair}"}
          = link_to s.headline, node_path(s)
          %span.distance
            = fa_icon "location-arrow"
            = "#{node_similar.distance_to_in_meter(s).round}m"
= link_to_landing_page(t("nodes.show.link.listing", :type => @node.node_type.localized_name, :city => @node.region.name), @node.region, @node.wheelchair, @node.node_type, :class => 'right') if @node.region


%h3.page-title Blame view

#tree-holder.tree-holder
  .file-holder
    .file-title
      %i.fa.fa-file
      %span.file_name
        = @path
        %small= number_to_human_size @blob.size
      %span.options= render "projects/blob/actions"
    .file-content.blame.highlight
      %table
        - @blame.each do |commit, lines, since|
          - commit = Commit.new(commit)
          %tr
            %td.blame-commit
              %span.commit
                = link_to commit.short_id, project_commit_path(@project, commit), class: "commit_short_id"

                = commit_author_link(commit, avatar: true, size: 16)

                = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
            %td.lines.blame-numbers
              %pre
                - (since...(since + lines.count)).each do |i|
                  = i
                  \
            %td.lines
              %pre{class: 'code highlight white'}
                %code
                  :erb
                    <% lines.each do |line| %>
                      <%= highlight(@blob.name, line, true).html_safe %>
                    <% end %>

Fix "500: Encoding error" on blame view

%h3.page-title Blame view

#tree-holder.tree-holder
  .file-holder
    .file-title
      %i.fa.fa-file
      %span.file_name
        = @path
        %small= number_to_human_size @blob.size
      %span.options= render "projects/blob/actions"
    .file-content.blame.highlight
      %table
        - @blame.each do |commit, lines, since|
          - commit = Commit.new(commit)
          %tr
            %td.blame-commit
              %span.commit
                = link_to commit.short_id, project_commit_path(@project, commit), class: "commit_short_id"

                = commit_author_link(commit, avatar: true, size: 16)

                = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
            %td.lines.blame-numbers
              %pre
                - (since...(since + lines.count)).each do |i|
                  = i
                  \
            %td.lines
              %pre{class: 'code highlight white'}
                %code
                  :erb
                    <% lines.each do |line| %>
                      <%= highlight(@blob.name, line.force_encoding("utf-8"), true).html_safe %>
                    <% end %>


- content_for :page_title do
  = AppConfig.settings.pod_name + " - " + t("two_factor_auth.title")

.container#twofa
  .text-center
    .logos-asterisk
    %h1
      = t("two_factor_auth.title")

  = form_for resource, as: resource_name,
                         url: session_path(resource_name),
                         html: {class: "block-form"},
                         method: :post do |f|
    %fieldset
      %label.sr-only#otp-label{for: "otp_attempt"}
        = t("two_factor_auth.input_token.label")

      = f.text_field :otp_attempt,
      type: :text,
      placeholder: t("two_factor_auth.input_token.placeholder"),
      required: true,
      autofocus: true,
      class: "input-block-level form-control"
      %p= t "two_factor_auth.recovery.reminder"

    .actions
      = f.button t("devise.sessions.new.sign_in"),
      type: :submit,
      class: "btn btn-large btn-block btn-primary"

  .text-center
    - if display_password_reset_link?
      = link_to t("devise.shared.links.forgot_your_password"),
        new_password_path(resource_name), id: "forgot_password_link"
      %br
    - if display_registration_link?
      = link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name)

Add lock icon to the 2fa OTP field

- content_for :page_title do
  = AppConfig.settings.pod_name + " - " + t("two_factor_auth.title")

.container#twofa
  .text-center
    .logos-asterisk
    %h1
      = t("two_factor_auth.title")

  = form_for resource, as: resource_name,
                         url: session_path(resource_name),
                         html: {class: "block-form"},
                         method: :post do |f|
    %fieldset
      %label.sr-only#otp-label{for: "otp_attempt"}
        = t("two_factor_auth.input_token.label")
      %i.entypo-lock
      = f.text_field :otp_attempt,
      type: :text,
      placeholder: t("two_factor_auth.input_token.placeholder"),
      required: true,
      autofocus: true,
      class: "input-block-level form-control"
      %p= t "two_factor_auth.recovery.reminder"

    .actions
      = f.button t("devise.sessions.new.sign_in"),
      type: :submit,
      class: "btn btn-large btn-block btn-primary"

  .text-center
    - if display_password_reset_link?
      = link_to t("devise.shared.links.forgot_your_password"),
        new_password_path(resource_name), id: "forgot_password_link"
      %br
    - if display_registration_link?
      = link_to t("devise.shared.links.sign_up"), new_registration_path(resource_name)


.dropdown-menu.dropdown-menu-right{ role: :menu }
  - if Subscription.is_subscribed(current_user, answer)
    -#                                            fun joke    should subscribe?
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "no" } }
      %i.fa.fa-fw.fa-anchor
      = t(".unsubscribe")
  - else
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "yes" } }
      %i.fa.fa-fw.fa-anchor
      = t(".subscribe")
  - if privileged? answer.user
    %a.dropdown-item.text-danger{ href: "#", data: { a_id: answer.id, action: "ab-destroy" } }
      %i.fa.fa-fw.fa-trash-o
      = t(".return")
  - unless answer.user == current_user
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } }
      %i.fa.fa-fw.fa-exclamation-triangle
      = t("voc.report")
  - if current_user.has_role? :administrator
    %a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" }
      %i.fa.fa-fw.fa-gears
      = t("voc.view_in_rails_admin")

Replace `has_role?` use in action partial with `admin?`

.dropdown-menu.dropdown-menu-right{ role: :menu }
  - if Subscription.is_subscribed(current_user, answer)
    -#                                            fun joke    should subscribe?
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "no" } }
      %i.fa.fa-fw.fa-anchor
      = t(".unsubscribe")
  - else
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "yes" } }
      %i.fa.fa-fw.fa-anchor
      = t(".subscribe")
  - if privileged? answer.user
    %a.dropdown-item.text-danger{ href: "#", data: { a_id: answer.id, action: "ab-destroy" } }
      %i.fa.fa-fw.fa-trash-o
      = t(".return")
  - unless answer.user == current_user
    %a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } }
      %i.fa.fa-fw.fa-exclamation-triangle
      = t("voc.report")
  - if current_user.admin?
    %a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" }
      %i.fa.fa-fw.fa-gears
      = t("voc.view_in_rails_admin")


= render "head"

#tree-holder.tree-holder
  %ul.breadcrumb
    %li
      %span.arrow
      = link_to project_tree_path(@project, @ref) do
        = @project.name
    - @tree.breadcrumbs(6) do |link|
      \/
      %li= link
  .clear

  .file_holder
    .file_title
      %i.icon-file
      %span.file_name
        = @tree.name
        %small= number_to_human_size @tree.size
      %span.options= render "tree/blob_actions"
    .file_content.blame
      %table
        - current_line = 1
        - @blame.each do |commit, lines|
          - commit = CommitDecorator.decorate(Commit.new(commit))
          %tr
            %td.blame-commit
              %span.commit
                = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"

                = commit.author_link avatar: true, size: 16

                = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
            %td.lines.blame-numbers
              %pre
                - if lines.empty?
                  = current_line
                  - current_line += 1
                - else
                  - lines.each do |line|
                    = current_line
                    - current_line += 1
            %td.lines
              %pre
                - lines.each do |line|
                  = line

Fix lines and line numbers being squashed in File -> blame

= render "head"

#tree-holder.tree-holder
  %ul.breadcrumb
    %li
      %span.arrow
      = link_to project_tree_path(@project, @ref) do
        = @project.name
    - @tree.breadcrumbs(6) do |link|
      \/
      %li= link
  .clear

  .file_holder
    .file_title
      %i.icon-file
      %span.file_name
        = @tree.name
        %small= number_to_human_size @tree.size
      %span.options= render "tree/blob_actions"
    .file_content.blame
      %table
        - current_line = 1
        - @blame.each do |commit, lines|
          - commit = CommitDecorator.decorate(Commit.new(commit))
          %tr
            %td.blame-commit
              %span.commit
                = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"

                = commit.author_link avatar: true, size: 16

                = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
            %td.lines.blame-numbers
              %pre
                - if lines.empty?
                  = current_line
                  - current_line += 1
                - else
                  - lines.each do |line|
                    :preserve
                      #{current_line}
                    - current_line += 1
            %td.lines
              %pre
                - lines.each do |line|
                  :preserve
                    #{line}


.page-header
  %h1= t(:sign_in)
= form_tag sessions_path, :html => { class: "form-horizontal" } do
  .form-group
    = label_tag :username, t(:username), class: 'col-lg-2 control-label'
    .col-lg-10
      = text_field_tag :username, nil, class: 'form-control'
  .form-group
    = label_tag :password, t(:password), class: 'col-lg-2 control-label'
    .col-lg-10
      = password_field_tag :password, nil, class: 'form-control'
  .form-group
    .col-lg-offset-2.col-lg-10
      = submit_tag "Submit", class: 'btn btn-primary'

Fix session new template class

.page-header
  %h1= t(:sign_in)
= form_tag sessions_path, class: "form-horizontal" do
  .form-group
    = label_tag :username, t(:username), class: 'col-lg-2 control-label'
    .col-lg-10
      = text_field_tag :username, nil, class: 'form-control'
  .form-group
    = label_tag :password, t(:password), class: 'col-lg-2 control-label'
    .col-lg-10
      = password_field_tag :password, nil, class: 'form-control'
  .form-group
    .col-lg-offset-2.col-lg-10
      = submit_tag "Submit", class: 'btn btn-primary'


- content_for :after_title, ' - Usage Stats'
= hot_javascript_tag("charts")

%header.main-page
  .container
    %h1 Usage Stats
.container
  %section
    .section-header
      %h3
        = "Total users: #{@user_count}"
        %br
        = "OAuth users: #{@logged_in_count}"
        %br
        = "Unique program facilitators / course instructors: #{@course_instructor_count}"
        %br
        = "Unique project home wikis: #{@home_wiki_count}"
        %br
        = "Unique wikis interacted with: #{@total_wikis_touched}"
      %div.section-header
        Courses / Programs over time
        - i = 0
        - data = Course.all.map { |c| i += 1; [c.created_at, i.to_i] }
        = line_chart([{ name: 'count', data: data }], legend: false)

  %section
    .section-header
      Courses / Programs per wiki:
      - Wiki.all.order(:language, :project).each do |wiki|
        %li
          = "#{wiki.domain}: #{Course.where(home_wiki: wiki).count}"

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

Fix ordering of usage chart

- content_for :after_title, ' - Usage Stats'
= hot_javascript_tag("charts")

%header.main-page
  .container
    %h1 Usage Stats
.container
  %section
    .section-header
      %h3
        = "Total users: #{@user_count}"
        %br
        = "OAuth users: #{@logged_in_count}"
        %br
        = "Unique program facilitators / course instructors: #{@course_instructor_count}"
        %br
        = "Unique project home wikis: #{@home_wiki_count}"
        %br
        = "Unique wikis interacted with: #{@total_wikis_touched}"
      %div.section-header
        Courses / Programs over time
        - i = 0
        - data = Course.all.order(:created_at).map { |c| i += 1; [c.created_at, i.to_i] }
        = line_chart([{ name: 'count', data: data }], legend: false)

  %section
    .section-header
      Courses / Programs per wiki:
      - Wiki.all.order(:language, :project).each do |wiki|
        %li
          = "#{wiki.domain}: #{Course.where(home_wiki: wiki).count}"

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


- if entry
  - entry.send(attribute.name).each do |resource|
    = link_to "##{ resource.id }", edit_polymorphic_path(resource)

Refactor has_many partial to presenter

- if entry
  = Adminable::EntriesPresenter.new(entry.public_send(attribute.name)).to_s


%style
  = Diffy::CSS

- content_for :title do
  Division Description Changes —
  = @division.original_name
  —
  = formatted_date(@division.date)
- set_meta_tags description: "All changes made to the description and title of the division: #{@division.name}"

.page-header
  %h1= yield :title

%p
  All changes made to the description and title of this
  division.

%p
  = link_to "View division", @division
  |
  = link_to "Edit description", edit_division_path(@division)

%table.table
  %thead
    %tr
      %th Change
      %th Division
  %tbody
    - @division.wiki_motions.each_with_index do |wiki_motion, index|
      %tr
        %td{width: "16%"}
          = link_to "#{@division.house} vote #{@division.date}##{@division.number}", @division
          %p
            Edited by
            = link_to wiki_motion.user.name, wiki_motion.user
          %p
            on
            = wiki_motion.edit_date.strftime('%F %T')
        %td
          %p Title
          = Diffy::Diff.new(wiki_motion.previous_title.strip, wiki_motion.title.strip).to_s(:html).html_safe
          %p Description
          = Diffy::Diff.new(wiki_motion.previous_description, wiki_motion.description).to_s(:html).html_safe

Remove index as it's not used

%style
  = Diffy::CSS

- content_for :title do
  Division Description Changes —
  = @division.original_name
  —
  = formatted_date(@division.date)
- set_meta_tags description: "All changes made to the description and title of the division: #{@division.name}"

.page-header
  %h1= yield :title

%p
  All changes made to the description and title of this
  division.

%p
  = link_to "View division", @division
  |
  = link_to "Edit description", edit_division_path(@division)

%table.table
  %thead
    %tr
      %th Change
      %th Division
  %tbody
    - @division.wiki_motions.each do |wiki_motion|
      %tr
        %td{width: "16%"}
          = link_to "#{@division.house} vote #{@division.date}##{@division.number}", @division
          %p
            Edited by
            = link_to wiki_motion.user.name, wiki_motion.user
          %p
            on
            = wiki_motion.edit_date.strftime('%F %T')
        %td
          %p Title
          = Diffy::Diff.new(wiki_motion.previous_title.strip, wiki_motion.title.strip).to_s(:html).html_safe
          %p Description
          = Diffy::Diff.new(wiki_motion.previous_description, wiki_motion.description).to_s(:html).html_safe


%h1
  Newsletter

- Newsletter.all.each do |n|
  = "Name: #{n.name}"
  = "File: #{n.file_path}"
  = "date: #{n.date}"
  %hr

Add sample accordion section for newsletters

%h1
  Newsletter

%hr
- Newsletter.all.each do |n|
  = "Name: #{n.name}"
  = "File: #{n.file_path}"
  = "date: #{n.date}"
  %hr

.panel-group#accordion
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseOne'}
          What is html?
    .panel-collapse.collapse.in#collapseOne
      .panel-body
        %p
          Html is like this markup language thing.
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseTwo'}
          What is css?
    .panel-collapse.collapse.in#collapseTwo
      .panel-body
        %p
          Cascading stylesheets


%div{:style => defined?(hidden) && 'none',:class => event.status}[event]
  %div[event.eventable]
    %header{:class => event.subtitle ? "subtitle" : nil}
      %h1.icon= image_tag(event.icon_url, :size => "48x48", :alt => event.title, :title => event.title)
      %time{:datetime => event.event_date.strftime("%Y-%m-%dT%H:%M:%S%z")}
        %h1.date= pretty_date event.event_date
        .time= pretty_time event.event_date
      %h1= event.title
      - if event.subtitle
        %h2
          .subtitle_word= event.subtitle.first
          .subtitle_date= pretty_date event.subtitle.last,false
    .body= raw event.body
    .buttons
      = link_to image_tag("actions/event_open.png"), open_extended_event_url(event), :remote => true, :class => "extend_button", :observer => "false"
      = image_tag "actions/event_opened.png", :class => "close_extend_button", :style => "display:none", :observer => "false"
    .attachments
      .inner
        = render :partial => "events/mini", :collection => event.children.unique_eventable.order("event_date"), :as => :event
    .extended{:style => "display:none"}
      .inner

Fix let those who are allowed open others' event extensions

%div{:style => defined?(hidden) && 'none',:class => event.status}[event]
  %div[event.eventable]
    %header{:class => event.subtitle ? "subtitle" : nil}
      %h1.icon= image_tag(event.icon_url, :size => "48x48", :alt => event.title, :title => event.title)
      %time{:datetime => event.event_date.strftime("%Y-%m-%dT%H:%M:%S%z")}
        %h1.date= pretty_date event.event_date
        .time= pretty_time event.event_date
      %h1= event.title
      - if event.subtitle
        %h2
          .subtitle_word= event.subtitle.first
          .subtitle_date= pretty_date event.subtitle.last,false
    .body= raw event.body
    .buttons
      = link_to image_tag("actions/event_open.png"), open_extended_event_url(event,:person_id => @topic.uln), :remote => true, :class => "extend_button", :observer => "false"
      = image_tag "actions/event_opened.png", :class => "close_extend_button", :style => "display:none", :observer => "false"
    .attachments
      .inner
        = render :partial => "events/mini", :collection => event.children.unique_eventable.order("event_date"), :as => :event
    .extended{:style => "display:none"}
      .inner


- @page_title = "#{t(@game.name)} ##{@script_level.try(:game_chapter) || @level.level_num} "

= render partial: "levels/blockly", locals: { app: @game.app }

.reference_area
  - if @videos && !@videos.empty?
    %h5
      %span.help_text Need help?
      %span Checkout these videos and hints.
    = render partial: 'levels/video', collection: @videos
    %div{ style: "clear: both;"}

  - if can? :edit, @level
    %br/
    #{link_to 'edit', edit_game_level_path(@game, @level)} / #{ link_to 'stats', level_stats_path(@level) }

- if @autoplay_video
  :javascript
    showVideo('#{@autoplay_video.youtube_code}', '#{@autoplay_video.name}');

Add text per Hadi's request.

- @page_title = "#{t(@game.name)} ##{@script_level.try(:game_chapter) || @level.level_num} "

= render partial: "levels/blockly", locals: { app: @game.app }

.reference_area
  - if @videos && !@videos.empty?
    %h5
      %span.help_text Need help?
      %span Checkout these videos and hints.
    = render partial: 'levels/video', collection: @videos
    %div{ style: "clear: both;"}

  - if can? :edit, @level
    %br/
    #{link_to 'edit', edit_game_level_path(@game, @level)} / #{ link_to 'stats', level_stats_path(@level) }

- if @autoplay_video
  :javascript
    showVideo('#{@autoplay_video.youtube_code}', '#{@autoplay_video.name}' + '  [Current videos are placeholders.]');


.splash-content
  .row
    .col-xs-12.col-sm-8.col-sm-offset-2
      .splash-text-container.centered-text
        %h3.headroom
          Sometimes life is tough...
        %h1.centered-text
          Find Refuge

  .row.more-headroom
    .col-xs-12.col-sm-8.col-sm-offset-2
      = render partial: "layouts/search", locals: {splash: true}

  .row.more-headroom
    .col-xs-12.col-sm-6.col-sm-offset-3
      = button_to new_restroom_path, method: :get, class: "btn btn-lg btn-purple splash-add-restroom-btn" do
        Add A Restroom
        %i.fa.fa-plus-square-o.fa-2x

  .row.even-more-headroom
    .col-xs-12.col-sm-6.col-sm-offset-3
      = link_to image_tag("app-store.svg"), "https://itunes.apple.com/us/app/refuge-restrooms/id968531953?mt=8"

  .row.more-headroom.splash-bottom-padding
    .col-xs-12.col-sm-6.col-sm-offset-3
      = link_to image_tag("play-store.png"), "https://play.google.com/store/apps/details?id=org.refugerestrooms"
  = render 'layouts/footer'

Use suggested workaround to fix VO for older iOS

.splash-content
  .row
    .col-xs-12.col-sm-8.col-sm-offset-2
      .splash-text-container.centered-text
        %h3.headroom
          Sometimes life is tough...
        %h1.centered-text
          Find Refuge

  .row.more-headroom
    .col-xs-12.col-sm-8.col-sm-offset-2
      = render partial: "layouts/search", locals: {splash: true}

  .row.more-headroom
    .col-xs-12.col-sm-6.col-sm-offset-3
      = button_to new_restroom_path, method: :get, class: "btn btn-lg btn-purple splash-add-restroom-btn" do
        Add A Restroom
        %i.fa.fa-plus-square-o.fa-2x

  .row.even-more-headroom
    .col-xs-12.col-sm-6.col-sm-offset-3
      = link_to image_tag("app-store.svg", role: "img"), "https://itunes.apple.com/us/app/refuge-restrooms/id968531953?mt=8"

  .row.more-headroom.splash-bottom-padding
    .col-xs-12.col-sm-6.col-sm-offset-3
      = link_to image_tag("play-store.png"), "https://play.google.com/store/apps/details?id=org.refugerestrooms"
  = render 'layouts/footer'


= content_for(:page_id, 'auth')

.auth-form.sign-in-form
  %p.register
    %span
      Nouveau sur demarches‑simplifiees.fr ?
    = link_to "Créer un compte", new_user_registration_path, class: "button primary auth-signup-button"

  %hr

  = form_for User.new, url: user_session_path, html: { class: "form" } do |f|
    %h1 Connectez-vous

    = f.label :email, "Email"
    = f.text_field :email, autofocus: true

    = f.label :password, "Mot de passe"
    = f.password_field :password, placeholder: "8 caractères minimum"

    .auth-options
      %div
        = f.check_box :remember_me, as: :boolean
        = f.label :remember_me, "Se souvenir de moi", class: 'remember-me'

      .text-right
        = link_to "Mot de passe oublié ?", new_user_password_path, class: "link"

    = f.submit "Se connecter", class: "button large primary expand"

  = render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }

Remove sign up form sign in Add link to sign up help

= content_for(:page_id, 'auth')

.auth-form.sign-in-form

  = form_for User.new, url: user_session_path, html: { class: "form" } do |f|
    %h1 Connectez-vous

    = f.label :email, "Email"
    = f.text_field :email, autofocus: true

    = f.label :password, "Mot de passe"
    = f.password_field :password, placeholder: "8 caractères minimum"

    .auth-options
      %div
        = f.check_box :remember_me, as: :boolean
        = f.label :remember_me, "Se souvenir de moi", class: 'remember-me'

      .text-right
        = link_to "Mot de passe oublié ?", new_user_password_path, class: "link"

    = f.submit "Se connecter", class: "button large primary expand"

  = render partial: 'shared/france_connect_login', locals: { url: france_connect_particulier_path }

  %hr
  %p.center
    %span Vous êtes nouveau sur demarches‑simplifiees.fr ?
    %br
    %br
    = link_to "Trouvez votre démarche", "https://faq.demarches-simplifiees.fr/article/59-comment-trouver-ma-demarche", class: "button expend secondary"


!!!
%html(ng-app="F2J")
  %head
    %title System F Compiler
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    .container= yield

Use .container-fluid for a full width container.

!!!
%html(ng-app="F2J")
  %head
    %title System F Compiler
    = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
  %body
    .container-fluid= yield


.proposal-accordian
  .lmo-wrap{ng-repeat: "proposal in model.closedProposals() track by proposal.id", id: "proposal-{{proposal.id}}"}
    .active-proposal{ng-if: "selectedProposalId == proposal.id"}
      %proposal_expanded{proposal: "proposal", can_collapse: "true"}

    .inactive-proposal{ng-if: "selectedProposalId != proposal.id", ng-click: "selectProposal(proposal)"}
      %proposal_collapsed{proposal: "proposal"}

Order closed proposals by closed at date

.proposal-accordian
  .lmo-wrap{ng-repeat: "proposal in model.closedProposals() | orderBy:'-closedAt' track by proposal.id", id: "proposal-{{proposal.id}}"}
    .active-proposal{ng-if: "selectedProposalId == proposal.id"}
      %proposal_expanded{proposal: "proposal", can_collapse: "true"}

    .inactive-proposal{ng-if: "selectedProposalId != proposal.id", ng-click: "selectProposal(proposal)"}
      %proposal_collapsed{proposal: "proposal"}


-#
-# Copyright (C) 2016 Google Inc.
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-#
-extends "layouts/base.haml"

-block body
  .container-fluid.welcome
    %section.content
      .flash
        -with messages = get_flashed_messages(with_categories=True)
          -if messages
            -for category, message in messages
              %div{ 'class': "{{category}}" }
                %a.close{'href': "#", 'data-dismiss': "alert" }
                  x
                %p
                  {{message|safe}}
        -#FIXME: Flash messages
        -#flash.each do |type, value|
          -value = [value] unless value.is_a?(Array)
          -value = value.map(:presence).compact
          -if value.size > 0
            %div{ 'class': type }
              %a.close{'href': "#{}", :'data-dismiss': "alert"}
                ×
              -value.each do |message|
                %p=message

    .row-fluid
      .span12
        %h1
          gGRC
        %h2
          Governance, Risk and Compliance
        %p.centered
          %a.btn.btn-large.btn-info{:href => "/dashboard"} Login
          %br
          %br
          -if about_url
            %a.about-link{:href => "{{about_url}}", :target => "_blank"}
              {{about_text}}

Change gGRC label to GGRC on login page

-#
-# Copyright (C) 2016 Google Inc.
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-#
-extends "layouts/base.haml"

-block body
  .container-fluid.welcome
    %section.content
      .flash
        -with messages = get_flashed_messages(with_categories=True)
          -if messages
            -for category, message in messages
              %div{ 'class': "{{category}}" }
                %a.close{'href': "#", 'data-dismiss': "alert" }
                  x
                %p
                  {{message|safe}}
        -#FIXME: Flash messages
        -#flash.each do |type, value|
          -value = [value] unless value.is_a?(Array)
          -value = value.map(:presence).compact
          -if value.size > 0
            %div{ 'class': type }
              %a.close{'href': "#{}", :'data-dismiss': "alert"}
                ×
              -value.each do |message|
                %p=message

    .row-fluid
      .span12
        %h1
          GGRC
        %h2
          Governance, Risk and Compliance
        %p.centered
          %a.btn.btn-large.btn-info{:href => "/dashboard"} Login
          %br
          %br
          -if about_url
            %a.about-link{:href => "{{about_url}}", :target => "_blank"}
              {{about_text}}


!!!
%html
	%head
		%title moneybook
		%link(rel="stylesheet" href="/css/styles.css")
	%body
		%form{ :action=> "/add", :method => "post"}
			%fieldset
				%ul
					%li
						%input{:type => "text",:name => "where",  :placeholder=>"where"}
					%li
						%input{:name => "cost", :placeholder=>"cost"}
					%li
						%input{:type => "submit"}

Add html5 validation for numbers

!!!
%html
	%head
		%title moneybook
		%link(rel="stylesheet" href="/css/styles.css")
	%body
		%form{ :action=> "/add", :method => "post"}
			%fieldset
				%ul
					%li
						%input{:type => "text",:name => "where",  :placeholder=>"where"}
					%li
						%input{:type => "number", :step => "any", :name => "cost", :placeholder=>"cost"}
					%li
						%input{:type => "submit"}


.page-title Route #{@route.number} Bus Stops

- if @stops.empty?
  No stops on this route
- else
  Completed
  - stop_list @stops.completed
  Not Completed
  - stop_list @stops.not_completed
  Pending
  - stop_list @stops.pending

Make changes according to the controller

.page-title Route #{@route.number} Bus Stops

- if @stops.empty?
  No stops on this route
- else
  - @stops_arr.each_pair do |status, stops|
    - if status
      Not Completed
    -else
      Completed
    Stops
    %ul
    - stops.each do |stop|
      %li
        = link_to edit_bus_stop_path(stop.hastus_id) do
          - stop.name


.container
  .row
    - Plan.all_plans.each do |plan|
      - unless Owner.supporters(plan).empty?
        .col-xs-12
          %h2
            = link_to plan.name.pluralize, new_supporter_path
          = render Owner.supporters(plan)

Add an intro to the supporter index page

.container
  .row.text-center
    %h2 Thank you
    %p.lead
      The
      = link_to "continued support", new_supporter_path
      of these wonderful people keeps morph.io free for everyone and makes it even more awesome.

  .row
    - Plan.all_plans.each do |plan|
      - unless Owner.supporters(plan).empty?
        .col-xs-12
          %h2
            = link_to plan.name.pluralize, new_supporter_path
          = render Owner.supporters(plan)


---
title: Home
type: homepage
---

%header.home__intro
	%h1.home__intro__title
		Hi, I'm David.

	%p.home__intro__tagline
		I build websites and have a ton of fun doing it.

.home__links
	%a{:target => "_blank", :href => "mailto:me@voxeldavid.com"} me@voxeldavid.com
	%a{:target => "_blank", :href => "https://twitter.com/voxeldavid"} Twitter
	%a{:target => "_blank", :href => "https://github.com/voxeldavid"} Github
	%a{:target => "_blank", :href => "https://gist.github.com/voxeldavid"} Gists

%footer.home__footer
	%a{:href => "blog/"} Blog
	%a{:href => "work/"} Work
	%a{:href => "archive/"} Site Archive

%script{:src => "/assets/js/home.js", :type => "text/javascript"}

Put links under divs for cleaner structure (index)

---
title: Home
type: homepage
---

%header.home__intro
	%h1.home__intro__title
		Hi, I'm David.

	%p.home__intro__tagline
		I build websites and have a ton of fun doing it.

.home__content
	.home__links--prime
		%a{:target => "_blank", :href => "mailto:me@voxeldavid.com"} me@voxeldavid.com
		%a{:target => "_blank", :href => "https://twitter.com/voxeldavid"} Twitter
		%a{:target => "_blank", :href => "https://github.com/voxeldavid"} Github
		%a{:target => "_blank", :href => "https://gist.github.com/voxeldavid"} Gists

%footer.home__footer
	.home__links--sub
		%a{:href => "about/"} About
		%a{:href => "blog/"} Blog
		%a{:href => "work/"} Work
		%a{:href => "archive/"} Site Archive

%script{:src => "/assets/js/home.js", :type => "text/javascript"}


.off-canvas.position-left#offCanvas{'data-off-canvas': ''}
  %button.close-button{'aria-label' => "Close menu", 'data-close': ''}
    %span{'aria-hidden': true} ×
  %ul.menu.vertical
    %li= locale_link((current_locale == :en ? :pl : :en))
    %li= link_to t('nav.home'), root_path
    - if company_signed_in?
      %li= link_to t('nav.jobs'), offers_path
      %li= link_to t('nav.candidates'), candidates_path
    -else
      %li= link_to t('nav.jobs_pl'), jobs_poland_path
      %li= link_to t('nav.jobs_abroad'), jobs_abroad_path
      %li= link_to t('nav.companies'), companies_path
  %hr/
  %ul.menu.vertical
    - if logged_in?
      %li= link_to "Profile", profile_path
      %li= link_to "Sign out", destroy_user_session_path, method: :delete
    - else
      %li= link_to t('nav.sign_in'), new_user_session_path
      %li= link_to t('nav.sign_up'), sign_up_path

Add new offer link to offcanvas menu

.off-canvas.position-left#offCanvas{'data-off-canvas': ''}
  %button.close-button{'aria-label' => "Close menu", 'data-close': ''}
    %span{'aria-hidden': true} ×
  %ul.menu.vertical
    %li= locale_link((current_locale == :en ? :pl : :en))
    %li= link_to t('nav.home'), root_path
    %li= link_to t('nav.jobs_pl'), jobs_poland_path
    %li= link_to t('nav.jobs_abroad'), jobs_abroad_path
    - if company_signed_in?
      %li= link_to t('nav.candidates'), candidates_path
      %li= link_to t('nav.add_offer'), new_offer_path
    %li= link_to t('nav.companies'), companies_path
  %hr/
  %ul.menu.vertical
    - if logged_in?
      %li= link_to "Profile", profile_path
      %li= link_to "Sign out", destroy_user_session_path, method: :delete
    - else
      %li= link_to t('nav.sign_in'), new_user_session_path
      %li= link_to t('nav.sign_up'), sign_up_path


%fieldset
  %legend{align: "center"}= Spree.t(:transaction, scope: :paypal)
  .row
    .alpha.six.columns
      %dl
        %dt
          = Spree.t(:payer_id, scope: :paypal)
          \:
        %dd= payment.source.payer_id
        %dt
          = Spree.t(:token, scope: :paypal)
          \:
        %dd= payment.source.token
        %dt
          = Spree.t(:transaction_id)
          \:
        %dd= payment.source.transaction_id
    - if payment.source.state != 'refunded'
      = button_link_to Spree.t('actions.refund', scope: :paypal),
        spree.paypal_refund_admin_order_payment_path(@order, payment),
        icon: 'icon-dollar'
    - else
      .alpha.six.columns
        %dl
          %dt
            = Spree.t(:state, scope: :paypal)
            \:
          %dd= payment.source.state.titleize
          %dt
            = Spree.t(:refunded_at, scope: :paypal)
            \:
          %dd= pretty_time(payment.source.refunded_at)
          %dt
            = Spree.t(:refund_transaction_id, scope: :paypal)
            \:
          %dd= payment.source.refund_transaction_id

Remove refund button from paypal completed order tab


- commit = @repository.commit(tag.target)
- release = @releases.find { |release| release.tag == tag.name }
%li
  %div
    = link_to namespace_project_tag_path(@project.namespace, @project, tag.name) do
      %strong
        = icon('tag')
        = tag.name
    - if tag.message.present?

      = strip_gpg_signature(tag.message)

    .controls
      = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, tag.name), class: 'btn-grouped btn' do
        = icon("pencil")
      - if can? current_user, :download_code, @project
        = render 'projects/tags/download', ref: tag.name, project: @project

  - if commit
    = render 'projects/branches/commit', commit: commit, project: @project
  - else
    %p
      Cant find HEAD commit for this tag
  - if release && release.description.present?
    .description.prepend-top-default
      .wiki
        = preserve do
          = markdown release.description

Add permission check for tag list release notes button

- commit = @repository.commit(tag.target)
- release = @releases.find { |release| release.tag == tag.name }
%li
  %div
    = link_to namespace_project_tag_path(@project.namespace, @project, tag.name) do
      %strong
        = icon('tag')
        = tag.name
    - if tag.message.present?

      = strip_gpg_signature(tag.message)

    .controls
      - if can?(current_user, :download_code, @project)
        = render 'projects/tags/download', ref: tag.name, project: @project

      - if can?(current_user, :push_code, @project)
        = link_to edit_namespace_project_tag_release_path(@project.namespace, @project, tag.name), class: 'btn-grouped btn has_tooltip', title: "Edit release notes" do
          = icon("pencil")
  - if commit
    = render 'projects/branches/commit', commit: commit, project: @project
  - else
    %p
      Cant find HEAD commit for this tag
  - if release && release.description.present?
    .description.prepend-top-default
      .wiki
        = preserve do
          = markdown release.description


%div{:id => @tabs[0][1], 'role' => 'tabpanel', 'aria-labelledby' =>"#{@tabs[0][1]}_tab"}
  = render :partial => "form"

Fix assignments compute page translations

%div{:id => @tabs[0][0], 'role' => 'tabpanel', 'aria-labelledby' =>"#{@tabs[0][0]}_tab"}
  = render :partial => "form"


= simple_form_for(post) do |f|
  = f.input :title
  = f.input :description
  = f.association :category
  = f.input :tag_list, as: :string

  = f.button :submit

:javascript
  $("#offer_tag_list").tagsManager();

Add ability to create posts for other users (for managers)

= simple_form_for(post) do |f|
  = f.input :title
  = f.input :description
  = f.association :category
  = f.input :tag_list, as: :string

  - if current_user.manages? current_organization
    = f.association :user, collection: current_organization.users
    = f.hidden_field :publisher_id, value: current_user.id
  = f.button :submit

:javascript
  $("#offer_tag_list").tagsManager();


- unless private_check
  = render 'permissions_error'
- else
  - content_for :title do
    = "Create an issue for #{@project.name}"

  %article{ data: "issues"}
    %header
      %h1.generated
        = avatar @project.user.email
        %p
          %span
            = link_to @project.name, "/#{@user.username}/#{@project.name}"
          = "- Issue #81"
      %h2
        - if @project.private == true
          %span.badge.type PRV
        -else
          %span.badge.type PUB
        - if @project.id == @project.parent
          %span.badge.author PARENT
        - else FORK

    = render 'shared/messages'
    = render 'projects/project_toolbar'

    %section
      %div
        %div.option
          %header
            %h1
              = @issue.title
            %h2.issue
              = @issue.description
        %aside
          %h1
            Actions
          %nav
            %ul
              %li.active
                = link_to("Close",File.join(@issue.show_url,'close'),:method=>"post")
              %li
                Merge

    %section.comments
      = render partial: "comments/comment", collection: @comments
      = render partial: "comments/new", locals: {type: 'issue', id: @issue.id.to_s, ajax: @ajax, comment: @comment}

Add section names to comment on Issues

- unless private_check
  = render 'permissions_error'
- else
  - content_for :title do
    = "Create an issue for #{@project.name}"

  %article{ data: "issues"}
    %header
      %h1.generated
        = avatar @project.user.email
        %p
          %span
            = link_to @project.name, "/#{@user.username}/#{@project.name}"
          = "- Issue #81"
      %h2
        - if @project.private == true
          %span.badge.type PRV
        -else
          %span.badge.type PUB
        - if @project.id == @project.parent
          %span.badge.author PARENT
        - else FORK

    = render 'shared/messages'
    = render 'projects/project_toolbar'

    %section
      %div
        %div.option
          %header
            %h1
              = @issue.title
            %h2.issue
              = @issue.description
        %aside
          %h1
            Actions
          %nav
            %ul
              %li.active
                = link_to("Close",File.join(@issue.show_url,'close'),:method=>"post")
              %li
                Merge

    %section.comments
      %section.showcomments
        = render partial: "comments/comment", collection: @comments
      %section.newcomment
        = render partial: "comments/new", locals: {type: 'issue', id: @issue.id.to_s, ajax: @ajax, comment: @comment}


%h1 Notes
- @notes.each do |note|
  .note
    .title= link_to note.date.strftime('%A %B %e, %Y'), date_link(note.date)
    .body= simple_format note.body

= will_paginate @notes

Edit link on blog layout.

%h1 Notes
- @notes.each do |note|
  .note
    .title
      = link_to note.date.strftime('%A %B %e, %Y'), date_link(note.date)
      = link_to '»', note, :rel=>:facebox
    .body= simple_format note.body

= will_paginate @notes


-if Settings.hide_staff_personal_details=="1" and @topic.try("staff?")
  .row.home-page-block.full= render 'personal_details_staff'
- else
  .row.home-page-block.full= render 'personal_details'
.row.home-page-block.full= render 'thoughts'
.row
  .span5
    .row.home-page-block.left{:load_block => next_lesson_block_person_url(@topic)}= image_tag "ajax-loader.gif"
  .span5
    - if @user.staff? and @user == @topic
      .row.home-page-block.right{:load_block => my_courses_block_person_url(@topic)}= image_tag "ajax-loader.gif"
    - else
      .row.home-page-block.right{:load_block => attendance_block_person_url(@topic)}= image_tag "ajax-loader.gif"
.row
  .span5
    .row.home-page-block.left{:load_block => targets_block_person_url(@topic)}= image_tag "ajax-loader.gif"
    .row.home-page-block.left{:load_block => moodle_block_person_url(@topic)}= image_tag "ajax-loader.gif"
  .span5
    .row.home-page-block.right{:style => "height:233px; padding:10px;"}= raw Settings.advert_box_html

Make advert box more like other boxes so you can have a nice title

-if Settings.hide_staff_personal_details=="1" and @topic.try("staff?")
  .row.home-page-block.full= render 'personal_details_staff'
- else
  .row.home-page-block.full= render 'personal_details'
.row.home-page-block.full= render 'thoughts'
.row
  .span5
    .row.home-page-block.left{:load_block => next_lesson_block_person_url(@topic)}= image_tag "ajax-loader.gif"
  .span5
    - if @user.staff? and @user == @topic
      .row.home-page-block.right{:load_block => my_courses_block_person_url(@topic)}= image_tag "ajax-loader.gif"
    - else
      .row.home-page-block.right{:load_block => attendance_block_person_url(@topic)}= image_tag "ajax-loader.gif"
.row
  .span5
    .row.home-page-block.left{:load_block => targets_block_person_url(@topic)}= image_tag "ajax-loader.gif"
    .row.home-page-block.left{:load_block => moodle_block_person_url(@topic)}= image_tag "ajax-loader.gif"
  .span5
    .row.home-page-block.right{:style => "height:255px"}= raw Settings.advert_box_html


= form_for @user, :html => { :class => 'form-horizontal' } do |f|
  .control-group
    = f.label :name, :class => 'control-label'
    .controls
      = f.text_field :name, :class => 'text_field', :required => true
  .control-group
    = f.label :email, :class => 'control-label'
    .controls
      = f.email_field :email, :class => 'email_field'
  .control-group
    = f.label :balance, :class => 'control-label'
    .controls
      = f.number_field :balance, :class => 'number_field'
  .form-actions
    = f.submit nil, :class => 'btn btn-primary'
    = link_to t('.cancel', :default => t("helpers.links.cancel")), users_path, :class => 'btn'

Prepend € sign to balance input field

= form_for @user, :html => { :class => 'form-horizontal' } do |f|
  .control-group
    = f.label :name, :class => 'control-label'
    .controls
      = f.text_field :name, :class => 'text_field', :required => true
  .control-group
    = f.label :email, :class => 'control-label'
    .controls
      = f.email_field :email, :class => 'email_field'
  .control-group
    = f.label :balance, :class => 'control-label'
    .controls
      .input-prepend
        %span.add-on €
        = f.number_field :balance, :class => 'number_field'
  .form-actions
    = f.submit nil, :class => 'btn btn-primary'
    = link_to t('.cancel', :default => t("helpers.links.cancel")), users_path, :class => 'btn'


= f.inputs t_model(Employment) do
  = f.input :duration_from, :as => :date_field, :wrapper_html => {:class => 'col1'}
  = f.input :duration_to, :as => :date_field, :wrapper_html => {:class => 'col2'}
  = f.input :temporary, :wrapper_html => {:class => 'col1'}
  = f.input :hourly_paid, :wrapper_html => {:class => 'col2'}

  = f.input :salary_amount, :input_html => {:style => 'width: 6em'}, :wrapper_html => {:class => 'col1'}
  = f.input :workload, :input_html => {:style => 'width: 6em'}, :wrapper_html => {:class => 'col2'}
  = f.input :daily_workload, :as => :string, :input_html => {:style => 'width: 6em'}
  =# f.input :overtime_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :holiday_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :sunday_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :night_premium, :input_html => {:style => 'width: 6em'}

= f.inputs do
  = f.input :kids, :input_html => {:style => 'width: 6em'}

Move kids field into fieldset with other employment fields.

= f.inputs t_model(Employment) do
  = f.input :duration_from, :as => :date_field, :wrapper_html => {:class => 'col1'}
  = f.input :duration_to, :as => :date_field, :wrapper_html => {:class => 'col2'}
  = f.input :temporary, :wrapper_html => {:class => 'col1'}
  = f.input :hourly_paid, :wrapper_html => {:class => 'col2'}

  = f.input :salary_amount, :input_html => {:style => 'width: 6em'}, :wrapper_html => {:class => 'col1'}
  = f.input :workload, :input_html => {:style => 'width: 6em'}, :wrapper_html => {:class => 'col2'}
  = f.input :daily_workload, :as => :string, :input_html => {:style => 'width: 6em'}
  =# f.input :overtime_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :holiday_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :sunday_premium, :input_html => {:style => 'width: 6em'}
  =# f.input :night_premium, :input_html => {:style => 'width: 6em'}

  = f.input :kids, :input_html => {:style => 'width: 6em'}


!!!
%html
  %head
    %title Orientation
    = stylesheet_link_tag    "application", media: "all"
    = javascript_include_tag "application"
    = csrf_meta_tags

  %body{ class: body_class }
    .row
      %nav.cell.well
        %ul.fl
          %li.logo
            = link_to image_tag("brackets_banner_logo-black.svg", height: 40, width: 40), root_url
          %li= link_to "Tags", tags_url
          %li= link_to "Authors", authors_url
          %li.new-article= link_to "New Article", new_article_url
        %ul.fr
          - if current_user
            %li.auth
              = current_user.image_link
              = current_user.link_tag
              | #{link_to "Log Out", logout_path, title: current_user.email}
          - else
            %li.auth= link_to "Log In", login_path, data: { no_turbolink: true }

    - if flash[:error]
      .error= flash[:error]
    - if flash[:notice]
      .notice= flash[:notice]

    = yield

Apply site header initial styles, hooks

!!!
%html
  %head
    %title Orientation
    = stylesheet_link_tag    "application", media: "all"
    = javascript_include_tag "application"
    = csrf_meta_tags

  %body{ class: body_class }
    %header.row.row--a.ov.pbm.ptm{ 'data-ui-element' => 'header' }
      %nav.split
        .split-item
          .split-cell.split-cell--fluid
            %ul.list.list--inline.tsm
              %li.list-item
                = link_to image_tag("brackets_banner_logo-blue.svg", height: 40, width: 40, class: 'vam'), root_url
              %li.list-item= link_to "Tags", tags_url
              %li.list-item= link_to "Authors", authors_url
          .split-cell.split-cell--fixed
            - if current_user
              .dropdown.dropdown--e.js-dropdown
                .js-dropdown-btn
                  = image_tag 'http://placehold.it/40', class: 'thumb dib vam'
                  %p.dib.mbf ▼
                %ul.dropdown-menu
                  %li.dropdown-item
                    = current_user.name= link_to current_user.name, current_user.link, class: 'dropdown-item-link'
                  %li.dropdown-item
                    = link_to "Log Out", logout_path, title: current_user.email, class: 'dropdown-item-link'
            - else
              = link_to "Log In", login_path, data: { no_turbolink: true }

    - if flash[:error]
      .error= flash[:error]
    - if flash[:notice]
      .notice= flash[:notice]

    = yield


#first-block
  .en-cours
    %b
      = dossier_count = current_administrateur.procedures.count
    = "Démarche".pluralize(dossier_count)

#action-block

#menu-block
  .split-hr-left
  #procedure-list
    %a#draft-procedures{ :href => "#{url_for :admin_procedures_draft}" }
      .procedure-list-element{ class: @draft_class }
        - if Flipflop.publish_draft?
          En test
        - else
          Brouillons
        .badge.progress-bar-default
          = current_administrateur.procedures.brouillons.count

    %a#active-procedures{ :href => "#{url_for :admin_procedures}" }
      .procedure-list-element{ class: @active_class }
        Publiées
        .badge.progress-bar-success
          = current_administrateur.procedures.publiees.count

    %a#archived-procedures{ :href => "#{url_for :admin_procedures_archived}" }
      .procedure-list-element{ class: @archived_class }
        Archivées
        .badge.progress-bar-purple
          = current_administrateur.procedures.archivees.count

  .split-hr-left

#infos-block

Add switch account type layout

#first-block
  .en-cours
    %b
      = dossier_count = current_administrateur.procedures.count
    = "Démarche".pluralize(dossier_count)

#action-block

#menu-block
  .split-hr-left
  #procedure-list
    %a#draft-procedures{ :href => "#{url_for :admin_procedures_draft}" }
      .procedure-list-element{ class: @draft_class }
        - if Flipflop.publish_draft?
          En test
        - else
          Brouillons
        .badge.progress-bar-default
          = current_administrateur.procedures.brouillons.count

    %a#active-procedures{ :href => "#{url_for :admin_procedures}" }
      .procedure-list-element{ class: @active_class }
        Publiées
        .badge.progress-bar-success
          = current_administrateur.procedures.publiees.count

    %a#archived-procedures{ :href => "#{url_for :admin_procedures_archived}" }
      .procedure-list-element{ class: @archived_class }
        Archivées
        .badge.progress-bar-purple
          = current_administrateur.procedures.archivees.count

  .split-hr-left
  = render partial: 'layouts/switch_devise_profile_module'

#infos-block