%h2
  Cuttlefish — lovely open source transactional email

%p
  Ensure your emails arrive at their destination. And a whole lot more…

%h3 How to send email via Cuttlefish
%p
  Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.

.row#status-counts
  = render "main/status_counts"

Add instructions on the home page for when there are apps

%h2
  Cuttlefish — lovely open source transactional email

%p
  Ensure your emails arrive at their destination. And a whole lot more…

%h3 How to send email via Cuttlefish
%p
  - if App.normal_apps?
    Start by picking an #{link_to "existing App", apps_path} or #{link_to "create a new one", new_app_path}.
    Then you'll see how to send an email specifically for that App.
  - else
    Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.

.row#status-counts
  = render "main/status_counts"


.card.styleguide-intro.styleguide-block.copy--body.context--content
  %h1.copy--h1 Proportional Grid
  %p
    The main grid in waldorf is based on the width of one card. Landing pages more often use this proportional grid.

- gutters = [10,15,20,30]

- gutters.each do |gutter|
  .styleguide-block.styleguide-grid.context--content
    %p.copy--h2 Proportional Grid with a ten pixel gutter (.grid-wrapper--#{gutter})
    %div{class: "grid-wrapper--#{gutter}"}
      - 2.times do
        .col--one-half
          .card.copy--h4 .col--one-half

    %div{class: "grid-wrapper--#{gutter}"}
      - 3.times do
        .col--one-third
          .card.copy--h4 .col--one-third

    %div{class: "grid-wrapper--#{gutter}"}
      - 4.times do
        .col--one-quarter
          .card.copy--h4 .col--one-quarter

    %div{class: "grid-wrapper--#{gutter}"}
      - 5.times do
        .col--one-fifth
          .card.copy--h4 .col--one-fifth

Fix up titling for grids in styleguide

.card.styleguide-intro.styleguide-block.copy--body.context--content
  %h1.copy--h1 Proportional Grid
  %p
    The main grid in waldorf is based on the width of one card. Landing pages more often use this proportional grid.

- gutters = [10,15,20,30]

- gutters.each do |gutter|
  .styleguide-block.styleguide-grid.context--content
    %p.copy--h2 Proportional Grid with a #{gutter} pixel gutter (.grid-wrapper--#{gutter})
    %div{class: "grid-wrapper--#{gutter}"}
      - 2.times do
        .col--one-half
          .card.copy--h4 .col--one-half

    %div{class: "grid-wrapper--#{gutter}"}
      - 3.times do
        .col--one-third
          .card.copy--h4 .col--one-third

    %div{class: "grid-wrapper--#{gutter}"}
      - 4.times do
        .col--one-quarter
          .card.copy--h4 .col--one-quarter

    %div{class: "grid-wrapper--#{gutter}"}
      - 5.times do
        .col--one-fifth
          .card.copy--h4 .col--one-fifth


- page_title "Edit", @blob.path, @ref

.file-editor
  %ul.nav-links.no-bottom.js-edit-mode
    %li.active
      = link_to '#editor' do
        = icon('edit')
        Edit File

    %li
      = link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
        = icon('eye')
        = editing_preview_title(@blob.name)

  = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-quick-submit js-requires-input js-edit-blob-form') do
    = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
    = render 'shared/new_commit_form', placeholder: "Update #{@blob.name}"

    = hidden_field_tag 'last_commit', @last_commit
    = hidden_field_tag 'content', '', id: "file-content"
    = hidden_field_tag 'from_merge_request_id', params[:from_merge_request_id]
    = render 'projects/commit_button', ref: @ref, cancel_path: namespace_project_blob_path(@project.namespace, @project, @id)

:javascript
  blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}")
  new NewCommitForm($('.js-edit-blob-form'))

Remove icons from file edit tabs

- page_title "Edit", @blob.path, @ref

.file-editor
  %ul.nav-links.no-bottom.js-edit-mode
    %li.active
      = link_to '#editor' do
        Edit File

    %li
      = link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
        = editing_preview_title(@blob.name)

  = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-quick-submit js-requires-input js-edit-blob-form') do
    = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
    = render 'shared/new_commit_form', placeholder: "Update #{@blob.name}"

    = hidden_field_tag 'last_commit', @last_commit
    = hidden_field_tag 'content', '', id: "file-content"
    = hidden_field_tag 'from_merge_request_id', params[:from_merge_request_id]
    = render 'projects/commit_button', ref: @ref, cancel_path: namespace_project_blob_path(@project.namespace, @project, @id)

:javascript
  blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}")
  new NewCommitForm($('.js-edit-blob-form'))


= link_to person_timetables_url(@topic, :date => @next_timetable_event.try(:start)), :style => "color:inherit" do
  %h3
    Next lesson
    = image_tag("timetable.png")
  .span4
    - if @next_timetable_event
      %h4= @next_timetable_event.title
      %h5= pretty_date @next_timetable_event.start, :day => true
      .small_text
        Room:
        = @next_timetable_event.rooms.join ", "
        .small_text= @next_timetable_event.teachers.join ", "
    - else
      .alert
        - unless Rails.env == "development"
          = @topic.kind_of?(Person) ? "You have" : "This course has"
          no current timetable events.
        - else
          %i.icon-ban-circle
          Timetables do not currently work in testing mode.

Fix next timetable event block

= link_to person_timetables_url(@topic, :date => @next_timetable_event.timetable_start)), :style => "color:inherit" do
  %h3
    Next lesson
    = image_tag("timetable.png")
  .span4
    - if @next_timetable_event
      %h4= @next_timetable_event.title
      %h5= pretty_date @next_timetable_event.timetable_start, :day => true
      .small_text
        Room:
        = @next_timetable_event.rooms.join ", "
        .small_text= @next_timetable_event.teachers.join ", "
    - else
      .alert
        - unless Rails.env == "development"
          = @topic.kind_of?(Person) ? "You have" : "This course has"
          no current timetable events.
        - else
          %i.icon-ban-circle
          Timetables do not currently work in testing mode.


.navbar.navbar-bottom
  .navbar-inner
    .container.center
      %ul.nav.text-center
        %li= link_to "About", "http://wiki.growstuff.org/index.php/About%20Growstuff"
        %li= link_to "Contact", url_for(:controller => '/about', :action => 'contact')
        %li= link_to "Terms of Service", url_for(:controller => '/policy', :action => 'tos')
        %li= link_to "Privacy Policy", url_for(:controller => %'/policy', :action => 'privacy')
        %li= link_to "Community Guidelines", url_for(:controller => '/policy', :action => 'community')
        %li= link_to "Support/FAQ", url_for(:controller => '/support')
        %li= link_to "Open Source", "https://github.com/Growstuff/growstuff"

Update footer markup to use bootstrap3 navbar classes

.navbar.navbar-default.navbar-bottom
  .container
    %ul.nav.navbar-nav.text-center
      %li= link_to "About", "http://wiki.growstuff.org/index.php/About%20Growstuff"
      %li= link_to "Contact", url_for(:controller => '/about', :action => 'contact')
      %li= link_to "Terms of Service", url_for(:controller => '/policy', :action => 'tos')
      %li= link_to "Privacy Policy", url_for(:controller => %'/policy', :action => 'privacy')
      %li= link_to "Community Guidelines", url_for(:controller => '/policy', :action => 'community')
      %li= link_to "Support/FAQ", url_for(:controller => '/support')
      %li= link_to "Open Source", "https://github.com/Growstuff/growstuff"


%p
  %i.warning-validation
  = :not_sent_incoming_parcels_on_current_financial_year.tl(code: financial_year.code)
  - period_param = @financial_year.started_on.to_s + '_' + @financial_year.stopped_on.to_s
  = link_to(:see_incoming_parcels.tl,  backend_parcels_path(period: period_param, nature: :incoming), target: '_blank')

Fix invalid path in FinancialYear close validations about incoming parcels

%p
  %i.warning-validation
  = :not_sent_incoming_parcels_on_current_financial_year.tl(code: financial_year.code)
  - period_param = @financial_year.started_on.to_s + '_' + @financial_year.stopped_on.to_s
  = link_to(:see_incoming_parcels.tl,  backend_receptions_path(period: period_param, nature: :incoming), target: '_blank')


#german_map

