= semantic_form_for @booking_template do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :amount, :input_html => {"data-autofocus" => true, :size => 12, :style => 'text-align: right'}
    = f.input :title
    = f.input :credit_account
    = f.input :debit_account
    = f.input :comments, :input_html => {:rows => 5}
  = f.buttons do
    = f.commit_button

Add code field to booking template form.

= semantic_form_for @booking_template do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :amount, :input_html => {"data-autofocus" => true, :size => 12, :style => 'text-align: right'}
    = f.input :code
    = f.input :title
    = f.input :credit_account
    = f.input :debit_account
    = f.input :comments, :input_html => {:rows => 5}
  = f.buttons do
    = f.commit_button


- exists = Site.table_exists?
- not_blank = current_site.respond_to?(:analytics_code) and !current_site.analytics_code.blank?
- if exists and not_blank
  :javascript
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '#{current_site.analytics_code}']);
    _gaq.push(['_trackPageview']);
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

Replace Google Analytics snippet by Piwik's snippet for UFRGS

- if Rails.env.production?
  :javascript
    var _paq = _paq || [];
    _paq.push(['trackPageView']);
    _paq.push(['enableLinkTracking']);
    (function() {
      var u="//stats.ufrgs.br/piwik/";
      _paq.push(['setTrackerUrl', u+'piwik.php']);
      _paq.push(['setSiteId', 62]);
      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
      g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
    })();
  %noscript
    %p
      %img{ src: "//stats.ufrgs.br/piwik/piwik.php?idsite=62", style: "border:0;", alt: ""}


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

    - if user_signed_in?
      .g
        %main.g-b.g-b--2of3
          .split.search-bar.mbm
            .split-item
              .split-cell.split-cell--fluid.prm
                = form_tag articles_path, method: :get, remote: true do
                  = search_field_tag :search, params[:search], placeholder: "Search articles by keyword", class: 'form-input'
              .split-cell.split-cell--fixed
                = link_to "New Article", new_article_url, class: 'btn btn--a'
          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }

Apply inline Form styles to search bar and button

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

    - if user_signed_in?
      .g
        %main.g-b.g-b--2of3
          .split.search-bar.mbm
            .form.form--inline.split-item
              .split-cell.split-cell--fluid.prm
                = form_tag articles_path, method: :get, remote: true do
                  = search_field_tag :search, params[:search], placeholder: "Search articles by keyword", class: 'form-input'
              .split-cell.split-cell--fixed
                = link_to "New Article", new_article_url, class: 'btn btn--a form-btn'
          %ul.list.js-article-list
            = render @articles

        %aside.g-b.g-b--1of3
          = render "tags/tag_categories", tags: @tags

          = link_to "Archived Articles (#{Article.archived.count})", archived_articles_path

    - else
      %h1
        = link_to "Please Log in to Continue", login_path, data: { no_turbolink: true }


%footer.universal-footer
  .footer-content
    .footer-links-left
      %ul
        %li= link_to "Ministries", ministries_smart_path(current_page.path),
          class: "scroll scroll-on-page-link"
        %li= link_to "Our Team", "/team"
        %li= link_to "Meet Jesus", "/jesus"
        %li= link_to "Doctrine", "/doctrine"
    .footer-links-right
      %ul
        %li= link_to "About", "/about"
        %li= link_to "Our Approach", "/approach"
        %li= link_to "Contact", "/contact"
        %li= link_to "Donate", "/donate"
    .footer-logo
      = link_to home_smart_path(current_page.path), class: "home-back-to-top" do
        = inline_svg "logo-full-white.svg", class: "logo"
  %hr
  %p
    Have you met Jesus? We’d love to
    %br.link-break
    = succeed "." do
      = link_to "introduce you", "/jesus"

Add blog link to footer.

%footer.universal-footer
  .footer-content
    .footer-links-left
      %ul
        %li= link_to "Ministries", ministries_smart_path(current_page.path),
          class: "scroll scroll-on-page-link"
        %li= link_to "Our Team", "/team"
        %li= link_to "Meet Jesus", "/jesus"
        %li= link_to "Blog", "/blog"
        %li= link_to "Doctrine", "/doctrine"
    .footer-links-right
      %ul
        %li= link_to "About", "/about"
        %li= link_to "Our Approach", "/approach"
        %li= link_to "Contact", "/contact"
        %li= link_to "Donate", "/donate"
    .footer-logo
      = link_to home_smart_path(current_page.path), class: "home-back-to-top" do
        = inline_svg "logo-full-white.svg", class: "logo"
  %hr
  %p
    Have you met Jesus? We’d love to
    %br.link-break
    = succeed "." do
      = link_to "introduce you", "/jesus"


.help
  -if CMS_CONFIG["ALLOW_HELP_EDIT"]
    %a.widgetbtn.fltrt{:'data-toggle' => 'collapse', :href => '#helpedit'}
      %i.grcicon-edit-grey
  -if @help && !@help.content.blank?
    -content_for :modal_title do
      -if @help.title.present?
        =@help.title
      -else
        =@help_slug.humanize
        Help
    .help-content
      =display_as_html @help.content
  -else
    -content_for :modal_title do
      GRC Help
    %p This content is coming soon.  We are working on it.

-if CMS_CONFIG["ALLOW_HELP_EDIT"]
  #helpedit.collapse
    .row-fluid
      .well
        =form_for @help, :url => update_help_path, :method => :post, :remote => true do |f|
          =f.label :help_title
          =f.text_field :title, :class => 'span12'
          =f.label :help_content
          =f.text_area :content, :class => 'span12 double wysihtml5'
          .row-fluid
            .span12
              =f.submit :Save, :class => 'btn btn-warning pull-right'
          =f.hidden_field :slug

=render :partial => "shared/wysihtml5"

Fix initial help edit to display changes correctly

.help
  -if CMS_CONFIG["ALLOW_HELP_EDIT"]
    %a.widgetbtn.fltrt{:'data-toggle' => 'collapse', :href => '#helpedit'}
      %i.grcicon-edit-grey
  -if @help && !@help.content.blank?
    -content_for :modal_title do
      -if @help.title.present?
        =@help.title
      -else
        =@help_slug.humanize
        Help
    .help-content
      =display_as_html @help.content
  -else
    -content_for :modal_title do
      GRC Help
    .help-content
      %p This content is coming soon.  We are working on it.

-if CMS_CONFIG["ALLOW_HELP_EDIT"]
  #helpedit.collapse
    .row-fluid
      .well
        =form_for @help, :url => update_help_path, :method => :post, :remote => true do |f|
          =f.label :help_title
          =f.text_field :title, :class => 'span12'
          =f.label :help_content
          =f.text_area :content, :class => 'span12 double wysihtml5'
          .row-fluid
            .span12
              =f.submit :Save, :class => 'btn btn-warning pull-right'
          =f.hidden_field :slug

=render :partial => "shared/wysihtml5"


%ul.actions
  %li= link_to('back', administer_dashboard_index_path)
  %li= link_to("New #{model_class.model_name.human}", new_administer_entity_path(:model_name => model_class.model_name))
%h1= model_class.model_name.human.pluralize
%table.items_list
  %thead
    %tr
    - model_class.column_names.each do |column_name|
      %th= column_name

  %tbody
    - @collection.each do |object|
      %tr{:class => cycle('odd', 'even')}
      - model_class.column_names.each do |column_name|
        %td= object.send(column_name).to_s

Fix haml indenting in entities/index view


%table.char
  %tbody
    %tr.colnames
      %td Name
    - if @character.current_title && @character.titles
      - TitleHelper::sorted_titles(@character.titles).each do |title|
        %tr
          %td
            - if title == TitleHelper::get_title_name(@character.current_title)
              %span.current_title= title
            - else
              %span= title
    - else
      %tr
        %td No titles.

Add title count row to titles pane

%table.char
  %tbody
    -unless @character.titles.nil?
      %tr
        %td.specialized= "Title count: #{@character.titles.length}"
    %tr.colnames
      %td Name
    - if @character.current_title && @character.titles
      - TitleHelper::sorted_titles(@character.titles).each do |title|
        %tr
          %td
            - if title == TitleHelper::get_title_name(@character.current_title)
              %span.current_title= title
            - else
              %span= title
    - else
      %tr
        %td No titles.


.landing-container

:javascript
  if (Portal.currentUser.isAnonymous) {
    PortalPages.renderSignupModal({});
  } else {
    window.location.href = "/";
  }

Add oauth providers to new user signup view.

.landing-container

:javascript
  if (Portal.currentUser.isAnonymous) {
    PortalPages.renderSignupModal({ oauthProviders: Portal.oauthProviders });
  } else {
    window.location.href = "/";
  }


= field_set_tag nil, id: 'service_area-name-options', class: 'input-search-filter' do
  = label_tag 'service_area', t('labels.select_county')
  = select_tag :service_area, options_for_select([['All', ''], ['Adams'], ['Asotin'], ['Benton'], ['Chelan'], ['Clallam'], ['Clark'], ['Colombia'], ['Cowlitz'], ['Douglas'], ['Ferry'], ['Franklin'], ['Garfield'], ['Grant'], ['Grays Harbor'], ['Island'], ['Jefferson'], ['King'], ['Kitsap'], ['Kittitas'], ['Klickitat'], ['Lewis'], ['Lincoln'], ['Mason'], ['Okanogan'], ['Pacific'], ['Pend Oreille'], ['Pierce'], ['San Juan'], ['Skagit'], ['Skamania'], ['Snohomish'], ['Spokane'], ['Stevens'], ['Thurston'], ['Wakiakum'], ['Walla Walla'], ['Whatcom'], ['Whitman'], ['Yakima']], params[:service_area])

Fix Wahkiakum County Spelling in County Selector

= field_set_tag nil, id: 'service_area-name-options', class: 'input-search-filter' do
  = label_tag 'service_area', t('labels.select_county')
  = select_tag :service_area, options_for_select([['All', ''], ['Adams'], ['Asotin'], ['Benton'], ['Chelan'], ['Clallam'], ['Clark'], ['Colombia'], ['Cowlitz'], ['Douglas'], ['Ferry'], ['Franklin'], ['Garfield'], ['Grant'], ['Grays Harbor'], ['Island'], ['Jefferson'], ['King'], ['Kitsap'], ['Kittitas'], ['Klickitat'], ['Lewis'], ['Lincoln'], ['Mason'], ['Okanogan'], ['Pacific'], ['Pend Oreille'], ['Pierce'], ['San Juan'], ['Skagit'], ['Skamania'], ['Snohomish'], ['Spokane'], ['Stevens'], ['Thurston'], ['Wahkiakum'], ['Walla Walla'], ['Whatcom'], ['Whitman'], ['Yakima']], params[:service_area])


- provide(:title, generate_title("Inbox"))
.container.j2-page
  .row
    .col-md-3.col-xs-12.col-sm-4.hidden-xs
      = render 'inbox/sidebar'
    .col-md-9.col-xs-12.col-sm-8
      = render 'layouts/messages'
      #entries
        - @inbox.each do |i|
          = render 'inbox/entry', i: i

        - if @inbox.empty?
          = t 'views.inbox.empty'

      #pagination= will_paginate @inbox, renderer: BootstrapPagination::Rails, page_links: false

      - if @inbox.next_page
        %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @inbox.current_page }}
          = t 'views.actions.load'

    .col-md-9.col-xs-12.col-sm-8.visible-xs
      = render 'inbox/sidebar'

