---
  title: Photoessays
  body_classes: photoessays
  meta_description: A collection of photoessays, from travels, conferences, and experiences…
  meta_keywords: Photography, travel, photoessays
---

.Page
  .Content
    .Row
      .Content_Headline.pb3
        %h1 Photoessays

    - data.photoessays.each do | photoessays |
      .Content_photoessays.Row
        - photoessays.photoessays.each do | photoessay |
          = partial("photoessays/components/card", locals: { photoessay: photoessay})

Add year anchor to photoessays

---
  title: Photoessays
  body_classes: photoessays
  meta_description: A collection of photoessays, from travels, conferences, and experiences…
  meta_keywords: Photography, travel, photoessays
---

.Page
  .Content
    .Row
      .Content_Headline.pb3
        %h1 Photoessays

    - data.photoessays.each do | photoessays |
      .Content_photoessays.Row{id: photoessays.year }
        - photoessays.photoessays.each do | photoessay |
          = partial("photoessays/components/card", locals: { photoessay: photoessay})


- @hide_top_links = true
- @no_container = true
- breadcrumb_title "Projects"
- page_title "Starred Projects"
- header_title "Projects", dashboard_projects_path

%div{ class: container_class }
  = render "projects/last_push"
  = render 'dashboard/projects_head'

  - if params[:filter_projects] || any_projects?(@projects)
    = render 'projects'
  - else
    %h3 You don't have starred projects yet
    %p.slead Visit project page and press on star icon and it will appear on this page.

Fix empty starred projects header

- @hide_top_links = true
- @no_container = true
- breadcrumb_title "Projects"
- page_title "Starred Projects"
- header_title "Projects", dashboard_projects_path

%div{ class: container_class }
  = render "projects/last_push"
  = render 'dashboard/projects_head'

  - if params[:filter_projects] || any_projects?(@projects)
    = render 'projects'
  - else
    %h3.page-title You don't have starred projects yet
    %p.slead Visit project page and press on star icon and it will appear on this page.


= form_tag(omniauth_authorize_path(:user, :crowd), id: 'new_crowd_user' class: 'show-gl-field-errors') do
  .form-group
    = label_tag 'Username or email', for: :username
    = text_field_tag :username, nil, {class: "form-control top", title: "This field is required", autofocus: "autofocus", required: true }
  .form-group
    = label_tag :password
    = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", required: true }
  - if devise_mapping.rememberable?
    .remember-me.checkbox
      %label{for: "remember_me"}
        = check_box_tag :remember_me, '1', false, id: 'remember_me'
        %span Remember me
  = button_tag "Sign in", class: "btn-save btn"

Fix syntax error -- missing comma in _new_crowd.

= form_tag(omniauth_authorize_path(:user, :crowd), id: 'new_crowd_user', class: 'show-gl-field-errors') do
  .form-group
    = label_tag 'Username or email', for: :username
    = text_field_tag :username, nil, {class: "form-control top", title: "This field is required", autofocus: "autofocus", required: true }
  .form-group
    = label_tag :password
    = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", required: true }
  - if devise_mapping.rememberable?
    .remember-me.checkbox
      %label{for: "remember_me"}
        = check_box_tag :remember_me, '1', false, id: 'remember_me'
        %span Remember me
  = button_tag "Sign in", class: "btn-save btn"


=link_to image_tag("fassets_core/video.png", :width => "72", :height => "72"), preview_file_asset_path(content.asset)

Add main_app to the path so it is available from the engines.

=link_to image_tag("fassets_core/video.png", :width => "72", :height => "72"), main_app.preview_file_asset_path(content.asset)


= resource_form(@user) do |f|
  = record_name(@user.name, 'user', :when_blank => 'New User')
  = form_errors(@user)
  = content do
    = f.fieldset(:class => 'primary') do
      = f.input(:name, :col => 6)
      = f.input(:email, :col => 6)

    = f.fieldset('Password') do
      = f.input(:password)

    - unless @user == current_user
      - if @user.destroyable?
        = form_notice(:delete) do
          %p
            This account may be deleted as the user associated with it has
            not added or modified any records. Deletion is permanent and once
            gone the account cannot be recovered.

          = link_to('Delete User', path(:delete, @user), :class => 'button delete')

      - else
        = form_notice(:disable) do
          %p
            This account may be disabled. The user associated with this account
            will not be able to log in. After being disabled, the account may be
            re-enabled later.

          = button_tag('Disable User', :name => 'user[disabled]', :value => 1)

  = footer do
    = save_button

Add a notice about why a user cannot delete or disable their own account.

= resource_form(@user) do |f|
  = record_name(@user.name, 'user', :when_blank => 'New User')
  = form_errors(@user)
  = content do
    = f.fieldset(:class => 'primary') do
      = f.input(:name, :col => 6)
      = f.input(:email, :col => 6)

    = f.fieldset('Password') do
      = f.input(:password)

    - if @user == current_user
      = form_notice(:general) do
        %p
          You cannot delete or disable your own account. If you need this
          account deleted or disabled another user must do it for you.

    - else
      - if @user.destroyable?
        = form_notice(:delete) do
          %p
            This account may be deleted as the user associated with it has
            not added or modified any records. Deletion is permanent and once
            gone the account cannot be recovered.

          = link_to('Delete User', path(:delete, @user), :class => 'button delete')

      - else
        = form_notice(:disable) do
          %p
            This account may be disabled. The user associated with this account
            will not be able to log in. After being disabled, the account may be
            re-enabled later.

          = button_tag('Disable User', :name => 'user[disabled]', :value => 1)

  = footer do
    = save_button


.campaign-nav__wrapper
  .campaign_navigation
    .container
      %a
        %h2.title
          = "#{t('campaign.campaign')}: #{@campaign.title}"
      %nav
        %ul
          = nav_link(t('courses.overview'), overview_campaign_path(@campaign.slug))
          = nav_link(t('courses.programs'), programs_campaign_path(@campaign.slug))

Fix nav string for campaign courses/programs

.campaign-nav__wrapper
  .campaign_navigation
    .container
      %a
        %h2.title
          = "#{t('campaign.campaign')}: #{@campaign.title}"
      %nav
        %ul
          = nav_link(t('courses.overview'), overview_campaign_path(@campaign.slug))
          = nav_link(t("#{Features.default_course_string_prefix}.courses"), programs_campaign_path(@campaign.slug))


= repository_nav parent.repository, :ontologies, disable_actions: true

= ontology_nav parent, "Ontology Content"

- unless parent.owl?
  = pagination do
    - unless collection.blank?
      = render partial: 'list'
    - else
      %h3 No entities found

- else
  - if @hierarchy_exists
    - unless show_classes?
      - unless @page_selected
        .btn-group#ontology_selections
          = link_to 'Class Hierarchy', '#hierarchy', class: 'btn btn-default mode btn-primary', id: 'hierarchy'
          = link_to 'Class Details', '#detail', class: 'btn btn-default mode', id: 'detail-page'
      - else
        .btn-group#ontology_selections
          = link_to 'Class Hierarchy', '#hierarchy', class: 'btn btn-default mode', id: 'hierarchy'
          = link_to 'Class Details', '#detail', class: 'btn btn-default mode btn-primary', id: 'detail-page'
      .owl_entities
        #class-hierarchy{class: (@page_selected) ? "hide" : ""}
          = render partial: 'treeview'

  .entities-detail
    = pagination do
      - unless collection.blank?
        = render partial: 'list'
      - else
        %h3 No entities found

Select "Content" tab for entities views.

= repository_nav parent.repository, :ontologies, disable_actions: true

= ontology_nav parent, :entities

- unless parent.owl?
  = pagination do
    - unless collection.blank?
      = render partial: 'list'
    - else
      %h3 No entities found

- else
  - if @hierarchy_exists
    - unless show_classes?
      - unless @page_selected
        .btn-group#ontology_selections
          = link_to 'Class Hierarchy', '#hierarchy', class: 'btn btn-default mode btn-primary', id: 'hierarchy'
          = link_to 'Class Details', '#detail', class: 'btn btn-default mode', id: 'detail-page'
      - else
        .btn-group#ontology_selections
          = link_to 'Class Hierarchy', '#hierarchy', class: 'btn btn-default mode', id: 'hierarchy'
          = link_to 'Class Details', '#detail', class: 'btn btn-default mode btn-primary', id: 'detail-page'
      .owl_entities
        #class-hierarchy{class: (@page_selected) ? "hide" : ""}
          = render partial: 'treeview'

  .entities-detail
    = pagination do
      - unless collection.blank?
        = render partial: 'list'
      - else
        %h3 No entities found


.row
  .col-md-3
    = image_tag @user.gravatar_url, class: "img-responsive"
    %h1= @user.name
    %h2= @user.nickname
    %ul
      - unless @user.company.blank?
        %li= @user.company
      - unless @user.blog.blank?
        %li= link_to @user.blog, @user.blog
    %p
      = link_to @user.github_url do
        %i.icon-github-sign.icon-large
        = @user.nickname
        on GitHub

  .col-md-9

    - if @user.scrapers.empty?
      %h3 Has no scrapers

    - else
      %h3 Scrapers

      %ul
        - @user.scrapers.each do |scraper|
          %li
            %strong
              = link_to scraper.name, scraper
            - unless scraper.description.blank?
              —
              = scraper.description

    - if @user == current_user
      = link_to "Add scraper", new_scraper_path, class: "btn btn-default"

Make the user avatar a little prettier

.row
  .col-md-3
    = image_tag @user.gravatar_url, class: "img-responsive img-thumbnail"
    %h1= @user.name
    %h2= @user.nickname
    %ul
      - unless @user.company.blank?
        %li= @user.company
      - unless @user.blog.blank?
        %li= link_to @user.blog, @user.blog
    %p
      = link_to @user.github_url do
        %i.icon-github-sign.icon-large
        = @user.nickname
        on GitHub

  .col-md-9

    - if @user.scrapers.empty?
      %h3 Has no scrapers

    - else
      %h3 Scrapers

      %ul
        - @user.scrapers.each do |scraper|
          %li
            %strong
              = link_to scraper.name, scraper
            - unless scraper.description.blank?
              —
              = scraper.description

    - if @user == current_user
      = link_to "Add scraper", new_scraper_path, class: "btn btn-default"


.row
  .col-md-3
    .panel.panel-default.header-part
      .panel-heading
        .row
          .col-md-12
            %h3.panel-title
              %i.fa.fa-list
              Report
      .panel-body
        = render 'actions'

  .col-md-9
    = render @report_view

Refactor reports layout to allow the report view to determine how to render the report and optionally render a set of actions

.row
  .col-md-12
    .page-header
      %h1= @report.name