.description
  :markdown
    [Hacken.in](http://hacken.in). Dein Kalender für Events rund ums Hacken, Geek-Kultur und alles, was zum Nerdsein gehört.

    Momentan gibt es uns für [Berlin](http://hacken.in/move_to/berlin),
    [Köln](http://hacken.in/move_to/koeln) und [München](http://hacken.in/move_to/muenchen).

Use relative links to the cities

#german_map

.description
  :markdown
    [Hacken.in](http://hacken.in). Dein Kalender für Events rund ums Hacken,
    Geek-Kultur und alles, was zum Nerdsein gehört.
    Momentan gibt es uns für [Berlin](move_to/berlin), [Köln](move_to/koeln)
    und [München](move_to/muenchen).


- if url_for(only_path: true) != "/"
  %p
    [
    = link_to("よくある質問", "#faq")
    ]
%p
  = render :_search_form, layout: false
- if @books
  .row
    .col-sm-7
      = render :_books, layout: false
    - unless @books.empty?
      .col-sm-3
        %p#conditions
          = render :_conditions, layout: false
      .col-sm-2
        %p#authors
          = render :_authors, layout: false
%p
  = render :_faq, layout: false
%p
  - if url_for(only_path: true) != "/"
    [
    = link_to("ページ上部に移動", "#")
    ]
  [
  = link_to("類似文書検索", "#{@sub_url}similar")
  ]
  [
  = link_to("ブックマーク", "javascript:void(0)", onclick: "goBookmarks(#{@sub_url})")
  ]

Move bookmarks link to page top

%p
  - if url_for(only_path: true) != "/"
    [
    = link_to("よくある質問", "#faq")
    ]
  [
  = link_to("ブックマーク", "javascript:void(0)", onclick: "goBookmarks(#{@sub_url})")
  ]
%p
  = render :_search_form, layout: false
- if @books
  .row
    .col-sm-7
      = render :_books, layout: false
    - unless @books.empty?
      .col-sm-3
        %p#conditions
          = render :_conditions, layout: false
      .col-sm-2
        %p#authors
          = render :_authors, layout: false
%p
  = render :_faq, layout: false
%p
  - if url_for(only_path: true) != "/"
    [
    = link_to("ページ上部に移動", "#")
    ]
  [
  = link_to("類似文書検索", "#{@sub_url}similar")
  ]


- set_title t('documents.admin')

%p.new
  = link_to t('documents.new_document'), new_document_path

%table
  %thead
    %tr
      %th= t('documents.title')
      %th= t('documents.publication_date')
      %th= t('documents.uploader')
      %th
  - @categories.each do |category|
    %tbody
      %tr.category
        %td{colspan: 4}
          = category.title
      - if category.documents.empty?
        %tr.empty
          %td{colspan: 4}= t('documents.no_documents')
      - else
        - category.documents.each do |document|
          %tr
            %td= link_to document.title, document.file.url
            %td= document.publication_date
            %td= document.uploader.full_name
            %td
              - if permitted_to? :destroy, document
                = link_to t('crud.destroy'), document, confirm: t('documents.confirm_delete'), method: :delete

Fix links on document admin page

- set_title t('documents.admin')

%p.new
  = link_to t('documents.new_document'), new_document_path

%table
  %thead
    %tr
      %th= t('documents.title')
      %th= t('documents.publication_date')
      %th= t('documents.uploader')
      %th
  - @categories.each do |category|
    %tbody
      %tr.category
        %td{colspan: 4}
          = category.title
      - if category.documents.empty?
        %tr.empty
          %td{colspan: 4}= t('documents.no_documents')
      - else
        - category.documents.each do |document|
          %tr
            %td= link_to document.title, document.file.url
            %td= document.publication_date
            %td= document.uploader.full_name
            %td
              - if permitted_to? :edit, document
                = link_to t('crud.edit'), edit_document_path(document)
            %td
              - if permitted_to? :destroy, document
                = link_to t('crud.destroy'), document, confirm: t('documents.confirm_delete'), method: :delete


.container
  .contents

    = render :partial => "section",
             :locals => { :header => "Authorize us on Github",
                          :body => "body1_1",
                          :explanation => "explanation1",
                          :index => 1}

    = render :partial => "section",
             :locals => { :header => "Pick a project",
                          :body => "body2_1",
                          :explanation => nil,
                          :index => 2}

    = render :partial => "section",
             :locals => { :header => "Profit",
                          :explanation => "explanation3",
                          :body => nil,
                          :index => 3}

Use the correct step and substep on load, not just 1 for each.

.container
  .contents

    = render :partial => "section",
             :locals => { :header => "Authorize us on Github",
                          :body => "body#{@step}_#{@substep}",
                          :explanation => "explanation1",
                          :index => 1}

    = render :partial => "section",
             :locals => { :header => "Pick a project",
                          :body => "body#{@step}_#{@substep}",
                          :explanation => nil,
                          :index => 2}

    = render :partial => "section",
             :locals => { :header => "Profit",
                          :explanation => "explanation3",
                          :body => nil,
                          :index => 3}


.container
  .profile_container
    = render 'user_profiles/user_form'

    #userprofile_navbar
      - if @user.course_instructor? || @user.course_student?
        = render 'user_profiles/profile_nav'

    #profile_details

      - if @user.course_instructor? || @user.course_student?
        #react_root{"data-isstudent" =>  @user.course_student? ? '{ "student": true }' : '{ "student": false }' , "data-isinstructor" =>  @user.course_instructor? ? '{ "instructor": true }' : '{ "instructor": false }'}

      - unless @last_courses_user
        %br/
        %h4
          #{@user.username}
          = t("courses.nocourse")

Fix profile page for Wiki Education staff

.container
  .profile_container
    = render 'user_profiles/user_form'

    #userprofile_navbar
      - if @last_courses_user
        = render 'user_profiles/profile_nav'

    #profile_details
      - if @last_courses_user
        #react_root{"data-isstudent" =>  @user.course_student? ? '{ "student": true }' : '{ "student": false }' , "data-isinstructor" =>  @user.course_instructor? ? '{ "instructor": true }' : '{ "instructor": false }'}

      - unless @last_courses_user
        %br/
        %h4
          #{@user.username}
          = t("courses.nocourse")


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

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

Emphasize selected capital planning years in planner tool

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

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


%main.row
  .cell.well.well--l

    - if user_signed_in?

      .js-search
        .split
          .split-cell.form.form--inline
            = form_tag articles_path, method: :get, remote: true, class: 'js-search-form' do
              = search_field_tag :search, params[:search],
                class: 'form-input js-search-input',
                placeholder: 'Search articles by keyword',
                autofocus: true
          .split-cell.mlxs
            = link_to "Fresh", fresh_articles_path, class: "btn #{action_name == 'fresh' ? 'btn--a' : ''}"
            = link_to "Stale", stale_articles_path, class: "btn #{action_name == 'stale' ? 'btn--a' : ''}"
            = link_to "Rotten", rotten_articles_path, class: "btn #{action_name == 'rotten' ? 'btn--a' : ''}"

        %ul.list.list--xs.js-search-results
          = render @articles

    - else

      %h1
        = link_to 'Please Log in to Continue', login_path

Use a more discrete button for the state filters

%main.row
  .cell.well.well--l

    - if user_signed_in?

      .js-search
        .split
          .split-cell.form.form--inline
            = form_tag articles_path, method: :get, remote: true, class: 'js-search-form' do
              = search_field_tag :search, params[:search],
                class: 'form-input js-search-input',
                placeholder: 'Search articles by keyword',
                autofocus: true
          .split-cell.mlxs
            = link_to "Fresh", fresh_articles_path, class: "btn #{action_name == 'fresh' ? 'btn--b' : ''}"
            = link_to "Stale", stale_articles_path, class: "btn #{action_name == 'stale' ? 'btn--b' : ''}"
            = link_to "Rotten", rotten_articles_path, class: "btn #{action_name == 'rotten' ? 'btn--b' : ''}"

        %ul.list.list--xs.js-search-results
          = render @articles

    - else

      %h1
        = link_to 'Please Log in to Continue', login_path


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

.conversation-participants.framed-content
  .control-icons.pull-right
    - if conversation.participants.count > 1
      = link_to content_tag(:i, nil, class: "entypo-cross"),
                conversation_visibility_path(conversation),
                method: "delete",
                data:   {confirm: "#{t('.hide')}?"},
                title:  t(".hide"),
                class:  "hide_conversation"
    - else
      = link_to content_tag(:i, nil, class: "entypo-trash"),
                conversation_visibility_path(conversation),
                method: "delete",
                data:   {confirm: "#{t('.delete')}?"},
                title:  t(".delete"),
                class:  "delete_conversation"

  %h3{ :class => direction_for(conversation.subject) }
    = conversation.subject

  - for participant in conversation.participants
    = person_image_link(participant, :size => :thumb_small)

.stream
  = render partial: 'messages', locals: { conversation: conversation }

Fix conversations participants design regression

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

.conversation-participants.framed-content.clearfix
  .control-icons.pull-right
    - if conversation.participants.count > 1
      = link_to content_tag(:i, nil, class: "entypo-cross"),
                conversation_visibility_path(conversation),
                method: "delete",
                data:   {confirm: "#{t('.hide')}?"},
                title:  t(".hide"),
                class:  "hide_conversation"
    - else
      = link_to content_tag(:i, nil, class: "entypo-trash"),
                conversation_visibility_path(conversation),
                method: "delete",
                data:   {confirm: "#{t('.delete')}?"},
                title:  t(".delete"),
                class:  "delete_conversation"

  %h3{ :class => direction_for(conversation.subject) }
    = conversation.subject

  - for participant in conversation.participants
    = person_image_link(participant, :size => :thumb_small)

.stream
  = render partial: 'messages', locals: { conversation: conversation }


#content

  #trademark-introduction
    = image_tag "ufpe/logo-lg.png", size: "460x164"
    .headline
      = t(".headline")
    = link_to t('.register.title'), register_path, class: "btn btn-danger btn-large"

  - if current_site.local_auth_enabled? || current_site.ldap_enabled?
    #login-box.form-area
      %h2= t('.login.title')
      = render :partial => 'sessions/login_form'
      .action-links
        %ul
          - if current_site.shib_enabled?
            %li= link_to t('.login.federation'), shibboleth_path, :class => 'shibboleth_login'
          %li= link_to t('.login.lost_password'), new_user_password_path
          - unless current_site.external_help.blank?
            %li= link_to t('.links.help'), current_site.external_help
          %li
            = render :partial => "shared/language_links"

Hide registration button in the frontpage if registration is disabled

#content

  #trademark-introduction
    = image_tag "ufpe/logo-lg.png", size: "460x164"
    .headline
      = t(".headline")
    - if current_site.registration_enabled?
      = link_to t('.register.title'), register_path, class: "btn btn-danger btn-large"

  - if current_site.local_auth_enabled? || current_site.ldap_enabled?
    #login-box.form-area
      %h2= t('.login.title')
      = render :partial => 'sessions/login_form'
      .action-links
        %ul
          - if current_site.shib_enabled?
            %li= link_to t('.login.federation'), shibboleth_path, :class => 'shibboleth_login'
          %li= link_to t('.login.lost_password'), new_user_password_path
          - unless current_site.external_help.blank?
            %li= link_to t('.links.help'), current_site.external_help
          %li
            = render :partial => "shared/language_links"


// Sets the class of #content-column
- content_for :class_content_column do
  hole-width

- content_for :class_sidebar_column do
  display-none

- content_for :page_title do
  = t('bookyt.overview.title')

%h1
  = t('bookyt.overview.title')

= render_navigation(:context => 'main', :expand_all => true, :renderer => SimpleNavigation::Renderer::Overview)

Add newline to overview view.


- div_for(pitch) do
  .block-spacer-negative
  .box_white
    #equalize
      = render :partial => 'news_items/news_item', :object => pitch
      .span-235.button_news_items
        = render :partial => "donations/button", :locals => { :news_item => pitch }
    .clear

Fix styling for pitch partial

- div_for(pitch) do
  .block-spacer-negative
  .box_white
    #equalize
      = render :partial => 'news_items/news_item', :object => pitch
      .span-205.button_news_items
        = render :partial => "donations/button", :locals => { :news_item => pitch }
    .clear


= icon_tag @icon
%br
Keyword:
= @icon.keyword
- if @icon.credit
  %br
  Credit:
  = @icon.credit
- if @icon.user_id == current_user.try(:id)
  %br
  = link_to "Make avatar", avatar_icon_path(@icon), method: :post
  %br
  = link_to "Edit icon", edit_icon_path(@icon)
  %br
  = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?'

- if @icon.galleries
  %br
  %br
  .post-header
    .padding-15 Galleries
  %table
    - @icon.galleries.order(:name).each do |gallery|
      = render partial: 'galleries/single', locals: {gallery: gallery, klass: 'subber', skip_forms: true}

Fix a galleryless icon's "galleries" display list

= icon_tag @icon
%br
Keyword:
= @icon.keyword
- if @icon.credit
  %br
  Credit:
  = @icon.credit
- if @icon.user_id == current_user.try(:id)
  %br
  = link_to "Make avatar", avatar_icon_path(@icon), method: :post
  %br
  = link_to "Edit icon", edit_icon_path(@icon)
  %br
  = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?'

- if @icon.galleries.present?
  %br
  %br
  .post-header
    .padding-15 Galleries
  %table
    - @icon.galleries.order(:name).each do |gallery|
      = render partial: 'galleries/single', locals: {gallery: gallery, klass: 'subber', skip_forms: true}


- page_title "Trending Projects"
.explore-title
  %h3
    Explore GitLab
  %p.lead
    Discover projects and groups. Share your projects with others
%hr
.explore-trending-block
  %p.lead
    %i.fa.fa-comments-o
    See most discussed projects for last month
  %hr
  .public-projects
    %ul.bordered-list
      = render @trending_projects

  .center.append-bottom-20
    = link_to 'Show all projects', explore_projects_path, class: 'btn btn-primary'

Remove button to all projects on Trending Projects page.


#contents
  =h1 "S'inscrire"

  = form_for @account, :as =>:account, :url => registration_path(:account) do |f|
    = messages_on_error @account
    %p
      = f.label :login, "Identifiant"
      = f.text_field :login, :required => 'required', :maxlength => 40
    %p
      = f.label :email, "Adresse de courriel"
      = f.email_field :email, :required => "required"
    %p
      = f.submit "S'inscrire"

  = render :partial => "devise/shared/links"

Add some explanations about creating an account

#contents
  =h1 "S'inscrire"

  = form_for @account, :as =>:account, :url => registration_path(:account) do |f|
    = messages_on_error @account
    %p
      = f.label :login, "Identifiant"
      = f.text_field :login, :required => 'required', :maxlength => 40
    %p
      = f.label :email, "Adresse de courriel"
      = f.email_field :email, :required => "required"
    %p
      = f.submit "S'inscrire"

  %article.notes
    %p
      Ce formulaire permet de créer un compte utilisateur.
      Un compte utilisateur vous permet par exemple de poster des commentaires, il est le premier pas pour participer d'une manière ou d'une autre à LinuxFr.org.
    %p
      Le système utilisé lors de l'identification est basé sur les cookies.
      Vous recevrez un message pour confirmer la création de votre compte.
    %p
      Si le compte existe déjà, cela signifie que l'adresse électronique proposée est déjà dans notre base.
      Veuillez alors demander un nouveau mot de passe.
    %p
      %strong IMPORTANT :
      une seule création de compte par personne physique est autorisée.
      Toute création de comptes multiples par une même personne, qu'elle qu'en soit la raison, sera considérée comme un abus de ressources.
      De plus, il est interdit d'utiliser une adresse email temporaire, qui ne permet pas aux administrateurs de vous contacter en cas de problèmes avec votre compte.
      Lorsqu'une telle adresse est découverte, les administrateurs se réservent le droit de fermer ou supprimer le compte.
    %p
      Conformément à la loi informatique et liberté, vous pouvez modifier vos informations personnelles par le biais du formulaire web de gestion de vos paramètres utilisateurs.

  = render :partial => "devise/shared/links"


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

        = render :partial => 'topbar_middle'

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

Add a link to the admin page in the dropdown.

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

        = render :partial => 'topbar_middle'

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


/ TODO: Move conditional presentation to proper location
- if tag.articles.size > 5
  .split.mbs
    .split-item
      .split-cell
        %h1.h2.dib= tag.name.titleize
      .split-cell
        = link_to "View All", tag_path(tag), class: 'tsm'
- else
  .mbs
    %h1.h2.dib= tag.name.titleize

%div.card.card--b.mbm
  %ul.list
    / TODO: Only display the latest five (or pinned) articles
    - articles.take(5).each do |article|
      %li.list-item.mbxs
        = article.freshness
        = link_to article.title, article, class: 'tsm mutedLink'

Remove Tag Category freshness indicator

/ TODO: Move conditional presentation to proper location
- if tag.articles.size > 5
  .split.mbs
    .split-item
      .split-cell
        %h1.h2.dib= tag.name.titleize
      .split-cell
        = link_to "View All", tag_path(tag), class: 'tsm'
- else
  .mbs
    %h1.h2.dib= tag.name.titleize

%div.card.card--b.mbm
  %ul.list
    / TODO: Only display the latest five (or pinned) articles
    - articles.take(5).each do |article|
      %li.list-item.mbxs
        = link_to article.title, article, class: 'tsm mutedLink'


%section.progress-bar
  %h5= language.name
  .progress-bar__container
    .progress-bar__wrap{ style: "width: #{percentage_of(language.lessons.total, language.lessons.complete)};" }
      .progress-bar__inner
        = percentage_of(language.lessons.total, language.lessons.complete)

Use local vars for brevity. (< 80 cols)

:ruby
  total = language.lessons.total
  complete = language.lessons.complete

%section.progress-bar
  %h5= language.name
  .progress-bar__container
    .progress-bar__wrap{ style: "width: #{percentage_of(total, complete)};" }
      .progress-bar__inner
        = percentage_of(total, complete)


%fieldset
  %legend.panel-legend Condition
  = format_field("Age", asset.age.to_s + " yrs")
  = format_field("Mileage", format_as_integer(asset.reported_mileage) ) if asset.type_of? :vehicle or asset.type_of :support_vehicle
  = format_field("Reported Condition", asset.reported_condition_type.nil? ? 'Unknown' : asset.reported_condition_type.name )
  = format_field("Reported On", format_as_date(asset.reported_condition_date) )
  = format_field("Est. Rating", format_as_decimal(asset.estimated_condition_rating, 1))
  = format_field("Est. Condition", asset.estimated_condition_type.nil? ? 'Unknown' : asset.estimated_condition_type.name )
  = format_field("Est. Value", format_as_currency(asset.estimated_value))

Fix bug in asset views

%fieldset
  %legend.panel-legend Condition
  = format_field("Age", asset.age.to_s + " yrs")
  = format_field("Mileage", format_as_integer(asset.reported_mileage) ) if asset.type_of? :vehicle or asset.type_of? :support_vehicle
  = format_field("Reported Condition", asset.reported_condition_type.nil? ? 'Unknown' : asset.reported_condition_type.name )
  = format_field("Reported On", format_as_date(asset.reported_condition_date) )
  = format_field("Est. Rating", format_as_decimal(asset.estimated_condition_rating, 1))
  = format_field("Est. Condition", asset.estimated_condition_type.nil? ? 'Unknown' : asset.estimated_condition_type.name )
  = format_field("Est. Value", format_as_currency(asset.estimated_value))


- if @incidents.present?
  #incidents.span9
    - @incidents.each do |incident|
      .incident
        .row-fluid
          .span8
            .row-fluid
              %h3.name= "#{Faker::Name.last_name}, #{Faker::Name.first_name}" #incident.arrest_report.person_name
              %p.docket-number= incident.docket_number
          .span3
            %h3.court-date= incident.next_court_date.strftime("%b %-d")
            %span.court-date-note Next Court Date
        .row-fluid
          .span1
            %p.sex= incident.defendant_sex
            %p.age= incident.defendant_age
          .span3
            %p.severity= incident.top_charge_code_expanded
            %p.charge-code= format_top_charge(incident)
          .span3
            %p.priors
              %span.count 3
              prior convictions
            %p.open-cases
              %span.count 1
              open case
          .span3.offset1
            %p.court-part= incident.next_court_part
            %p.last-updated
              Last updated
              %span.updated-date
                May 16
    .row-fluid
      = will_paginate @incidents, renderer: BootstrapPagination::Sinatra

- else
  No cases found.

Remove the last updated display.

- if @incidents.present?
  #incidents.span9
    - @incidents.each do |incident|
      .incident
        .row-fluid
          .span8
            .row-fluid
              %h3.name= "#{Faker::Name.last_name}, #{Faker::Name.first_name}" #incident.arrest_report.person_name
              %p.docket-number= incident.docket_number
          .span3
            %h3.court-date= incident.next_court_date.strftime("%b %-d")
            %span.court-date-note Next Court Date
        .row-fluid
          .span1
            %p.sex= incident.defendant_sex
            %p.age= incident.defendant_age
          .span3
            %p.severity= incident.top_charge_code_expanded
            %p.charge-code= format_top_charge(incident)
          .span3
            %p.priors
              %span.count 3
              prior convictions
            %p.open-cases
              %span.count 1
              open case
          .span3.offset1
            %p.court-part= incident.next_court_part
    .row-fluid
      = will_paginate @incidents, renderer: BootstrapPagination::Sinatra

- else
  No cases found.


%fieldset
  .field
    = f.label :phone
    = f.text_field :phone
  .field
    = f.label :receive_sms, 'Text Notifications'
    %div
      %label
        = f.radio_button :receive_sms, true, checked: (params[:receive_sms] == nil ? true : params[:receive_sms])
        Send Me Text Message Notifications
      %label
        = f.radio_button :receive_sms, false
        Don't Send Me Any Text Messages
  .field
    = f.label :local_phone
    = f.text_field :local_phone
    %span.smalltext (Required to receive notifications during the Congress. Enter 10 digits with no spaces or dashes.)
  .field
    = f.label :email
    = f.text_field :email

  -# ISO 3166-1 alpha-2
  .field
    = f.label :country
    = f.select :country, COUNTRIES, { :include_blank => true }

Clarify that a U.S. number is needed for notifications

%fieldset
  .field
    = f.label :phone
    = f.text_field :phone
  .field
    = f.label :receive_sms, 'Text Notifications'
    %div
      %label
        = f.radio_button :receive_sms, true, checked: (params[:receive_sms] == nil ? true : params[:receive_sms])
        Send Me Text Message Notifications
      %label
        = f.radio_button :receive_sms, false
        Don't Send Me Any Text Messages
  .field
    = f.label :local_phone
    = f.text_field :local_phone
    %span.smalltext (A U.S. phone number is required to receive notifications during the Congress. Enter 10 digits with no spaces or dashes.)
  .field
    = f.label :email
    = f.text_field :email

  -# ISO 3166-1 alpha-2
  .field
    = f.label :country
    = f.select :country, COUNTRIES, { :include_blank => true }


#running-indicator
  - if scraper.queued? || scraper.running?
    = render "application/spinner"

Revert "A bit of a stab in the dark"

#running-indicator
  - if scraper.queued? || scraper.running?
    = render "spinner"


- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .pull-right.col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .text-content
      - if has_button
        %h4
          The Issue Tracker is a good place to add things that need to be improved or solved in a project!
        %p
          An issue can be a bug, a todo or a feature request that needs to be discussed in a project.
          Besides, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        - else
          = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        %h4.text-center There are no issues to show.

Fix copy in Issue Tracker empty state.

- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .pull-right.col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .text-content
      - if has_button
        %h4
          The Issue Tracker is the place to add things that need to be improved or solved in a project
        %p
          Issues can be bugs, tasks or ideas to be discussed.
          Besides, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        - else
          = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        %h4.text-center There are no issues to show.


%h1.page-title
  = t('.archived_claims')

%h2 #{pluralize(@claims.count, t('.archived_claim'))}

#report-options.container
  = render partial: 'search_form', locals: { archived: true}

#search-summary
  - if params[:search].present?
    = render partial: 'shared/search_summary'

#details
  = render partial: 'claims', locals: { claims: @claims }
  = paginate @claims

Remove secondary title heading from Archive page

%h1.page-title
  = t('.archived_claims')

#report-options.container
  = render partial: 'search_form', locals: { archived: true}

#search-summary
  - if params[:search].present?
    = render partial: 'shared/search_summary'

#details
  = render partial: 'claims', locals: { claims: @claims }
  = paginate @claims


= paginator.render do
  %div#footer
    %ul#pagination
      = prev_page_tag unless current_page.first?
      - each_page do |page|
        - if page.left_outer? || page.right_outer? || page.inside_window?
          = page_tag page
        - elsif !page.was_truncated?
          = gap_tag
      = next_page_tag unless current_page.last?

Put the paginator in the footer using the helper.

= footer do
  = paginator.render do
    %ul#pagination
      = prev_page_tag unless current_page.first?
      - each_page do |page|
        - if page.left_outer? || page.right_outer? || page.inside_window?
          = page_tag page
        - elsif !page.was_truncated?
          = gap_tag
      = next_page_tag unless current_page.last?


-# @project is present when viewing Project's milestone
- project = @project || record.project

%li{ id: dom_id(record, 'sortable'),  class: "#{dom_class(record)}-row", 'data-iid' => record.iid, 'data-url' => polymorphic_path(record) }
  %span
    - if show_project_name
      %strong #{project.name} ·
    - elsif show_full_project_name
      %strong #{project.name_with_namespace} ·
    = link_to_gfm record.title, [project.namespace.becomes(Namespace), project, record], title: record.title
  %div{class: "#{dom_class(record)}-detail"}
    = link_to [project.namespace.becomes(Namespace), project, record] do
      %span{ class: "#{dom_class(record)}-number" } ##{record.iid}
    - record.labels.each do |label|
      = render_colored_label(label)
    - if record.assignee
      = image_tag avatar_icon(record.assignee, 16), class: "avatar s16", alt: ''

Add link with filter by milestone for labels and avatar.

-# @project is present when viewing Project's milestone
- project = @project || record.project
- record_type = record.class.table_name
- base_url_args = [project.namespace.becomes(Namespace), project, record_type]

%li{ id: dom_id(record, 'sortable'),  class: "#{dom_class(record)}-row", 'data-iid' => record.iid, 'data-url' => polymorphic_path(record) }
  %span
    - if show_project_name
      %strong #{project.name} ·
    - elsif show_full_project_name
      %strong #{project.name_with_namespace} ·
    = link_to_gfm record.title, [project.namespace.becomes(Namespace), project, record], title: record.title
  %div{class: "#{dom_class(record)}-detail"}
    = link_to [project.namespace.becomes(Namespace), project, record] do
      %span{ class: "#{dom_class(record)}-number" } ##{record.iid}

    - record.labels.each do |label|
      %a{ href: polymorphic_path(base_url_args, { milestone_title: @milestone.title, label_name: label.title, state: 'all' }) }<
        = render_colored_label(label)

    - if record.assignee
      %a{ href: polymorphic_path(base_url_args, { milestone_title: @milestone.title, assignee_id: record.assignee_id, state: 'all' }) }
        = image_tag(avatar_icon(record.assignee, 16), class: "avatar s16", alt: '')


%shop.darkswarm
  - content_for :order_cycle_form do

    %div{"ng-controller" => "OrderCycleChangeCtrl"}
      %closing{"ng-if" => "OrderCycle.selected()"}
        Next order closing
        %strong {{ OrderCycle.orders_close_at() | date_in_words }}

      %span Ready for pickup

      / Will this label should be a variable to reflect pickup or delivery as appropriate

      %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
              "ng-change" => "changeOrderCycle()",
              "ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
              "popover-placement" => "bottom", "popover" => "When do you want to get your order?", "popover-trigger" => "openTrigger"}

  = render partial: "shopping_shared/details"

  .row
    = render partial: "shop/products/form"

= render partial: "shared/footer"

Tweak label until shipping methods are available

%shop.darkswarm
  - content_for :order_cycle_form do

    %div{"ng-controller" => "OrderCycleChangeCtrl"}
      %closing{"ng-if" => "OrderCycle.selected()"}
        Next order closing
        %strong {{ OrderCycle.orders_close_at() | date_in_words }}

      %span Ready for

      / Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate

      %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
              "ng-change" => "changeOrderCycle()",
              "ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
              "popover-placement" => "bottom", "popover" => "When do you want to get your order?", "popover-trigger" => "openTrigger"}

  = render partial: "shopping_shared/details"

  .row
    = render partial: "shop/products/form"

= render partial: "shared/footer"


- if logged_in?
  %nav
    %ul.nav.nav-pills
      %li.logout
        = link_to logout_path, :title => t("navigation.logout") do
          %span.octicon.octicon-sign-out

      %li
        = link_to dashboard_path do
          %span.octicon.octicon-dashboard
          = t("navigation.dashboard")
      %li
        = link_to user_path(current_user) do
          %span.octicon.octicon-person
          = t("navigation.profile")
      %li
        = link_to gifts_path do
          %span.octicon.octicon-gift
          = t("navigation.gifted_code")
      %li
        = link_to my_suggestions_path do
          %span.octicon.octicon-repo
          = t("navigation.my_suggestions")
      - if admin?
        %li
          = link_to admin_projects_path do
            %span.octicon.octicon-tools
            = t("navigation.manage_projects")

Add description for Logout link

- if logged_in?
  %nav
    %ul.nav.nav-pills
      %li.logout
        = link_to logout_path, :title => t("navigation.logout") do
          %span.octicon.octicon-sign-out
          = t("navigation.logout")

      %li
        = link_to dashboard_path do
          %span.octicon.octicon-dashboard
          = t("navigation.dashboard")
      %li
        = link_to user_path(current_user) do
          %span.octicon.octicon-person
          = t("navigation.profile")
      %li
        = link_to gifts_path do
          %span.octicon.octicon-gift
          = t("navigation.gifted_code")
      %li
        = link_to my_suggestions_path do
          %span.octicon.octicon-repo
          = t("navigation.my_suggestions")
      - if admin?
        %li
          = link_to admin_projects_path do
            %span.octicon.octicon-tools
            = t("navigation.manage_projects")


- title 'Ensamkommande barn'
%section.box.show.refugee
  %h1.box-title
    = "#{@refugee.name}, #{@refugee.dossier_number}"
    = @refugee.draft? ? '(Utkast)' : ''

  .box-content.basic.form-data
    .tabs
      %ul
        %li= link_to 'Allmänt', @refugee
        %li= link_to 'Placeringar', refugee_show_placements_path(@refugee)
        %li= link_to 'Extra kostnader/insatser', refugee_show_costs_path(@refugee)
        %li= link_to 'Anhöriga', refugee_show_relateds_path(@refugee)
        %li.active Ekonomi

    = form_for @refugee, html: { class: 'basic' } do
      = kv 'Totala kostnader',
           number_to_currency(@refugee.total_costs, delimiter: ' ')
      = kv 'Totala placeringskostnader',
           number_to_currency(@refugee.total_placement_and_home_costs, delimiter: ' ')
      = kv 'Förväntad intäkt',
           number_to_currency(@refugee.total_rate.to_s, delimiter: ' ')
      = kv 'Total utbetald schablon',
           number_to_currency(@refugee.payments.map(&:amount).sum.to_s, delimiter: ' ')

      = render 'payments'

Check abilities for reading paymen table for refugee

- title 'Ensamkommande barn'
%section.box.show.refugee
  %h1.box-title
    = "#{@refugee.name}, #{@refugee.dossier_number}"
    = @refugee.draft? ? '(Utkast)' : ''

  .box-content.basic.form-data
    .tabs
      %ul
        %li= link_to 'Allmänt', @refugee
        %li= link_to 'Placeringar', refugee_show_placements_path(@refugee)
        %li= link_to 'Extra kostnader/insatser', refugee_show_costs_path(@refugee)
        %li= link_to 'Anhöriga', refugee_show_relateds_path(@refugee)
        %li.active Ekonomi

    = form_for @refugee, html: { class: 'basic' } do
      = kv 'Totala kostnader',
           number_to_currency(@refugee.total_costs, delimiter: ' ')
      = kv 'Totala placeringskostnader',
           number_to_currency(@refugee.total_placement_and_home_costs, delimiter: ' ')
      = kv 'Förväntad intäkt',
           number_to_currency(@refugee.total_rate.to_s, delimiter: ' ')
      = kv 'Total utbetald schablon',
           number_to_currency(@refugee.payments.map(&:amount).sum.to_s, delimiter: ' ')

      - if can? :read, Payment
        = render 'payments'


%h2.effective-orders-page-title Orders

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

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

Move admin New Order button to top right

%h2= @page_title

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

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


.row
  - @organization.eligible_funding_sources.each do |fs|
    .col-md-4
      = render :partial => 'fund_detail', :locals => {:fund => fs}

.row
  .col-md-12
    %table.table
      %thead
        %tr
          - @columns.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.center= cell
          - if @organization.direct_recipient
            %th

      %tbody
        - @budgets.each do |row|
          %tr
            - row.each_with_index do |obj, idx|
              - if idx == 0
                %td.left= obj
              - else
                %td.right= format_as_currency(obj)
            - if @organization.direct_recipient
              %td
                %button.pull-right.btn.btn-success.btn-xs{:data => {:toggle => 'modal', :target => '#budget-edit-modal', :id => row[0].object_key}}
                  %i.fa.fa-edit= " Update"

      %tfoot
        %tr
          - @totals.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.right= format_as_currency(cell)

= render 'chart_scripts'

Replace incomplete logic in CPT budgets view

.row
  .col-md-12
    .chart{:id => "chart_#{@report.id}"}

.row
  .col-md-12
    %table.table
      %thead
        %tr
          - @columns.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.center= cell
          - if @organization.direct_recipient
            %th

      %tbody
        - @budgets.each do |row|
          %tr
            - row.each_with_index do |obj, idx|
              - if idx == 0
                %td.left= obj
              - else
                %td.right= format_as_currency(obj)
            - if @organization.direct_recipient
              %td
                %button.pull-right.btn.btn-success.btn-xs{:data => {:toggle => 'modal', :target => '#budget-edit-modal', :id => row[0].object_key}}
                  %i.fa.fa-edit= " Update"

      %tfoot
        %tr
          - @totals.each_with_index do |cell, idx|
            - if idx == 0
              %th.left= cell
            - else
              %th.right= format_as_currency(cell)

= render 'chart_scripts'


:markdown
  The [`sqlite3` Node module](https://www.npmjs.com/package/sqlite3) makes it easy to store data in an SQLite database.

  To save data all you need to do is use the `sqlite3` module
  to create your database and table, and then use the `prepare`, `run`,
  and `finalize` functions to insert new records.

:coderay
  #!javascript
  var sqlite3 = require("sqlite3").verbose();

  # Open a database handle
  var db = new sqlite3.Database("data.sqlite");
  db.serialize(function() {

    # Create new table
    db.run("CREATE TABLE IF NOT EXISTS data (title TEXT)");

    # Insert a new record
    var statement = db.prepare("INSERT INTO data(title) VALUES (?)");
    statement.run('A new title to add');
    statement.finalize();
  });

Add some links to the docs so people can dig in if they need to

:markdown
  The [`sqlite3` Node module](https://www.npmjs.com/package/sqlite3) makes it easy to store data in an SQLite database.

  To save data all you need to do is use the `sqlite3` module
  to create your database and table, and then use the [`prepare`](https://github.com/mapbox/node-sqlite3/wiki/API#databasepreparesql-param--callback),
  [`run`](https://github.com/mapbox/node-sqlite3/wiki/API#databaserunsql-param--callback),
  and [`finalize`](https://github.com/mapbox/node-sqlite3/wiki/API#statementfinalizecallback) functions to insert new records.

:coderay
  #!javascript
  var sqlite3 = require("sqlite3").verbose();

  # Open a database handle
  var db = new sqlite3.Database("data.sqlite");
  db.serialize(function() {

    # Create new table
    db.run("CREATE TABLE IF NOT EXISTS data (title TEXT)");

    # Insert a new record
    var statement = db.prepare("INSERT INTO data(title) VALUES (?)");
    statement.run('A new title to add');
    statement.finalize();
  });


= title _('Classroom Syllabus')

#syllabus
  .eight.columns.formatted
    - unless @syllabus.new_record?
      %h3
        = @syllabus.title

      .panel
        %p
          = @syllabus.intro

      = @syllabus.content.html_safe

    - else
      = link_to(_('Update Classroom Syllabus'), edit_syllabus_path, :class => 'syllabus-create')

    - unless @lectures.blank?

      %h3
        = _('Course structure')

      %ul#lectures-tree.hierarchical-list
        = list_lectures_tree(@lectures)

  = render(:partial => 'sidebar')

Update a bit syllabus template.

= title _('Classroom Syllabus')

#syllabus
  .eight.columns.formatted
    - unless @syllabus.new_record?
      %h3
        = @syllabus.title

      .panel
        %p
          = @syllabus.intro

      = @syllabus.content.html_safe

    - else
      %h4
        = _('Not updated yet')
      %hr
        - if can?(:create, @syllabus)
          = link_to(_('Update the syllabus now'), edit_syllabus_path, :class => 'button primary syllabus-create')
        - else
          %p
            = _('None of the classroom collaborators managed to update the syllabus.')
          %p
            = _('Please check back again in a while.')

    - unless @lectures.blank?

      %h3
        %i.left.icon-structure
        = _('Course structure')

      %ul#lectures-tree.hierarchical-list
        = list_lectures_tree(@lectures)

  = render(:partial => 'sidebar')


.nested-fields.indent-fieldset.js-test-rep-order
  - @representation_order_count += 1
  %h3.bold-normal
    = t('.representation_order')

  %span.auto-width
    = f.anchored_label 'Representation order date', "defendant_#{@defendant_count}_representation_order_#{@representation_order_count}_representation_order_date"
    .form-hint.xsmall.zero-vert-margin

    = f.gov_uk_date_field :representation_order_date
    = validation_error_message(@error_presenter, "defendant_#{@defendant_count}_representation_order_#{@representation_order_count}_representation_order_date")

  %span.auto-width
    = f.anchored_label t('maat_reference_number'), "defendant_#{@defendant_count}_representation_order_#{@representation_order_count}_maat_reference"
    .form-hint.xsmall.zero-vert-margin
      = t("maat_reference_number_eg")
    = f.text_field :maat_reference
    = validation_error_message(@error_presenter, "defendant_#{@defendant_count}_representation_order_#{@representation_order_count}_maat_reference")

  = link_to_remove_association t('link.remove_rep_order'), f if @representation_order_count > 1

Fix a bug that related to rep order remove links


.container
  .row
    .col-md-3
      %h1.page-header
        Machine Learning Resources
        -#%small Helpful Links
.row
  .col-md-3
  .list-group
    = link_to 'Quick review of the linear algebra concepts relevant to machine learning', "http://www.deeplearningbook.org/contents/linear_algebra.html", class: 'list-group-item', target: '_blank'
    = link_to 'An Introduction to Statistical Learning (Book and MOOC slides', "http://www-bcf.usc.edu/~gareth/ISL/", class: 'list-group-item', target: '_blank'
    = link_to 'Every single Machine Learning course on the internet, ranked by your reviews', "https://medium.freecodecamp.org/every-single-machine-learning-course-on-the-internet-ranked-by-your-reviews-3c4a7b8026c0", class: 'list-group-item', target: '_blank'
    = link_to 'Deep Learning Book, a.k.a. the Bible of Deep Learning, authored by Ian Goodfellow, Yoshua Bengio, and Aaron Courville', "http://www.deeplearningbook.org/", class: 'list-group-item', target: '_blank'

Add ML algos cheat sheet.

.container
  .row
    .col-md-3
      %h1.page-header
        Machine Learning Resources
        -#%small Helpful Links
.row
  .col-md-3
  .list-group
    = link_to 'Quick review of the linear algebra concepts relevant to machine learning', "http://www.deeplearningbook.org/contents/linear_algebra.html", class: 'list-group-item', target: '_blank'
    = link_to 'An Introduction to Statistical Learning (Book and MOOC slides', "http://www-bcf.usc.edu/~gareth/ISL/", class: 'list-group-item', target: '_blank'
    = link_to 'Every single Machine Learning course on the internet, ranked by your reviews', "https://medium.freecodecamp.org/every-single-machine-learning-course-on-the-internet-ranked-by-your-reviews-3c4a7b8026c0", class: 'list-group-item', target: '_blank'
    = link_to 'Deep Learning Book, a.k.a. the Bible of Deep Learning, authored by Ian Goodfellow, Yoshua Bengio, and Aaron Courville', "http://www.deeplearningbook.org/", class: 'list-group-item', target: '_blank'
    = link_to 'Machine learning algom cheat sheet', "https://docs.microsoft.com/en-us/azure/machine-learning/studio/algorithm-cheat-sheet", class: 'list-group-item', target: '_blank'


- content_for :title, "\"#{@search_result.keyword}\" « Search"
- content_for :header do
  %h1.page-header "#{@search_result.keyword}" search result

- unless @search_result.results.present?
  .box
    .box-body
      No results found.
- else
  - @search_result.results.each do |result|
    .box
      .box-header.with-border
        %h3.box-title
          - case result
          - when TableMemo
            %small.label.bg-green Table
            = link_to highlight(result.full_name, @search_result.keyword), url_for(result)
          - when ColumnMemo
            %small.label.bg-green Column
            = link_to highlight(result.full_name, @search_result.keyword), url_for(result)
      .box-body
        = highlight(markdown_html(result.description), @search_result.keyword).html_safe

Replace column label color of search result from green to blue

- content_for :title, "\"#{@search_result.keyword}\" « Search"
- content_for :header do
  %h1.page-header "#{@search_result.keyword}" search result

- unless @search_result.results.present?
  .box
    .box-body
      No results found.
- else
  - @search_result.results.each do |result|
    .box
      .box-header.with-border
        %h3.box-title
          - case result
          - when TableMemo
            %small.label.bg-green Table
            = link_to highlight(result.full_name, @search_result.keyword), url_for(result)
          - when ColumnMemo
            %small.label.bg-aqua-active Column
            = link_to highlight(result.full_name, @search_result.keyword), url_for(result)
      .box-body
        = highlight(markdown_html(result.description), @search_result.keyword).html_safe


- content_for :plan_tab_navs do
  %li#travel-map-tab
    %a{href: '#map', 'data-toggle' => 'tab', onclick: 'mapInitialize()', title: '地図検索'}

- content_for :plan_tab_contents do
  #map.tab-pane
    %form#map-search{action: map_search_path, method: 'POST'}
      .row
        .col-sm-10
          %input.form-control{name: 'keyword', placeholder: 'グーグルマップのように', required: '', type: 'input'}
        .col-sm-2
          %input.btn.btn-default{type: 'submit', value: '検索'}
    #map-canvas
    %ol#map-search-result.droptrue

Add input card name button

- content_for :plan_tab_navs do
  %li#travel-map-tab
    %a{href: '#map', 'data-toggle' => 'tab', onclick: 'mapInitialize()', title: '地図検索'}

- content_for :plan_tab_contents do
  #map.tab-pane
    %form#own-card{action: '', name: 'mark'}
      .row
        .col-sm-10
          %input.form-control{name: 'keyword', placeholder: 'カードのタイトルを入力してください', required: '', type: 'input'}
        .col-sm-2
          %input.btn.btn-default#create-mark{type: 'button', value: '作成'}
    %form#map-search{action: map_search_path, method: 'POST'}
      .row
        .col-sm-10
          %input.form-control{name: 'keyword', placeholder: 'グーグルマップのように', required: '', type: 'input'}
        .col-sm-2
          %input.btn.btn-default{type: 'submit', value: '検索'}
    #map-canvas
    %ol#map-search-result.droptrue


- @feeds.group(["year", "month"]).each do |group|
  - sub_record = group.sub_records.first
  - year = sub_record.year
  - month = sub_record.month
  = link_to("#{"%04d" % year}-#{"%02d" % month} (#{group.n_sub_records})",
            url("/search?word=#{params[:word]}&year=#{year}&month=#{month}"))

Break by months by years

- @feeds.group(["year", "month"]).each do |group|
  - sub_record = group.sub_records.first
  - year = sub_record.year
  - month = sub_record.month
  = link_to("#{"%04d" % year}-#{"%02d" % month} (#{group.n_sub_records})",
            url("/search?word=#{params[:word]}&year=#{year}&month=#{month}"))
  %br


- @page_title = t('shoppe.product_category.product_categories')

= content_for :header do
  %p.buttons=link_to t('shoppe.product_category.new_category'), :new_product_category, :class => 'button green'
  %h2.products= t('shoppe.product_category.product_categories')

.table
  %table.data
    %thead
      %tr
        %th= t('shoppe.product_category.name')
        - I18n.available_locales.each do |i|
          %th
    %tbody
      - if @product_categories_without_parent.empty?
        %tr.empty
          %td= t('shoppe.product_category.no_categories')
      - else
        - for cat in @product_categories_without_parent
          %tr
            %td= link_to cat.name, [:edit, cat]
            - I18n.available_locales.each do |i|
              - if cat.translations.where(locale: i).count >= 1
                %td= link_to i, edit_product_category_localisation_path(cat, cat.translations.where(locale: i).first.id)
              - else
                %td= link_to i, new_product_category_localisation_path(cat, locale_field: i)
          = nested_product_category_rows(cat)

Fix bug where table body is not same width as header when no product category is added

- @page_title = t('shoppe.product_category.product_categories')

= content_for :header do
  %p.buttons=link_to t('shoppe.product_category.new_category'), :new_product_category, :class => 'button green'
  %h2.products= t('shoppe.product_category.product_categories')

.table
  %table.data
    %thead
      %tr
        %th= t('shoppe.product_category.name')
        - unless @product_categories_without_parent.empty?
          - I18n.available_locales.each do |i|
            %th
    %tbody
      - if @product_categories_without_parent.empty?
        %tr.empty
          %td= t('shoppe.product_category.no_categories')
      - else
        - for cat in @product_categories_without_parent
          %tr
            %td= link_to cat.name, [:edit, cat]
            - I18n.available_locales.each do |i|
              - if cat.translations.where(locale: i).count >= 1
                %td= link_to i, edit_product_category_localisation_path(cat, cat.translations.where(locale: i).first.id)
              - else
                %td= link_to i, new_product_category_localisation_path(cat, locale_field: i)
          = nested_product_category_rows(cat)


- middle = 'icn--middle' if middle
- title ||= nil

- unless title.nil?
  %i.icn{ class: "icn--#{icon} #{middle}" }
    %span.srt= title
- else
  %i.icn{ class: "icn--#{icon} #{middle}" }

Add klass local parameter to Icon partial

- middle = 'icn--middle' if middle
- klass ||= nil
- title ||= nil

- unless title.nil?
  %i.icn{ class: "icn--#{icon} #{middle} #{klass}" }
    %span.srt= title
- else
  %i.icn{ class: "icn--#{icon} #{middle} #{klass}" }


.product-thumb
  %a{"ng-click" => "triggerProductModal()"}
    %img{"ng-src" => "{{::product.primaryImageOrMissing}}"}

.row.summary
  .summary-header
    %h3
      %a{"ng-click" => "triggerProductModal()", href: 'javascript:void(0)'}
        %span{"ng-bind" => "::product.name"}
    %p.product-description{ng: {bind: "::product.description", click: "triggerProductModal()"}}
    .product-producer
      = t :products_from
      %span
        %enterprise-modal
          %span{"ng-bind" => "::enterprise.name"}

    .product-properties.filter-shopfront.property-selectors
      %filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }

Hide description paragraph if product has no description

.product-thumb
  %a{"ng-click" => "triggerProductModal()"}
    %img{"ng-src" => "{{::product.primaryImageOrMissing}}"}

.row.summary
  .summary-header
    %h3
      %a{"ng-click" => "triggerProductModal()", href: 'javascript:void(0)'}
        %span{"ng-bind" => "::product.name"}
    %p.product-description{ng: {bind: "::product.description", click: "triggerProductModal()", show: "product.description.length"}}
    .product-producer
      = t :products_from
      %span
        %enterprise-modal
          %span{"ng-bind" => "::enterprise.name"}

    .product-properties.filter-shopfront.property-selectors
      %filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }


- group_member = local_assigns[:group_member]
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" if group.description.blank?

%li.group-row{ class: css_class }
  - if group_member
    .controls.hidden-xs
      - if can?(current_user, :admin_group, group)
        = link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do
          %i.fa.fa-cogs

      = link_to leave_group_group_members_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-sm btn btn-grouped", title: 'Leave this group' do
        %i.fa.fa-sign-out

  .stats
    %span
      = icon('home')
      = number_with_delimiter(group.projects.count)

    %span
      = icon('users')
      = number_with_delimiter(group.users.count)

  = image_tag group_icon(group), class: "avatar s40 hidden-xs"
  = link_to group, class: 'group-name' do
    %span.item-title= group.name

  - if group_member
    as
    %span #{group_member.human_access}

  - if group.description.present?
    .light
      = markdown(group.description, pipeline: :description)

Refactor css for groups list

- group_member = local_assigns[:group_member]
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" if group.description.blank?

%li.group-row{ class: css_class }
  - if group_member
    .controls.hidden-xs
      - if can?(current_user, :admin_group, group)
        = link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do
          %i.fa.fa-cogs

      = link_to leave_group_group_members_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-sm btn btn-grouped", title: 'Leave this group' do
        %i.fa.fa-sign-out

  .stats
    %span
      = icon('home')
      = number_with_delimiter(group.projects.count)

    %span
      = icon('users')
      = number_with_delimiter(group.users.count)

  = image_tag group_icon(group), class: "avatar s40 hidden-xs"
  = link_to group, class: 'group-name title' do
    = group.name

  - if group_member
    as
    %span #{group_member.human_access}

  - if group.description.present?
    .light
      = markdown(group.description, pipeline: :description)


.row
  .small-12.columns
    %nav.top-padded{"aria-label": "You are here:", role: "navigation"}
      %ul.breadcrumbs
        %li
          =link_to "Components", staff_components_path
        %li
          %span.show-for-sr Current:
          Component Visual Dictionary
.row.top-padded
  -@components.each do |component|
    .small-12.medium-3.large-2.columns.end.text-center
      =link_to staff_component_path(component) do
        .callout.primary.small
          =image_tag(component.picture.thumb.url, alt: "Thumbnail Picture of #{component.name}", class: "thumbnail margin-bottom-none")
          %div
            =component.name

Apply the equalizer to callouts in the visual dictionary.

.row
  .small-12.columns
    %nav.top-padded{"aria-label": "You are here:", role: "navigation"}
      %ul.breadcrumbs
        %li
          =link_to "Components", staff_components_path
        %li
          %span.show-for-sr Current:
          Component Visual Dictionary
.row.top-padded{ data: { equalizer: "" } }
  -@components.each do |component|
    .small-12.medium-3.large-2.columns.end.text-center
      =link_to staff_component_path(component) do
        .callout.primary.small{ data: { equalizer: { watch: "" } } }
          =image_tag(component.picture.thumb.url, alt: "Thumbnail Picture of #{component.name}", class: "thumbnail margin-bottom-none")
          %div
            =component.name


by
%a{ href: user_path(@build.user) }
  %span.d-none.d-sm-block
    = image_tag avatar_icon_for_user(@build.user, 24), class: "avatar s24"
    %strong{ data: { toggle: 'tooltip', placement: 'top', title: @build.user.to_reference } }
      = @build.user.name
  %strong.d-block.d-sm-none= @build.user.to_reference

Fix artifacts job header layout

by
%a{ href: user_path(@build.user) }
  %span.d-none.d-sm-inline
    = image_tag avatar_icon_for_user(@build.user, 24), class: "avatar s24"
    %strong{ data: { toggle: 'tooltip', placement: 'top', title: @build.user.to_reference } }
      = @build.user.name
  %strong.d-inline.d-sm-none= @build.user.to_reference


%h1= t ".title"
- if @site_comments
  %table
    %thead
      %th= t(".when")
      %th= t(".who")
      %th= t(".name")
      %th= t(".email")
      %th= t(".what")
      %th= t(".where")
      %th= t(".how")
    - @site_comments.each do |comment|
      %tr
        %td= t ".when_ago", time_ago: time_ago_in_words(comment.created_at)
        %td= link_to(comment.user.name, user_path(comment.user)) if comment.user
        %td= comment.name
        %td= comment.email
        %td= simple_format comment.body
        %td= comment.context_url
        %td= comment.context_data
- else
  = t ".no_comments"

Add comment ids and condense user info

%h1= t ".title"
- if @site_comments
  %table
    %thead
      %th= t(".id")
      %th= t(".when")
      %th= t(".who")
      %th= t(".what")
      %th= t(".where")
      %th= t(".how")
    - @site_comments.each do |comment|
      %tr
        %td= comment.id
        %td= t ".when_ago", time_ago: time_ago_in_words(comment.created_at)
        %td
          %ul
            %li= link_to(comment.user.name, user_path(comment.user)) if comment.user
            %li= comment.name
            %li= comment.email
        %td= simple_format comment.body
        %td= comment.context_url
        %td= comment.context_data
- else
  = t ".no_comments"


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

- body_classes << "reversed"

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

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

Add explanitory text about downloaded tarball

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

- body_classes << "reversed"

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

    %h2 Download

    %p
      %a{:href => api_edition_url(:id => @fabulator_edition.id)}
        = @fabulator_edition.download_filename + ".tgz"
    %p
      N.B.: This archive opens as
      = @fabulator_edition.filename
      when unpacked.


---
title: i18n YAML for Gengo Online
description: Convert i18n YAML files for Rails or whatever into Gengo friendly submissions and back again.
---

.content
  .content-item.content-description
    Convert your i18n YAML files, for Rails or whatever, into
    %a.gengo{href:"https://gengo.com"} Gengo
    friendly submissions and back again.
  .content-item.content-converter
    %textarea.yaml
    %textarea.gengo
  .content-item.content-made-with-by
    Conversion back the other way coming soon.
  .content-item.content-made-with-by
    %a{href:"https://github.com/leighmcculloch/gengoyaml"}
      github.com/leighmcculloch/gengoyaml

Disable editing the gengo textarea until we support conversion the other way.

---
title: i18n YAML for Gengo Online
description: Convert i18n YAML files for Rails or whatever into Gengo friendly submissions and back again.
---

.content
  .content-item.content-description
    Convert your i18n YAML files, for Rails or whatever, into
    %a.gengo{href:"https://gengo.com"} Gengo
    friendly submissions and back again.
  .content-item.content-converter
    %textarea.yaml
    %textarea.gengo{disabled:"disabled"}
  .content-item.content-made-with-by
    Conversion back the other way coming soon.
  .content-item.content-made-with-by
    %a{href:"https://github.com/leighmcculloch/gengoyaml"}
      github.com/leighmcculloch/gengoyaml


-d30 = 30.day.from_now
-d60 = 60.day.from_now
-d180 = 180.day.from_now
.control-group
  %label.control-label{:for => 'latest-date'} If item remains unavailable, cancel request after:
  #latest-date.controls
    %label.radio{ :for => "30 days"}
      %input(type="radio" name="latest-date" value="#{d30.strftime("%Y-%m-%d")}" id="30 days")
      30 days (#{d30.strftime("%m-%d-%Y")})
    %label.radio{ :for => "60 days"}
      %input(type="radio" name="latest-date" value="#{d60.strftime("%Y-%m-%d")}" id="60 days")
      60 days (#{d60.strftime("%m-%d-%Y")})
    %label.radio{ :for => "180 days"}
      %input(type="radio" name="latest-date" value="#{d180.strftime("%Y-%m-%d")}" id="180 days" checked="checked")
      180 days (#{d180.strftime("%m-%d-%Y")})

Update IDs to remove spaces.

-d30 = 30.day.from_now
-d60 = 60.day.from_now
-d180 = 180.day.from_now
.control-group
  %label.control-label{:for => 'latest-date'} If item remains unavailable, cancel request after:
  #latest-date.controls
    %label.radio{ :for => "30 days"}
      %input(type="radio" name="latest-date" value="#{d30.strftime("%Y-%m-%d")}" id="days_30")
      30 days (#{d30.strftime("%m-%d-%Y")})
    %label.radio{ :for => "60 days"}
      %input(type="radio" name="latest-date" value="#{d60.strftime("%Y-%m-%d")}" id="days_60")
      60 days (#{d60.strftime("%m-%d-%Y")})
    %label.radio{ :for => "180 days"}
      %input(type="radio" name="latest-date" value="#{d180.strftime("%Y-%m-%d")}" id="days_180" checked="checked")
      180 days (#{d180.strftime("%m-%d-%Y")})


.row
  .col-sm-12
    .col-sm-4
      %fieldset
        %legend.panel-legend Asset Details
      = render partial: "assets/asset_details", :locals => {:asset => @asset}
    .col-sm-4
      = render partial: "assets/asset_condition_details", :locals => {:asset => @asset}
    .col-sm-4
      %fieldset
        %legend.panel-legend Replacement/Rehabilitation
        = render partial: "assets/asset_rehab_details", :locals => {:asset => @asset}

Fix missing header in asset table popup

.row
  .col-sm-12
    .col-sm-4
      %fieldset
        %legend.panel-legend Asset Details
      = render partial: "assets/asset_details", :locals => {:asset => @asset}
    .col-sm-4
      %fieldset
        %legend.panel-legend Condition
      = render partial: "assets/asset_condition_details", :locals => {:asset => @asset}
    .col-sm-4
      %fieldset
        %legend.panel-legend Replacement/Rehabilitation
        = render partial: "assets/asset_rehab_details", :locals => {:asset => @asset}


.banner.banner-metrics
  .container
    %h3 This week at morph.io
    - cache 'vanity_stats', :expires_in => 1.hour do
      .metric-box.col-sm-4
        %strong 350,987
        web pages scraped
      .metric-box.col-sm-4
        %strong 1,236,347
        rows of data collected
      .metric-box.col-sm-4
        %strong 51,110
        downloads & API queries

Revert "Harcode numbers for testing"

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


= render "asset_report_actions"

Remove FY dropdown from SOGR report actions- that's a meaningless action. SOGR is only for current FY

= form_tag report_path(@report), :class => "navbar-form navbar-right panel-action", :method => :get, :id => 'report_filter_form', :role => "form" do
  - if @organization_list.count > 1
    .form-group
      = select_tag(:agency, options_for_select(Organization.where(id: @data.organization_ids)), :class => "form-control pull-right", :include_blank => "Jump to...")

:javascript
  $(document).ready(function() {
    // Jump to agency
    $('#agency').change(function() {
      document.location = "#" + $(this).val();
    })
  });


- if spree_current_user
  %ul#login-nav.inline-menu
    %li{"data-hook" => "user-logged-in-as"}
      = t(:logged_in_as)
      \: #{spree_current_user.email}
    %li{"data-hook" => "user-account-link"}
      %i.icon-user
      = link_to t(:account), account_path
    %li{"data-hook" => "user-logout-link"}
      %i.icon-signout
      = link_to t(:logout), spree.logout_path
    %li{"data-hook" => "store-frontend-link"}
      %i.icon-external-link
      = link_to t(".header.store"), spree.root_path, target: "_blank"

Make login nav use main_app router

- if spree_current_user
  %ul#login-nav.inline-menu
    %li{"data-hook" => "user-logged-in-as"}
      = t(:logged_in_as)
      \: #{spree_current_user.email}
    %li{"data-hook" => "user-account-link"}
      %i.icon-user
      = link_to t(:account), account_path
    %li{"data-hook" => "user-logout-link"}
      %i.icon-signout
      = link_to t(:logout), logout_path
    %li{"data-hook" => "store-frontend-link"}
      %i.icon-external-link
      = link_to t(".header.store"), main_app.root_path, target: "_blank"


- content_for :breadcrumbs do
  %ol.breadcrumb
    %li= link_to 'Home', root_path
    %li= link_to <%= class_name %>.model_name.human.pluralize, <%= index_helper %>_path
    %li.active= <%= class_name %>.model_name.human

.container
  .page-header.clearfix
    %h1.pull-left= <%= class_name %>.model_name.human
    .pull-right{ :style => 'margin-top: 20px' }
      = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-default pull-right' do
        %i.glyphicon.glyphicon-edit
        = "Edit #{<%= class_name %>.model_name.human}"

  %p#notice= notice

  <%- for attribute in attributes -%>
  %dl.dl-horizontal
    %dt= <%= class_name %>.human_attribute_name(:<%= attribute.name %>)
    %dd= @<%= singular_table_name %>.<%= attribute.name %>
  <%- end -%>

Fix a rendering bug in show template

- content_for :breadcrumbs do
  %ol.breadcrumb
    %li= link_to 'Home', root_path
    %li= link_to <%= class_name %>.model_name.human.pluralize, <%= index_helper %>_path
    %li.active= <%= class_name %>.model_name.human

.container
  .page-header.clearfix
    %h1.pull-left= <%= class_name %>.model_name.human
    .pull-right{ :style => 'margin-top: 20px' }
      = link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :class => 'btn btn-default pull-right' do
        %i.glyphicon.glyphicon-edit
        = "Edit #{<%= class_name %>.model_name.human}"

  %p#notice= notice

  %dl.dl-horizontal
  <%- for attribute in attributes -%>
    %dt= <%= class_name %>.human_attribute_name(:<%= attribute.name %>)
    %dd= @<%= singular_table_name %>.<%= attribute.name %>
  <%- end -%>


.page-container
  =image_tag("loomio-orange.png")
  #invitation-container
    .row
      %h3.span8.offset2 Your request to a start a new group on Loomio has been approved!
      %p
    .row
      .span6.offset2
        %p If you're new to Loomio, you'll need to set up an account before you create your group.
        %p
          %a.btn.btn-info.btn-large{:href => new_user_path, :id => 'create-account'}
            Create an account
        %p
        %p If you already have an account, log in to continue.
        %p
          %a.btn.btn-info.btn-large{:href => new_user_session_path, :id => 'sign-in'}
            Sign in here
      .span2
        =image_tag("mascot-medium-lefthand.gif")

Improve verbiage on invitation page.

.page-container
  =image_tag("loomio-orange.png")
  #invitation-container
    .row
      %h3.span8.offset2 Your request to a start a new group on Loomio has been approved!
      %p
    .row
      .span6.offset2
        %p If you're new to Loomio, you'll need to set up an account before you create your group.
        %p
          %a.btn.btn-info.btn-large{:href => new_user_path, :id => 'create-account'}
            Create an account
        %p
        %p If you already have an account, sign in to continue.
        %p
          %a.btn.btn-info.btn-large{:href => new_user_session_path, :id => 'sign-in'}
            Sign in here
      .span2
        =image_tag("mascot-medium-lefthand.gif")


- if ::Settings.ui.mark_translated_strings && !Rails.env.test?
  :javascript
    ManageIQ.i18n.mark_translated_strings = true

Disable marking of translated strings in production

- if ::Settings.ui.mark_translated_strings && !Rails.env.test? && !Rails.env.production?
  :javascript
    ManageIQ.i18n.mark_translated_strings = true


%p#notice
%h1= @schema.name
%h2= @schema.schema_category.name
%table
  %thead
    %tr
      %th Fecha
      %th Version
      %th{:colspan => "3"}
  %tbody
    - @schema_versions.each do |schema_version|
      %tr
        %td= schema_version.created_at
        %td= schema_version.version_number
        %td= link_to 'Ver', [@schema,schema_version]

Add tables to 'new version' view

- if !user_signed_in?
  Para subir un esquema por favor
  = link_to 'identifíquese con su clave única', user_clave_unica_omniauth_authorize_path
- else
  = form_for @schema do |f|
    - if @schema.errors.any?
      #error_explanation
        %h2
          = pluralize(@schema.errors.count, "error")
          prohibited this schema from being saved:
        %ul
          - @schema.errors.full_messages.each do |message|
            %li= message
    .instance-panel
      .container
        .col-md-12{:class => "text-center"}
    .container.new-schemas-container
      %h1= @schema.name
      %h4= @schema.schema_category.name
      .row
        .col-md-12
          %table.table.schema-versions
            %thead
              %tr
                %th Versión
                %th Fecha
                %th
            %tbody
              - @schema_versions.each do |schema_version|
                %tr
                  %td= schema_version.version_number
                  %td= schema_version.created_at
                  %td= link_to 'Ver', [@schema,schema_version]


%h1 Incidents
- if @start_date.present?
  %h2
    = @start_date.strftime '%A, %B %e'
    —
    = @end_date.strftime '%A, %B %e'
  .date-navigation
    = link_to incidents_path(mode: @mode, start_date: @prev_start), class: 'prev' do
      %button.btn.btn-primary
        ←
        Previous #{@mode}
    - case @mode
    - when 'week'
      = link_to incidents_path(mode: 'month', start_date: @start_date.beginning_of_month), class: 'switch' do
        %button.btn.btn-primary View for whole month
    - when 'month'
      = link_to incidents_path(mode: 'week', start_date: @week_start_date), class: 'switch' do
        %button.btn.btn-primary View single week
    = link_to incidents_path(mode: @mode, start_date: @next_start), class: 'next' do
      %button.btn.btn-primary
        Next #{@mode}
        →
= render 'division_filters' if current_user.divisions.many?
= render 'claim_search'
.batch-hastus-export
  %button.btn.btn-primary#main-button Batch export Hastus XML
  %button.btn.btn-primary#select-all Select all
= render 'table'

Add two buttons for separate formats, give them ids for coffee

%h1 Incidents
- if @start_date.present?
  %h2
    = @start_date.strftime '%A, %B %e'
    —
    = @end_date.strftime '%A, %B %e'
  .date-navigation
    = link_to incidents_path(mode: @mode, start_date: @prev_start), class: 'prev' do
      %button.btn.btn-primary
        ←
        Previous #{@mode}
    - case @mode
    - when 'week'
      = link_to incidents_path(mode: 'month', start_date: @start_date.beginning_of_month), class: 'switch' do
        %button.btn.btn-primary View for whole month
    - when 'month'
      = link_to incidents_path(mode: 'week', start_date: @week_start_date), class: 'switch' do
        %button.btn.btn-primary View single week
    = link_to incidents_path(mode: @mode, start_date: @next_start), class: 'next' do
      %button.btn.btn-primary
        Next #{@mode}
        →
= render 'division_filters' if current_user.divisions.many?
= render 'claim_search'
.batch-hastus-export
  %button.btn.btn-primary#main-button Batch export
  %button.btn.btn-primary#xml-button Batch export Hastus XML
  %button.btn.btn-primary#csv-button Batch export Hastus CSV
  %button.btn.btn-primary#select-all Select all
= render 'table'


- unless Rails.env.production?
  %meta{:name => 'robots', :content => 'noindex, nofollow'}

%meta(charset="utf-8")
%meta{'http-equiv' => 'Content-language', :content => I18n.locale}
%meta{:name => 'language', :content => I18n.locale}
%meta{:name => 'copyright', :content => 'Sozialhelden e.V'}
%meta{:name => 'robots', :content => 'follow index'}
%meta{:name => "google-site-verification", :content => "ANQCVlgXNpnBdZInKyE4eWMeNPq-cIckJGMyEYPXNec"}

%link{:href => search_index_url, :rel => 'search', :title => t('header.meta.search')}
%link{:href => root_url, :rel => 'home', :title => t('header.meta.homepage')}
%link{:href => 'http://blog.wheelmap.org/kontakt/', :rel => 'copyright', :title => t('header.navigation.imprint')}
%link{:href=>"/favicon.ico", :rel=>"shortcut icon"}

Use rails helper for generating favicon link.

- unless Rails.env.production?
  %meta{:name => 'robots', :content => 'noindex, nofollow'}

%meta(charset="utf-8")
%meta{'http-equiv' => 'Content-language', :content => I18n.locale}
%meta{:name => 'language', :content => I18n.locale}
%meta{:name => 'copyright', :content => 'Sozialhelden e.V'}
%meta{:name => 'robots', :content => 'follow index'}
%meta{:name => "google-site-verification", :content => "ANQCVlgXNpnBdZInKyE4eWMeNPq-cIckJGMyEYPXNec"}

%link{:href => search_index_url, :rel => 'search', :title => t('header.meta.search')}
%link{:href => root_url, :rel => 'home', :title => t('header.meta.homepage')}
%link{:href => 'http://blog.wheelmap.org/kontakt/', :rel => 'copyright', :title => t('header.navigation.imprint')}
=favicon_link_tag('/favicon.ico')


= semantic_form_for resource do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :customer_id, :as => :hidden
    = f.input :state, :as => :hidden
    = f.input :company, :input_html => {:class => 'combobox', 'data-autofocus' => true}
    = f.input :title
    = f.input :value_date, :as => :date_field
    = f.input :amount
    = f.input :due_date, :as => :date_field
    = f.input :remarks

  = f.buttons do
    = f.commit_button

Add field for credit_invoice form.

= semantic_form_for resource do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :customer_id, :as => :hidden
    = f.input :state, :as => :hidden
    = f.input :company, :input_html => {:class => 'combobox', 'data-autofocus' => true}
    = f.input :title
    = f.input :value_date, :as => :date_field
    = f.input :amount
    = f.input :due_date, :as => :date_field
    = f.input :remarks

  = f.inputs do
    = f.semantic_fields_for :attachments do |a|
      = a.input :file, :as => :file

  = f.buttons do
    = f.commit_button


#select_charts
  - @groups.each_pair do |group, charts|
    %h1= t("chart_group.#{group.downcase}")
    - if charts.is_a?(Array)
      = render 'chart_preview', charts: charts

    - elsif charts.is_a?(Hash)
      - charts.each_pair do |sub_group, charts|
        - if sub_group
          %h2= t("chart_sub_group.#{sub_group.downcase}")
        = render 'chart_preview', charts: charts

Check for presence of subgroup instead of NOT NULL

#select_charts
  - @groups.each_pair do |group, charts|
    %h1= t("chart_group.#{group.downcase}")
    - if charts.is_a?(Array)
      = render 'chart_preview', charts: charts

    - elsif charts.is_a?(Hash)
      - charts.each_pair do |sub_group, charts|
        - if sub_group.present?
          %h2= t("chart_sub_group.#{sub_group.downcase}")
        = render 'chart_preview', charts: charts


#select_charts
  - @groups.each_pair do |group, charts|
    - if charts.any?
      %h1= t("chart_group.#{group.downcase}")
      - charts.each do |chart|
        %div.pick_chart{:data => { :chart_id => chart.id, :chart_holder => @chart_holder}}
          %a
            = image_tag "output_elements/#{chart.icon}", :size => "50x30"
            %h2= t("output_elements.#{chart.key}").html_safe

Fix that chart picker wouldn't load a new chart

#select_charts
  - @groups.each_pair do |group, charts|
    - if charts.any?
      %h1= t("chart_group.#{group.downcase}")
      - charts.each do |chart|
        %div.pick_chart{'data-chart_id' => chart.id, 'data-chart_holder' => @chart_holder}
          %a
            = image_tag "output_elements/#{chart.icon}", :size => "50x30"
            %h2= t("output_elements.#{chart.key}").html_safe


.details.dashboard-section
  %h3 Update your details

  %p= link_to 'Edit my profile', edit_user_path
  %p= link_to 'Change my password', '#'

Remove change password link (part of edit profile)


- supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false)
.comment-toolbar.clearfix
  .toolbar-text
    Styling with
    = link_to 'Markdown', help_page_path('markdown/markdown'), target: '_blank', tabindex: -1
    - if supports_slash_commands
      and
      = link_to 'slash commands', help_page_path('workflow/slash_commands'), target: '_blank', tabindex: -1
      are
    - else
      is
    supported
  %button.toolbar-button.markdown-selector{ type: 'button', tabindex: '-1' }
    = icon('file-image-o', class: 'toolbar-button-icon')
    Attach a file

Change location of slash commands in notes widget

- supports_slash_commands = local_assigns.fetch(:supports_slash_commands, false)
.comment-toolbar.clearfix
  .toolbar-text
    Styling with
    = link_to 'Markdown', help_page_path('markdown/markdown'), target: '_blank', tabindex: -1
    - if supports_slash_commands
      and
      = link_to 'slash commands', help_page_path('user/project/slash_commands'), target: '_blank', tabindex: -1
      are
    - else
      is
    supported
  %button.toolbar-button.markdown-selector{ type: 'button', tabindex: '-1' }
    = icon('file-image-o', class: 'toolbar-button-icon')
    Attach a file


.box-content
  = simple_form_for @rate_category, html: { class: "basic home" } do |f|
    = f.error_notification class: "warning"

    %h2.group-title Schablon
    = f.input :name
    = show_attribute('rate_category.description', @rate_category.description)
    = f.input :from_age
    = f.input :to_age
    = f.association :legal_code, include_blank: false, selected: 1

    %h2.group-title Ekonomi
    .terms
      = f.simple_fields_for :rates do |s|
        = render "fields_for_rate", s: s
      .form-group
        %span.control-label
        .controls
          = add_rates_button "Lägg till belopp", f

    = render 'application/submit', form: f, cancel_path: rate_categories_path

Disable edit of rate categories

.box-content
  = simple_form_for @rate_category, html: { class: "basic home" } do |f|
    = f.error_notification class: "warning"

    %h2.group-title Schablon
    = show_attribute('rate_category.name', @rate_category.name)
    = show_attribute('rate_category.description', @rate_category.description)
    = show_attribute('rate_category.from_age', @rate_category.from_age)
    = show_attribute('rate_category.to_age', @rate_category.to_age)
    = show_attribute('rate_category.legal_code', @rate_category.legal_code.name)

    %h2.group-title Ekonomi
    .terms
      = f.simple_fields_for :rates do |s|
        = render "fields_for_rate", s: s
      .form-group
        %span.control-label
        .controls
          = add_rates_button "Lägg till belopp", f

    = render 'application/submit', form: f, cancel_path: rate_categories_path


=content_for :title, @title
=content_for :header do
  %h2
    =tx "title_main"
    %small
      =tx "title_small"
      %strong
        %i.icon-flag.tip{title: tx("title_flag")}

#container.container-fluid
  #source-list.well.span12{data: {sources: @sources.to_json}}
    %label.checkbox.inline Limit categories to specific sources:
    -@sources.each do |source|
      %label.checkbox.inline
        %input{type: 'checkbox', value: source, data: {bind: 'checked: sources'}}
        =source
  .category-listing{data: {bind: 'foreach: categories'}}
    .item.well.span3
      %a{data: {bind: "attr: { href: link }"}}
        %h4{data: {bind: 'text: text'}}

=javascript_include_tag 'knockout-2.2.1'
=javascript_include_tag 'gene-categories-view-model.coffee'

Fix display problem with arangement of blocks in druggable gene categories view occuring on large monitors

=content_for :title, @title
=content_for :header do
  %h2
    =tx "title_main"
    %small
      =tx "title_small"
      %strong
        %i.icon-flag.tip{title: tx("title_flag")}

#container.container-fluid
  #source-list.well.span12{data: {sources: @sources.to_json}}
    %label.checkbox.inline Limit categories to specific sources:
    -@sources.each do |source|
      %label.checkbox.inline
        %input{type: 'checkbox', value: source, data: {bind: 'checked: sources'}}
        =source

#container.container-fluid
  .category-listing{data: {bind: 'foreach: categories'}}
    .item.well.span3
      %a{data: {bind: "attr: { href: link }"}}
        %h4{data: {bind: 'text: text'}}
%p

=javascript_include_tag 'knockout-2.2.1'
=javascript_include_tag 'gene-categories-view-model.coffee'


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

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

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

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

Add link to status page

%h4.center Et voilà!
.row
  .col.s12.l6.offset-l3.m8.offset-m2
    .card
      .card-content
        %p
          Ton mot de passe Arts et Métiers Alumni a été changé ainsi que celui de ton
          %b compte Google Gadz.org
          si tu en as un.
        %br
        %p La synchronisation des mots de passe peu mettre quelques minutes, patience !
        %br
        %p En cas de doutes sur le bon fonctionnement des services, tu peux visiter la page de status :
        %p
          = link_to "status.gadz.org", "https://status.gadz.org/", target: "_blank", rel: "nofollow"

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

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


%h2 Sign in
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
  %div
    = f.label :email
    %br/
    = f.email_field :email, :autofocus => true
  %div
    = f.label :password
    %br/
    = f.password_field :password
  - if devise_mapping.rememberable?
    %div
      = f.check_box :remember_me
      = f.label :remember_me
  %div= f.submit "Sign in"
= render "users/shared/links"

Add providers to login page

%h2 Sign in

= render 'users/auth/providers', flow: 'login', icons: true, color: true, prefix: 'Login in with '

= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
  %div
    = f.label :email
    %br/
    = f.email_field :email, :autofocus => true
  %div
    = f.label :password
    %br/
    = f.password_field :password
  - if devise_mapping.rememberable?
    %div
      = f.check_box :remember_me
      = f.label :remember_me
  %div= f.submit "Sign in"
= render "users/shared/links"


- filter_name = :by_value_period
- define_filter filter_name do
  - filters = current_tenant.fiscal_years.reverse.map do |period|
    - value = {"from" => period[:from].to_s(:db), "to" => period[:to].to_s(:db)}
    - {:value => value, :title => period[:to].year}
  = boot_nav_filter(filter_name, [{:title => :all, :value => nil}] + filters)

Fix translation for fiscal period filter.

- filter_name = :by_value_period
- define_filter filter_name do
  - filters = current_tenant.fiscal_years.reverse.map do |period|
    - value = {"from" => period[:from].to_s(:db), "to" => period[:to].to_s(:db)}
    - {:value => value, :title => period[:to].year}
  = boot_nav_filter(filter_name, [{:title => t('bookyt.all'), :value => nil}] + filters)


-# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-# Created By: ivan@reciprocitylabs.com
-# Maintained By: ivan@reciprocitylabs.com

-extends "mockups/base.haml"

-block title
  Mockups

-block main
  %div{"style": "width: 30%; margin: 3em auto 0; padding: 2em; background: white; border: 1px solid #ccc"}
    %h2 Mockup links
    %ul
      %li
        %a{"href": '/mockups/request'}
          Request mockup
      %li
        %a{"href": '/mockups/assessor'}
          Assessor mockup
      %li
        %a{"href": '/mockups/workflow'}
          Workflow mockup

Add new mockup on list

-# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>
-# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
-# Created By: ivan@reciprocitylabs.com
-# Maintained By: ivan@reciprocitylabs.com

-extends "mockups/base.haml"

-block title
  Mockups

-block main
  %div{"style": "width: 30%; margin: 3em auto 0; padding: 2em; background: white; border: 1px solid #ccc"}
    %h2 Mockup links
    %ul
      %li
        %a{"href": '/mockups/request'}
          Request mockup
      %li
        %a{"href": '/mockups/assessor'}
          Assessor mockup
      %li
        %a{"href": '/mockups/workflow'}
          Workflow mockup
      %li
        %a{"href": '/mockups/quick-workflow'}
          Quick workflow creation mockup