= render "shared/links"
- Inbox.where(id: @inbox.ids).update_all(new: false)

Convert visibility classes to Bootstrap 4

- provide(:title, generate_title("Inbox"))
.container.j2-page
  .row
    .col-md-3.col-xs-12.col-sm-4.d-none.d-sm-block
      = render 'inbox/sidebar'
    .col-md-9.col-xs-12.col-sm-8
      = render 'layouts/messages'
      #entries
        - @inbox.each do |i|
          = render 'inbox/entry', i: i

        - if @inbox.empty?
          = t 'views.inbox.empty'

      #pagination= will_paginate @inbox, renderer: BootstrapPagination::Rails, page_links: false

      - if @inbox.next_page
        %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @inbox.current_page }}
          = t 'views.actions.load'

    .col-md-9.col-xs-12.col-sm-8.d-block.d-sm-none
      = render 'inbox/sidebar'

= render "shared/links"
- Inbox.where(id: @inbox.ids).update_all(new: false)


- if current_user
  Welcome, #{current_user.email}
  |
  = link_to "Log Out", destroy_user_session_path, :method => :delete
  -if can? :manage, User
    |
    = link_to "User Admin", admin_users_path
  -if can? :manage, Theme
    |
    = link_to "Themes", themes_path
  -if can? :manage, Project
    |
    = link_to "Projects", projects_path
  -if can? :manage, User
    |
    = link_to "Failed runs", dirty_runs_path
- else
  = link_to "Log In", new_user_session_path

Revert "Login path links to account picker"

- if current_user
  Welcome, #{current_user.email}
  |
  = link_to "Log Out", destroy_user_session_path, :method => :delete
  -if can? :manage, User
    |
    = link_to "User Admin", admin_users_path
  -if can? :manage, Theme
    |
    = link_to "Themes", themes_path
  -if can? :manage, Project
    |
    = link_to "Projects", projects_path
  -if can? :manage, User
    |
    = link_to "Failed runs", dirty_runs_path
- else
  = link_to "Log In", user_omniauth_authorize_path(:concord_portal)


- if current_user.has_permission(:constitution_proposal)
  =form(:controller => 'proposals', :action => 'create_assets_amendment') do
    %div.constitution_proposal
      %p.reveal_link
        %a{:href => '#'}
          Propose adding a clause to allow holding of assets
      %div.proposal_form{:style => 'display: none;'}
        %p
          Propose that the organisation should be allowed to hold, transfer or dispose of material assets and intangible assets.
        %input{:type => 'hidden', :name => 'new_assets_value', :value => '1'}
        %p
          = submit_tag "Propose change", :id => 'submit'
        %p
          %a{:href => '#', :class => 'cancel_link'}
            Cancel

Fix deprecation warning: should use form_tag for form not backed by a model.

- if current_user.has_permission(:constitution_proposal)
  = form_tag(:controller => 'proposals', :action => 'create_assets_amendment') do
    %div.constitution_proposal
      %p.reveal_link
        %a{:href => '#'}
          Propose adding a clause to allow holding of assets
      %div.proposal_form{:style => 'display: none;'}
        %p
          Propose that the organisation should be allowed to hold, transfer or dispose of material assets and intangible assets.
        %input{:type => 'hidden', :name => 'new_assets_value', :value => '1'}
        %p
          = submit_tag "Propose change", :id => 'submit'
        %p
          %a{:href => '#', :class => 'cancel_link'}
            Cancel


%p Bonjour,

%p Vous avez demandé à vous désinscrire des listes de diffusion Gadz.org.

.txtcenter.bouton.bouton_bleu
  =link_to "Selectionner mes listes de diffusion", unsubscribe_url(@token) ,:class => "bouton bouton_orange_1 txtcenter"

%p
  Si ce lien ne fonctionne pas, copiez l'adresse suivante puis collez-la dans une nouvelle fenêtre de navigateur :
%p=unsubscribe_token_url(@token)

%p Vous pourrez sélectionner les listes de diffusion dont vous souhaitez vous désabonner

%p.small
  Si vous n'êtes pas à l'origine de cette demande, vous pouvez simplement l'ignorer

Fix link in unsubscribe mail button

%p Bonjour,

%p Vous avez demandé à vous désinscrire des listes de diffusion Gadz.org.

.txtcenter.bouton.bouton_bleu
  =link_to "Selectionner mes listes de diffusion", unsubscribe_token_url(@token) ,:class => "bouton bouton_orange_1 txtcenter"

%p
  Si ce lien ne fonctionne pas, copiez l'adresse suivante puis collez-la dans une nouvelle fenêtre de navigateur :
%p=unsubscribe_token_url(@token)

%p Vous pourrez sélectionner les listes de diffusion dont vous souhaitez vous désabonner

%p.small
  Si vous n'êtes pas à l'origine de cette demande, vous pouvez simplement l'ignorer


- cache :overview_index do
  // 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)

Include current_user.locale in cache key for overview_indes.

- cache [:overview_index, current_user.try(:locale)] do
  // 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)