- if lookup_context.template_exists?("#{@report_view}_actions", 'reports', true)
  %nav.navbar.navbar-default
    .container-fluid
      .collapse.navbar-collapse
        = render :partial => "#{@report_view}_actions"

.row
  .col-md-12
    = render @report_view


- entity_name = controller.controller_name.singularize.underscore #account
- @entity = instance_variable_get("@#{entity_name}")
- id = called_from_landing_page? ? "edit_#{entity_name}" : dom_id(@entity)

- if @entity.errors.empty?
  - if called_from_landing_page?
    crm.flip_form('edit_#{entity_name}');
    crm.set_title('edit_#{entity_name}', '#{h @entity.id}');
    = refresh_sidebar(:show, :summary)
  - else
    $('##{id}').replaceWith('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
    $('##{id}').effect("highlight", { duration:1500 });
  $('#flash').html('#{j t(:sample_updated)} - #{j @sample.name}'.);
  crm.flash('notice', false)
- else
  $('##{id}').html('#{ j render(:partial => "edit") }');
  $('##{id}').effect("shake", { duration:250, distance: 6 });
  $('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();

= hook(:entity_update, self, {entity: @entity})

Remove flash from Samples Update. Was causing issues.

- entity_name = controller.controller_name.singularize.underscore #account
- @entity = instance_variable_get("@#{entity_name}")
- id = called_from_landing_page? ? "edit_#{entity_name}" : dom_id(@entity)

- if @entity.errors.empty?
  - if called_from_landing_page?
    crm.flip_form('edit_#{entity_name}');
    crm.set_title('edit_#{entity_name}', '#{h @entity.id}');
    = refresh_sidebar(:show, :summary)
  - else
    $('##{id}').replaceWith('#{ j render(:partial => entity_name, :collection => [ @entity ]) }');
    $('##{id}').effect("highlight", { duration:1500 });
    = refresh_sidebar(:index, :filters)
- else
  $('##{id}').html('#{ j render(:partial => "edit") }');
  $('##{id}').effect("shake", { duration:250, distance: 6 });
  $('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();

= hook(:entity_update, self, {entity: @entity})


.row
  .col-md-12
    .panel.panel-default.header-part
      .panel-heading
        .row
          .col-md-4
            %h3.panel-title
              %i.fa.fa-list
              Funding Sources
          .col-md-8
            = render 'index_actions'
      .panel-body
        .row
          .col-md12
          - if @funding_sources.empty?
            %p No matching funding sources found
          - else
            = render 'index_table'

= render 'index_scripts'

Fix typo in index view

.row
  .col-md-12
    .panel.panel-default.header-part
      .panel-heading
        .row
          .col-md-4
            %h3.panel-title
              %i.fa.fa-list
              Funding Sources
          .col-md-8
            = render 'index_actions'
      .panel-body
        .row
          .col-md-12
          - if @funding_sources.empty?
            %p No matching funding sources found
          - else
            = render 'index_table'

= render 'index_scripts'


%h1 Fork Scraperwiki scraper

%p This is where you can pick a Scraperwiki scraper, optionally choose a name for it on GitHub and fork away!

.alert.alert-warning
  Note that things are currently restricted to Ruby scrapers

%p
  = link_to "Browse and Search", "https://classic.scraperwiki.com/browse/"
  for a scraper on ScraperWiki Classic that you want to fork. Then paste the url of the scraper below.

= semantic_form_for :scraper, url: scraperwiki_forks_path do |f|
  = f.inputs do
    = f.input :scraperwiki_url, hint: "The full URL for the ScraperWiki Classic scraper that you want to fork to here", input_html: {placeholder: "https://classic.scraperwiki.com/scrapers/city_of_sydney_development_applications/", class: "span8"}
    = f.input :name, hint: "Name to give the scraper here and on GitHub", input_html: {placeholder: "my-scraper", class: "span4"}
  = f.actions do
    = f.action :submit, label: "Fork Scraperwiki scraper"

Make example name on scraperwiki fork page better

%h1 Fork Scraperwiki scraper

%p This is where you can pick a Scraperwiki scraper, optionally choose a name for it on GitHub and fork away!

.alert.alert-warning
  Note that things are currently restricted to Ruby scrapers

%p
  = link_to "Browse and Search", "https://classic.scraperwiki.com/browse/"
  for a scraper on ScraperWiki Classic that you want to fork. Then paste the url of the scraper below.

= semantic_form_for :scraper, url: scraperwiki_forks_path do |f|
  = f.inputs do
    = f.input :scraperwiki_url, hint: "The full URL for the ScraperWiki Classic scraper that you want to fork to here", input_html: {placeholder: "https://classic.scraperwiki.com/scrapers/city_of_sydney_development_applications/"}
    = f.input :name, hint: "Name to give the scraper here and on GitHub", input_html: {placeholder: "city_of_sydney_development_applications"}
  = f.actions do
    = f.action :submit, label: "Fork Scraperwiki scraper"


= render "head"

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

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

                = commit.author_link avatar: true, size: 16

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

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

= render "head"

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

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

                = commit.author_link avatar: true, size: 16

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


%html
  %head
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    =# stylesheet_link_tag 'mailers/mailer'
    -# Include CSS inline
    %style= File.read(Rails.root.join('app/assets/stylesheets/mailers/mailer.css'))
  %body(leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0")
    %center
      %table(cellpadding="0" cellspacing="0" border="0" width="100%")
        %tbody
          %tr
            %td.header
              = link_to image_tag(URI.join(root_url,"assets/images/logo.png").to_s, :alt => "Errbit"), root_url

          = yield

          %tr
            %td.footer
              Your loyal servant,
              = link_to 'Errbit', root_url

Use asset pipeline logo in email

%html
  %head
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    =# stylesheet_link_tag 'mailers/mailer'
    -# Include CSS inline
    %style= File.read(Rails.root.join('app/assets/stylesheets/mailers/mailer.css'))
  %body(leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0")
    %center
      %table(cellpadding="0" cellspacing="0" border="0" width="100%")
        %tbody
          %tr
            %td.header
              = link_to image_tag(asset_path('images/logo.png'), :alt => "Errbit"), root_url

          = yield

          %tr
            %td.footer
              Your loyal servant,
              = link_to 'Errbit', root_url


= field_wrapper_for(form, field) do
  = form.send field.view_helper, field.method_name, field.html_attributes

- if field.ckeditor
  - head_javascript "ckeditor/ckeditor.js"
  - head_javascript do
    - if !File.exists?(File.join(Rails.root, 'public/javascripts/ckeditor/ckeditor.js'))
      alert("Install CKEditor using rake admin:ckeditor_download");
    $j(document).ready(function($){
    CKEDITOR.replace('#{field.dom_id}',
    {
    customConfig : '#{field.ckeditor_config_js}'
    }
    );
    });

Make the config.js file path not escaped and actually loaded

= field_wrapper_for(form, field) do
  = form.send field.view_helper, field.method_name, field.html_attributes

- if field.ckeditor
  - head_javascript "ckeditor/ckeditor.js"
  - head_javascript do
    - if !File.exists?(File.join(Rails.root, 'public/javascripts/ckeditor/ckeditor.js'))
      alert("Install CKEditor using rake admin:ckeditor_download");
    $j(document).ready(function($){
    CKEDITOR.replace('#{field.dom_id}',
    {
    customConfig : '#{field.ckeditor_config_js.html_safe}'
    }
    );
    });


= image_tag('fully_funded.png')
.small.uppcased_button_text
  .fully_funded_no_text This News Item is Fully Funded!
  .double_content_border

Clean up layout of fully-funded donation widget

= image_tag('fully_funded.png', :alt => 'This News Item is Fully Funded!')


- if resource.distributions.any?
  - c.cobble(:distributions) do
    .toolbar
      = tool_to :new.ta, {action: :new, controller: :target_distributions, target_id: resource.id }, tool: :new

    = target_distributions_chronologies(resource.distributions.order(:started_at), resource)

Remove condition to add a new target distribution.


%article.hentry.post{:id => "post-#{post.id}"}
  %header
    = render "blog/shared/previous-and-next-post", :post => post
    = render "blog/shared/share-buttons-for-post", :post => post

    %h1.entry-title
      = link_to_post(post,
      :text => textilize_without_paragraph(post.title),
      :rel => "bookmark")

    .entry-meta
      .entry-published
        = pretty_date(post.published_at, :class => "published")

      .entry-author
        = t(".written_by")
        = pretty_author(post.user)

  = adsense_block(:class => "adsense large-rect") do
    :plain
      <script>
        google_ad_client = "ca-pub-5288272203015721";
        google_ad_slot = "7303175719";
        google_ad_width = 336;
        google_ad_height = 280;
      </script>

  .entry-content
    = textilize(post.body)

  %footer

    = render "blog/shared/share-buttons-for-post", :post => post
    = render "blog/shared/donate-with-paypal"

    - unless post.tags.blank?
      .entry-tags
        Dieser Artikel wurde in den Kategorien
        = linked_tags_as_sentence(post.tags)
        einsortiert.

    = render "blog/shared/related-posts", :post => post

Put previous/next post links at the bottom of a post too

%article.hentry.post{:id => "post-#{post.id}"}
  %header
    = render "blog/shared/previous-and-next-post", :post => post
    = render "blog/shared/share-buttons-for-post", :post => post

    %h1.entry-title
      = link_to_post(post,
      :text => textilize_without_paragraph(post.title),
      :rel => "bookmark")

    .entry-meta
      .entry-published
        = pretty_date(post.published_at, :class => "published")

      .entry-author
        = t(".written_by")
        = pretty_author(post.user)

  = adsense_block(:class => "adsense large-rect") do
    :plain
      <script>
        google_ad_client = "ca-pub-5288272203015721";
        google_ad_slot = "7303175719";
        google_ad_width = 336;
        google_ad_height = 280;
      </script>

  .entry-content
    = textilize(post.body)

  %footer
    = render "blog/shared/share-buttons-for-post", :post => post
    = render "blog/shared/donate-with-paypal"
    = render "blog/shared/previous-and-next-post", :post => post

    - unless post.tags.blank?
      .entry-tags
        Dieser Artikel wurde in den Kategorien
        = linked_tags_as_sentence(post.tags)
        einsortiert.

    = render "blog/shared/related-posts", :post => post


-if item.has_image?
	= image_tag item.image.url

Add name to show image partial

%h4=item.name
-if item.desc
	=item.desc

-if item.has_image?
	= image_tag item.image.url


= render partial: 'shared/projectbar', locals: { project: @project }
.row
  .col-md-4
    = render partial: 'shared/projectstatuspanel', locals: { project: @project }
  .col-md-8
    .panel.panel-default
      .panel-heading
        = form_for_filterrific @filterrific, :html => { :class => 'form-horizontal' } do |f|
          .form-group
            .col-xs-12
              .input-group
                .input-group-btn
                  = link_to_button(reset_filterrific_url, "reset_filters", "remove")
                = f.text_field :search_title, :class => 'form-control filterrific-periodically-observed'
                - if thinker_signed_in?
                  .input-group-btn
                    = link_to_button(new_project_task_path, "new", "plus")
          = render partial: 'shared/filters', :locals => { :f => f }
      .panel-body{ :style => "padding: 0;" }
        = render_filterrific_spinner
        %table.table.table-condensed.table-hover#filterrific_results
          = render partial: 'list', locals: { tasks: @tasks }
    = paginate @tasks

Remove old button for reset filters

= render partial: 'shared/projectbar', locals: { project: @project }
.row
  .col-md-4
    = render partial: 'shared/projectstatuspanel', locals: { project: @project }
  .col-md-8
    .panel.panel-default
      .panel-heading
        = form_for_filterrific @filterrific, :html => { :class => 'form-horizontal' } do |f|
          .form-group
            .col-xs-12
              .input-group
                = f.text_field :search_title, :class => 'form-control filterrific-periodically-observed'
                - if thinker_signed_in?
                  .input-group-btn
                    = link_to_button(new_project_task_path, "new", "plus")
          = render partial: 'shared/filters', :locals => { :f => f }
      .panel-body{ :style => "padding: 0;" }
        = render_filterrific_spinner
        %table.table.table-condensed.table-hover#filterrific_results
          = render partial: 'list', locals: { tasks: @tasks }
    = paginate @tasks


#fieldset
  %h3
    = title
  %table.table.table-bordered.table-striped.table-hover.table-summary-screen
    %thead
      %tr
        - headers.each do |h|
          %th
            = h(h)
    %tbody
      - value.each do |row|
        - if row[:link]
          - click = row[:explorer] ? row[:link] : "DoNav('#{row[:link]}');"
          %tr{:onclick => click}
            - col_order.each do |col|
              %td{:title => _("View the table")}
                = row[col.to_sym]
        - else
          %tr.no-hover
            - col_order.each do |col|
              %td
                = row[col.to_sym]

Fix duplicate DOM id in textual summaries.

%fieldset
  %h3
    = title
  %table.table.table-bordered.table-striped.table-hover.table-summary-screen
    %thead
      %tr
        - headers.each do |h|
          %th
            = h(h)
    %tbody
      - value.each do |row|
        - if row[:link]
          - click = row[:explorer] ? row[:link] : "DoNav('#{row[:link]}');"
          %tr{:onclick => click}
            - col_order.each do |col|
              %td{:title => _("View the table")}
                = row[col.to_sym]
        - else
          %tr.no-hover
            - col_order.each do |col|
              %td
                = row[col.to_sym]


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

%a.conversation{:href => conversation_path(conversation)}
  .stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
    = person_image_tag(conversation.author)

    .subject
      .message_count
        = conversation.messages.size
      - if unread_counts[conversation.id].to_i > 0
        .unread_message_count
          = unread_counts[conversation.id].to_i

      %div{ :class => direction_for(conversation.subject) }
        = conversation.subject[0..30]

    .last_author
      .timestamp
        = t('ago', :time =>  time_ago_in_words(conversation.updated_at))
      - if not authors[conversation.id].nil?
        = authors[conversation.id].name

      - if conversation.participants.size > 2
        %span.participant_count
          = "(+#{conversation.participants.size - 1})"

Fix my quick fix (use '.present?' instead of 'not .nil?')

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

%a.conversation{:href => conversation_path(conversation)}
  .stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
    = person_image_tag(conversation.author)

    .subject
      .message_count
        = conversation.messages.size
      - if unread_counts[conversation.id].to_i > 0
        .unread_message_count
          = unread_counts[conversation.id].to_i

      %div{ :class => direction_for(conversation.subject) }
        = conversation.subject[0..30]

    .last_author
      .timestamp
        = t('ago', :time =>  time_ago_in_words(conversation.updated_at))
      - if authors[conversation.id].present?
        = authors[conversation.id].name

      - if conversation.participants.size > 2
        %span.participant_count
          = "(+#{conversation.participants.size - 1})"


= render "head"

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

  .file_holder
    .file_title
      %i.icon-file
      %span.file_name
        = @tree.name
        %small blame
      %span.options
        = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank"
        = link_to "history", project_commits_path(@project, @id), class: "btn very_small"
        = link_to "source", project_tree_path(@project, @id), class: "btn very_small"
    .file_content.blame
      %table
        - @blame.each do |commit, lines|
          - commit = Commit.new(commit)
          - commit = CommitDecorator.decorate(commit)
          %tr
            %td.author
              = image_tag gravatar_icon(commit.author_email, 16)
              = commit.author_name
            %td.blame_commit

              %code= link_to commit.short_id, project_commit_path(@project, commit)
              = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit), class: "row_title" rescue "--broken encoding"
            %td.lines
              = preserve do
                %pre
                  = Gitlab::Encode.utf8 lines.join("\n")

Use tree/blob_actions partial for blame view and fix file name encoding

= render "head"

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

  .file_holder
    .file_title
      %i.icon-file
      %span.file_name
        = @tree.name.force_encoding('utf-8')
        %small= number_to_human_size @tree.size
      %span.options= render "tree/blob_actions"
    .file_content.blame
      %table
        - @blame.each do |commit, lines|
          - commit = Commit.new(commit)
          - commit = CommitDecorator.decorate(commit)
          %tr
            %td.author
              = image_tag gravatar_icon(commit.author_email, 16)
              = commit.author_name
            %td.blame_commit

              %code= link_to commit.short_id, project_commit_path(@project, commit)
              = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit), class: "row_title" rescue "--broken encoding"
            %td.lines
              = preserve do
                %pre
                  = Gitlab::Encode.utf8 lines.join("\n")


- attributes_for(resource_class).each do |name|
  - t.attribute name, :format => :long
- t.action :show, :link_to => :resource_path, :class => 'btn small'
- t.action :edit, :link_to => :edit_resource_path, :class => 'btn small'
- t.action :delete, :method => :delete, :confirm => "Are you sure?", :class => 'btn small danger'

Use default actions in default table view

- attributes_for(resource_class).each do |name|
  - t.attribute name, :format => :long
- t.default_actions


%table.table.literate
  %tbody
    - @sections.each do |section|
      %tr{:id => "line-#{section[:at]}"}
        %td{:colspan => section[:code_lines] ? 1 : 2}
          %div.pilwrap
            %a.pilcrow{:href => "#line-#{section[:at]}"}
              = section[:at]
              ¶
          = section[:comment]
        - if section[:code]
          %td.code~ section[:code]

Clean out literate template a bit

%table.table.literate
  %tbody
    - @sections.each do |section|
      - next unless section[:code] || section[:comment]
      %tr{:id => "line-#{section[:at]}"}
        %td{:colspan => section[:code] ? 1 : 2}
          %div.pilwrap
            %a.pilcrow{:href => "#line-#{section[:at]}"}
              = section[:at]
              ¶
          ~ section[:comment]
        - if section[:code]
          %td.code~ section[:code]


.contextual
  = link_to 'Liste', project_path(@task.project), :class => 'icon icon-index'

%h1= t_title

= render "show"

Fix activities view (rename task => activity).

.contextual
  = link_to 'Liste', project_path(@activity.project), :class => 'icon icon-index'

%h1= t_title

= render "show"


!!!
%html
  %head
    %title Circle - Continuous Integration made easy

    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}

    -# Stylesheets first
    - if not params[:controller].start_with? "devise" then
      = stylesheet_link_tag "controller-specific/" + params[:controller]
    = stylesheet_link_tag "application"

    -# JS
    = airbrake_javascript_notifier # Load airbrake before any other JS, to catch run-time exceptions.

    = javascript_include_tag "application"
    - if not params[:controller].start_with? "devise" then
      = javascript_include_tag "controller-specific/" + params[:controller]

    = csrf_meta_tags

    = render :partial => 'google-analytics'

  %body
    %ul.hmenu
      - flash.each do |name, msg|
        = content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)

    = yield

Remove airbrake - Stuart says it's shit, and that they're doing a new one.

!!!
%html
  %head
    %title Circle - Continuous Integration made easy

    %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}

    -# Stylesheets first
    - if not params[:controller].start_with? "devise" then
      = stylesheet_link_tag "controller-specific/" + params[:controller]
    = stylesheet_link_tag "application"

    -# JS
    = javascript_include_tag "application"
    - if not params[:controller].start_with? "devise" then
      = javascript_include_tag "controller-specific/" + params[:controller]

    = csrf_meta_tags

    = render :partial => 'google-analytics'

  %body
    %ul.hmenu
      - flash.each do |name, msg|
        = content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)

    = yield


.row.filter-box.animate-show{"ng-show" => "filtersActive && totalActive() > 0"}
  .small-12.columns
    %a.button.secondary.small.expand{"ng-click" => "clearAll()"}
      %i.ofn-i_009-close
      Clear all filters

Add another class so we can see which row is clear filters

.row.filter-box.clear-filters.animate-show{"ng-show" => "filtersActive && totalActive() > 0"}
  .small-12.columns
    %a.button.secondary.small.expand{"ng-click" => "clearAll()"}
      %i.ofn-i_009-close
      Clear all filters


!!!
%html
  %head
    %meta{charset: "utf-8"}
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
    %meta{content: "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}
    %title= current_page.data.title || "OpenFW"
    = stylesheet_link_tag "all"
    = javascript_include_tag  "modernizr"

  %body{class: page_classes}

    %nav.top-bar{"data-topbar" => ""}
      %ul.title-area
        %li.name
          %h1
            %a{:href => "#"} OpenFW
        %li.toggle-topbar.menu-icon
          %a{:href => "#"}
            %span Menu
      %section.top-bar-section
        %ul.right
          %li.active= link_to "Get the Code", "https://github.com/OpenFW"
        %ul.left
          %li= link_to "About", "#about"
          %li= link_to "Projects", "#projects"

    = yield

    %section#footer
      .row
        .small-12.columns
          %p © 2013 OpenFW

    = javascript_include_tag  "all"

Add link to data portal

!!!
%html
  %head
    %meta{charset: "utf-8"}
    %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
    %meta{content: "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}
    %title= current_page.data.title || "OpenFW"
    = stylesheet_link_tag "all"
    = javascript_include_tag  "modernizr"

  %body{class: page_classes}

    %nav.top-bar{"data-topbar" => ""}
      %ul.title-area
        %li.name
          %h1
            %a{:href => "#"} OpenFW
        %li.toggle-topbar.menu-icon
          %a{:href => "#"}
            %span Menu
      %section.top-bar-section
        %ul.right
          %li.active= link_to "Get the Code", "https://github.com/OpenFW"
        %ul.left
          %li= link_to "About", "#about"
          %li= link_to "Projects", "#projects"
          %li= link_to "Data", "http://data.openfw.in"

    = yield

    %section#footer
      .row
        .small-12.columns
          %p © 2013 OpenFW

    = javascript_include_tag  "all"


!!!
%html{ :xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => :en,  :lang => :en }
  %head
    %meta{ "http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
    %title= t(:crm_admin_page)
    == <!-- #{controller.controller_name} : #{controller.action_name} -->
    = stylesheet_link_tag "screen", "modalbox.css"
    = stylesheet_link_tag "print", :media => "print"
    %style= yield :styles

    = javascript_include_tag :defaults, :cache => "cache/all"
    = javascript_include_tag "crm_classes.js", "modalbox.js", :cache => "cache/classes"
    = hook(:javascript_includes, self)

    %script{:type => "text/javascript"}= yield :javascript
    = csrf_meta_tag

  %body.admin
    = render "layouts/admin/header"
    = render "layouts/tabbed"
    = render "layouts/footer"
    %script{:type => "text/javascript"}
      = "crm.base_url = '#{Setting.base_url}';" unless Setting.base_url.blank?
      = get_browser_timezone_offset
      = yield :javascript_epilogue

Fix stylesheet and javascript include tags in admin layout

!!!
%html{ :xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => :en,  :lang => :en }
  %head
    %meta{ "http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
    %title= t(:crm_admin_page)
    == <!-- #{controller.controller_name} : #{controller.action_name} -->
    = stylesheet_link_tag :application
    = stylesheet_link_tag :print, :media => 'print'
    %style= yield :styles

    = javascript_include_tag :application
    = javascript_include_tag 'crm_classes'
    = hook(:javascript_includes, self)

    %script{:type => "text/javascript"}= yield :javascript
    = csrf_meta_tag

  %body.admin
    = render "layouts/admin/header"
    = render "layouts/tabbed"
    = render "layouts/footer"
    %script{:type => "text/javascript"}
      = "crm.base_url = '#{Setting.base_url}';" unless Setting.base_url.blank?
      = get_browser_timezone_offset
      = yield :javascript_epilogue


.list-group-item
  .row.budget-label
    .col-xs-6.col-sm-6.col-md-6
      = number_to_currency project.timer_values, unit: "h", precision: 0
      - unless project.timer_values.zero?
        %span.label.label-default{data: {toggle: 'tooltip'}, title: I18n.t(:"labels.budget.uninvoiced")}
          = number_to_currency project.timer_values_uninvoiced, unit: "h", precision: 0
    .col-xs-6.col-sm-6.col-md-6.text-right
      = number_to_currency (project.budget - project.timer_values), unit: "h", precision: 0
  .progress.progress-striped.text-center{title: I18n.t(:"labels.budget.limit", hours: project.budget.to_i), data: {toggle: "tooltip"}}

    .progress-bar{class: budget_progress(project), role: "progressbar", aria: {valuemin: "0", valuemax: "100"},style: "width: #{project.budget_percent_invoiced}%"}
    .progress-bar{class: "progress-bar-info", role: "progressbar", aria: {valuemin: "0", valuemax: "100"}, style: "width: #{project.budget_percent_uninvoiced}%"}
  .project-name.text-right
    = project.name_with_customer

Change precision on Dashboard budgets

.list-group-item
  .row.budget-label
    .col-xs-6.col-sm-6.col-md-6
      = number_to_currency project.timer_values, unit: "h", precision: 2
      - unless project.timer_values.zero?
        %span.label.label-default{data: {toggle: 'tooltip'}, title: I18n.t(:"labels.budget.uninvoiced")}
          = number_to_currency project.timer_values_uninvoiced, unit: "h", precision: 2
    .col-xs-6.col-sm-6.col-md-6.text-right
      = number_to_currency (project.budget - project.timer_values), unit: "h", precision: 0
  .progress.progress-striped.text-center{title: I18n.t(:"labels.budget.limit", hours: project.budget.to_i), data: {toggle: "tooltip"}}

    .progress-bar{class: budget_progress(project), role: "progressbar", aria: {valuemin: "0", valuemax: "100"},style: "width: #{project.budget_percent_invoiced}%"}
    .progress-bar{class: "progress-bar-info", role: "progressbar", aria: {valuemin: "0", valuemax: "100"}, style: "width: #{project.budget_percent_uninvoiced}%"}
  .project-name.text-right
    = project.name_with_customer


- title = t('mailboxer.new.title', user: @recipient.username)
- content_for :meta_title, title

#default_header_section
  %h1
    = title
#main
  .span-13
    = form_for @message do |f|
      %fieldset
        %legend= t('mailboxer.new.legend')
        -if @message.errors.any?
          .error
            %h2= t('mailboxer.new.errors', errors: pluralize(@message.errors.count, "error"))
            %ul
              -@message.errors.full_messages.each do |msg|
                %li '#{ msg }'
        %dl
          %dt
            = f.label :subject, t('mailboxer.new.subject')
          %dd
            -if params['subject']
              = f.text_field :subject, value: params['subject']
            -else
              = f.text_field :subject
          %dd
            = f.text_area :body, size: '80x3', maxlength: 1500, required: true
            %p.description
              = t 'mailboxer.new.body_max'
        = f.hidden_field :recipients
        = f.submit t('mailboxer.new.submit')
  .span-1
    %br
  .span-8
    = render partial: "partials/google_adsense", locals: { class_name: "desktop google_adsense_336_280", ad_slot: "7225596067"}
    = render partial: "partials/google_adsense", locals: { class_name: "mobile google_adsense_336_280", ad_slot: "7225596067"}

Use helper method for displaying messaging errors

- title = t('mailboxer.new.title', user: @recipient.username)
- content_for :meta_title, title

#default_header_section
  %h1
    = title
#main
  .span-13
    = form_for @message do |f|
      %fieldset
        %legend= t('mailboxer.new.legend')
        = errors_for(@message)

        %dl
          %dt
            = f.label :subject, t('mailboxer.new.subject')
          %dd
            -if params['subject']
              = f.text_field :subject, value: params['subject']
            -else
              = f.text_field :subject
          %dd
            = f.text_area :body, size: '80x3', maxlength: 1500, required: true
            %p.description
              = t 'mailboxer.new.body_max'
        = f.hidden_field :recipients
        = f.submit t('mailboxer.new.submit')
  .span-1
    %br
  .span-8
    = render partial: "partials/google_adsense", locals: { class_name: "desktop google_adsense_336_280", ad_slot: "7225596067"}
    = render partial: "partials/google_adsense", locals: { class_name: "mobile google_adsense_336_280", ad_slot: "7225596067"}


- setting.errors.full_messages.each do |e|
  .alert.alert-danger= e

.form-group
  = form.label :path
  = form.hidden_field :path
  = form.text_field :path, class: "form-control", disabled: true
.form-group
  = form.label :parse_type
  = form.hidden_field :parse_type
  = form.text_field :parse_type, class: "form-control", disabled: true

.form-group
  %label= setting.parse_type
  - parse_config = setting.create_parser
  = form.fields("parse[0]", model: parse_config, builder: FluentdFormBuilder) do |f|
    - f.object.common_options.each do |key|
      = f.hidden_field(key)
      = f.field(key, disabled: true)

= form.field(:tag)
= form.field(:pos_file)

.well.well-sm
  %h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
    = icon('fa-caret-down')
    = t('terms.advanced_setting')
  #advanced-setting.collapse
    .form-group
      = form.field(:rotate_wait)
    .form-group
      = form.field(:read_from_head)
    .form-group
      = form.field(:refresh_interval)

Add hidden field for owned plugin type

- setting.errors.full_messages.each do |e|
  .alert.alert-danger= e

.form-group
  = form.label :path
  = form.hidden_field :path
  = form.text_field :path, class: "form-control", disabled: true
.form-group
  = form.label :parse_type
  = form.hidden_field :parse_type
  = form.text_field :parse_type, class: "form-control", disabled: true

.form-group
  %label= setting.parse_type
  - parse_config = setting.create_parser
  = hidden_field_tag("setting[parse[0]][type]", form.object.parse_type)
  = form.fields("parse[0]", model: parse_config, builder: FluentdFormBuilder) do |f|
    - f.object.common_options.each do |key|
      = f.hidden_field(key)
      = f.field(key, disabled: true)

= form.field(:tag)
= form.field(:pos_file)

.well.well-sm
  %h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
    = icon('fa-caret-down')
    = t('terms.advanced_setting')
  #advanced-setting.collapse
    .form-group
      = form.field(:rotate_wait)
    .form-group
      = form.field(:read_from_head)
    .form-group
      = form.field(:refresh_interval)


%p
  Project was moved to another location
%p
  The project is now located under
  = link_to namespace_project_url(@project.namespace, @project) do
    = @project.name_with_namespace
%p
  To update the remote url in your local repository run (for ssh):
%p{ style: "background:$background-color; padding:10px; border:1px solid #ddd" }
  git remote set-url origin #{@project.ssh_url_to_repo}
%p
  or for http(s):
%p{ style: "background:$background-color; padding:10px; border:1px solid #ddd" }
  git remote set-url origin #{@project.http_url_to_repo}
%br

Fix email template css for project moved emails

%p
  Project was moved to another location
%p
  The project is now located under
  = link_to namespace_project_url(@project.namespace, @project) do
    = @project.name_with_namespace
%p
  To update the remote url in your local repository run (for ssh):
%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
  git remote set-url origin #{@project.ssh_url_to_repo}
%p
  or for http(s):
%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
  git remote set-url origin #{@project.http_url_to_repo}
%br


%h3
Hello!
%p.lead
  = "Welcome to #{ Spree::Config[:site_name] }!"

/ Heading Panel
%p
%p.callout
  %strong
    Your login
%p
  Your login email is
  %strong
    = @user.email
%p
  You can start shopping online now at
  %a{:href => "#{ spree.root_url }", :target => "_blank"}
    -# Remove http:// and trailing slashes from root url if they exist
    = spree.root_url.sub(/http:\/\//,"").sub(/\/$/,"")
%p
%hr/
%p
%p.lead
  Thanks for joining the network. We look forward to introducing you to many fantastic farmers, wonderful food hubs and delicious food!
%p
  We welcome all your questions and feedback; you can use the
  %em
    Send Feedback button on the site or email us at
    %a{:href => "mailto:hello@openfoodnetwork.org", :target => "_blank"}
      hello@openfoodnetwork.org

= render 'shared/mailers/signoff'

= render 'shared/mailers/social_and_contact'

Format fiddling in user signup confirm email


%h1 New Author

= simple_form_for @author, url: authors_path do |f|
  = f.input :name, label: false, placeholder: "Name"
  = f.input :email, as: :email, label: false, placeholder: "Email"
  = f.input :avatar, as: :file, label: "Photo"
  = f.submit "Create New Author", class: 'btn-a'

Integrate Authors New view styles

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

    .label.mbm Create a New Author
    .form.card.card--b
      = simple_form_for @author, url: authors_path do |f|

        .form-item
          = f.input :name, placeholder: 'Name',
            label_html: { class: 'label form-label' },
            input_html: { class: 'form-input' }

        .form-item
          = f.input :email, as: :email, placeholder: 'Email',
            label_html: { class: 'label form-label' },
            input_html: { class: 'form-input' }

        .form-item
          = f.input :avatar, as: :file, label: 'Photo'

        = f.submit 'Create', class: 'btn btn--a form-btn'


%li{id: "#{list.id}"}
  %span.name
    = link_to wrap(list.name), list_path(list.id)
    - if list.private?
      %i.icon-lock

    %span.item-count
    | #{pluralize(list.items.size, 'item')}

    %span.timestamp
      Updated #{time_ago_in_words(list.updated_at)} ago.

    - if signed_in? && current_user?(list.user)
      = link_to "delete", list, method: :delete, |
        data: { confirm: "You sure?" },          |
        title: list.name                         |

Remove list delete link for lists with items.

%li{id: "#{list.id}"}
  %span.name
    = link_to wrap(list.name), list_path(list.id)
    - if list.private?
      %i.icon-lock

    %span.item-count
    | #{pluralize(list.items.size, 'item')}

    %span.timestamp
      Updated #{time_ago_in_words(list.updated_at)} ago.

    - if signed_in? && current_user?(list.user) && list.items.count == 0
      = link_to "delete", list, method: :delete, |
        data: { confirm: "You sure?" },          |
        title: list.name                         |


- content_for :posts_title do
  Unread Posts
  = link_to hidden_posts_path do
    .view-button Hidden »
  = link_to unread_posts_path(started: (params[:started] != 'true')) do
    .view-button
      - if params[:started] == 'true'
        Show All Threads
      - else
        Only Show Opened Threads

= form_tag mark_posts_path, :method => :post do
  = render partial: 'posts/list', locals: {posts: @posts, show_unread_count: true, check_box_name: 'marked_ids[]', path: :unread_posts_path}
  - unless @posts.empty?
    %table
      %tr
        %td.right-align.padding-5{colspan: 8, class: cycle('even', 'odd')}
          = submit_tag "Hide from Unread", class: 'button'
          = submit_tag "Mark Read", class: 'button'
%br

= form_tag mark_boards_path, :method => :post do
  %table.float-left.form-table
    %tr
      %th Mark Entire Continuity
    %tr
      %td.even.padding-5.centered
        = select_tag :board_id,
                     options_from_collection_for_select(Board.all, :id, :name, params[:board_id]),
                     {class: 'chosen-select', prompt: '— Choose Continuity —'}
    %tr
      %th.subber
        = submit_tag "Hide from Unread", class: 'button'
        = submit_tag "Mark Read", class: 'button'

Sort boards in Unread page dropdown by name

- content_for :posts_title do
  Unread Posts
  = link_to hidden_posts_path do
    .view-button Hidden »
  = link_to unread_posts_path(started: (params[:started] != 'true')) do
    .view-button
      - if params[:started] == 'true'
        Show All Threads
      - else
        Only Show Opened Threads

= form_tag mark_posts_path, :method => :post do
  = render partial: 'posts/list', locals: {posts: @posts, show_unread_count: true, check_box_name: 'marked_ids[]', path: :unread_posts_path}
  - unless @posts.empty?
    %table
      %tr
        %td.right-align.padding-5{colspan: 8, class: cycle('even', 'odd')}
          = submit_tag "Hide from Unread", class: 'button'
          = submit_tag "Mark Read", class: 'button'
%br

= form_tag mark_boards_path, :method => :post do
  %table.float-left.form-table
    %tr
      %th Mark Entire Continuity
    %tr
      %td.even.padding-5.centered
        = select_tag :board_id,
                     options_from_collection_for_select(Board.all.sort_by{|b|b.name.downcase}, :id, :name, params[:board_id]),
                     {class: 'chosen-select', prompt: '— Choose Continuity —'}
    %tr
      %th.subber
        = submit_tag "Hide from Unread", class: 'button'
        = submit_tag "Mark Read", class: 'button'


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

Add galleries to icon view page

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

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


%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.


-# Not all inputs are ng inputs, they don't make the ng-form dirty on change.
-# ng-change is only valid for inputs, not for a form.
-# So we use onchange and have to get the scope to access the ng controller
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise_form",
  "ng-controller" => 'enterpriseCtrl',
  "ng-cloak" => true } do |f|

  %save-bar{ dirty: "enterprise_form.$dirty", persist: "true" }
    %input.red{ type: "button", value: t(:update), ng: { click: "submit()", disabled: "!enterprise_form.$dirty" } }
    %input{ type: "button", ng: { value: "enterprise_form.$dirty ? '#{t(:cancel)}' : '#{t(:close)}'", click: "cancel('#{main_app.admin_enterprises_path}')" } }

  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'admin/shared/side_menu'
      .one.column
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f

Set enterprise form dirty on any change

-# Not all inputs are ng inputs, they don't make the ng-form dirty on change.
-# ng-change is only valid for inputs, not for a form.
-# So we use onchange and have to get the scope to access the ng controller
= form_for [main_app, :admin, @enterprise], html: { name: "enterprise_form",
  onchange: "angular.element(enterprise_form).scope().setFormDirty()",
  "ng-controller" => 'enterpriseCtrl',
  "ng-cloak" => true } do |f|

  %save-bar{ dirty: "enterprise_form.$dirty", persist: "true" }
    %input.red{ type: "button", value: t(:update), ng: { click: "submit()", disabled: "!enterprise_form.$dirty" } }
    %input{ type: "button", ng: { value: "enterprise_form.$dirty ? '#{t(:cancel)}' : '#{t(:close)}'", click: "cancel('#{main_app.admin_enterprises_path}')" } }

  .row
    .sixteen.columns.alpha
      .four.columns.alpha
        = render 'admin/shared/side_menu'
      .one.column
      .eleven.columns.omega.fullwidth_inputs
        = render 'form', f: f


= render 'shared/header'

.repo-listing{'ng-controller' => 'ReposController'}
  %nav
    %ul
      %li.pull-left
        %span.active-count
          #{t('active_repos')}:
          {{(repos | filter:{active: true}).length}} of {{repos.length}}
      %li.pull-right
        %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'}
          %i.fa.fa-refresh
          %span{'ng-bind' => 'syncButtonText'}
    .search-wrapper
      %i.fa.fa-search
      %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'}
  %ul.repos{'ng-hide' => 'syncingRepos'}
    %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'}
      %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'}
      %span.name {{repo.full_github_name}}

Use simpler data binding for text displaying

= render 'shared/header'

.repo-listing{'ng-controller' => 'ReposController'}
  %nav
    %ul
      %li.pull-left
        %span.active-count
          #{t('active_repos')}:
          {{(repos | filter:{active: true}).length}} of {{repos.length}}
      %li.pull-right
        %a{'href' => '', 'ng-click' => 'sync()', 'ng-class' => '{disabled: syncingRepos}'}
          %i.fa.fa-refresh
          %span {{ syncButtonText }}
    .search-wrapper
      %i.fa.fa-search
      %input.search{'type' => 'text', 'placeholder' => 'search by repo name', 'ng-model' => 'search.name'}
  %ul.repos{'ng-hide' => 'syncingRepos'}
    %li.repo{'ng-repeat' => 'repo in repos | filter:search', 'ng-class' => '{active: repo.active, processing: repo.processing}'}
      %a.toggle{'href' => '', 'ng-click' => 'toggle(repo)'}
      %span.name {{repo.full_github_name}}


%table.editions
  %thead
    %tr
      %th Title
      %th Author
      %th Type
  %tbody
    -editions.each do |edition|
      = content_tag_for(:tr, edition) do
        %td.title= link_to edition.title, admin_edition_path(edition), title: "View edition #{edition.title}"
        %td.author= edition.author.name
        %td.type= edition.document.type

Add description when there are no content rows in document table.

%table.editions
  %thead
    %tr
      %th Title
      %th Author
      %th Type
  %tbody
    -editions.each do |edition|
      = content_tag_for(:tr, edition) do
        %td.title= link_to edition.title, admin_edition_path(edition), title: "View edition #{edition.title}"
        %td.author= edition.author.name
        %td.type= edition.document.type
    -if editions.blank?
      %tr
        %td{colspan: 3} No documents have been created.


%ul.nav-links.new-session-tabs.nav-tabs.nav{ class: ('custom-provider-tabs' if form_based_providers.any?) }
  - if crowd_enabled?
    %li.nav-item
      = link_to "Crowd", "#crowd", class: "nav-link #{active_when(form_based_auth_provider_has_active_class?(:crowd))}", 'data-toggle' => 'tab'
  - @ldap_servers.each_with_index do |server, i|
    %li.nav-item
      = link_to server['label'], "##{server['provider_name']}", class: "nav-link #{active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain))} qa-ldap-tab", 'data-toggle' => 'tab'

  = render_if_exists 'devise/shared/tab_smartcard'

  - if password_authentication_enabled_for_web?
    %li.nav-item
      = link_to 'Standard', '#login-pane', class: 'nav-link qa-standard-tab', 'data-toggle' => 'tab'
  - if allow_signup?
    %li.nav-item
      = link_to 'Register', '#register-pane', class: 'nav-link qa-register-tab', 'data-toggle' => 'tab'

Resolve CE/EE diffs in devise ldap tabs

%ul.nav-links.new-session-tabs.nav-tabs.nav{ class: ('custom-provider-tabs' if form_based_providers.any?) }
  - if crowd_enabled?
    %li.nav-item
      = link_to "Crowd", "#crowd", class: "nav-link #{active_when(form_based_auth_provider_has_active_class?(:crowd))}", 'data-toggle' => 'tab'
  = render_if_exists "devise/shared/kerberos_tab"
  - @ldap_servers.each_with_index do |server, i|
    %li.nav-item
      = link_to server['label'], "##{server['provider_name']}", class: "nav-link #{active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain))} qa-ldap-tab", 'data-toggle' => 'tab'

  = render_if_exists 'devise/shared/tab_smartcard'

  - if password_authentication_enabled_for_web?
    %li.nav-item
      = link_to 'Standard', '#login-pane', class: 'nav-link qa-standard-tab', 'data-toggle' => 'tab'
  - if allow_signup?
    %li.nav-item
      = link_to 'Register', '#register-pane', class: 'nav-link qa-register-tab', 'data-toggle' => 'tab'


%section#team.container
  %h3.section__title.section__title--blue= I18n.t("corporate.team.title")
  .row
    - %w{mike thibault yann sylvain}.each do |member|
      .col-3.col-3--centered
        %img{src: gravatar_for(I18n.t("corporate.team.#{member}.email")), class: "avatar", alt: I18n.t("corporate.team.#{member}.email")}
        %h4= I18n.t("corporate.team.#{member}.name")
        %p= I18n.t("corporate.team.#{member}.html")
        %ul.social-networks
          %li
            %a{href: "https://github.com/#{I18n.t("corporate.team.#{member}.github")}", target: "_blank"} Github
          %li
            %a{href: "https://twitter.com/#{I18n.t("corporate.team.#{member}.twitter")}", target: "_blank"} Twitter
          - if I18n.t("corporate.team.#{member}").has_key?(:linkedin)
            %li
              %a{href: I18n.t("corporate.team.#{member}.linkedin"), target: "_blank"} LinkedIn

Remove team members LinkedIn link


%h1 Instructions
%p
  Thank you for helping us categorize these organizations!
  Each page includes a link to 40 organizations. The idea is that each person
  will take a different page. To go to a different page, add '?page=' and the
  page number to the end of the browser's website address (the URL). For example, here is
  = link_to "page 2.", "#{root_url}?page=2"
%p
  To start, click on one of the links, which will take you to the details page
  for the organization, where you will find further instructions. Thank you!
%br
%p
  - @locations.each do |location|
    - location.services.each do |service|
      - if service.updated_at < (Time.now - 4.hours)
        %ul
          = link_to location.name, "/#{location.id}?page=#{params[:page]}"

Update instructions to let them know they can skip some orgs

%h1 Instructions
%p
  Thank you for helping us categorize these organizations!
  Each page includes a link to 40 organizations. The idea is that each person
  will take a different page. To go to a different page, add '?page=' and the
  page number to the end of the browser's website address (the URL). For example, here is
  = link_to "page 2.", "#{root_url}?page=2"
%p
  To start, click on one of the links, which will take you to the details page
  for the organization, where you will find further instructions. If an organization
  is not human-services related, feel free to skip it. Thank you!
%br
%p
  - @locations.each do |location|
    - location.services.each do |service|
      - if service.updated_at < (Time.now - 4.hours)
        %ul
          = link_to location.name, "/#{location.id}?page=#{params[:page]}"


.btn-group.pull-right.panel-action
  %button.btn.btn-primary.btn-sm.dropdown-toggle{:data => {:toggle => 'dropdown'}}
    I want to
    %span.caret
  %ul.dropdown-menu{:role => 'menu'}
    - if can? :create, Grant
      %li
        = link_to new_grant_path do
          %i.fa.fa-plus.fa-fw
          = "Add Grant";

= form_tag grants_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do
  .form-group
    = select_tag(:funding_source_id, options_for_select(FundingSource.all.collect{|a| [a.name, a.id]}, :selected => @funding_source_id), :class => "form-control", :prompt => "Any Source...")
  .form-group
    = select_tag(:fiscal_year, options_for_select(@fiscal_years, :selected => @fiscal_year), :class => "form-control", :prompt => "Any FY...")

:javascript
  $(document).ready(function() {

    $('#funding_source_id, #fiscal_year').change(function() {
      $('#filter_form').submit();
    });

  });

Fix layout issue with button

.btn-group.pull-right.panel-action{:style => 'margin-left: 5px;'}
  %button.btn.btn-primary.btn-sm.dropdown-toggle{:data => {:toggle => 'dropdown'}}
    I want to
    %span.caret
  %ul.dropdown-menu{:role => 'menu'}
    - if can? :create, Grant
      %li
        = link_to new_grant_path do
          %i.fa.fa-plus.fa-fw
          = "Add Grant";

= form_tag grants_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do
  .form-group
    = select_tag(:funding_source_id, options_for_select(FundingSource.all.collect{|a| [a.name, a.id]}, :selected => @funding_source_id), :class => "form-control", :prompt => "Any Source...")
  .form-group
    = select_tag(:fiscal_year, options_for_select(@fiscal_years, :selected => @fiscal_year), :class => "form-control", :prompt => "Any FY...")

:javascript
  $(document).ready(function() {

    $('#funding_source_id, #fiscal_year').change(function() {
      $('#filter_form').submit();
    });

  });


.col-lg-6
  .widget
    .widget-title
      = icon :database
      Latest projects
      %small.text-muted
        (Live)

    .widget-body.medium.no-padding{:"data-scroll-down" => true}
      .table-responsive
        %table.table.latest_projects
          %tbody
            - @new_projects.each do |project|
              - if project.default_branch
                %tr{:class => created_at_classes(project)}
                  %td= link_to_project(project, project.id)
                  %td= link_to(project.name, project.source_code_url, :target => '_blank')
                  %td.text-right
                    - if project.default_branch.latest_revision
                      - if project.default_branch.latest_revision.badge_in_readme?
                        %span.text-success= icon(:check)
                      = link_to_project project, image_tag(BadgeMarkup.new(project, project.default_branch).image_path(:svg))

Fix latest_projects widget style in admin

.col-lg-6
  .widget
    .widget-title
      = icon :database
      Latest projects
      %small.text-muted
        (Live)

    .widget-body.medium.no-padding{:"data-scroll-down" => true}
      .table-responsive
        %table.table.projects
          %tbody
            - @new_projects.each do |project|
              - if project.default_branch
                %tr{:class => created_at_classes(project)}
                  %td= link_to_project(project, project.id)
                  %td= link_to(project.name, project.source_code_url, :target => '_blank')
                  %td.text-right
                    - if project.default_branch.latest_revision
                      - if project.default_branch.latest_revision.badge_in_readme?
                        %span.text-success= icon(:check)
                      = link_to_project project, image_tag(BadgeMarkup.new(project, project.default_branch).image_path(:svg))


- if issues.any? and @board.groups.count > 1
  %div.rdb-column-head=t :rdb_x_issues, :count => issues.count
- issues.sort_by{|i| i.priority.position}.reverse.each do |issue|
  = render :partial => 'rdb_dashboard/issues/issue', :locals => { :issue => issue, :group => group }

Sort issues of same priority by id to avoid ordering jumps.

- if issues.any? and @board.groups.count > 1
  %div.rdb-column-head=t :rdb_x_issues, :count => issues.count
- issues.sort_by{|i| i.priority.position}.reverse.sort_by(&:id).each do |issue|
  = render :partial => 'rdb_dashboard/issues/issue', :locals => { :issue => issue, :group => group }


.navbar.navbar-fluid-top
  .navbar-inner
    .container-fluid
      %a.btn.btn-navbar(data-target=".nav-collapse" data-toggle="collapse")
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      %a.brand(href="#") Vizir
      .container.nav-collapse
        %ul.nav
          %li= link_to "Reload DSL", "/app/reload_dsl", :remote => true
          %li= link_to "DSL Data", "/app/dsl"
          %li= link_to "Link 3", "/path3"

Remove the "Link 3" menu item


---
title: Write/Speak/Code Meetups
page_class: 'meetups'
alias : meetups
---

%h1 Write/Speak/Code Meetups

- data[:meetups].each do |slug, meetup|
  %section.meetup
    %h2
      = meetup.name
    %ul.social
      %li
        = link_to 'Join Meetup', meetup.meetup_url, target: '_blank'
      %li
        = link_to meetup.twitter, target: '_blank' do
          .fa.fa-twitter
      %li
        = link_to "mailto: #{meetup.email}", target: '_blank' do
          .fa.fa-envelope
    %h4
      %strong Organizers
    = partial 'people_list', locals: { filter: "meetups-#{slug}" }

%section.meetup
  %h3 Are you interested in starting a Write/Speak/Code meetup?
  %p
    Contact us at
    = link_to 'info@writespeakcode.com', 'mailto:info@writespeakcode.com'
    if you are interested in starting a meetup near you.

Fix redirect from meetups to chapters

---
title: Write/Speak/Code Meetups
page_class: 'meetups'
alias : ['meetups.html', 'meetups/index.html']
---

%h1 Write/Speak/Code Meetups

- data[:meetups].each do |slug, meetup|
  %section.meetup
    %h2
      = meetup.name
    %ul.social
      %li
        = link_to 'Join Meetup', meetup.meetup_url, target: '_blank'
      %li
        = link_to meetup.twitter, target: '_blank' do
          .fa.fa-twitter
      %li
        = link_to "mailto: #{meetup.email}", target: '_blank' do
          .fa.fa-envelope
    %h4
      %strong Organizers
    = partial 'people_list', locals: { filter: "meetups-#{slug}" }

%section.meetup
  %h3 Are you interested in starting a Write/Speak/Code meetup?
  %p
    Contact us at
    = link_to 'info@writespeakcode.com', 'mailto:info@writespeakcode.com'
    if you are interested in starting a meetup near you.


!!!
%html{:lang => 'en'}
  %head
    %meta{:content => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type'}/
    %meta{:charset => 'utf-8'}/
    %meta{:content => 'IE=edge', 'http-equiv' => 'X-UA-Compatible'}/
    %meta{:content => 'width=device-width, initial-scale=1.0 maximum-scale=1.0, user-scalable=no', :name => 'viewport'}/
    = include_page_title
    // FIXME(auxesis): add helpers to set page description
    %meta{:content => 'Got Gastro helps you find out about potential food safety problems when eating out or buying food.'}
    - require_css('vendor/font-awesome.min')
    - require_css('vendor/bootstrap.min')
    - require_css('vendor/main.min')
    = include_required_css
    // FIXME(auxesis): add helpers to link canonical (with absolute url)
    %link{:href => link_to('/'), :rel => 'canonical'}/
    %link{:href => link_to('/img/favicon.png?1'), :rel => 'icon'}/
    %link{:href => link_to('/img/apple-touch-icon-precomposed.png?1'), :rel => 'apple-touch-icon-precomposed'}/
    - require_js('vendor/jquery.min')
  %body
    = yield

    = include_required_js

Fix path to main css

!!!
%html{:lang => 'en'}
  %head
    %meta{:content => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type'}/
    %meta{:charset => 'utf-8'}/
    %meta{:content => 'IE=edge', 'http-equiv' => 'X-UA-Compatible'}/
    %meta{:content => 'width=device-width, initial-scale=1.0 maximum-scale=1.0, user-scalable=no', :name => 'viewport'}/
    = include_page_title
    // FIXME(auxesis): add helpers to set page description
    %meta{:content => 'Got Gastro helps you find out about potential food safety problems when eating out or buying food.'}
    - require_css('vendor/font-awesome.min')
    - require_css('vendor/bootstrap.min')
    - require_css('main.min')
    = include_required_css
    // FIXME(auxesis): add helpers to link canonical (with absolute url)
    %link{:href => link_to('/'), :rel => 'canonical'}/
    %link{:href => link_to('/img/favicon.png?1'), :rel => 'icon'}/
    %link{:href => link_to('/img/apple-touch-icon-precomposed.png?1'), :rel => 'apple-touch-icon-precomposed'}/
    - require_js('vendor/jquery.min')
  %body
    = yield

    = include_required_js


%h2
  - if @host.nil?
    Users sorted by reports
  - else
    Users with the same IP
#users
  .row.row-cols-1.row-cols-sm-2.row-cols-md-3
    - @users.each do |u, c|
      .col
        = render 'moderation/userbox', user: u, count: (c || 0)

Add bottom padding to userbox col in moderation view

%h2
  - if @host.nil?
    Users sorted by reports
  - else
    Users with the same IP
#users
  .row.row-cols-1.row-cols-sm-2.row-cols-md-3
    - @users.each do |u, c|
      .col.pb-3
        = render 'moderation/userbox', user: u, count: (c || 0)


= form_tag case_workers_claims_path, method: :get do
  = hidden_field_tag :tab, params[:tab]
  = hidden_field_tag :sort, params[:sort]
  = hidden_field_tag :direction, params[:direction]
  = text_field_tag :search_maat, params[:search_maat], placeholder: 'MAAT reference no.'
  = text_field_tag :search_defendant, params[:search_defendant], placeholder: 'Defendant'
  = text_field_tag :search_case_worker, params[:search_case_worker], placeholder: 'Case worker name or email'
  = submit_tag 'Search', class: 'button'

Hide case worker search for non-admin case workers

= form_tag case_workers_claims_path, method: :get do
  = hidden_field_tag :tab, params[:tab]
  = hidden_field_tag :sort, params[:sort]
  = hidden_field_tag :direction, params[:direction]
  = text_field_tag :search_maat, params[:search_maat], placeholder: 'MAAT reference no.'
  = text_field_tag :search_defendant, params[:search_defendant], placeholder: 'Defendant'
  - if current_user.persona.admin?
    = text_field_tag :search_case_worker, params[:search_case_worker], placeholder: 'Case worker name or email'
  = submit_tag 'Search', class: 'button'


.row
  .col-md-8
    = semantic_form_for(@conference, :url => admin_conferences_path) do |f|
      = f.inputs 'Basic Information' do
        = f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'",
                          input_html: { required: 'required' }
        = f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
                                input_html: { required: 'required' }
      = f.inputs 'Scheduling' do
        = f.input :timezone, as: :time_zone, default: Time.zone.name, hint: 'Please select in what time zone your conference will take place.'
        = f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }
        = f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', required: 'required' }
      = f.actions do
        = f.action :submit, button_html: {class: 'btn btn-success pull-right'}

Add pattern & title attr to 'short title' field & prepended URL.

.row
  .col-md-8
    = semantic_form_for(@conference, :url => admin_conferences_path) do |f|
      = f.inputs 'Basic Information' do
        = f.input :title, hint: "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'",
                          input_html: { required: 'required' }
        = f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
                                input_html: { required: 'required', pattern: '[a-z0-9-]+', title: 'Only numbers, dashes, and/or lower cased letters.' }, :prepend => 'http://myconf.com/'
      = f.inputs 'Scheduling' do
        = f.input :timezone, as: :time_zone, default: Time.zone.name, hint: 'Please select in what time zone your conference will take place.'
        = f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }
        = f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', required: 'required' }
      = f.actions do
        = f.action :submit, button_html: {class: 'btn btn-success pull-right'}


= self.with_options(:scope => "users.daily_task_reminder_email") do |i18n|
  .email{ :style => email_global }
    %p= i18n.t(:daily_task_reminder_from_teambox)

    = tasks_for_daily_reminder(@tasks[:late], @user, i18n.t(:late_tasks))
    = tasks_for_daily_reminder(@tasks[:today], @user, i18n.t(:tasks_for_today))
    = tasks_for_daily_reminder(@tasks[:tomorrow], @user, i18n.t(:tasks_for_tomorrow))
    = tasks_for_daily_reminder(@tasks[:for_next_two_weeks], @user, i18n.t(:tasks_for_next_two_weeks))
    = tasks_for_daily_reminder(@tasks[:no_due_date], @user, i18n.t(:tasks_without_a_due_date))

  .footer{ :style => email_text(:small) }
    %p= i18n.t(:you_receive_this_message_html, :link => link_to(i18n.t(:settings_page), account_notifications_url))

Revert "fix dep. warn in the view"

- self.with_options(:scope => "users.daily_task_reminder_email") do |i18n|
  .email{ :style => email_global }
    %p= i18n.t(:daily_task_reminder_from_teambox)

    = tasks_for_daily_reminder(@tasks[:late], @user, i18n.t(:late_tasks))
    = tasks_for_daily_reminder(@tasks[:today], @user, i18n.t(:tasks_for_today))
    = tasks_for_daily_reminder(@tasks[:tomorrow], @user, i18n.t(:tasks_for_tomorrow))
    = tasks_for_daily_reminder(@tasks[:for_next_two_weeks], @user, i18n.t(:tasks_for_next_two_weeks))
    = tasks_for_daily_reminder(@tasks[:no_due_date], @user, i18n.t(:tasks_without_a_due_date))

  .footer{ :style => email_text(:small) }
    %p= i18n.t(:you_receive_this_message_html, :link => link_to(i18n.t(:settings_page), account_notifications_url))


.col-sm-12.trip_result-filter{style: 'padding: 5px;'}
  = f.label :trip_result_id, translate_helper(:trip_result)
  = f.collection_check_boxes :trip_result_id, [[TripResult::SHOW_ALL_ID, 'Show All']] + TripResult.by_provider(current_provider).order(:name).pluck(:id, :name) + [[TripResult::UNSCHEDULED_ID, 'Unscheduled']], :first, :last, { checked: session[:trip_result_id] }, {class: 'trip-result-filter', style: 'vertical-align: initial;'} do |b|
    .col-sm-12
      = b.check_box + " " + b.text

:javascript
  $(function() {
    var show_all_id = "#{TripResult::SHOW_ALL_ID}";
    $('.trip-result-filter[value=' + show_all_id+ ']').change(function() {
      $('.trip-result-filter[value!=' + show_all_id + ']').prop('checked', $(this).is(':checked'));
    });
  });

Rename Unscheduled trip result filter label to Pending

.col-sm-12.trip_result-filter{style: 'padding: 5px;'}
  = f.label :trip_result_id, translate_helper(:trip_result)
  = f.collection_check_boxes :trip_result_id, [[TripResult::SHOW_ALL_ID, 'Show All']] + TripResult.by_provider(current_provider).order(:name).pluck(:id, :name) + [[TripResult::UNSCHEDULED_ID, 'Pending']], :first, :last, { checked: session[:trip_result_id] }, {class: 'trip-result-filter', style: 'vertical-align: initial;'} do |b|
    .col-sm-12
      = b.check_box + " " + b.text

:javascript
  $(function() {
    var show_all_id = "#{TripResult::SHOW_ALL_ID}";
    $('.trip-result-filter[value=' + show_all_id+ ']').change(function() {
      $('.trip-result-filter[value!=' + show_all_id + ']').prop('checked', $(this).is(':checked'));
    });
  });


%p.instructions copypasta is a collaborative editing tool.  Readers submit edits, authors approve changes, everyone wins.
=form_for @account, :url => signup_path, :html => {:id => 'signup'} do |f|
  =fields_for @editor do |e|
    %h4 Enter your email address to join the beta
    -if @editor.errors.length > 0
      .error
        %ul
          -@editor.errors.keys.each do |f|
            -@editor.errors[f].each do |e|
              %li= f.to_s.humanize + ' ' + e
    %div=e.text_field :email
  .options= f.submit 'Next: Get the code!'

%p.instructions This tool is for you if you've ever received an email, comment, or smoke signal saying "hey, it's spelled pasta... not rasta".

Copy edits from a lovely user

%p.instructions Copypasta is a collaborative editing tool.  Readers submit edits, authors approve changes, everyone wins.
=form_for @account, :url => signup_path, :html => {:id => 'signup'} do |f|
  =fields_for @editor do |e|
    %h4 Enter your email address to join the beta.
    -if @editor.errors.length > 0
      .error
        %ul
          -@editor.errors.keys.each do |f|
            -@editor.errors[f].each do |e|
              %li= f.to_s.humanize + ' ' + e
    %div=e.text_field :email
  .options= f.submit 'Next: Get the code!'

%p.instructions This tool is for you if you've ever received an email, comment, or smoke signal saying "hey, it's spelled pasta... not rasta".


- if current_user.try(:just_signed_up?)
  :coffee
    mixpanel.alias "#{current_user.id}"
    mixpanel.track "user signed up"
- if current_user.try(:just_signed_in?)
  :coffee
    mixpanel.identify "#{current_user.id}"

:coffee
  mixpanel.track "page viewed", {'URL': window.location.pathname}
- if @run.present?
  :coffee
    mixpanel.track_links "#download-menu a", "run downloaded", (el) ->
      $.extend gon.run.tracking_info, { 'Desired Program': el.innerHTML }
    mixpanel.track_links "#disown", "run disowned"
    mixpanel.track_links "#delete", "run deleted"
    mixpanel.track_links "#sign_in",  "user signed in"
    mixpanel.track_links "#sign_out", "user signed out"

Fix tracking for sign in/out

- if current_user.try(:just_signed_up?)
  :coffee
    mixpanel.alias "#{current_user.id}"
    mixpanel.track "user signed up"
- if current_user.try(:just_signed_in?)
  :coffee
    mixpanel.identify "#{current_user.id}"

:coffee
  mixpanel.track "page viewed", {'URL': window.location.pathname}
  mixpanel.track_links "#sign_in",  "user signed in"
  mixpanel.track_links "#sign_out", "user signed out"
- if @run.present?
  :coffee
    mixpanel.track_links "#download-menu a", "run downloaded", (el) ->
      $.extend gon.run.tracking_info, { 'Desired Program': el.innerHTML }
    mixpanel.track_links "#disown", "run disowned"
    mixpanel.track_links "#delete", "run deleted"


= form_for [:organizer, event] do |f|
  %div
    = f.label :title
    = f.text_field :title, :placeholder => "What is your event called?"
  %div
    = f.label :logo_url, value: "URL of logo"
    = f.text_field :logo_url, :placeholder => "URL to the logo of the event."
  %div
    = f.label :description
    = f.text_area :description, :placeholder => "Give information that will help people decide what talks to give."
  %div.small-7
    = f.label :date, value: "Date of event"
    = f.date_field :date
  %div.small-7
    = f.label :start_time, value: "Start time"
    = f.text_field :start_time, :placeholder => "What time does the event start?"
  = f.fields_for :event_talk, event_talk do |et|
    %div
      = et.label :talk_time
      = et.text_field :talk_time, placeholder: "How long is each talk?"
    %div
      = et.label :talk_slots
      = et.text_field :talk_slots, placeholder: "How many talk slots are there?"
  %div.right
    = f.submit button_text, :class => "button radius"

Make it explicit that talk time is in minutes

= form_for [:organizer, event] do |f|
  %div
    = f.label :title
    = f.text_field :title, :placeholder => "What is your event called?"
  %div
    = f.label :logo_url, value: "URL of logo"
    = f.text_field :logo_url, :placeholder => "URL to the logo of the event."
  %div
    = f.label :description
    = f.text_area :description, :placeholder => "Give information that will help people decide what talks to give."
  %div.small-7
    = f.label :date, value: "Date of event"
    = f.date_field :date
  %div.small-7
    = f.label :start_time, value: "Start time"
    = f.text_field :start_time, :placeholder => "What time does the event start?"
  = f.fields_for :event_talk, event_talk do |et|
    %div
      = et.label :talk_time, value: "Talk time in minutes"
      = et.text_field :talk_time, placeholder: "How long is each talk in minutes?"
    %div
      = et.label :talk_slots
      = et.text_field :talk_slots, placeholder: "How many talk slots are there?"
  %div.right
    = f.submit button_text, :class => "button radius"


%div{"bo-if" => "producer.email || producer.website || producer.address.phone"}
  %h3 Contact

  %p{"bo-if" => "producer.email"}
    %a{"ng-href" => "mailto:{{producer.email | stripUrl}}", target: "_blank" }
      %i.ofn-i_050-mail-circle
      {{ producer.email | stripUrl }}

  %p{"ng-if" => "producer.address.phone"}
    WE NEED A PHONE ICON
    {{ producer.address.phone }}

  %p{"ng-if" => "producer.website"}
    %a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" }
      %i.ofn-i_049-web
      {{ producer.website | stripUrl }}

Update contact markup to reflect new design

%div.modal-centered{"bo-if" => "producer.email || producer.website || producer.address.phone"}
  %h5.modal-header Contact
  %p{"ng-if" => "producer.address.phone"}
    {{ producer.address.phone }}

  %p{"bo-if" => "producer.email"}
    %a{"ng-href" => "mailto:{{producer.email | stripUrl}}", target: "_blank" }
      {{ producer.email | stripUrl }}

  %p{"ng-if" => "producer.website"}
    %a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" }
      {{ producer.website | stripUrl }}


!!!
%html
  %head
    %title MwebEvents
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "bootstrap_and_overrides", :media => "all"

    = javascript_include_tag "application"
    = javascript_include_tag "twitter/bootstrap"

    = csrf_meta_tags

    = yield :head

  %body{:class => "#{controller_name_for_view} #{params[:action]}"}

    .container
      %ul.nav.nav-pills.pull-right
        - if current_user
          %p
            Hello
            = current_user.email
          %li.active
            = link_to t('.logout'), main_app.destroy_user_session_path, :method => 'delete'

        - else
          %li.active
            = link_to t('.login'), main_app.new_user_session_path
          %li
            = link_to t('.register'), main_app.new_user_registration_path

    .container-fluid
      = render partial: "shared/flash_messages", flash: flash
      = yield

Remove duplicate inclusion of bootstrap in sample app

!!!
%html
  %head
    %title MwebEvents
    = stylesheet_link_tag    "application", :media => "all"

    = javascript_include_tag "application"

    = csrf_meta_tags

    = yield :head

  %body{:class => "#{controller_name_for_view} #{params[:action]}"}

    .container
      %ul.nav.nav-pills.pull-right
        - if current_user
          %p
            Hello
            = current_user.email
          %li.active
            = link_to t('.logout'), main_app.destroy_user_session_path, :method => 'delete'

        - else
          %li.active
            = link_to t('.login'), main_app.new_user_session_path
          %li
            = link_to t('.register'), main_app.new_user_registration_path

    .container-fluid
      = render partial: "shared/flash_messages", flash: flash
      = yield


.position-buttons-panel{ng-show: 'undecided()'}
  %h4.lmo-card-subheading{translate: 'position_buttons_panel.heading'}

  .position_buttons_panel__buttons
    %button.position-button.position-button--yes{ng-click: 'select("yes")'}
      .sr-only{translate: 'vote_form.i_agree'}

    %button.position-button.position-button--abstain{ng-click: 'select("abstain")'}
      .sr-only{translate: 'vote_form.i_abstain'}

    %button.position-button.position-button--no{ng-click: 'select("no")'}
      .sr-only{translate: 'vote_form.i_disagree'}

    %button.position-button.position-button--block{ng-click: 'select("block")'}
      .sr-only{translate: 'vote_form.i_block'}

Remove vote buttons on closed proposals

.position-buttons-panel{ng-show: 'proposal.isActive() && undecided()'}
  %h4.lmo-card-subheading{translate: 'position_buttons_panel.heading'}

  .position_buttons_panel__buttons
    %button.position-button.position-button--yes{ng-click: 'select("yes")'}
      .sr-only{translate: 'vote_form.i_agree'}

    %button.position-button.position-button--abstain{ng-click: 'select("abstain")'}
      .sr-only{translate: 'vote_form.i_abstain'}

    %button.position-button.position-button--no{ng-click: 'select("no")'}
      .sr-only{translate: 'vote_form.i_disagree'}

    %button.position-button.position-button--block{ng-click: 'select("block")'}
      .sr-only{translate: 'vote_form.i_block'}


%ul.category-summary-list
  - categories.select {|category| category.post_count > 0 }.each do |category|
    %li.category-summary-list__item.category-summary
      = link_to "#{category.name} (#{category.post_count})", category_url(slug: category.slug), class: "category-summary__title"

      %ul.category-summary__content-titles
        - if category.has_children?
          - category.children.each do |sub_category|
            %li.category-summary__content-title
              = link_to "#{sub_category.name} (#{sub_category.post_count})", category_url(slug: category.slug)

        - else
          - category.posts.published.order_by_recent.limit(7).each do |post|
            %li.category-summary__content-title
              = link_to post.title, post_url(public_id: post.public_id)

      = link_to "もっと見る", category_url(slug: category.slug), class: "category-summary__more-link"

Use sub category slug properly

%ul.category-summary-list
  - categories.select {|category| category.post_count > 0 }.each do |category|
    %li.category-summary-list__item.category-summary
      = link_to "#{category.name} (#{category.post_count})", category_url(slug: category.slug), class: "category-summary__title"

      %ul.category-summary__content-titles
        - if category.has_children?
          - category.children.each do |sub_category|
            %li.category-summary__content-title
              = link_to "#{sub_category.name} (#{sub_category.post_count})", category_url(slug: sub_category.slug)

        - else
          - category.posts.published.order_by_recent.limit(7).each do |post|
            %li.category-summary__content-title
              = link_to post.title, post_url(public_id: post.public_id)

      = link_to "もっと見る", category_url(slug: category.slug), class: "category-summary__more-link"


:markdown
  The `sqlite3` Node module makes it easy to store data in an SQLite database.

  To save data all you need to do is use the [`sqlite3` module](https://www.npmjs.com/package/sqlite3).

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

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

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

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

Move link to first mention of module

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

  To save data all you need to do is use the `sqlite3` module.

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

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

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

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


%header
  %nav.top-bar{:'data-topbar' => true}
    %ul.title-area
      %li.name
        %a.logo{href: '/'}
          %img{src: '/assets/images/logo.png'}

      %li.toggle-topbar.menu-icon
        %a{href:'#'}
          %span Menu
    %section.top-bar-section.overhang-right
      %ul.right
        %li
          %a{href: 'http://shop.becauseofhope.org/products'} Shop
        %li
          %a{href: '/donate/'} Donate
        %li.has-dropdown
          %a About Us
          %ul.dropdown
            %li
              %a{href: '/ourwork/'} Mission
            %li
              %a{href: '/getinvolved/'} Get Involved
        %li.has-dropdown
          %a Programs
          %ul.dropdown
            %li
              %a{href: '/programs/bssp/'} BSSP
            %li
              %a{href: '/programs/beads/'} Beads Project
            %li
              %a{href: '/agriculture/'} Agriculture
        %li
          %a{href: 'http://blog.becauseofhope.org'} Blog
  .row
    .large-12.columns.header-line
      %hr

Add Our Team link to Header

%header
  %nav.top-bar{:'data-topbar' => true}
    %ul.title-area
      %li.name
        %a.logo{href: '/'}
          %img{src: '/assets/images/logo.png'}

      %li.toggle-topbar.menu-icon
        %a{href:'#'}
          %span Menu
    %section.top-bar-section.overhang-right
      %ul.right
        %li
          %a{href: 'http://shop.becauseofhope.org/products'} Shop
        %li
          %a{href: '/donate/'} Donate
        %li.has-dropdown
          %a About Us
          %ul.dropdown
            %li
              %a{href: '/ourwork/'} Mission
            %li
              %a{href: '/ourteam/'} Our Team
            %li
              %a{href: '/getinvolved/'} Get Involved
        %li.has-dropdown
          %a Programs
          %ul.dropdown
            %li
              %a{href: '/programs/bssp/'} BSSP
            %li
              %a{href: '/programs/beads/'} Beads Project
            %li
              %a{href: '/agriculture/'} Agriculture
        %li
          %a{href: 'http://blog.becauseofhope.org'} Blog
  .row
    .large-12.columns.header-line
      %hr


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

  To save data all you need to do is use the `sqlite3` module.

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

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

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

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

Add a bit more explanation as this is more complex than suggested

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

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

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

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

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

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