.page-footer
  .social
    #fb-root
    %script{defer: true}
      :plain
        window.fbAsyncInit = function() {
          FB.init({
            appId: "#{ENV['FACEBOOK_APP_ID']}",
            status: true,
            cookie: true,
            xfbml: true
          });
        };
        (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    .fb-share-button{data:{href: 'http://www.isomething.co.uk', type: 'button_count'}}
  .credits
    .text-muted
      :markdown
        iSomething was created by [Ben Basson](http://github.com/benbasson/isomething) |
        Weather icons ©2010-2014 [umutavci](http://umutavci.deviantart.com/art/weather-icon-set-165476034) |
        Weather data provided by [The Met Office](http://www.metoffice.gov.uk/)

Change link from GitHub to personal website.

.page-footer
  .social
    #fb-root
    %script{defer: true}
      :plain
        window.fbAsyncInit = function() {
          FB.init({
            appId: "#{ENV['FACEBOOK_APP_ID']}",
            status: true,
            cookie: true,
            xfbml: true
          });
        };
        (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));
    .fb-share-button{data:{href: 'http://www.isomething.co.uk', type: 'button_count'}}
  .credits
    .text-muted
      :markdown
        iSomething was created by Ben Basson |
        Weather icons ©2010-2014 [umutavci](http://umutavci.deviantart.com/art/weather-icon-set-165476034) |
        Weather data provided by [The Met Office](http://www.metoffice.gov.uk/)


#main_div
  - case @showtype
    - when "details"
      = render(:partial => "layouts/gtl", :locals => {:action_url => @lastaction})
    - when "item"
      = render(:partial => "layouts/#{@showtype}")
    - else
      - if %w(instances security_groups).include?(@display)
        = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@orchestration_stack.id}"}
      - else
        = render :partial => @showtype

Fix indentation of case block


- if @user.admin?
  %li.dropdown
    %button.btn.navbar-btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown"}
      Admin
      %i.fa.fa-caret-down
    %ul.dropdown-menu
      %li.dropdown-header Settings
      %li
        = link_to admin_settings_url do
          %i.fa.fa-cog.fa-fw
          Edit Settings
      %li
        = link_to admin_views_url do
          %i.fa.fa-th-list.fa-fw
          Setup Views
      %li
        = link_to admin_stats_url do
          %i.fa.fa-bar-chart-o.fa-fw
          Statistics
      - if Rails.env == "development"
        %li
          = link_to admin_test_login_url, :title => "Click to change user" do
            %i.fa.fa-user.fa-fw
            Change User
      - if @topic.kind_of? Person
        %li.divider
        %li.dropdown-header
          Data for
          = @topic.name
        %li
          = link_to MdlGradeTrack.user_url(@topic.username) do
            %i.fa.fa-file-code-o.fa-fw
            Moodle Grade Track XML
        %li
          = link_to admin_sync_grade_tracks_url(:person_id => @topic.mis_id) do
            %i.fa.fa-bar-chart.fa-fw
            Sync Moodle Grade Tracks

Put the refresh link on admin menu

- if @user.admin?
  %li.dropdown
    %button.btn.navbar-btn.btn-default.dropdown-toggle{"data-toggle" => "dropdown"}
      Admin
      %i.fa.fa-caret-down
    %ul.dropdown-menu
      %li.dropdown-header Settings
      %li
        = link_to admin_settings_url do
          %i.fa.fa-cog.fa-fw
          Edit Settings
      %li
        = link_to admin_views_url do
          %i.fa.fa-th-list.fa-fw
          Setup Views
      %li
        = link_to admin_stats_url do
          %i.fa.fa-bar-chart-o.fa-fw
          Statistics
      - if Rails.env == "development"
        %li
          = link_to admin_test_login_url, :title => "Click to change user" do
            %i.fa.fa-user.fa-fw
            Change User
      - if @topic.kind_of? Person
        %li.divider
        %li.dropdown-header
          Data for
          = @topic.name
        %li
          = link_to params.merge(:refresh => true) do
            %i.fa.fa-refresh.fa-fw
            Refresh from MIS
        %li
          = link_to MdlGradeTrack.user_url(@topic.username) do
            %i.fa.fa-file-code-o.fa-fw
            Moodle Grade Track XML
        %li
          = link_to admin_sync_grade_tracks_url(:person_id => @topic.mis_id) do
            %i.fa.fa-bar-chart.fa-fw
            Sync Moodle Grade Tracks


.container
  .content
    = render :partial => 'running'

    %table#recent-jobs
      %thead
        %tr
          %th #
          %th Revision
          %th Author
          %th Log
          %th Started
          %th Time taken
          %th Status
      %tbody
        - @project.recent_builds(30).each do |build|
          %tr
            %td
              = build_link_to build, @project

            %td
              = revision_link_to build.vcs_url, build.vcs_revision, build.branch

            %td
              = mail_to build.author_email, build.author_name

            %td
              - if build.body.to_s != "" # ignore nil and empty
                = link_to build.subject, "#", { :title => build.body }
              - else
                = build.subject

            %td
              = as_commit_time build.start_time

            %td
              = as_length_of_build build.start_time, build.stop_time
              - if build.status == :running
                (still running)

            %td
              != bootstrap_status build

Use a wider page for the project page.

.container-fluid
  = render :partial => 'running'

  %table#recent-jobs
    %thead
      %tr
        %th #
        %th Revision
        %th Author
        %th Log
        %th Started
        %th Time taken
        %th Status
    %tbody
      - @project.recent_builds(30).each do |build|
        %tr
          %td
            = build_link_to build, @project

          %td
            = revision_link_to build.vcs_url, build.vcs_revision, build.branch

          %td
            = mail_to build.author_email, build.author_name

          %td
            - if build.body.to_s != "" # ignore nil and empty
              = link_to build.subject, "#", { :title => build.body }
            - else
              = build.subject

          %td
            = as_commit_time build.start_time

          %td
            = as_length_of_build build.start_time, build.stop_time
            - if build.status == :running
              (still running)

          %td
            != bootstrap_status build


- breadcrumb :settings, current_project

= render 'settings_common_header'

.tab-content
  - if can? :manage, current_project
    .well
      %strong Delete project from Testributor (cannot be reverted):
      = link_to "Delete", project_path(current_project), method: :delete,
        data: { confirm: "'#{current_project.name}' project will be deleted. Are you sure?" },
        class: 'btn btn-danger'

Add alert message in general settings for non-owner users

- breadcrumb :settings, current_project

= render 'settings_common_header'

.tab-content
  - if can? :manage, current_project
    .well
      %strong Delete project from Testributor (cannot be reverted):
      = link_to "Delete", project_path(current_project), method: :delete,
        data: { confirm: "'#{current_project.name}' project will be deleted. Are you sure?" },
        class: 'btn btn-danger'
  - else
    - # Remove this when we add general settings which the non-owner users can change
    .alert.alert-danger Only the owner of this project can edit these settings


.jumbotron
  %h1 The Art World in Your App
  .p
    The Artsy API provides open access to public domain works on artsy.net for educational and other non-commercial purposes. It's currently only available for playing, testing and learning only. Please contact us for all other inquiries.
  .p
    = link_to "Ready? Start Here", start_path, class: 'btn btn-primary btn-lg'
    = link_to 'Subscribe to the Dev Mailing List', 'http://groups.google.com/group/artsy-api-developers/subscribe', target: '_blank', class: 'btn btn-default btn-lg', id: 'subscribe_link'
  .p
    By using this API you agree to the API Terms of Use.

.alert.alert-danger
  Note that the API is in super early beta and is currently only available for testing, playing and learning. It's not yet suitable for production, has limited scope and will likely change.

.alert.alert-success
  Please do
  =link_to 'email us', 'mailto:engineering@artsy.net?subject=Artsy%20API%20Feedback'
  and tell us what you want to build or if you have any other feedback. We can't wait to see what you build!

Clarify available uses and content.

.jumbotron
  %h1 The Art World in Your App
  .p
    The Artsy API provides access to images of historic artwork and related information on artsy.net for educational and other non-commercial purposes. It's currently available for playing, testing, and learning only, and not for production. Please contact us for all other inquiries.
  .p
    = link_to "Ready? Start Here", start_path, class: 'btn btn-primary btn-lg'
    = link_to 'Subscribe to the Dev Mailing List', 'http://groups.google.com/group/artsy-api-developers/subscribe', target: '_blank', class: 'btn btn-default btn-lg', id: 'subscribe_link'
  .p
    By accessing the API, you agree to our API Terms of Use.

.alert.alert-danger
  Note that the API is in super early beta and is currently available for internal, experimental use only. It's not available for production at this time, has limited scope, and will likely change.

.alert.alert-success
  Please do
  =link_to 'email us', 'mailto:engineering@artsy.net?subject=Artsy%20API%20Feedback'
  and tell us what you want to build or if you have any other feedback. We can't wait to see what you build!


%h1= @page_title

- if can?(:new, <%= class_name %>)
  %p.text-right= link_to 'New <%= human_name %>', <%= new_path %>, class: 'btn btn-primary'

- if @datatable.present?
  = render_datatable_scopes(@datatable)
  = render_datatable(@datatable)
- else
  %p There are no <%= plural_name %>.

Hide new button on index if no new action

%h1= @page_title

<%- if actions.include?('new') %>
- if can?(:new, <%= class_name %>)
  %p.text-right= link_to 'New <%= human_name %>', <%= new_path %>, class: 'btn btn-primary'

<% end -%>
- if @datatable.present?
  = render_datatable_scopes(@datatable)
  = render_datatable(@datatable)
- else
  %p There are no <%= plural_name %>.


%dt
  %dd{role: "menuitem"}
    = link_to "ClinSumm", clinical_summary_patient_path(@patient), title: "Clinical Summary"
  %dd{role: "menuitem"}
    = link_to "Admin", demographics_patient_path(@patient), title: "Demographics"
  %dd{role: "menuitem"}
    = link_to "Modals", patient_modalities_path(@patient), title: "Patient Modality"
  %dd{role: "menuitem"}
    = link_to "Problems (#{@patient.problems.length})", problems_patient_path(@patient), title: "Manage Problems"
  %dd{role: "menuitem"}
    = link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title: "Manage Medications"
  %dd{role: "menuitem"}
    = link_to "Events (#{@patient.events.length})", patient_events_path(@patient), title: "Patient Events"
  %dd{role: "menuitem"}
    = link_to "Clinic Visits (#{@patient.clinic_visits.length})", patient_clinic_visits_path(@patient), title: "Clinic Visits"

Add 'Letters' link to patient subnav menu

%dt
  %dd{role: "menuitem"}
    = link_to "ClinSumm", clinical_summary_patient_path(@patient), title: "Clinical Summary"
  %dd{role: "menuitem"}
    = link_to "Admin", demographics_patient_path(@patient), title: "Demographics"
  %dd{role: "menuitem"}
    = link_to "Modals", patient_modalities_path(@patient), title: "Patient Modality"
  %dd{role: "menuitem"}
    = link_to "Problems (#{@patient.problems.length})", problems_patient_path(@patient), title: "Manage Problems"
  %dd{role: "menuitem"}
    = link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title: "Manage Medications"
  %dd{role: "menuitem"}
    = link_to "Events (#{@patient.events.length})", patient_events_path(@patient), title: "Patient Events"
  %dd{role: "menuitem"}
    = link_to "Clinic Visits (#{@patient.clinic_visits.length})", patient_clinic_visits_path(@patient), title: "Clinic Visits"
  %dd{role: "menuitem"}
    = link_to "Letters (#{@patient.letters.length})", patient_letters_path(@patient), title: "Letters"


- if categories.present?
  %h3.related-categories 関連カテゴリ
  %ol.related-categories
    - categories.each do |category|
      - with_breadcrumb :category, category do
        %li
          = render 'application/breadcrumbs', options: {link_current: true, microdata: false}

Add class to apply style

- if categories.present?
  %h3.related-category__caption 関連カテゴリ
  %ol.related-category
    - categories.each do |category|
      - with_breadcrumb :category, category do
        %li.related-category__item
          = render 'application/breadcrumbs', options: {link_current: true, microdata: false}


%tr{:class => "#{cycle('odd', 'even')}"}[ledger_item]
  %td.date
    = ledger_item.transacted_on.to_s(:rfc822)
  %td.details
    %strong= link_to truncate(ledger_item.account.name), ledger_item.account
    - if ledger_item.matchable?
      Sent by
      = link_to(truncate(ledger_item.sender.name), contact_path(ledger_item.sender))
      to
      = link_to(truncate(ledger_item.recipient.name), contact_path(ledger_item.recipient))
      - if ledger_item.matched?
        and
        = link_to("posted against #{ledger_item.matches.collect{ |m| m.account.name }.join(", ")}", ledger_item.match)
  %td.description
    = ledger_item.description
  %td.currency
    = monetize(ledger_item.total_amount, ledger_item.currency)
  %td.last
    - if ledger_item.matchable? && !ledger_item.matched? && !@cart.ledger_items.include?(ledger_item)
      = link_to("Match", add_to_cart_path(:id => ledger_item.id), :class => "highlight")
      |
    = link_to 'Edit', edit_ledger_item_path(ledger_item), :class => (!ledger_item.matchable? ? "highlight" : "")

Truncate account name a little less

%tr{:class => "#{cycle('odd', 'even')}"}[ledger_item]
  %td.date
    = ledger_item.transacted_on.to_s(:rfc822)
  %td.details
    %strong= link_to truncate(ledger_item.account.name, :length => 40), ledger_item.account
    - if ledger_item.matchable?
      Sent by
      = link_to(truncate(ledger_item.sender.name), contact_path(ledger_item.sender))
      to
      = link_to(truncate(ledger_item.recipient.name), contact_path(ledger_item.recipient))
      - if ledger_item.matched?
        and
        = link_to("posted against #{ledger_item.matches.collect{ |m| m.account.name }.join(", ")}", ledger_item.match)
  %td.description
    = ledger_item.description
  %td.currency
    = monetize(ledger_item.total_amount, ledger_item.currency)
  %td.last
    - if ledger_item.matchable? && !ledger_item.matched? && !@cart.ledger_items.include?(ledger_item)
      = link_to("Match", add_to_cart_path(:id => ledger_item.id), :class => "highlight")
      |
    = link_to 'Edit', edit_ledger_item_path(ledger_item), :class => (!ledger_item.matchable? ? "highlight" : "")


.song-item.d-flex.flex-column.flex-md-row.align-items-md-center
  - if song.watchable?(current_user)
    .song-thumbnail.text-center.mb-2.mb-md-0.mr-md-3
      = link_to song_path(song, format: :js), remote: true do
        = image_tag song.youtube_thumbnail
  .song-info
    = link_to song.live_title, song.live unless current_page?(song.live) || params[:controller] == 'entries'
    = song.time_order
    %h4
      = song.title
      %small= '(オリジナル曲)' if song.original?
      = status_icon(song) if current_user&.played?(song)
    %ul.list-inline.mb-2
      = render song.playings.sort_by(&:inst_order)
    = simple_format(song.comment) if song.comment?
    = link_to icon('pencil') + ' Edit', edit_song_path(song) if song.editable?(current_user)

Add link to song detail

.song-item.d-flex.flex-column.flex-md-row.align-items-md-center
  - if song.watchable?(current_user)
    .song-thumbnail.text-center.mb-2.mb-md-0.mr-md-3
      = link_to song_path(song, format: :js), remote: true do
        = image_tag song.youtube_thumbnail
  .song-info
    = link_to song.live_title, song.live unless current_page?(song.live) || params[:controller] == 'entries'
    = current_page?(song) ? song.time_order : link_to(song.time_order, song)
    %h4
      = song.title
      %small= '(オリジナル曲)' if song.original?
      = status_icon(song) if current_user&.played?(song)
    %ul.list-inline.mb-2
      = render song.playings.sort_by(&:inst_order)
    = simple_format(song.comment) if song.comment?
    = link_to icon('pencil') + ' Edit', edit_song_path(song) if song.editable?(current_user)


%tr
  -if user.respond_to? :login
    %td= user.login
  %td= user.to_s
  %td= link_to user.email, user, 'data-href-container' => 'tr'
  %td= user.roles.join(', ')
  %td= user.last_sign_in_at if Devise.mappings[:user].trackable?
  %td= user.locked_at if Devise.mappings[:user].lockable?

  %td.action-links
    =link_to t_action(:edit), edit_resource_url(user)
    =link_to t_action(:lock), lock_user_path(user), :method => :post if Devise.mappings[:user].lockable? && !user.locked_at?
    =link_to t_action(:unlock), unlock_user_path(user), :method => :post if Devise.mappings[:user].lockable? && user.locked_at?
    =link_to t_action(:delete), resource_url(user), :confirm => t_confirm_delete(user), :method => :delete

Use list_link_to helper in user list partials.

%tr
  -if user.respond_to? :login
    %td= user.login
  %td= user.to_s
  %td= link_to user.email, user, 'data-href-container' => 'tr'
  %td= user.roles.join(', ')
  %td= user.last_sign_in_at if Devise.mappings[:user].trackable?
  %td= user.locked_at if Devise.mappings[:user].lockable?

  %td.action-links
    = list_link_to :edit, user
    = list_link_to :lock, user, :method => :post if Devise.mappings[:user].lockable? && !user.locked_at?
    = list_link_to :unlock, user, :method => :post if Devise.mappings[:user].lockable? && user.locked_at?
    = list_link_to :delete, user, :confirm => t_confirm_delete(user), :method => :delete


!!!
%html{ class: "bg-#{(rand() * 3).to_i + 1}"}
  %head
    %title Tahi
    = stylesheet_link_tag "auth", media: "all"
    = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = csrf_meta_tags
    = render 'layouts/segment_io'
  %body.sessions
    #tahi-container{class: yield(:tahi_container_class)}
      = yield

Load fonts over SSL if available

!!!
%html{ class: "bg-#{(rand() * 3).to_i + 1}"}
  %head
    %title Tahi
    = stylesheet_link_tag "auth", media: "all"
    = stylesheet_link_tag "//fonts.googleapis.com/css?family=Cabin:400,700,400italic"
    = csrf_meta_tags
    = render 'layouts/segment_io'
  %body.sessions
    #tahi-container{class: yield(:tahi_container_class)}
      = yield


%h4.project-list-item{:id => "project-#{index}"}
  = link_to project_path(@episode, project) do
    = image_tag(project.avatar.url(:thumb), width: '20')
    = project.title

%p{:style=>"margin-top: -10px"}
  %small
    = render :partial => "projects/state_name", :locals => {:project => project }
    by
    = link_to(user_path(project.originator.id)) do
      #{project.originator.name}
      = render :partial => "projects/like_button", :locals => {:project => project }
:markdown
  #{truncate(project.description, length: 140)}
- unless project.users.empty?
  .well.well-sm
    - project.users.each do |user|
      = link_to user_path(user) do
        = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
%span.help-block
  %small
    = render :partial => "projects/info", :locals => {:project => project }

Replace partial rendering with decorator calls in projects/list_item

%h4.project-list-item{:id => "project-#{index}"}
  = link_to project_path(@episode, project) do
    = image_tag(project.avatar.url(:thumb), width: '20')
    = project.title

%p{:style=>"margin-top: -10px"}
  %small
    = project.state_name
    by
    = link_to(user_path(project.originator.id)) do
      #{project.originator.name}
      = project.like_button
:markdown
  #{truncate(project.description, length: 140)}
- unless project.users.empty?
  .well.well-sm
    - project.users.each do |user|
      = link_to user_path(user) do
        = image_tag(user.gravatar_url(:size => "24"), :class => "img-thumbnail", :title => "#{user.name}", :alt => user.name)
%span.help-block
  %small
    = project.updated_at
    = project.kudos
    = project.grab_it_link


%ul.tabs
  %li.active= link_to t_model, '#tab-contact'
  %li= link_to t_model(Salary), '#tab-salaries'
  %li= link_to t_title(:list, Invoice), '#tab-invoices'
  %li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
  %li= link_to t_title(:list, Attachment), '#tab-attachments'

.tab-content
  #tab-contact.active= render "form"
  #tab-salaries= render 'show_salaries'
  #tab-invoices= render 'show_invoices'
  #tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
  #tab-attachments= render 'show_attachments'

Include timesheets tab in employee.

%ul.tabs
  %li.active= link_to t_model, '#tab-contact'
  %li= link_to t_model(Salary), '#tab-salaries'
  %li= link_to t_title(:list, Invoice), '#tab-invoices'
  %li= link_to t_title(:list, Activity), '#tab-activities' if Bookyt::Engine.engines.include?('bookyt_projects')
  %li= link_to t_title(:timesheet, Activity), '#tab-timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
  %li= link_to t_title(:list, Attachment), '#tab-attachments'

.tab-content
  #tab-contact.active= render "form"
  #tab-salaries= render 'show_salaries'
  #tab-invoices= render 'show_invoices'
  #tab-activities= render 'show_activities' if Bookyt::Engine.engines.include?('bookyt_projects')
  #tab-timesheet= render 'show_timesheet' if Bookyt::Engine.engines.include?('bookyt_projects')
  #tab-attachments= render 'show_attachments'


= render 'admin/sheets/upload_script'
.outset
  %table.index
    %thead
      %tr
        %th Javascript
        %th Filter
        %th Modify
    %tbody
      - unless models.blank?
        - models.each do |javascript|
          %tr
            %td.name
              = image('javascript')
              = link_to javascript.title, edit_admin_script_path(javascript)
            %td.filter= javascript.part('body').filter.filter_name
            %td.actions= link_to(image('minus') + ' ' + t('remove'), admin_script_url(javascript), :class => "action", :method => :delete, :confirm => "Is it OK to delete #{javascript.slug}?")
      - else
        %tr
          %td.empty{:colspan => 2}= t('no_scripts')

#actions
  = pagination_for(models)
  %ul
    %li= link_to image('plus') + " " + t("new_javascript"), new_admin_script_path, :class => 'action_button'
    %li
      = link_to image('upload') + ' ' + t("upload"), '#uploader', :class => 'replace action_button'
      #uploader.action_button
        - form_for :upload, :url => upload_admin_scripts_path, :html => { :class => 'button_form', :multipart => true } do |f|
          %span
            = f.label :upload, image('upload') + ' ' + t('upload')
            = f.file_field :upload
            = f.submit t('create_javascript')

Fix colspan for 'no scripts' td

= render 'admin/sheets/upload_script'
.outset
  %table.index
    %thead
      %tr
        %th Javascript
        %th Filter
        %th Modify
    %tbody
      - unless models.blank?
        - models.each do |javascript|
          %tr
            %td.name
              = image('javascript')
              = link_to javascript.title, edit_admin_script_path(javascript)
            %td.filter= javascript.part('body').filter.filter_name
            %td.actions= link_to(image('minus') + ' ' + t('remove'), admin_script_url(javascript), :class => "action", :method => :delete, :confirm => "Is it OK to delete #{javascript.slug}?")
      - else
        %tr
          %td.empty{:colspan => 3}= t('no_scripts')

#actions
  = pagination_for(models)
  %ul
    %li= link_to image('plus') + " " + t("new_javascript"), new_admin_script_path, :class => 'action_button'
    %li
      = link_to image('upload') + ' ' + t("upload"), '#uploader', :class => 'replace action_button'
      #uploader.action_button
        - form_for :upload, :url => upload_admin_scripts_path, :html => { :class => 'button_form', :multipart => true } do |f|
          %span
            = f.label :upload, image('upload') + ' ' + t('upload')
            = f.file_field :upload
            = f.submit t('create_javascript')


%li.highlight[sample]
  - if sample.state
    .strip{:class => sample.state}= t(short_state)
  - else
    .strip.white #{t :other}

  %ul.tools
    = "Edit | Delete"

  .indent
    %tt
      = "Sample " + sample.id.to_s
  = hook(:sample_bottom, self, :sample => sample)

Add created by tag to Sample list on Opp view

%li.highlight[sample]
  - if sample.state
    .strip{:class => sample.state}= t(short_state)
  - else
    .strip.white #{t :other}

  %ul.tools
    = "Edit | Delete"

  .indent
    %tt
      = "Sample " + sample.id.to_s
      –
      - user_name = sample.user.try(:full_name)
      - if user_name
        = t(:added_by, :time_ago => timeago(sample.created_at), :user => h(user_name)).html_safe
      - else
        = t(:added_ago, :value => timeago(sample.created_at)).html_safe
  = hook(:sample_bottom, self, :sample => sample)


- label = if options[:label_method].present?
  - resource.send(name).send(options[:label_method])
- else
  - resource.send(name)
- link_to = options[:link_to]
- case link_to
  - when Proc
    = link_to(label, link_to.call(resource))
  - when String
    = link_to(label, link_to)
  - when Symbol
    = link_to(label, send(link_to))
  - when nil
    = label

Fix error where missing associated object leads to exception.

- label = if options[:label_method].present?
  - resource.send(name).try(options[:label_method])
- else
  - resource.send(name)
- link_to = options[:link_to]
- case link_to
  - when Proc
    = link_to(label, link_to.call(resource))
  - when String
    = link_to(label, link_to)
  - when Symbol
    = link_to(label, send(link_to))
  - when nil
    = label


#top-page-header.page-header
  .container
    - if flash[:notice]
      .alert.alert-success.alert-dismissable
        %button{ type: 'button', class: 'close', data: {dismiss: 'alert'}, aria: {hiddeen: 'true'} }
          ×
        =h(flash[:notice])

    %h1
      オリジナル
      %span.attention プラン
      を作成し、みんなと
      %span.attention 共有
      しよう
  #new-plan-button
    = link_to 'New Plan!', new_plan_path, class: 'btn btn-primary btn-lg'
    %p PC専用
.container
  = render 'sns_button'
  .plans-list
    - if @plans
      - @plans.reverse.each do |plan|
        %li.top-list-title
          %h4= plan[:title]
          = link_to 'プランを見る', plan
          %p= '作成日' + plan.created_at.strftime('%Y/%m/%d %H:%M')
          .area-tags
            - (plan[:area_tags] || []).each do |tag|
              %span{ name: tag, class: 'label label-default' }= tag

Modify move '.alert.alert-success' to bottom

#top-page-header.page-header
  .container
    %h1
      オリジナル
      %span.attention プラン
      を作成し、みんなと
      %span.attention 共有
      しよう
  #new-plan-button
    = link_to 'New Plan!', new_plan_path, class: 'btn btn-primary btn-lg'
    %p PC専用
.container
  = render 'sns_button'
  - if flash[:notice]
    .alert.alert-success.alert-dismissable
      %button{ type: 'button', class: 'close', data: {dismiss: 'alert'}, aria: {hiddeen: 'true'} }
        ×
      =h(flash[:notice])

  .plans-list
    - if @plans
      - @plans.reverse.each do |plan|
        %li.top-list-title
          %h4= plan[:title]
          = link_to 'プランを見る', plan
          %p= '作成日' + plan.created_at.strftime('%Y/%m/%d %H:%M')
          .area-tags
            - (plan[:area_tags] || []).each do |tag|
              %span{ name: tag, class: 'label label-default' }= tag


%h3.page-title Background Jobs
%br
.ui-box
  %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
%h4 Sidekiq running processes
- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep`
- if sidekiq_processes.empty?
  %b There are no running sidekiq processes
  %b Please restart GitLab
- else
  .ui-box
    %table.zebra-striped
      %thead
        %th USER
        %th
        %th PID
        %th
        %th CPU
        %th
        %th MEM
        %th
        %th STATE
        %th
        %th START
        %th
        %th COMMAND
        %th
        - sidekiq_processes.split("\n").each do |process|
          - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
          - data = process.gsub!(/\s+/m, '|').strip.split('|')
          %tr
            - 6.times do
              %td= data.shift
              %td
            %td= data.join(" ")
  %b If '[25 of 25 busy]' is shown, restart GitLab.
  %br
  %b If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u git -f sidekiq) and restart GitLab.

Use `service gitlab reload` to restart sidekiq

%h3.page-title Background Jobs
%br
.ui-box
  %iframe{src: sidekiq_path, width: '100%', height: 900, style: "border: none"}
%h4 Sidekiq running processes
- sidekiq_processes = `ps -eo euser,pid,pcpu,pmem,stat,start,command | grep sidekiq | grep -v grep`
- if sidekiq_processes.empty?
  %b There are no running sidekiq processes
  %b Please restart GitLab
- else
  .ui-box
    %table.zebra-striped
      %thead
        %th USER
        %th
        %th PID
        %th
        %th CPU
        %th
        %th MEM
        %th
        %th STATE
        %th
        %th START
        %th
        %th COMMAND
        %th
        - sidekiq_processes.split("\n").each do |process|
          - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
          - data = process.gsub!(/\s+/m, '|').strip.split('|')
          %tr
            - 6.times do
              %td= data.shift
              %td
            %td= data.join(" ")
  %b If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'.
  %br
  %b If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u git -f sidekiq) and restart GitLab.


%h3 Confirm founding meeting
%p TODO: Text here about confirming that the founding meeting happened.

= form(:action => url(:controller => 'induction', :action => 'confirm_founding_meeting')) do
  %p Select the members who voted in favour.
  %ul.founding_members
    %li
      = check_box(:name => "members[#{@founding_member.id}]", :value => 1, :checked => true, :disabled => true, :label => @founding_member.name)
    - @other_members.each do |member|
      %li
        = check_box(:name => "members[#{member.id}]", :value => 1, :checked => false, :label => member.name)
  %p= submit("Confirm founding meeting, and found #{@organisation_name}")

%p
  %strong OR
  = link_to("Cancel this founding meeting, and change the organisation details.", url(:controller => 'induction', :action => 'restart_induction'))

Fix wording on induction/founding_meeting page.

%h3 Confirm results of founding meeting
%p Once you have had your founding meeting, you can come back here and confirm who voted in favour of founding the organisation.

= form(:action => url(:controller => 'induction', :action => 'confirm_founding_meeting')) do
  %p Select the members who voted in favour.
  %ul.founding_members
    %li
      = check_box(:name => "members[#{@founding_member.id}]", :value => 1, :checked => true, :disabled => true, :label => @founding_member.name)
    - @other_members.each do |member|
      %li
        = check_box(:name => "members[#{member.id}]", :value => 1, :checked => false, :label => member.name)
  %p= submit("Confirm founding meeting, and found #{@organisation_name}")

%p
  %strong OR
  = link_to("Cancel this founding meeting, and change the organisation details.", url(:controller => 'induction', :action => 'restart_induction'))


- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to "%s (%s)" % [booking_template.title, booking_template.code], item_action.call(booking_template), 'data-href-container' => 'tr'
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= amount_to_s(booking_template)
  %td= t(booking_template.amount_relates_to, :scope => 'booking_template.relation') if booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, booking_template)
    = list_link_for(:delete, booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true

Drop code in () for booking templates.

- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to "%s" % [booking_template.title, booking_template.code], item_action.call(booking_template), 'data-href-container' => 'tr'
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= amount_to_s(booking_template)
  %td= t(booking_template.amount_relates_to, :scope => 'booking_template.relation') if booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, booking_template)
    = list_link_for(:delete, booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true


.activity-list
  - for date, group in doc_groups:
    %section
      %h4
        &= date.strftime('%e %B %Y')
        %span.badge.badge-default&= len(group)

      %table.table.table-striped.table-condensed.activity-list
        - for doc in group:
          %tr
            %td.user
              - if doc.created_by:
                &= doc.created_by.short_name()

            %td
              - problems = doc.analysis_problems()
              - if problems:
                %i.text-danger.fa.fa-warning(title=' '.join([p.long_desc for p in problems]))
              - elif doc.checked_by:
                %i.fa.fa-check-circle(title='Checked by %s' % doc.checked_by.short_name())

            %td.title
              %a(href=url_for('show_article', id=doc.id))
                %strong&= doc.title
            %td.published_at
              &=doc.published_at.strftime('%e %B %Y')
            %td.medium
              %span.label.label-default&=doc.medium.name

Allow users to click on articles without titles

.activity-list
  - for date, group in doc_groups:
    %section
      %h4
        &= date.strftime('%e %B %Y')
        %span.badge.badge-default&= len(group)

      %table.table.table-striped.table-condensed.activity-list
        - for doc in group:
          %tr
            %td.user
              - if doc.created_by:
                &= doc.created_by.short_name()

            %td
              - problems = doc.analysis_problems()
              - if problems:
                %i.text-danger.fa.fa-warning(title=' '.join([p.long_desc for p in problems]))
              - elif doc.checked_by:
                %i.fa.fa-check-circle(title='Checked by %s' % doc.checked_by.short_name())

            %td.title
              %a(href=url_for('show_article', id=doc.id))
                %strong&= doc.title or '(none)'
            %td.published_at
              &=doc.published_at.strftime('%e %B %Y')
            %td.medium
              %span.label.label-default&=doc.medium.name


%h4 #{crop.name.capitalize} harvests
- if crop.harvests.empty?
  %p
    Nobody has harvested this crop yet.
- else
  %ul
    - crop.harvests.take(3).each do |harvest|
      %li
        = link_to "#{harvest.owner} harvested #{display_quantity(harvest)}.", harvest_path(harvest)
        = render partial: 'members/location', locals: { member: harvest.owner }
        %small
          = distance_of_time_in_words(harvest.created_at, Time.zone.now)
          ago.
  %p
    = link_to "View all #{crop.name} harvests", harvests_by_crop_path(crop)
- if crop.approved?
  - if current_member
    %p= link_to "Harvest #{crop.name}", new_harvest_path(crop_id: crop.id)
  - else
    = render partial: 'shared/signin_signup', locals: { to: "track your #{crop.name} harvests" }

Fix ordering of recent harvests

%h4 #{crop.name.capitalize} harvests
- if crop.harvests.empty?
  %p
    Nobody has harvested this crop yet.
- else
  %ul
    - crop.harvests.order(harvested_at: :desc).limit(3).each do |harvest|
      %li
        = link_to "#{harvest.owner} harvested #{display_quantity(harvest)}.", harvest_path(harvest)
        = render 'members/location', member: harvest.owner
        %small
          = distance_of_time_in_words(harvest.harvested_at, Time.zone.now)
          ago.
  %p
    = link_to "View all #{crop.name} harvests", harvests_by_crop_path(crop)
- if crop.approved?
  - if current_member
    %p= link_to "Harvest #{crop.name}", new_harvest_path(crop_id: crop.id)
  - else
    = render partial: 'shared/signin_signup', locals: { to: "track your #{crop.name} harvests" }


%head
  %title #{page.blog_title} :: #{page.title}
  - if page.respond_to? :description
    %meta(name="description" content="#{page.description}")/
  - if page.respond_to? :keywords
    %meta(name="keywords" content="#{page.keywords}")/
  %link(href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css")
  %script(src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" type="text/javascript")
  %script(src="/javascripts/mootools-1.2.4.2-more.js" type="text/javascript")
  - if page.respond_to? :twitter_user
    :javascript
      var twitter_user = "#{page.twitter_user}"
      var show_replies = #{page.show_replies};
      var tweet_count = #{page.tweet_count};
    %script(src="/javascripts/octopress.js" type="text/javascript")
    %script(src="/javascripts/twitter.js" type="text/javascript")
  - if page.respond_to? :google_analytics
    %script(src="http://www.google-analytics.com/ga.js" type="text/javascript")

  - # RSS Feed
  %link(href="/atom.xml" rel="alternate" title="#{page.blog_title}" type="application/atom+xml")

Enforce UTF-8 in meta tag to avoid character set problems.

%head
  %title #{page.blog_title} :: #{page.title}
  %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
  - if page.respond_to? :description
    %meta(name="description" content="#{page.description}")/
  - if page.respond_to? :keywords
    %meta(name="keywords" content="#{page.keywords}")/
  %link(href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css")
  %script(src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" type="text/javascript")
  %script(src="/javascripts/mootools-1.2.4.2-more.js" type="text/javascript")
  - if page.respond_to? :twitter_user
    :javascript
      var twitter_user = "#{page.twitter_user}"
      var show_replies = #{page.show_replies};
      var tweet_count = #{page.tweet_count};
    %script(src="/javascripts/octopress.js" type="text/javascript")
    %script(src="/javascripts/twitter.js" type="text/javascript")
  - if page.respond_to? :google_analytics
    %script(src="http://www.google-analytics.com/ga.js" type="text/javascript")

  - # RSS Feed
  %link(href="/atom.xml" rel="alternate" title="#{page.blog_title}" type="application/atom+xml")


.text_field.name
  = f.label :name, t('.name')
  = f.text_field :name
  = errors_for f.object, :name

- if f.object.new_record?
  = f.fields_for :comments, f.object.comments.build do |comment_fields|
    .field.text_area
      = comment_fields.text_area :body, :placeholder => t("comments.new.conversation")
    .extra
      .upload_area
        %p= t('uploads.new.select_a_file')
        - comment_fields.object.uploads.build
        = comment_fields.fields_for :uploads do |uploads|
          = uploads.file_field :asset, :id => 'upload_file'
      .private_options{ :style => 'display: none', 'object-prefix' => "conversation_new", 'object-type' => 'conversation' }
        .option.normal
          = f.radio_button :is_private, false, :checked => !f.object.is_private, :id => "conversation_new_public", :disabled => true
          %label{ :for => "conversation_new_public" }= t('comments.private.public')
        .option.private
          = f.radio_button :is_private, true, :checked => f.object.is_private, :id => "conversation_new_private", :disabled => true
          %label{ :for => "conversation_new_private" }= t('comments.private.private')
      .actions
        .attach
          %span= t('comments.fields.attach') + ": "
          = link_to t('uploads.comment_upload_link'), '#uploads', :class => 'attach_icon hoverable', :title => "Attach a file"
        = render 'google_docs/form', :f => comment_fields
        = link_to "Privacy", '#privacy', :class => 'private_switch hoverable', :title => "Control who can see this element"

Remove extra fields on the conversation form which are entirely unnecessary as they are generated in private_element.js

.text_field.name
  = f.label :name, t('.name')
  = f.text_field :name
  = errors_for f.object, :name

- if f.object.new_record?
  = f.fields_for :comments, f.object.comments.build do |comment_fields|
    .field.text_area
      = comment_fields.text_area :body, :placeholder => t("comments.new.conversation")
    .extra
      .upload_area
        %p= t('uploads.new.select_a_file')
        - comment_fields.object.uploads.build
        = comment_fields.fields_for :uploads do |uploads|
          = uploads.file_field :asset, :id => 'upload_file'
      .private_options{ :style => 'display: none', 'object-prefix' => "conversation_new", 'object-type' => 'conversation' }
      .actions
        .attach
          %span= t('comments.fields.attach') + ": "
          = link_to t('uploads.comment_upload_link'), '#uploads', :class => 'attach_icon hoverable', :title => "Attach a file"
        = render 'google_docs/form', :f => comment_fields
        = link_to "Privacy", '#privacy', :class => 'private_switch hoverable', :title => "Control who can see this element"


= hidden_field(:user, :has_projects_in_form, :value => true)
%fieldset
  %legend
    Admin for Projects
  %ul.options-list
    - projects = projects.sort_by &:name
    - projects.each_with_index do |p, i|
      - checkbox_id = "project-" + i.to_s + "-admin"
      %li
        = check_box_tag "user[admin_project_ids][]", p.id, @user.admin_for_projects.include?(p), id: checkbox_id
        = label_tag checkbox_id do
          = p.name
  %div.additional-options
    = hidden_field(:user, :can_add_teachers_to_cohorts, :value => false)
    = check_box_tag "user[can_add_teachers_to_cohorts]", 1, policy(@user).add_teachers_to_cohorts?, id: "user_can_add_teachers_to_cohorts_cb"
    = label_tag "user_can_add_teachers_to_cohorts_cb" do
      User can add teachers to cohorts of projects they administer

Use value in database for checkbox instead of value from user policy

= hidden_field(:user, :has_projects_in_form, :value => true)
%fieldset
  %legend
    Admin for Projects
  %ul.options-list
    - projects = projects.sort_by &:name
    - projects.each_with_index do |p, i|
      - checkbox_id = "project-" + i.to_s + "-admin"
      %li
        = check_box_tag "user[admin_project_ids][]", p.id, @user.admin_for_projects.include?(p), id: checkbox_id
        = label_tag checkbox_id do
          = p.name
  %div.additional-options
    = hidden_field(:user, :can_add_teachers_to_cohorts, :value => false)
    = check_box_tag "user[can_add_teachers_to_cohorts]", 1, @user.can_add_teachers_to_cohorts?, id: "user_can_add_teachers_to_cohorts_cb"
    = label_tag "user_can_add_teachers_to_cohorts_cb" do
      User can add teachers to cohorts of projects they administer


!!!
%html
  %head
    %meta{ content: 'width=device-width, initial-scale=1.0', name: 'viewport' }
      %title= content_for?(:title) ? yield(:title) : 'Ohana API'
      %meta{ content: content_for?(:description) ? yield(:description) : 'An open-source API of human services, farmers markets, parks, libraries, museums, and other organizations in San Mateo County', name: 'description' }
        = stylesheet_link_tag 'application', media: 'all'
        = csrf_meta_tags
        = yield(:head)
  %body{ class: "#{controller_name} #{action_name}" }
    = render 'shared/navigation'
    #main{ role: 'main' }
      .content
        .container
          .row
            = render 'shared/messages'
            = yield
    = javascript_include_tag 'application'

Update HTML meta-description: San Mateo County => South Florida

!!!
%html
  %head
    %meta{ content: 'width=device-width, initial-scale=1.0', name: 'viewport' }
      %title= content_for?(:title) ? yield(:title) : 'Ohana API'
      %meta{ content: content_for?(:description) ? yield(:description) : "An open-source API of human services, farmer's markets, parks, libraries, museums, and other organizations in South Florida", name: 'description' }
        = stylesheet_link_tag 'application', media: 'all'
        = csrf_meta_tags
        = yield(:head)
  %body{ class: "#{controller_name} #{action_name}" }
    = render 'shared/navigation'
    #main{ role: 'main' }
      .content
        .container
          .row
            = render 'shared/messages'
            = yield
    = javascript_include_tag 'application'


- if @pages.respond_to?(:total_pages)
  - content_for(:rel_next_prev_link_tags) { rel_next_prev_link_tags(@pages) }
  - content_for(:canonical_tag) do
    %link{rel: :canonical, href: url_for(all: true, only_path: false)}
- breadcrumb :post, @post
- set_meta_tags title: @post.title

%article
  %h1= @post.title
  = raw render_markdown(@pages.map(&:body).join)

  - if @pages.respond_to?(:total_pages) && @pages.total_pages > 1
    %nav.pagination
      = paginate @pages, theme: :post

  = render partial: 'banner', locals: {position: :press_article_bottom}

  %aside
    = render partial: 'sns_share', locals: {title: @post.title, url: post_url(@post), twitter_account: current_site.twitter_account, caption: current_site.sns_share_caption}

    = render partial: 'short_collection', locals: {posts: @post.related_posts}

Set meta description to post.body

- if @pages.respond_to?(:total_pages)
  - content_for(:rel_next_prev_link_tags) { rel_next_prev_link_tags(@pages) }
  - content_for(:canonical_tag) do
    %link{rel: :canonical, href: url_for(all: true, only_path: false)}
- breadcrumb :post, @post
- set_meta_tags title: @post.title, description: @post.body

%article
  %h1= @post.title
  = raw render_markdown(@pages.map(&:body).join)

  - if @pages.respond_to?(:total_pages) && @pages.total_pages > 1
    %nav.pagination
      = paginate @pages, theme: :post

  = render partial: 'banner', locals: {position: :press_article_bottom}

  %aside
    = render partial: 'sns_share', locals: {title: @post.title, url: post_url(@post), twitter_account: current_site.twitter_account, caption: current_site.sns_share_caption}

    = render partial: 'short_collection', locals: {posts: @post.related_posts}


%footer.text-center
  %small
    © 2016 京大アンプラグド

Improve the copyright in the footer

%footer.text-center
  %small= "© 2014-#{Time.current.year} 京大アンプラグド".html_safe


= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .form-actions
    .center
      %p
        = btn_link_to "Sign in using My MLH »".html_safe, user_mlh_omniauth_authorize_path
      %p
        %em or use an account:
  .form-inputs
    = f.input :email, required: false, input_html: { autofocus: true }
    = f.input :password, required: false
    = f.input :remember_me, as: :boolean if devise_mapping.rememberable?
  .form-actions{class:'center'}
    = f.button :submit, "Sign In"
    %p
      Need an account?
      = link_to "Sign Up".html_safe, new_user_registration_path

Add link to password reset page

= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
  .form-actions
    .center
      %p
        = btn_link_to "Sign in using My MLH »".html_safe, user_mlh_omniauth_authorize_path
      %p
        %em or use an account:
  .form-inputs
    = f.input :email, required: false, input_html: { autofocus: true }
    = f.input :password, required: false
    = f.input :remember_me, as: :boolean if devise_mapping.rememberable?
  .form-actions{class:'center'}
    = f.button :submit, "Sign In"
    %p
      Need an account?
      = link_to "Sign Up".html_safe, new_user_registration_path
      \-
      = link_to "Forgot password", new_user_password_path


!!! 5
%html
  %head
    %meta{ charset: "utf-8" }
    %title Garage
    = csrf_meta_tags
    = stylesheet_link_tag "garage/application", :media => "all"
    = javascript_include_tag "garage/application"
    = favicon_link_tag "favicon.ico"

  %body
    %header
      .section
        %h1
          = link_to "Garage", garage_docs.resources_path
        %ul.right
          %li= link_to "Docs", garage_docs.resources_path
          %li= link_to "Console", garage_docs.console_resources_path
          - if _current_user
            %li= link_to "signout(#{current_user.name})", "/signout", method: :post

    .main
      = yield

Fix current_user -> _current_user, so confusing

!!! 5
%html
  %head
    %meta{ charset: "utf-8" }
    %title Garage
    = csrf_meta_tags
    = stylesheet_link_tag "garage/application", :media => "all"
    = javascript_include_tag "garage/application"
    = favicon_link_tag "favicon.ico"

  %body
    %header
      .section
        %h1
          = link_to "Garage", garage_docs.resources_path
        %ul.right
          %li= link_to "Docs", garage_docs.resources_path
          %li= link_to "Console", garage_docs.console_resources_path
          - if _current_user
            %li= link_to "signout(#{_current_user.name})", "/signout", method: :post

    .main
      = yield


.page-header
    %h3
        %i.fa.fa-calendar-check-o
        Punch New Record

= render 'form'

Fix indentation and other details

.page-header
  %h2
    = emojify @card.icon
    Punch New Record

= render 'form'


#maincontent
  = render :partial => "layouts/flash_msg"

  - if @display == "config_info"
    %fieldset%
      %p.legend Info
      %table.style3
        - if @rp_config.nil? || @rp_config.empty?
          %tr
            %td{:width => "495"}
              %strong Not Available
        - else
          - @rp_config.each_slice(2) do |items|
            %tr{:class => cycle('row0', 'row1')}
              items.each do |item|
                %td{:width => "495"}
                  %strong
                    = h(item[:field])
                  = h(item[:description])

  - elsif @display == "descendant_vms"
    = render :partial => "layouts/dc_tree_page"

Fix HAML syntax and remove trailing ^M characters from the file

#maincontent
  = render :partial => "layouts/flash_msg"

  - if @display == "config_info"
    %fieldset
      %p.legend Info
      %table.style3
        - if @rp_config.nil? || @rp_config.empty?
          %tr
            %td{:width => "495"}
              %strong Not Available
        - else
          - @rp_config.each_slice(2) do |items|
            %tr{:class => cycle('row0', 'row1')}
              - items.each do |item|
                %td{:width => "495"}
                  %strong
                    = h(item[:field])
                  = h(item[:description])

  - elsif @display == "descendant_vms"
    = render :partial => "layouts/dc_tree_page"


- if @diff.empty?
  .ui.floating.small.message No enough information to detect difference between these two versions.
- else
  - @diff.each_file do |file|
    .ui.top.attached.secondary.segment.code-review-header
      %i.dropdown.icon.js-toggle-diff
      = file.label
      = diff_file_status(file)
    %table.ui.small.table.code-review
      - file.each_change do |change, type, location, old_ln, new_ln|
        - blocker = @comments[location]&.any?(&:blocker?)
        %tr{ class: type, data: { location: location } }
          %td.collapsing.line= old_ln
          %td.collapsing.line= new_ln
          %td.code #{@disable_comments ? '' : '<i class="comment icon js-add-comment"></i>'.html_safe}#{change}
        - if @comments.include?(location)
          %tr.comments{ data: { location: location, blocker: blocker } }
            %td.line.center.aligned{ colspan: 2 }
              %i{ class: code_comment_icon(@comments[location]) }
            %td
              .ui.comments
                - @comments[location].each do |comment|
                  = render partial: 'comment', locals: { comment: comment, reply: true }

Increase dropdown icon used to hide/show files in MR view.

- if @diff.empty?
  .ui.floating.small.message No enough information to detect difference between these two versions.
- else
  - @diff.each_file do |file|
    .ui.top.attached.secondary.segment.code-review-header
      %i.dropdown.large.icon.js-toggle-diff
      = file.label
      = diff_file_status(file)
    %table.ui.small.table.code-review
      - file.each_change do |change, type, location, old_ln, new_ln|
        - blocker = @comments[location]&.any?(&:blocker?)
        %tr{ class: type, data: { location: location } }
          %td.collapsing.line= old_ln
          %td.collapsing.line= new_ln
          %td.code #{@disable_comments ? '' : '<i class="comment icon js-add-comment"></i>'.html_safe}#{change}
        - if @comments.include?(location)
          %tr.comments{ data: { location: location, blocker: blocker } }
            %td.line.center.aligned{ colspan: 2 }
              %i{ class: code_comment_icon(@comments[location]) }
            %td
              .ui.comments
                - @comments[location].each do |comment|
                  = render partial: 'comment', locals: { comment: comment, reply: true }


.col-md-12
  .col-md-3
    %strong
      %label Ingredients:
  .col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
  #new_ingredient
  = f.simple_fields_for :ingredients do |ingredient|
    .col-md-4
      = ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
    .col-md-3
      = ingredient.input :quantity, label: false, placeholder: 'Quantity'
    .col-md-4
      = ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
    .col-md-1
      %br
      = ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs"

Remove 'remove' button from ingredient on edit page

.col-md-12
  .col-md-3
    %strong
      %label Ingredients:
  .col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
  #new_ingredient
  = f.simple_fields_for :ingredients do |ingredient|
    .col-md-4
      = ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
    .col-md-3
      = ingredient.input :quantity, label: false, placeholder: 'Quantity'
    .col-md-4
      = ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
    .col-md-1
      %br
      = ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs" unless ingredient.object.persisted?


= contextual_links

%h1= t_title
%ul.overview-list.level-1
  %li
    = link_to t_model(DebitInvoice), debit_invoices_path
    %ul.overview-list.level-2
      %li= link_to "Offene Rechnungen", debit_invoices_path(:by_state => :booked)
      %li= link_to "Überfällige Rechnungen", debit_invoices_path(:overdue => true)
      %li= link_to "Neue Rechnung", new_debit_invoice_path
      %li= link_to "VESR Datei einlesen", new_esr_file_path

  %li
    = link_to t_model(CreditInvoice), credit_invoices_path
    %ul.overview-list.level-2
      %li= link_to "Offene Rechnungen", credit_invoices_path(:by_state => :booked)
      %li= link_to "Überfällige Rechnungen", credit_invoices_path(:overdue => true)
      %li= link_to "Neue Rechnung", new_credit_invoice_path

Add own overview section for vesr actions to invoice index.

= contextual_links

%h1= t_title
%ul.overview-list.level-1
  %li
    = link_to t_model(DebitInvoice), debit_invoices_path
    %ul.overview-list.level-2
      %li= link_to "Offene Rechnungen", debit_invoices_path(:by_state => :booked)
      %li= link_to "Überfällige Rechnungen", debit_invoices_path(:overdue => true)
      %li= link_to "Neue Rechnung", new_debit_invoice_path

  %li
    = link_to t_model(CreditInvoice), credit_invoices_path
    %ul.overview-list.level-2
      %li= link_to "Offene Rechnungen", credit_invoices_path(:by_state => :booked)
      %li= link_to "Überfällige Rechnungen", credit_invoices_path(:overdue => true)
      %li= link_to "Neue Rechnung", new_credit_invoice_path

  %li
    = link_to "VESR", esr_files_path
    %ul.overview-list.level-2
      %li= link_to "VESR Datei einlesen", new_esr_file_path
      %li= link_to "VESR Journal", esr_files_path


.home
  .landing
    - unless current_user
      .heading
        %h1
          Sharing Between Effective Altruists!
    .home-categories-outer
      .home-categories
        - ApplicationHelper::CATEGORIES.each do |category|
          .category
            = link_to category.titleize, root_path(category:category)

  .row.proposals-table-outer
    .col-md-6
      - if @offers.count > 0
        %h2
          = link_to 'New Offers', offers_path
        %table.table.proposals-table
          %tbody
            - @offers.each do |proposal|
              - if proposal
                = render partial: "proposals/proposal", locals: { proposal: proposal, description_size: 110  }
        %h2
          = link_to 'More', offers_path
      - else
        %h2 No Offers in This Category

    .col-md-6
      - if @wanteds.count > 0
        %h2
          = link_to 'New ' +  name_for('wanted', plural: true).titleize, wanteds_path
        %table.table.proposals-table
          %tbody
            - @wanteds.each do |proposal|
              - if proposal
                = render partial: "proposals/proposal", locals: { proposal: proposal, description_size: 150 }
        %h2
          = link_to 'More ', wanteds_path
      - else
        %h2 No Requests in This Category

Remove seemingly unnecessary nil checks.

.home
  .landing
    - unless current_user
      .heading
        %h1
          Sharing Between Effective Altruists!
    .home-categories-outer
      .home-categories
        - ApplicationHelper::CATEGORIES.each do |category|
          .category
            = link_to category.titleize, root_path(category:category)

  .row.proposals-table-outer
    .col-md-6
      - if @offers.count > 0
        %h2
          = link_to 'New Offers', offers_path
        %table.table.proposals-table
          %tbody
            - @offers.each do |offer|
              = render partial: "proposals/proposal", locals: { proposal: offer, description_size: 110  }
        %h2
          = link_to 'More', offers_path
      - else
        %h2 No Offers in This Category

    .col-md-6
      - if @wanteds.count > 0
        %h2
          = link_to 'New ' +  name_for('wanted', plural: true, capitalized: true), wanteds_path
        %table.table.proposals-table
          %tbody
            - @wanteds.each do |wanted|
              = render partial: "proposals/proposal", locals: { proposal: wanted, description_size: 150 }
        %h2
          = link_to 'More ', wanteds_path
      - else
        %h2 No Requests in This Category


- terms_and_conditions_activated = current_order.distributor.terms_and_conditions.file?
- if terms_and_conditions_activated
  %p.small
    %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_activated=#{terms_and_conditions_activated}" } }
      %label{for: "accept_terms"}= t('.message_html', terms_and_conditions_link: link_to( t( '.link_text' ), current_order.distributor.terms_and_conditions.url, target: '_blank'))

Move small class to label so that rule is actually applied

- terms_and_conditions_activated = current_order.distributor.terms_and_conditions.file?
- if terms_and_conditions_activated
  %p
    %input{ type: 'checkbox', id: 'accept_terms', ng: { model: "terms_and_conditions_accepted", init: "terms_and_conditions_activated=#{terms_and_conditions_activated}" } }
      %label.small{for: "accept_terms"}= t('.message_html', terms_and_conditions_link: link_to( t( '.link_text' ), current_order.distributor.terms_and_conditions.url, target: '_blank'))


.row.white-back
  %a{ href: '/admin/procedures/new_from_existing', class: 'btn-sm btn-primary' }
    Créer une nouvelle procédure à partir d'une procédure existante

.row.white-back
  %h2
    = t('dynamics.admin.dossiers.tableau_de_bord.nouvelle_procedure')

  #procedure_new.section.section-label
    = form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
      = render partial: 'informations', locals: { f: f }
      = f.submit 'Valider', class: 'btn btn-info', id: 'save-procedure', style: 'float: right;'

Use the path helper in the new procedure template

.row.white-back
  %a{ href: new_from_existing_admin_procedures_path, class: 'btn-sm btn-primary' }
    Créer une nouvelle procédure à partir d'une procédure existante

.row.white-back
  %h2
    = t('dynamics.admin.dossiers.tableau_de_bord.nouvelle_procedure')

  #procedure_new.section.section-label
    = form_for @procedure, url: { controller: 'admin/procedures', action: :create }, multipart: true do |f|
      = render partial: 'informations', locals: { f: f }
      = f.submit 'Valider', class: 'btn btn-info', id: 'save-procedure', style: 'float: right;'


- unless params.has_key?(:notitle)
  .visualization-header
    %h2.pull-left
      = @visualization.name
%div{ class: params.has_key?(:notitle) ? 'visualization-graph notitle' : 'visualization-graph' }
  .visualization-graph-container
    = render 'partials/item_graph_menu_navigation'
    = render 'partials/item_graph_menu_actions'
    .visualization-graph-component.loading
      %svg
    = render 'partials/item_graph_info'

= render 'partials/user_label', :user => @visualization.author, :align => 'left', :target => '_blank'

= render 'partials/embed_icon', item: @visualization

= render 'partials/item_share_panel', item: @visualization

Set Info Panel over visualization title in embedded visualizations


!!!
%html
  %head
    %meta{charset: "utf-8"}
    %meta{content: "IE=edge,chrome=1", http: {equiv: "X-UA-Compatible"}}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1"}
    %meta{name: "description", content: meta_description}
    %meta{name: "keywords", content: meta_keywords}
    %meta{property: "og:title", content: page_title}
    %meta{property: "og:type", content: open_graph_type}
    %meta{property: "og:image", content: data.defaults.gravatar_url}
    %meta{property: "og:url", content: absolute_url}

    %title= page_title
    %link{rel: "canonical", href: absolute_url}

    %link{href: data.defaults.pt_sans_font_url, rel: 'stylesheet', type: 'text/css'}
    %link{href: data.defaults.titillium_font_url, rel: 'stylesheet', type: 'text/css'}

    = stylesheet_link_tag "application"
    = feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed"

  %body{class: "#{page_classes}"}
    %header.navigation= partial "nav"

    %main.type-system-sans{:role => "main"}
      = yield

    %footer
      %span= "© #{Date.today.year} Jeff Cole"

    = javascript_include_tag "application"

Add home link to footer

!!!
%html
  %head
    %meta{charset: "utf-8"}
    %meta{content: "IE=edge,chrome=1", http: {equiv: "X-UA-Compatible"}}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1"}
    %meta{name: "description", content: meta_description}
    %meta{name: "keywords", content: meta_keywords}
    %meta{property: "og:title", content: page_title}
    %meta{property: "og:type", content: open_graph_type}
    %meta{property: "og:image", content: data.defaults.gravatar_url}
    %meta{property: "og:url", content: absolute_url}

    %title= page_title
    %link{rel: "canonical", href: absolute_url}

    %link{href: data.defaults.pt_sans_font_url, rel: 'stylesheet', type: 'text/css'}
    %link{href: data.defaults.titillium_font_url, rel: 'stylesheet', type: 'text/css'}

    = stylesheet_link_tag "application"
    = feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed"

  %body{class: "#{page_classes}"}
    %header.navigation= partial "nav"

    %main.type-system-sans{:role => "main"}
      = yield

    %footer
      %a{href: "/", title: "Home"} Home

      %span= "© #{Date.today.year} Jeff Cole"

    = javascript_include_tag "application"


%div.repo-listing
  %h1.logo Hound
  .pitch
    %h2
      Take care of pesky code reviews with a trusty Hound. Hound reviews GitHub pull requests for style guide violations.
      = link_to 'https://github.com/thoughtbot/guides/tree/master/style', class: 'style-guide', target: '_blank' do
        View the style guide →
    = link_to '/auth/github', class: 'auth button' do
      = t('authenticate')
  .search-container
    %i.fa.fa-search.disabled
    %input.search{'type' => 'text', 'placeholder' => 'Search repo list', 'disabled' => 'disabled'}
  %ul.disabled
    - 1.times do
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/paperclip
      %li.repo
        %span.toggle.activate
          %a{'href' => '#'}
        %span.name
          thoughtbot/bourbon
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/capybara-webkit
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/clearance
      %li.repo
        %span.toggle.activate
          %a{'href' => '#'}
        %span.name
          thoughtbot/guides

Make it clear that only Ruby is supported

%div.repo-listing
  %h1.logo Hound
  .pitch
    %h2
      Take care of pesky code reviews with a trusty Hound. Hound reviews GitHub pull requests for style guide violations in your Ruby code.
      = link_to 'https://github.com/thoughtbot/guides/tree/master/style#ruby', class: 'style-guide', target: '_blank' do
        View the style guide →
    = link_to '/auth/github', class: 'auth button' do
      = t('authenticate')
  .search-container
    %i.fa.fa-search.disabled
    %input.search{'type' => 'text', 'placeholder' => 'Search repo list', 'disabled' => 'disabled'}
  %ul.disabled
    - 1.times do
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/paperclip
      %li.repo
        %span.toggle.activate
          %a{'href' => '#'}
        %span.name
          thoughtbot/bourbon
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/capybara-webkit
      %li.repo
        %span.toggle.deactivate
          %a{'href' => '#'}
        %span.name
          thoughtbot/clearance
      %li.repo
        %span.toggle.activate
          %a{'href' => '#'}
        %span.name
          thoughtbot/guides


- modal_image = artifact.artifact_images[0]
%section
  %h2 Alternate Views
  %ul#image-collection{style: "list-style-type: none; margin-left: 0;"}
    - artifact.artifact_images.each do |image|
      %li.item= image_tag image.url, class: 'artifact-image', onClick: "$('#imageModal').modal();"

  #imageModal.modal.hide.fade{ tabindex: "-1", role: "dialog", style: "width: #{modal_image.width + 20}px;",
    'aria-labelledby' =>"myModalLabel", 'aria-hidden' => "true"}
    .modal-header
      %button{type: "button", class: "close", 'data-dismiss' => "modal", 'aria-hidden' => "true"} ×
      %h3#myModalLabel Image Detail
    .modal-body{style: 'max-height: 600px;'}
      = image_tag modal_image.url, style: "margin: auto;"
    .modal-footer
      %button.btn{data:{dismiss: "modal"}, 'aria-hidden' => "true"} Close

Make image name the title of alternate images. Temporary.

- modal_image = artifact.artifact_images[0]
%section
  %h2 Alternate Views
  %ul#image-collection{style: "list-style-type: none; margin-left: 0;"}
    - artifact.artifact_images.each do |image|
      %li.item= image_tag image.url, class: 'artifact-image', onClick: "$('#imageModal').modal();", title: image.image

  #imageModal.modal.hide.fade{ tabindex: "-1", role: "dialog", style: "width: #{modal_image.width + 20}px;",
    'aria-labelledby' =>"myModalLabel", 'aria-hidden' => "true"}
    .modal-header
      %button{type: "button", class: "close", 'data-dismiss' => "modal", 'aria-hidden' => "true"} ×
      %h3#myModalLabel Image Detail
    .modal-body{style: 'max-height: 600px;'}
      = image_tag modal_image.url, style: "margin: auto;"
    .modal-footer
      %button.btn{data:{dismiss: "modal"}, 'aria-hidden' => "true"} Close


%section.search
	.container
		%h4.m-t Filter information by topic
		.search-content
			%input{ id: "textsearch", type: "text"}

Change search text to keyword search

%section.search
	.container
		%h4.m-t Filter information by keywords
		.search-content
			%input{ id: "textsearch", type: "text"}


:ruby
  events_view ||= params[:view] || cookies[:events_view] || 'list'

- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-event-details.sidebar-box
  #sidebar-filters.sidebar-box= render 'events/filters'
  #sidebar-exports.sidebar-box= render 'events/exports'

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), params.merge(:view => 'calendar'), :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), params.merge(:view => 'list'), :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title= t('.title')

- cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
  .events-list{:class => events_view}= render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date

Fix caching w/ list vs. cal on event index page, default to cal for now

:ruby
  events_view ||= params[:view] || cookies[:events_view] || 'calendar'

- content_for :sidebar do
  #sidebar-welcome.sidebar-box= render 'site/welcome'
  #sidebar-event-details.sidebar-box
  #sidebar-filters.sidebar-box= render 'events/filters'
  #sidebar-exports.sidebar-box= render 'events/exports'

.view-switcher
  %ul
    %li= link_to t('.switcher.calendar'), params.merge(:view => 'calendar'), :class => (events_view == 'calendar' ? 'selected' : ''), :data => { :view => 'calendar' }
    %li= link_to t('.switcher.list'), params.merge(:view => 'list'), :class => (events_view == 'list' ? 'selected' : ''), :data => { :view => 'list' }

%h2.main-title= t('.title')

.events-list{:class => events_view}
  - cache_if(@perform_caching, CacheObserver.daily_key_for('events-index', request)) do
    = render 'events/calendar', :events => @events, :start_date => @start_date, :end_date => @end_date


.well
  = form.input :title
  = form.locale_input

.well
  = form.input :body, input_html: { 'data-add-editor': false, 'data-editor-syntax': :textile }

.well
  = form.input :link_to_more, as: :boolean

.well
  = form.input :published, as: :boolean

%h4= resource_class.human_attribute_name(:pictures)
#pictures
  = form.simple_fields_for(:pictures) do |picture|
    = render 'picture_fields', f: picture
  .well.well-xs.links
    = link_to_add_association form, :pictures, class: 'btn btn-default btn-xs'

Make usage of rich-editor optional.

.well
  = form.input :title
  = form.locale_input

.well
  = form.input :body, input_html: { 'data-add-editor': Itsf::Backend.features?(:'ace-rails-ap'), 'data-editor-syntax': :textile }

.well
  = form.input :link_to_more, as: :boolean

.well
  = form.input :published, as: :boolean

%h4= resource_class.human_attribute_name(:pictures)
#pictures
  = form.simple_fields_for(:pictures) do |picture|
    = render 'picture_fields', f: picture
  .well.well-xs.links
    = link_to_add_association form, :pictures, class: 'btn btn-default btn-xs'


- head_javascript "rails_admin/application.js"

#block-tables.block
  = breadcrumbs_for :bulk_delete, @abstract_model

  .content
    %h2.title Delete confirmation
    .inner
      = render(:partial => 'layouts/rails_admin/flash', :locals => {:flash => flash})
      %p Are you sure you want to delete the following object along with all of the following related items will be deleted:
      %div{:style=>"padding-left:20px"}
        = render :partial => "delete_notice", :collection => @bulk_objects
      = form_tag rails_admin_bulk_destroy_path(:model_name => @abstract_model.to_param, :bulk_ids => @bulk_ids) do
        %br
        %br
        .group.navform.wat-cf
          %button.button{:type => "submit"}
            %img{:alt => "Remove", :src => "/stylesheets/rails_admin/theme/activo/images/icons/cross.png"}
            = t("admin.delete.confirmation")

          %button.button{:type => "submit", :name => "_continue"}
            =t("admin.new.cancel")

Update to bulk_delete page from merge.

- head_javascript "rails_admin/application.js"

#block-tables.block
  = breadcrumbs_for :bulk_delete, @abstract_model

  .content
    %h2.title Delete confirmation
    .inner
      = render(:partial => 'layouts/rails_admin/flash', :locals => {:flash => flash})
      %p Are you sure you want to delete the following object along with all of the following related items will be deleted:
      %div{:style=>"padding-left:20px"}
        = render :partial => "delete_notice", :collection => @bulk_objects
      = form_tag rails_admin_bulk_destroy_path(:model_name => @abstract_model.to_param, :bulk_ids => @bulk_objects.map(&:id)) do
        %br
        %br
        .group.navform.wat-cf
          %button.button{:type => "submit"}
            %img{:alt => "Remove", :src => "/stylesheets/rails_admin/theme/activo/images/icons/cross.png"}
            = t("admin.delete.confirmation")

          %button.button{:type => "submit", :name => "_continue"}
            =t("admin.new.cancel")


%section
  .page-header
    .pull-right
      = action_button "primary", "Add conference", new_conference_path, hint: "Add a new conference"
    %h1 List of conferences
  - if params[:term].blank? and Conference.all.empty?
    .row
      .span16
        .blank-slate
          %p
            There is not a single conference yet.
            Start adding a conference by clicking on the
            button on the right.
  - else
    = render 'shared/search_and_table', collection: @conferences

Add link to conferences list to home for orga

%section
  .page-header
    .pull-right
      = action_button "primary", "Add conference", new_conference_path, hint: "Add a new conference"
      - if policy(conference).orga?
        = action_button "primary", "Manage conferences", conferences_path, hint: "Delete conferences"
    %h1 List of conferences
  - if params[:term].blank? and Conference.all.empty?
    .row
      .span16
        .blank-slate
          %p
            There is not a single conference yet.
            Start adding a conference by clicking on the
            button on the right.
  - else
    = render 'shared/search_and_table', collection: @conferences


- if url
  = link_to url, target: "_blank", class: "ui primary large labeled icon button" do
    %i.cart.icon
    Buy

Add displaying a disabled buy button when the game is not available

%a.ui.primary.large.labeled.icon.button{href: url, target: "_blank", class: ("disabled" unless url )}
  %i.cart.icon
  Buy


%p= t ".explanation"
%table
  %thead
    %th= "#{MessageThread.model_name.human} #{MessageThread.human_attribute_name(:title)}"
    %th= Message.human_attribute_name(:check_reason)
    %th= "#{MessageThread.model_name.human} #{t('.approved')}?"
    %th= "#{Message.model_name.human} #{Message.human_attribute_name(:body)}"
    %th= User.human_attribute_name(:full_name)
    %th
  %tbody
    - @messages.each do |message|
      %tr{id: message.id}
        %td= link_to message.thread.title.truncate(100), thread_path(message.thread)
        %td= t(".#{message.check_reason}")
        %td= message.thread.approved?
        %td{title: message.body}= message.body.truncate(300)
        %td= link_to(message.created_by.full_name, user_profile_path(message.created_by))
        %td
          = link_to t(".approve"), approve_thread_message_path(message.thread, message),
            method: :put, class: "btn-green", remote: true

          = link_to t(".reject"), reject_thread_message_path(message.thread, message),
            method: :put, class: "btn-grey", remote: true

= paginate @messages

Fix moderation page when message has no thread

%p= t ".explanation"
%table
  %thead
    %th= "#{MessageThread.model_name.human} #{MessageThread.human_attribute_name(:title)}"
    %th= Message.human_attribute_name(:check_reason)
    %th= "#{MessageThread.model_name.human} #{t('.approved')}?"
    %th= "#{Message.model_name.human} #{Message.human_attribute_name(:body)}"
    %th= User.human_attribute_name(:full_name)
    %th
  %tbody
    - @messages.each do |message|
      %tr{id: message.id}
        %td
          - if message.thread
            = link_to message.thread.title.truncate(100), thread_path(message.thread)
        %td= t(".#{message.check_reason}")
        %td= message.thread.approved?
        %td{title: message.body}= message.body.truncate(300)
        %td= link_to(message.created_by.full_name, user_profile_path(message.created_by))
        %td
          = link_to t(".approve"), approve_thread_message_path(message.thread, message),
            method: :put, class: "btn-green", remote: true

          = link_to t(".reject"), reject_thread_message_path(message.thread, message),
            method: :put, class: "btn-grey", remote: true

= paginate @messages


%section
  .page-header
    .row
      .span9
        %h1
          = Chronicle.model_name.human
          - if @chronicle.present?
            - if @chronicle.mood == "happy"

            - else

            = link_to " #{t('helpers.links.edit')}".html_safe, edit_chronicle_path(@chronicle), class: 'btn'
          - else
            = link_to " #{t('helpers.links.add')}".html_safe, new_chronicle_path, class: 'btn'
      .span3
        = form_tag root_path, :method => 'get', :class => 'form-search' do
          = text_field_tag :date, params[:date], :class => 'input-small datepicker'
          = submit_tag t('go'), :class => 'btn'

  - if @chronicle
    %p
      = Chronicle.human_attribute_name(:mood) + ':'
      =t @chronicle.mood
    %p
      = Chronicle.human_attribute_name(:summary) + ':'
      = @chronicle.summary

Add date value to datepicker form

%section
  .page-header
    .row
      .span9
        %h1
          = Chronicle.model_name.human
          - if @chronicle.present?
            - if @chronicle.mood == "happy"

            - else

            = link_to " #{t('helpers.links.edit')}".html_safe, edit_chronicle_path(@chronicle), class: 'btn'
          - else
            = link_to " #{t('helpers.links.add')}".html_safe, new_chronicle_path, class: 'btn'
      .span3
        = form_tag root_path, :method => 'get', :class => 'form-search' do
          = text_field_tag :date, l(@date), :class => 'input-small datepicker'
          = submit_tag t('go'), :class => 'btn'

  - if @chronicle
    %p
      = Chronicle.human_attribute_name(:mood) + ':'
      =t @chronicle.mood
    %p
      = Chronicle.human_attribute_name(:summary) + ':'
      = @chronicle.summary


= simple_form_for [:admin, @text] do |f|
  = f.input :key
  = f.input :title_en
  = f.input :title_nl
  = f.input :short_content_en
  = f.input :short_content_nl
  = f.input :content_en
  = f.input :content_nl
  = f.input :searchable,
    :hint => 'Check if you want the page to appear on the search page results'
  = f.button :submit

Remove "searchable" field admin Texts form

= simple_form_for [:admin, @text] do |f|
  = f.input :key
  = f.input :title_en
  = f.input :title_nl
  = f.input :short_content_en
  = f.input :short_content_nl
  = f.input :content_en
  = f.input :content_nl
  = f.button :submit