- sub_header('Blog Entry', @blog_entry.title)

%ul#summary
  - if @blog_entry.published?
    %li
      %span.key Status
      %span.indicator.ok Published
    %li
      %span.key Published
      %span.value.indicator.ok.time= @blog_entry.published_at
  - else
    %li
      %span.key Status
      %span.indicator Unpublished
  %li
    %span.key Comments
    %span.value.indicator.neutral= @blog_entry.comments.count

= content(:class => 'inset') do
  = column(6) do
    %h3 Body
    %div.body
      = render_markdown(@blog_entry.body, 4)

    %h3 Assets (images, etc.)

    %ul.assets
      - @blog_entry.images.each do |image|
        %li.asset-preview
          %div.frame= image_tag(image.preview.url(:thumb_medium))

  = column(6, :class => 'last') do
    %h3 Comments

= footer do
  = edit_button(@blog_entry)
  = delete_button(@blog_entry)

Fix the display of assets.

- sub_header('Blog Entry', @blog_entry.title)

%ul#summary
  - if @blog_entry.published?
    %li
      %span.key Status
      %span.indicator.ok Published
    %li
      %span.key Published
      %span.value.indicator.ok.time= @blog_entry.published_at
  - else
    %li
      %span.key Status
      %span.indicator Unpublished
  %li
    %span.key Comments
    %span.value.indicator.neutral= @blog_entry.comments.count

= content(:class => 'inset') do
  = column(6) do
    %h3 Body
    %div.body
      = render_markdown(@blog_entry.body, 4)

    %h3 Assets (images, etc.)

    %ul.assets
      - @blog_entry.images.each do |image|
        %li.asset-preview
          %div.frame= image_tag(image.previews.url(:thumb_medium))

  = column(6, :class => 'last') do
    %h3 Comments

= footer do
  = edit_button(@blog_entry)
  = delete_button(@blog_entry)


.row
  .small-12.medium-6.columns
    %a.button.success.tiny.filterbtn{"ng-click" => "filtersActive = !filtersActive",
    "ng-show" => "FilterSelectorsService.selectors.length > 0"}
      {{ filterText(filtersActive) }}
      %i.ofn-i_005-caret-down{"ng-show" => "!filtersActive"}
      %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"}

    %a.button.secondary.tiny.filterbtn.disabled{"ng-show" => "FilterSelectorsService.selectors.length == 0"}
      No filters
  -# .small-12.medium-6.columns.text-right
  -#   %input{type: "checkbox", name: "profile"}><
  -#   %label Show profiles

Hide profile filter from search for the mo

.row
  .small-12.medium-6.columns
    %a.button.success.tiny.filterbtn{"ng-click" => "filtersActive = !filtersActive",
    "ng-show" => "FilterSelectorsService.selectors.length > 0"}
      {{ filterText(filtersActive) }}
      %i.ofn-i_005-caret-down{"ng-show" => "!filtersActive"}
      %i.ofn-i_006-caret-up{"ng-show" => "filtersActive"}

    %a.button.secondary.tiny.filterbtn.disabled{"ng-show" => "FilterSelectorsService.selectors.length == 0"}
      No filters
  .small-12.medium-6.columns.text-right
    .profile-checkbox

    / Hide until we're ready to work on this:

    /   %input{type: "checkbox", name: "profile"}><
    /   %label Show profiles
    / %button.button.secondary.tiny.help-btn.ng-scope{:popover => "Profiles do not have a shopfront on the Open Food Network,  but they may have their own physical or online shop elsewhere", "popover-placement" => "left"}><
    /   %i.ofn-i_013-help


- content_for :title, 'Admin'

- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Admin', admin_path

%h2 Manage

.row
  .col-md-4
    %h2 Site admin

    %ul#site_admin
      %li= link_to "Roles", roles_path
      %li= link_to "Forums", forums_path
      %li= link_to "CMS", comfy_admin_cms_path
      %li= link_to t('.garden_types'), garden_types_path

  .col-md-4
    %h2 Crop data admin
    %ul
      %li= link_to "Alternate names", alternate_names_path
      %li= link_to "Scientific names", scientific_names_path
  .col-md-4
    %h2 Member admin
    %ul
      %li= link_to "Newsletter subscribers", admin_newsletter_path
      %li= link_to "Members", admin_members_path

Tidy up admin landing page

- content_for :title, 'Admin'

- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Admin', admin_path

%h1 Manage #{ENV['GROWSTUFF_SITE_NAME']}

.row
  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'tablet-alt'
          Site admin
      .card-body
        %nav.nav
          %li= link_to "Roles", roles_path, class: 'nav-link'
          %li= link_to "Forums", forums_path, class: 'nav-link'
          %li= link_to "CMS", comfy_admin_cms_path, class: 'nav-link'
          %li= link_to t('.garden_types'), garden_types_path, class: 'nav-link'

  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'seedling'
          Crop data admin
      .card-body
        %nav.nav
          %li= link_to "Crop Wrangling", wrangle_crops_path, class: 'nav-link'
          %li= link_to "Alternate names", alternate_names_path, class: 'nav-link'
          %li= link_to "Scientific names", scientific_names_path, class: 'nav-link'

  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'user'
          Member admin
      .card-body
        %nav.nav
          %li= link_to "Newsletter subscribers", admin_newsletter_path, class: 'nav-link'
          %li= link_to "Members", admin_members_path, class: 'nav-link'


%section.user-profile
  .user-profile-column-left
    = render 'navigation'
    .user-profile-content
      = render 'list_watched'
  .user-profile-column-right
    = render 'user_avatar'
    = render 'list_added'

Disable rendering of user' avatar for now

%section.user-profile
  .user-profile-column-left
    = render 'navigation'
    .user-profile-content
      = render 'list_watched'
  .user-profile-column-right
    -# FIXME = render 'user_avatar'
    = render 'list_added'


#sign_in_or_user{:style=>'display:block; float: right'}

:javascript
  jQuery(document).ready(function() {
    $.ajax({
      type: "GET",
      url: '/dashboardapi/user_menu',
      success: function(data) {
        jQuery('#sign_in_or_user').html(data);
      }
    });
  });

Use a span not a div

%span#sign_in_or_user

:javascript
  jQuery(document).ready(function() {
    $.ajax({
      type: "GET",
      url: '/dashboardapi/user_menu',
      success: function(data) {
        jQuery('#sign_in_or_user').html(data);
      }
    });
  });


= form_for root_path, html: { id: 'new_scaled_scenario' } do |f|
  .row
    .field
      = render "pages/root_page/country_select"
    .field
      = render "pages/root_page/year_select"

  .row
    .field
      %p Scaling attribute
      %select(name="scaling_attribute")
        %option(value="number_of_residences") Number of residences
    .field
      %p Scale to…
      %input.string(type="text" name="scaling_value" placeholder="e.g. 1000, 250000, ...")

  #submit
    = render "pages/root_page/start_button"

Fix submission of scaled scenario form

= form_tag root_path, id: 'new_scaled_scenario' do
  .row
    .field
      = render "pages/root_page/country_select"
    .field
      = render "pages/root_page/year_select"

  .row
    .field
      %p Scaling attribute
      %select(name="scaling_attribute")
        %option(value="number_of_residences") Number of residences
    .field
      %p Scale to…
      %input.string(type="text" name="scaling_value" placeholder="e.g. 1000, 250000, ...")

  #submit
    = render "pages/root_page/start_button"


.hero-unit
  .pull-right
    = image_tag 'http://www.gravatar.com/avatar/9100faec8b9af029823b0a0ff208b942', class: 'img-circle'
  %h1 Quoty
  %h3 A place where people can share and save the most touching and inspiring quotes or words, in a modern way.

%ul#quotes
  = render @quotes

.well
  = render 'more_results'

Hide hero unit for signed in user

- unless signed_in?
  .hero-unit
    .pull-right
      = image_tag 'http://www.gravatar.com/avatar/9100faec8b9af029823b0a0ff208b942', class: 'img-circle'
    %h1 Quoty
    %h3 A place where people can share and save the most touching and inspiring quotes or words, in a modern way.

%ul#quotes
  = render @quotes

.well
  = render 'more_results'


- WulinMaster::GridState.create_default(@current_user.id, grid.name)

.grid_states_switcher
  =label_tag "grid_states", "Configuration:"
  =select_tag "grid_states", options_for_select(grid_states_options(@current_user.id, grid.name))
  %a{:href => "javascript:void(0);", :class => "configure_icon_s manage"}

:javascript
  $(function(){
    $("a.manage").click(function(){
      $.get('wulin_master/grid_states_manages/manage?' + "grid=#{grid.name}", function(data){
        $('body').append(data);
        var scope = $(".states_manage_form");

        scope.dialog({
          height: 250,
          width: 400,
          show: "blind",
          modal: true,
          close: function(event, ui) {
            scope.dialog('destroy');
            scope.remove();
          }
        });
      });
    });
  });

Change grid state label in grid toolbar (configuration -> custom views)

- WulinMaster::GridState.create_default(@current_user.id, grid.name)

.grid_states_switcher
  =label_tag "grid_states", "Custom Views:"
  =select_tag "grid_states", options_for_select(grid_states_options(@current_user.id, grid.name))
  %a{:href => "javascript:void(0);", :class => "configure_icon_s manage"}

:javascript
  $(function(){
    $("a.manage").click(function(){
      $.get('wulin_master/grid_states_manages/manage?' + "grid=#{grid.name}", function(data){
        $('body').append(data);
        var scope = $(".states_manage_form");

        scope.dialog({
          height: 250,
          width: 400,
          show: "blind",
          modal: true,
          close: function(event, ui) {
            scope.dialog('destroy');
            scope.remove();
          }
        });
      });
    });
  });


- if ENV["survey_url"].present? && cookies[:survey_url_closed] != "1" && !Rails.env.test?
  #service-announcement.bg-dark
    %div{ class: defined?(container) && container.present? ? container : "container" }
      .py-1.small.text-white.text-center
        %i.fa.fa-info-circle
        Please fill out our
        = succeed "." do
          = link_to "short survey", ENV["survey_url"], data: { object: "service-announcement-link", cookie: "survey_url_closed" }

        .float-right
          = link_to "#", data: { object: "service-announcement", cookie: "survey_url_closed", days: 14 }, class: "text-white no-underline" do
            ✗
- elsif cookies[:privacy_policy_closed] != "1" && !Rails.env.test? && false
  #service-announcement.bg-dark
    %div{ class: defined?(container) && container.present? ? "container" : container }
      .py-1.small.text-white.text-center
        %i.fa.fa-info-circle
        We've updated our
        = succeed "." do
          = link_to "privacy policy", privacy_policy_path, data: { object: "service-announcement-link", cookie: "privacy_policy_closed" }

        .float-right
          = link_to "#", data: { object: "service-announcement", cookie: "privacy_policy_closed", days: 14 }, class: "text-white no-underline" do
            ✗

Fix container for service announcement

- if ENV["survey_url"].present? && cookies[:survey_url_closed] != "1" && !Rails.env.test?
  #service-announcement.bg-dark
    %div{ class: defined?(container) && container.present? ? container : "container" }
      .py-1.small.text-white.text-center
        %i.fa.fa-info-circle
        Please fill out our
        = succeed "." do
          = link_to "short survey", ENV["survey_url"], data: { object: "service-announcement-link", cookie: "survey_url_closed" }

        .float-right
          = link_to "#", data: { object: "service-announcement", cookie: "survey_url_closed", days: 14 }, class: "text-white no-underline" do
            ✗
- elsif cookies[:privacy_policy_closed] != "1" && !Rails.env.test? && false
  #service-announcement.bg-dark
    %div{ class: defined?(container) && container.present? ? container : "container" }
      .py-1.small.text-white.text-center
        %i.fa.fa-info-circle
        We've updated our
        = succeed "." do
          = link_to "privacy policy", privacy_policy_path, data: { object: "service-announcement-link", cookie: "privacy_policy_closed" }

        .float-right
          = link_to "#", data: { object: "service-announcement", cookie: "privacy_policy_closed", days: 14 }, class: "text-white no-underline" do
            ✗


= render :partial => "layouts/flash_msg"
%h3= _("Report Results by User")

- if @sb[:orphaned_records].blank?
  = render :partial => 'layouts/info_msg', :locals => {:message => _("No Records Found.")}
- else
  %table.table.table-striped.table-bordered
    %thead
      %tr
        %th.table-view-pf-select
        %th= _("Username")
        %th= _("Count")
    %tbody
      - @sb[:orphaned_records].each do |rec|
        %tr.no-hover
          - question = _("Are you sure you want to delete orphaned records for user '%{user}'?") % {:user => rec[:userid]}
          - onclick = remote_function(:url => {:action => 'orphaned_records_delete', :userid => rec[:userid]}, :confirm => question)

          %td.table-view-pf-select{:onclick => onclick, :title => _("Click to delete Orphaned Records for this user")}
            = image_tag(image_path('toolbars/delete.png'), :class => "rollover small")
          %td= h(rec[:userid])
          %td= h(rec[:count])

Replace delete.png with fonticon in server diagnostics orphaned data

= render :partial => "layouts/flash_msg"
%h3= _("Report Results by User")

- if @sb[:orphaned_records].blank?
  = render :partial => 'layouts/info_msg', :locals => {:message => _("No Records Found.")}
- else
  %table.table.table-striped.table-bordered
    %thead
      %tr
        %th.table-view-pf-select
        %th= _("Username")
        %th= _("Count")
    %tbody
      - @sb[:orphaned_records].each do |rec|
        %tr.no-hover
          - question = _("Are you sure you want to delete orphaned records for user '%{user}'?") % {:user => rec[:userid]}
          - onclick = remote_function(:url => {:action => 'orphaned_records_delete', :userid => rec[:userid]}, :confirm => question)

          %td.table-view-pf-select
            %button.btn.btn-default{:onclick => onclick, :title => _("Click to delete Orphaned Records for this user")}
              %i.pficon.pficon-delete
          %td= h(rec[:userid])
          %td= h(rec[:count])


%table.char
  %tbody
    %tr.line
      %td.tab Titles
    - if @character.current_title && @character.titles
      - @character.titles.each do |t|
        %tr
          %td
            - if t == @character.current_title
              %span.current_title= t
            else
              %span= t

Add dash to else in title pane

%table.char
  %tbody
    %tr.line
      %td.tab Titles
    - if @character.current_title && @character.titles
      - @character.titles.each do |t|
        %tr
          %td
            - if t == @character.current_title
              %span.current_title= t
            - else
              %span= t


.container
  .row
    .col-md-6
      %h2 Recent New Users
      %p
        = link_to users_path do
          See more of the #{pluralize(User.count, "user")}…
      %ul.list-unstyled
        - User.all.order(created_at: :desc).limit(10).each do |user|
          %li
            = owner_image(user, 20)
            = link_to user.nickname, user
            - if user.name
              —
              = user.name
      %h2 Organizations with Scrapers
      %ul.list-unstyled
        - Organization.all_with_scrapers.each do |org|
          %li
            = owner_image(org, 20)
            = link_to org.nickname, org
            - if org.name
              —
              = org.name
    .col-md-6
      %h2 Recently Active Scrapers
      %p
        = link_to scrapers_path do
          See more of the #{pluralize(Scraper.count, "scraper")}…
      .list-group= sync partial: "scraper", collection: Scraper.order(:updated_at => :desc).limit(10)

Duplicate search form from search page to top of signed in landing page

.container
  .search-header
    =form_tag search_path, method: "get", class: "form-inline" do
      %h1.label-heading
        %label Search
      .input-group.col-sm-12.col-md-8.col-lg-7
        = hidden_field_tag :type, @type
        %input.form-control#query{required: "required", type: "search", autofocus: (@q.blank? ? true : false), maxlength: "256", name: "q", value: "#{@q if !@q.blank?}"}/
        .input-group-btn
          %button.btn.btn-primary{type: "submit"} Search

.container
  .row
    .col-md-6
      %h2 Recent New Users
      %p
        = link_to users_path do
          See more of the #{pluralize(User.count, "user")}…
      %ul.list-unstyled
        - User.all.order(created_at: :desc).limit(10).each do |user|
          %li
            = owner_image(user, 20)
            = link_to user.nickname, user
            - if user.name
              —
              = user.name
      %h2 Organizations with Scrapers
      %ul.list-unstyled
        - Organization.all_with_scrapers.each do |org|
          %li
            = owner_image(org, 20)
            = link_to org.nickname, org
            - if org.name
              —
              = org.name
    .col-md-6
      %h2 Recently Active Scrapers
      %p
        = link_to scrapers_path do
          See more of the #{pluralize(Scraper.count, "scraper")}…
      .list-group= sync partial: "scraper", collection: Scraper.order(:updated_at => :desc).limit(10)


- set_meta_tags description: "Search morph.io scrapers and users #{"for ‘" + @q + "’" if @q}"

.container
  %h1.label-heading
    Search
  = render partial: "search_form"
  - if @q
    - if @all_scrapers.total_count.zero? && @owners.empty?
      %h2 No results found
      %p= no_search_results_message("scrapers or users", @q)
      %p
        Suggestions:
      %ul
        %li check the spelling
        %li try some more general or alternate terms
      %p You could also try browsing all #{link_to "scrapers", scrapers_path} or #{link_to "users", users_path}.
    - else
      .search-results.row
        .col-xs-12
          = render partial: "search_type_nav"

        - if @type == "users"
          = render "results_owners"
        - else
          = render "results_scrapers"

Remove trailing space if there is no query

- set_meta_tags description: "Search morph.io scrapers and users#{" for ‘" + @q + "’" if @q}"

.container
  %h1.label-heading
    Search
  = render partial: "search_form"
  - if @q
    - if @all_scrapers.total_count.zero? && @owners.empty?
      %h2 No results found
      %p= no_search_results_message("scrapers or users", @q)
      %p
        Suggestions:
      %ul
        %li check the spelling
        %li try some more general or alternate terms
      %p You could also try browsing all #{link_to "scrapers", scrapers_path} or #{link_to "users", users_path}.
    - else
      .search-results.row
        .col-xs-12
          = render partial: "search_type_nav"

        - if @type == "users"
          = render "results_owners"
        - else
          = render "results_scrapers"


.page-header
  %h1 Download

  %p.lead
    Download your shopping receipts data as a spreadsheet

%p
  This is your shopping data so you should have access to it to do
  with as you please.

%p
  You can load this into pretty much any spreadsheet program such as
  #{link_to "OpenOffice", "https://www.openoffice.org/"},
  #{link_to "Google Docs", "https://docs.google.com/spreadsheets"},
  or
  = link_to "Microsoft Office", "https://products.office.com"
  to do your own analysis. The data is downloaded as a
  = link_to "comma-separated values (CSV)", "http://en.wikipedia.org/wiki/Comma-separated_values"
  file which is very widely supported.

%p
  And please do let us know if you do something interesting with your data! We're
  always interested to hear from you.

= link_to "Download your data", download_data_path, class: "btn btn-default"

Add examples of what you could use the data for

.page-header
  %h1 Download

  %p.lead
    Download your shopping receipts data as a spreadsheet

%p
  This is your shopping data so you should have access to it to do
  with as you please. You could for example use it for
  %ul
    %li household budgetting
    %li seeing how much organic vs non-organic produce you buy
    %li what items you buy the most

%p
  You can load this into pretty much any spreadsheet program such as
  #{link_to "OpenOffice", "https://www.openoffice.org/"},
  #{link_to "Google Docs", "https://docs.google.com/spreadsheets"},
  or
  = link_to "Microsoft Office", "https://products.office.com"
  to do your own analysis. The data is downloaded as a
  = link_to "comma-separated values (CSV)", "http://en.wikipedia.org/wiki/Comma-separated_values"
  file which is very widely supported.

%p
  And please do let us know if you do something interesting with your data! We're
  always interested to hear from you.

= link_to "Download your data", download_data_path, class: "btn btn-default"


- page_title "Find File", @ref

.file-finder-holder.tree-holder.clearfix
  .nav-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'find_file', path: @path
    %ul.breadcrumb.repo-breadcrumb
      %li
        = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
          = @project.path
      %li.file-finder
        %input#file_find.form-control.file-finder-input{ type: "text", placeholder: 'Find by path', autocomplete: 'off' }

  .tree-content-holder
    .table-holder
      %table.table.files-slider{ class: "table_#{@hex_path} tree-table table-striped" }
        %tbody
      = spinner nil, true

:javascript
  var projectFindFile = new ProjectFindFile($(".file-finder-holder"), {
    url: "#{escape_javascript(namespace_project_files_path(@project.namespace, @project, @ref, @options.merge(format: :json)))}",
    treeUrl: "#{escape_javascript(namespace_project_tree_path(@project.namespace, @project, @ref))}",
    blobUrlTemplate: "#{escape_javascript(namespace_project_blob_path(@project.namespace, @project, @id || @commit.id))}"
  });
  new ShortcutsFindFile(projectFindFile);

Add Repository subnav to 'Find files'

- page_title "Find File", @ref
= render "projects/commits/head"

.file-finder-holder.tree-holder.clearfix
  .nav-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'find_file', path: @path
    %ul.breadcrumb.repo-breadcrumb
      %li
        = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
          = @project.path
      %li.file-finder
        %input#file_find.form-control.file-finder-input{ type: "text", placeholder: 'Find by path', autocomplete: 'off' }

  .tree-content-holder
    .table-holder
      %table.table.files-slider{ class: "table_#{@hex_path} tree-table table-striped" }
        %tbody
      = spinner nil, true

:javascript
  var projectFindFile = new ProjectFindFile($(".file-finder-holder"), {
    url: "#{escape_javascript(namespace_project_files_path(@project.namespace, @project, @ref, @options.merge(format: :json)))}",
    treeUrl: "#{escape_javascript(namespace_project_tree_path(@project.namespace, @project, @ref))}",
    blobUrlTemplate: "#{escape_javascript(namespace_project_blob_path(@project.namespace, @project, @id || @commit.id))}"
  });
  new ShortcutsFindFile(projectFindFile);


=provide(:title, "Group Index")

<!-- Top Pagination Bar -->
.pagination-container
  = will_paginate @groups, renderer: BootstrapPagination::Rails
  .pull-right.pagination
    = label_tag :per_page_top, "Display per page:"
    = select_tag :per_page_top, options_for_select([20,50,100,"All"], params[:per_page]), :onchange => "if(this.value){window.location='?per_page='+this.value;}"

<!-- Layout the matrix table -->
.col-sm-12
  %table.table.table-striped#groups
    %thead
      %tr
        %th Group Name
        %th{style: "text-align: center;"} Number of Matrices
        %th Description
    %tbody
      - @groups.each do |group|
        %tr
          %td= link_to "#{group.name}", "/#{group.name}"
          %td{style: "text-align: center;"}= group.num_matrices
          %td= group.notes.lines.first

<!-- Bottom Pagination Bar -->
.pagination-container
  = will_paginate @groups, renderer: BootstrapPagination::Rails
  .pull-right.pagination
    = label_tag :per_page_bottom, "Display per page:"
    = select_tag :per_page_bottom, options_for_select([20,50,100,"All"], params[:per_page]), :onchange => "if(this.value){window.location='?per_page='+this.value;}"

Fix group listing error when group has no notes

=provide(:title, "Group Index")

<!-- Top Pagination Bar -->
.pagination-container
  = will_paginate @groups, renderer: BootstrapPagination::Rails
  .pull-right.pagination
    = label_tag :per_page_top, "Display per page:"
    = select_tag :per_page_top, options_for_select([20,50,100,"All"], params[:per_page]), :onchange => "if(this.value){window.location='?per_page='+this.value;}"

<!-- Layout the matrix table -->
.col-sm-12
  %table.table.table-striped#groups
    %thead
      %tr
        %th Group Name
        %th{style: "text-align: center;"} Number of Matrices
        %th Description
    %tbody
      - @groups.each do |group|
        %tr
          %td= link_to "#{group.name}", "/#{group.name}"
          %td{style: "text-align: center;"}= group.num_matrices
          %td= group.notes.lines.first unless group.notes.nil?

<!-- Bottom Pagination Bar -->
.pagination-container
  = will_paginate @groups, renderer: BootstrapPagination::Rails
  .pull-right.pagination
    = label_tag :per_page_bottom, "Display per page:"
    = select_tag :per_page_bottom, options_for_select([20,50,100,"All"], params[:per_page]), :onchange => "if(this.value){window.location='?per_page='+this.value;}"


%p
  = text_field :name, :label => 'Name'
%p
  = text_field :hostname, :label => 'Hostname'

= fieldset :legend => 'Operating System' do
  = select :operating_system_id, :collection => Locomotive::OperatingSystem.all, :value_method => :id, :text_method => :name

= fieldset :legend => 'Roles' do
  %table
    - # render :partial => "system_role", :collection => Role.all
    - Locomotive::Role.all.each do |role|
      - html_id = 'role_' + role.id.to_s
      %tr
        %td
          = check_box :name => "system[role_ids][]", :boolean => false, :id => html_id, :value => role.id, :checked => @system.roles.include?(role)
        %td
          = label role.name, :for => html_id

Make sure the select form helper displays the right option as selected

%p
  = text_field :name, :label => 'Name'
%p
  = text_field :hostname, :label => 'Hostname'

= fieldset :legend => 'Operating System' do
  = select :operating_system_id, :collection => Locomotive::OperatingSystem.all, :value_method => :id, :text_method => :name, :selected => @system.operating_system_id.to_s

= fieldset :legend => 'Roles' do
  %table
    - # render :partial => "system_role", :collection => Role.all
    - Locomotive::Role.all.each do |role|
      - html_id = 'role_' + role.id.to_s
      %tr
        %td
          = check_box :name => "system[role_ids][]", :boolean => false, :id => html_id, :value => role.id, :checked => @system.roles.include?(role)
        %td
          = label role.name, :for => html_id


= render :template => 'application/index'

Fix "new" contextual link in salaries index.

.contextual
  = icon_link_to :new, {:action => :select_employee}

%h2= t_title

= paginated_section collection do
  - if collection.any?
    = render "list"


- # JQuery
%script{ src: "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" }

- # Angular
%script{ src: "//ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular-sanitize.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular-route.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular-poller/0.4.2/angular-poller.min.js"}

- # Jquery Modules
%script{ src: "//blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js" }
%script{ src: "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" }
%script{ src: "//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js" }
%script{ src: "//cdn.jsdelivr.net/g/json2@0.1,jquery.cookie@1.3.1,jquery.placeholder@2.0.7,lodash@3.10.1,momentjs@1.7.2,load-image@1.11.1,accounting.js@0.3.2"}

Upgrade Angular and jQuery on Rails pages

- # JQuery
%script{ src: "//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" }

- # Angular
%script{ src: "//ajax.googleapis.com/ajax/libs/angularjs/1.5.9/angular.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.9/angular-sanitize.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.9/angular-route.min.js" }
%script{ src: "//cdnjs.cloudflare.com/ajax/libs/angular-poller/0.4.2/angular-poller.min.js"}

- # Jquery Modules
%script{ src: "//blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js" }
%script{ src: "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" }
%script{ src: "//ajax.googleapis.com/ajax/libs/jqueryui/1.12.4/jquery-ui.min.js" }
%script{ src: "//cdn.jsdelivr.net/g/json2@0.1,jquery.cookie@1.3.1,jquery.placeholder@2.0.7,lodash@3.10.1,momentjs@1.7.2,load-image@1.11.1,accounting.js@0.3.2"}


!!! 1.1 Strict
%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en")
  %head
    %title Spreedly Core Sample
    %meta(http-equiv="Content-type" content="text/html; charset=utf-8")/
    %meta(http-equiv="X-UA-Compatible" content="chrome=1")/
    = javascript_include_tag "application"
    = stylesheet_link_tag 'reset', 'sample', '960'

  %body

    %p.header
      Spreedly Core Sample App. Visit
      = link_to "Spreedlycore.com", "http://spreedlycore.com"
      for more information.

    .container_12
      = render '/layouts/flash_details'
      .inner= yield

Make link to core use https.

!!! 1.1 Strict
%html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en")
  %head
    %title Spreedly Core Sample
    %meta(http-equiv="Content-type" content="text/html; charset=utf-8")/
    %meta(http-equiv="X-UA-Compatible" content="chrome=1")/
    = javascript_include_tag "application"
    = stylesheet_link_tag 'reset', 'sample', '960'

  %body

    %p.header
      Spreedly Core Sample App. Visit
      = link_to "Spreedlycore.com", "https://spreedlycore.com"
      for more information.

    .container_12
      = render '/layouts/flash_details'
      .inner= yield


.col-sm-1#affixed{ data: { spy: 'affix' } }
  = link_to "Back to Top", '#', id: 'back_to_top'

:javascript
  $('#affixed').affix({
    offset: {
      top: $(window).height() * 0.1
    }
  });

  $('#back_to_top').click(function() {
    $('html, body').animate({ scrollTop: 0 }, 'fast');
  });

Change back to top styling to a button

.col-sm-1#affixed{ data: { spy: 'affix' } }
  %button.btn.btn-primary{ type: 'button', id: 'back_to_top' }
    Back to Top

:javascript
  $('#affixed').affix({
    offset: {
      top: $(window).height() * 0.1
    }
  });

  $('#back_to_top').click(function() {
    $('html, body').animate({ scrollTop: 0 }, 'fast');
  });


!!! 5
%html{ lang: I18n.locale }
  %head
    %meta{ charset: 'utf-8' }/
    %meta{ name: 'robots', content: 'noindex' }/

    = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous'
    = javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
    = render partial: 'layouts/theme', object: @core
    = render partial: 'layouts/theme', object: @theme
    = yield

Fix locale packs loading in embed layout

!!! 5
%html{ lang: I18n.locale }
  %head
    %meta{ charset: 'utf-8' }/
    %meta{ name: 'robots', content: 'noindex' }/

    = javascript_pack_tag "locales", integrity: true, crossorigin: 'anonymous'
    - if @theme
      - if @theme[:supported_locales].include? I18n.locale.to_s
        = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
      - elsif @theme[:supported_locales].include? 'en'
        = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous'
    = render partial: 'layouts/theme', object: @core
    = render partial: 'layouts/theme', object: @theme
    = yield


%h1 About Us

%p
  Larp Library was made by #{mail_to "natbudin@gmail.com", "Nat Budin"} and is a project of
  #{link_to "New England Interactive Literature", "http://interactiveliterature.org"}.

%p
  Larp Library is a Ruby on Rails application.  The source code for the app is available
  #{link_to "on Github", "https://github.com/neinteractiveliterature/larp_library"}.

Add Eva to the About page

%h1 About Us

%ul.list-unstyled
  %li
    %strong Lead Developer:
    Nat Budin (natbudin AT gmail DOT com)
  %li
    %strong Curator:
    Eva Schiffer (valleyviolet AT gmail DOT com)
  %li
    A project of
    #{link_to "New England Interactive Literature", "http://interactiveliterature.org"}.

%p
  Larp Library is a Ruby on Rails application.  The source code for the app is available
  #{link_to "on Github", "https://github.com/neinteractiveliterature/larp_library"}.


:css
  .transparent_backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: transparent;
  }

  .user_options {
    display: inline-block;
    background-color: white;
    border: 1px solid black;
    z-index: 100001;
    text-align: left;
    white-space: nowrap;
    position: absolute;
    right: 0;
    padding: 10px;
    left: auto;
    bottom: auto;
  }

= render partial: 'shared/user_header'

:javascript
  handleUserMenuClick = function () {
    $('.user_options').toggle();
    if ($(".user_options").css('display') == 'none') {
      $(".transparent_backdrop").off('click', handleUserMenuClick);
      $(".transparent_backdrop").off('touchend', handleUserMenuClick);
      $(".transparent_backdrop").toggle();
    }
    else {
      $(".transparent_backdrop").on('click', handleUserMenuClick);
      $(".transparent_backdrop").on('touchend', handleUserMenuClick);
      $(".transparent_backdrop").toggle();
    }
    return false;
  }

Change css to better fit user menu into pegasus

:css
  .user_menu {
    display: inline;
  }

  .transparent_backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    background-color: transparent;
  }

  .user_options {
    display: inline-block;
    background-color: white;
    border: 1px solid black;
    z-index: 100001;
    text-align: left;
    white-space: nowrap;
    position: absolute;
    right: 0;
    padding: 10px;
    left: auto;
    bottom: auto;
  }

= render partial: 'shared/user_header'

:javascript
  handleUserMenuClick = function () {
    $('.user_options').toggle();
    if ($(".user_options").css('display') == 'none') {
      $(".transparent_backdrop").off('click', handleUserMenuClick);
      $(".transparent_backdrop").off('touchend', handleUserMenuClick);
      $(".transparent_backdrop").toggle();
    }
    else {
      $(".transparent_backdrop").on('click', handleUserMenuClick);
      $(".transparent_backdrop").on('touchend', handleUserMenuClick);
      $(".transparent_backdrop").toggle();
    }
    return false;
  }


-title = the_vernaculator('title_display', 'title_vern_display')
-subtitle = the_vernaculator('subtitle_display', 'subtitle_vern_display')
= render :partial => 'shared/back_to_item'
%h2 ScanIt
%div.well
  %h3.item-title-request.blacklight-title_display=title
  %div.request-author
    =show_presenter(@document).field_value 'title_responsibility_display'
  %p
    Click the button below to go to the ScanIt form and place your request.
  .clearfix
    -if @alternate_request_options and @alternate_request_options.count >= 2
      %a{:href => BlacklightCornellRequests::Request::DOCUMENT_DELIVERY_URL, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
        Go to ScanIt
      = render :partial => 'shared/request_options'
    -else
      %a{:href => BlacklightCornellRequests::Request::DOCUMENT_DELIVERY_URL, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
        Go to ScanIt
      %div.accordion-heading.request-options.pull-left.form-alternative-action
        or
        =link_to 'Ask a Librarian','http://ask.library.cornell.edu'
        for help.

Replace DOCUMENT_DELIVERY_URL with scanit_link for the button Go to ScanIt

-title = the_vernaculator('title_display', 'title_vern_display')
-subtitle = the_vernaculator('subtitle_display', 'subtitle_vern_display')
= render :partial => 'shared/back_to_item'
%h2 ScanIt
%div.well
  %h3.item-title-request.blacklight-title_display=title
  %div.request-author
    =show_presenter(@document).field_value 'title_responsibility_display'
  %p
    Click the button below to go to the ScanIt form and place your request.
  .clearfix
    -if @alternate_request_options and @alternate_request_options.count >= 2
      %a{:href => @scanit_link, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
        Go to ScanIt
      = render :partial => 'shared/request_options'
    -else
      %a{:href => @scanit_link, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
        Go to ScanIt
      %div.accordion-heading.request-options.pull-left.form-alternative-action
        or
        =link_to 'Ask a Librarian','http://ask.library.cornell.edu'
        for help.


.unit.map
  #reports-map

.unit.list
  .container

    .unit.filters
      = form_tag reports_path, method: :get do
        .fields
          = label_tag 'start_date', 'De fecha'
          = text_field_tag 'start_date', params[:start_date], class: 'datepicker'
        .fields
          = label_tag 'end_date', 'A fecha'
          = text_field_tag 'end_date', params[:end_date], class: 'datepicker'
        .fields
          = label_tag 'status', 'Estatus'
          = select_tag('status', options_from_collection_for_select(Report::STATUS_LIST, :first, :last, params[:status]))
        .fields
          = label_tag 'category_id', 'Categoria'
          = select_tag('category_id', options_from_collection_for_select(Category.all, :id, :name, params[:category_id]))
        .actions
          = submit_tag 'Buscar', class: "submit"

    - @reports.each do |report|
      .unit.report{id: "report_#{report.id}", data: { lat: report.lat, lng: report.lng } }

        .votes
          .counter
            = report.votes_for
          = vote_link_for(report)

        %h2= link_to report.category.name, report_url(report), class: "title"
        %p= report.description
        %p
          Reportado por
          %span.user= report.user.name
          = timeago(report.created_at)

= paginate @reports

Add empty filters to search form

.unit.map
  #reports-map

.unit.list
  .container

    .unit.filters
      = form_tag reports_path, method: :get do
        .fields
          = label_tag 'start_date', 'De fecha'
          = text_field_tag 'start_date', params[:start_date], class: 'datepicker'
        .fields
          = label_tag 'end_date', 'A fecha'
          = text_field_tag 'end_date', params[:end_date], class: 'datepicker'
        .fields
          = label_tag 'status', 'Estatus'
          = select_tag('status', options_from_collection_for_select(Report::STATUS_LIST, :first, :last, params[:status]), prompt: 'Cualquiera')
        .fields
          = label_tag 'category_id', 'Categoria'
          = select_tag('category_id', options_from_collection_for_select(Category.all, :id, :name, params[:category_id]), prompt: 'Todas')
        .actions
          = submit_tag 'Buscar', class: "submit"

    - @reports.each do |report|
      .unit.report{id: "report_#{report.id}", data: { lat: report.lat, lng: report.lng } }

        .votes
          .counter
            = report.votes_for
          = vote_link_for(report)

        %h2= link_to report.category.name, report_url(report), class: "title"
        %p= report.description
        %p
          Reportado por
          %span.user= report.user.name
          = timeago(report.created_at)

= paginate @reports


- if @posts.empty?
  %div
    %p 「#{@query.keywords}」を含む記事は見つかりませんでした。
- else
  %div
    絞り込み：
    - if @query.participant_id.present?
      = Participant.find(@query.participant_id).name
      = link_to content_tag(:span, '', class: 'fa fa-remove'), @query.params(remove: [:participant_id])
    - else
      - @result_set.participants.each do |participant|
        %span
          = link_to participant.name, @query.params(add: {participant_id: participant._key})
          = "(#{participant.n_sub_records})"

  %p 「#{@query.keywords}」を含む記事は#{@posts.total_count}件見つかりました。
  %ol
    - @posts.each do |post|
      %li
        = link_to post.title, post
        - post.credits.each do |credit|
          .participant= link_to credit.participant.name, @query.params(add: {participant_id: credit.participant.id})

  - if @posts.total_pages > 1
    %nav.pagination
      = paginate @posts
      %p.pagination__entries= page_entries_info @posts

Use block style instead of content_tag

- if @posts.empty?
  %div
    %p 「#{@query.keywords}」を含む記事は見つかりませんでした。
- else
  %div
    絞り込み：
    - if @query.participant_id.present?
      = Participant.find(@query.participant_id).name
      = link_to @query.params(remove: [:participant_id]) do
        %span.fa.fa-remove
    - else
      - @result_set.participants.each do |participant|
        %span
          = link_to participant.name, @query.params(add: {participant_id: participant._key})
          = "(#{participant.n_sub_records})"

  %p 「#{@query.keywords}」を含む記事は#{@posts.total_count}件見つかりました。
  %ol
    - @posts.each do |post|
      %li
        = link_to post.title, post
        - post.credits.each do |credit|
          .participant= link_to credit.participant.name, @query.params(add: {participant_id: credit.participant.id})

  - if @posts.total_pages > 1
    %nav.pagination
      = paginate @posts
      %p.pagination__entries= page_entries_info @posts


%html

  %head

    %title Try Redis
    %link{rel: "stylesheet", href: "/style.css"}

  %body

    #header
      %img{src: "/images/try-redis-500x50.png", width: 500, height: 50}

    #log
      .line.notification= tutorial 0

    #toolbar
      %input#input

    #footer
      :markdown
        This page was written by [Alex McHale](http://github.com/alexmchale)
        and inspired by [Try Mongo](http://try.mongodb.org).

    %script{type: "application/x-javascript", src: "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"}
    %script{type: "application/x-javascript", src: "http://documentcloud.github.com/underscore/underscore-min.js"}
    %script{type: "application/x-javascript", src: "/javascripts/json2.js"}
    %script{type: "application/x-javascript", src: "/javascripts/terminal.js"}

Add more contact info to the footer.

%html

  %head

    %title Try Redis
    %link{rel: "stylesheet", href: "/style.css"}

  %body

    #header
      %img{src: "/images/try-redis-500x50.png", width: 500, height: 50}

    #log
      .line.notification= tutorial 0

    #toolbar
      %input#input

    #footer
      :markdown
        This page was written by Alex McHale
        ([email](mailto:alexmchale@gmail.com)
         [github](http://github.com/alexmchale)
         [twitter](http://twitter.com/alexmchale))
        and inspired by [Try Mongo](http://try.mongodb.org).

    %script{type: "application/x-javascript", src: "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"}
    %script{type: "application/x-javascript", src: "http://documentcloud.github.com/underscore/underscore-min.js"}
    %script{type: "application/x-javascript", src: "/javascripts/json2.js"}
    %script{type: "application/x-javascript", src: "/javascripts/terminal.js"}


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

Fix letterboxing for iphone 5

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


- if theme
  - if theme[:pack] != 'common' && theme[:common]
    = render partial: 'layouts/theme', object: theme[:common]
  - if theme[:pack]
    - pack_path = theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}"
    = javascript_pack_tag pack_path, crossorigin: 'anonymous'
    - if theme[:skin]
      - if !theme[:flavour] || theme[:skin] == 'default'
        = stylesheet_pack_tag pack_path, media: 'all', crossorigin: 'anonymous'
      - else
        = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}", crossorigin: 'anonymous'
    - if theme[:preload]
      - theme[:preload].each do |link|
        %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/

Fix missing media: 'all' on default skins

- if theme
  - if theme[:pack] != 'common' && theme[:common]
    = render partial: 'layouts/theme', object: theme[:common]
  - if theme[:pack]
    - pack_path = theme[:flavour] ? "flavours/#{theme[:flavour]}/#{theme[:pack]}" : "core/#{theme[:pack]}"
    = javascript_pack_tag pack_path, crossorigin: 'anonymous'
    - if theme[:skin]
      - if !theme[:flavour] || theme[:skin] == 'default'
        = stylesheet_pack_tag pack_path, media: 'all', crossorigin: 'anonymous'
      - else
        = stylesheet_pack_tag "skins/#{theme[:flavour]}/#{theme[:skin]}/#{theme[:pack]}", media: 'all', crossorigin: 'anonymous'
    - if theme[:preload]
      - theme[:preload].each do |link|
        %link{ href: asset_pack_path("#{link}.js"), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/


.row
  .col-sm-10.col-sm-offset-1
    = render 'contests/contest_header', { contest: @contest }

    - if @contest.contestant?(current_user) or @contest.past?
      = render 'contests/tabs', { active_tab: :problems }

      .problems
        %table{ class: 'table table-striped table-bordered' }
          %thead
            %tr
              %th.center{ width: '5%' }
              %th.center{ width: '95%' } 問題名
          %tbody
            - @contest.problems.each.with_index do |problem, i|
              %tr
                %td.center= link_to ('A'.ord + i).chr, problem.url
                %td= link_to problem.title, problem.url

    - else
      = render 'contests/registration'

Change links to open in new tab

.row
  .col-sm-10.col-sm-offset-1
    = render 'contests/contest_header', { contest: @contest }

    - if @contest.contestant?(current_user) or @contest.past?
      = render 'contests/tabs', { active_tab: :problems }

      .problems
        %table{ class: 'table table-striped table-bordered' }
          %thead
            %tr
              %th.center{ width: '5%' }
              %th.center{ width: '95%' } 問題名
          %tbody
            - @contest.problems.each.with_index do |problem, i|
              %tr
                %td.center= link_to ('A'.ord + i).chr, problem.url, target: :_blank
                %td= link_to problem.title, problem.url, target: :_blank

    - else
      = render 'contests/registration'


%header.banner{:role => "banner"}
  .grid
    %a.icon-heroica.logo.scrollto{:href => "#hero", :rel => "bookmark"}
    %button.icon-menu.navicon.navicon-x{"aria-label" => "Toggle Navigation",
                                        "data-navicon" => "button",
                                        :role => "button", :type => "button"}
      %span.navicon__lines

    %nav{:role => "navigation"}
      %ul.nav__list
        %li.nav__list-item
          %i.fa.fa-file-pdf-o
          %a.scrollto{:href => "jorge_polanco_resume.pdf", :target => "_blank"}
            Resume

        %li.nav__list-item
          %i.fa.fa-child
          %a.scrollto{:href => "#about"}
            About

        %li.nav__list-item
          %i.fa.fa-wrench
          %a.scrollto{:href => "#services"}
            Services

        %li.nav__list-item
          %i.fa.fa-cogs
          %a.scrollto{:href => "#skills"}
            Skills

        %li.nav__list-item
          %i.fa.fa-briefcase
          %a.scrollto{:href => "#experience"}
            Experience

        %li.nav__list-item
          %i.fa.fa-picture-o
          %a.scrollto{:href => "#portfolio"}
            Portfolio

        %li.nav__list-item
          %i.fa.fa-envelope
          %a.scrollto{:href => "#contact"}
            Contact

Update link to resume to doc

%header.banner{:role => "banner"}
  .grid
    %a.icon-heroica.logo.scrollto{:href => "#hero", :rel => "bookmark"}
    %button.icon-menu.navicon.navicon-x{"aria-label" => "Toggle Navigation",
                                        "data-navicon" => "button",
                                        :role => "button", :type => "button"}
      %span.navicon__lines

    %nav{:role => "navigation"}
      %ul.nav__list
        %li.nav__list-item
          %i.fa.fa-file-pdf-o
          %a.scrollto{:href => "resume-jorge-polanco.doc", :target => "_blank"}
            Resume

        %li.nav__list-item
          %i.fa.fa-child
          %a.scrollto{:href => "#about"}
            About

        %li.nav__list-item
          %i.fa.fa-wrench
          %a.scrollto{:href => "#services"}
            Services

        %li.nav__list-item
          %i.fa.fa-cogs
          %a.scrollto{:href => "#skills"}
            Skills

        %li.nav__list-item
          %i.fa.fa-briefcase
          %a.scrollto{:href => "#experience"}
            Experience

        %li.nav__list-item
          %i.fa.fa-picture-o
          %a.scrollto{:href => "#portfolio"}
            Portfolio

        %li.nav__list-item
          %i.fa.fa-envelope
          %a.scrollto{:href => "#contact"}
            Contact


#main_div
  - if %w(physical_servers).include?(@display)
    = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"}
  - else
    - case @showtype
    - when "main"
      = render :partial => 'layouts/textual_groups_generic'
    - when "timeline"
      = render :partial => "layouts/tl_show_async"

  %physical-server-toolbar#physical_server_show_form{'physical-server-id' => @record.id}

:javascript
  miq_bootstrap('#physical_server_show_form');

Fix network devices table not showing up

#main_div
  - if %w(guest_devices physical_servers).include?(@display)
    = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"}
  - else
    - case @showtype
    - when "main"
      = render :partial => 'layouts/textual_groups_generic'
    - when "timeline"
      = render :partial => "layouts/tl_show_async"

  %physical-server-toolbar#physical_server_show_form{'physical-server-id' => @record.id}

:javascript
  miq_bootstrap('#physical_server_show_form');


#sidebar.rcol
  %p.intro
    We want to learn about people, organisations and networks involved in Digital Social Innovation in Europe. If that’s you, or if you want to find out more about how to be involved; please get in touch:

  %p.twitter
    %a{ href: 'https://twitter.com/digi_si' } @digi_si

  %p.mail
    %a{ href: 'mailto:contact@digitalsocial.eu' } contact@digitalsocial.eu

  %a.button{ href: 'mailto:contact@digitalsocial.eu' } CONTACT US

Call to action text change

#sidebar.rcol
  %p.intro
    We want to learn about people, organisations and networks involved in Digital Social Innovation in Europe. If that’s you, or if you want to find out more about how to be involved; please get in touch:

  %p.twitter
    %a{ href: 'https://twitter.com/digi_si' } @digi_si

  %p.mail
    %a{ href: 'mailto:contact@digitalsocial.eu' } contact@digitalsocial.eu

  %a.button{ href: 'mailto:contact@digitalsocial.eu' } TAKE PART


- 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"}

Remove redundant legend that doesn't look good

- 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
        = 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"}


.hero-unit
  %h1= rubyfriends_app.subtitle
  = link_to "Learn more", about_path, id: 'learn-more'
  -# TODO - add facebook like button
  .bird
    %p
      Share your friendships with the hashtag
      = link_to "#RubyFriends", twitter_url
  %span.shared-smiles-count
    #{rubyfriends_app.tweets_count} friendships so far!

= paginate(paginated_tweets)

%ul#smiles-list
  - paginated_tweets.each do |tweet|
    %li{class: cycle('one', 'two', 'three', 'four')}
      %a.ajax_overlay{href: tweet_path(tweet)}
        = image_tag(tweet.image_url(:thumb).to_s)
      .text
        %p= tweet.tweet_text
        %small
          = link_to "@#{tweet.username}", twitter_url(tweet.username)
          at #{tweet.published_at.strftime('%b, %d %Y')}
          = link_to "link", twitter_url("#{tweet.username}/status/#{tweet.tweet_id}")

= paginate(paginated_tweets)

= ajax_overlay

Remove pagination from top of page

.hero-unit
  %h1= rubyfriends_app.subtitle
  = link_to "Learn more", about_path, id: 'learn-more'
  -# TODO - add facebook like button
  .bird
    %p
      Share your friendships with the hashtag
      = link_to "#RubyFriends", twitter_url
  %span.shared-smiles-count
    #{rubyfriends_app.tweets_count} friendships so far!

%ul#smiles-list
  - paginated_tweets.each do |tweet|
    %li{class: cycle('one', 'two', 'three', 'four')}
      %a.ajax_overlay{href: tweet_path(tweet)}
        = image_tag(tweet.image_url(:thumb).to_s)
      .text
        %p= tweet.tweet_text
        %small
          = link_to "@#{tweet.username}", twitter_url(tweet.username)
          at #{tweet.published_at.strftime('%b, %d %Y')}
          = link_to "link", twitter_url("#{tweet.username}/status/#{tweet.tweet_id}")

= paginate(paginated_tweets)

= ajax_overlay


%table
  %thead
    %tr
      %th Name
      %th url
      %th users
      %th visible
      %th trigger
  %tbody
    = render :collection => @projects, :partial => 'project'

Make the admin page more readable.

.container
  %table
    %thead
      %tr
        %th Name
        %th url
        %th users
        %th visible
        %th trigger
    %tbody
      = render :collection => @projects, :partial => 'project'


-# This is currently also used on galleries#show

- if picture.plain?
  - size ||= :medium
  - variant = picture.image_file.variant(resize: Settings.sizes.send(size))
  - mobileVariant = picture.image_file.variant(resize: Settings.sizes.medium)

  = react_component :LazyPicture,
    { src: url_for(variant),
      srcMobile: size == :small ? url_for(mobileVariant) : nil,
      title: picture.to_s }

  %noscript
    = image_tag variant, title: picture, alt: picture

- else
  = react_component 'crypto/LazyEncryptedImage',
    { src: url_for(picture.image_file),
      title: picture.to_s }

Decrease image quality in mobile viewports

-# This is currently also used on galleries#show

- if picture.plain?
  - size ||= :medium
  - variant = picture.image_file.variant(resize: Settings.sizes.send(size))
  - mobileVariant = picture.image_file.variant(resize: Settings.sizes.medium, quality: 60)

  = react_component :LazyPicture,
    { src: url_for(variant),
      srcMobile: size == :small ? url_for(mobileVariant) : nil,
      title: picture.to_s }

  %noscript
    = image_tag variant, title: picture, alt: picture

- else
  = react_component 'crypto/LazyEncryptedImage',
    { src: url_for(picture.image_file),
      title: picture.to_s }


%li
  - node_id = entry['osm_type'] == 'way' ? (entry['osm_id'].to_i * -1) : entry['osm_id']
  %a.clearfix{:href => root_path(anchor: "/popup/#{node_id}?" + {:lat => entry['lat'], :lon => entry['lon'], :zoom => 17, :q => params[:q]}.to_param)}
    - entry['display_name'].split(', ').each_with_index do |part, index|
      %span{:class => index == 0 ? 'strong' : nil}
        = index > 0 ? ' ‹ ' : nil
        = part

    %i.icon-chevron-right.pull-right

Fix placement of node id in search result links.

%li
  %a.clearfix{:href => root_path(anchor: (entry['osm_type'] == 'node' ? "/popup/" + entry['osm_id'] : '') + "?" + {:lat => entry['lat'], :lon => entry['lon'], :zoom => 17, :q => params[:q]}.to_param)}
    - entry['display_name'].split(', ').each_with_index do |part, index|
      %span{:class => index == 0 ? 'strong' : nil}
        = index > 0 ? ' ‹ ' : nil
        = part

    %i.icon-chevron-right.pull-right


-# -*- coding: utf-8 -*-
%li.song_item
  .title= link_to "曲 #{h(song.title)}", url_for(:songs, :show, :id => song)
  .author=h song.account.name

Put delimiter between prefix and song name in the song list

-# -*- coding: utf-8 -*-
%li.song_item
  .title= link_to "曲 - #{h(song.title)}", url_for(:songs, :show, :id => song)
  .author=h song.account.name


- content_for :title, "Crops"

%ul.thumbnails
  - @crops.each do |crop|
    %li.span2
      .thumbnail
        = image_tag('http://placehold.it/150x150', :alt => '', :class => 'img-rounded')
        %h3= link_to crop.system_name, crop
        - if crop.scientific_names.count > 0
          %p
            %i
              = crop.scientific_names.first.scientific_name

- if user_signed_in?
  %div
    = link_to 'New Crop', new_crop_path, {:class => 'button'}

Fix weird linebreaks on crops index page.

- content_for :title, "Crops"
- c = 0

%ul.thumbnails
  .row
  - @crops.each do |crop|
    - c += 1
    %li.span2
      .thumbnail(style='height: 200px')
        = image_tag('http://placehold.it/150x150', :alt => '', :class => 'img-rounded')
        %p= link_to crop.system_name, crop
        - if crop.scientific_names.count > 0
          %p
            %i
              %small
                = crop.scientific_names.first.scientific_name
    - if (c % 6) == 0
      .row

- if user_signed_in?
  %div
    = link_to 'New Crop', new_crop_path, {:class => 'button'}


- content_for(:section_header) do
  .section_header
    %h1= semantic_pluralize(@results.total_entries, "search result") + " for “#{params[:query]}”".html_safe

- if @results.blank?
  %h2 Nothing here!
  %p
    = "We couldn't find anything that matched your search for <strong>#{params[:query]}</strong>.".html_safe
    You might want to try again.

- else
  %ul.resource_list.search_results
    - @results.each do |result|
      = render :partial => "#{result.class.name.tableize}/list_item", :object => result
  = render :partial => 'shared/list_pagination', :object => @results

Fix display of "no search results" case when searching.

- content_for(:section_header) do
  .section_header
    %h1= semantic_pluralize(@results.present? ? @results.total_entries : 0, "search result") + " for “#{params[:query]}”".html_safe

- if @results.blank?
  %h2 Nothing here!
  %p
    = "We couldn't find anything that matched your search for <strong>#{params[:query]}</strong>.".html_safe
    You might want to try again.

- else
  %ul.resource_list.search_results
    - @results.each do |result|
      = render :partial => "#{result.class.name.tableize}/list_item", :object => result
  = render :partial => 'shared/list_pagination', :object => @results


- content_for :page_header do
  = page_header resource.to_s

= view_for resource_path_array do |s|
  = render 'show', :s => s

- child_resources.each do |data|
  %section
    %h2= data[:name]
    .btn-toolbar
      = link_to("New #{data[:resource_name]}", polymorphic_url((controller_namespaces + [resource, data[:resource_class]]), :action => :new), :class => 'btn')
    = table_for(controller_namespaces + [resource, data[:resource_class]], resource.send(data[:symbol])) do |t|
      = render (controller_namespaces + [data[:symbol].to_s, 'table']).join('/'), :t => t, :resource_class => data[:resource_class]

Move new child resource button to right side

- content_for :page_header do
  = page_header resource.to_s

= view_for resource_path_array do |s|
  = render 'show', :s => s

- child_resources.each do |data|
  %section
    .btn-toolbar
      .btn-group.pull-right
        = link_to("New #{data[:resource_name]}", polymorphic_url((controller_namespaces + [resource, data[:resource_class]]), :action => :new), :class => 'btn')
      %h2= data[:name]
    = table_for(controller_namespaces + [resource, data[:resource_class]], resource.send(data[:symbol])) do |t|
      = render (controller_namespaces + [data[:symbol].to_s, 'table']).join('/'), :t => t, :resource_class => data[:resource_class]


= render :partial => "shared/calendar", :locals => {:year => @year, :month => @month, :url_method => :monthly_assets_path}

#book
  = render :partial => "assets"

Enable calendar switch in asesets/monthly

= render :partial => "shared/calendar", :locals => {year: @year, month: @month, switcher: true, data: {url_template: monthly_assets_path(year: '_YEAR_', month: '_MONTH_')}}

#book
  = render :partial => "assets"


/ Sidebar Menu
.ui.vertical.sidebar.menu
  %a.active.item Home
  %a.item Work
  %a.item Company
  %a.item Careers
  %a.item Login
  %a.item Signup
/ Page Contents
.pusher
  .ui.vertical.center.aligned.segment
    .ui.container
      .ui.large.main.menu
        %a.toc.item
          %i.sidebar.icon
        %a.active.item Home
        %a.item About
        %a.item Company
        %a.item Careers
        .right.item
          .item
            %a.ui.button Log in
          .item
            %a.ui.button Sign Up

Add logo in header, and fix sign in and sign up links

/ Sidebar Menu
.ui.vertical.sidebar.menu
  %a.active.item Home
  %a.item Work
  %a.item Company
  %a.item Careers
  %a.item Login
  %a.item Signup
/ Page Contents
.pusher
  .ui.vertical.center.aligned.segment
    .ui.container
      .ui.large.main.menu
        %a.toc.item
          %i.sidebar.icon
        %a.brand.item{href: root_path}= image_tag("logo/logo.png")
        %a.active.item Home
        %a.item About
        %a.item Company
        %a.item Careers
        .right.item
          .item
            %a.ui.button{href: new_user_session_path} Log in
          .item
            %a.ui.button{href: new_user_registration_path} Sign Up


- if @merge_request_diff.collected?
  = render "projects/commits/diffs", diffs: @merge_request.diffs, project: @merge_request.source_project
- elsif @merge_request_diff.empty?
  %h4.nothing_here_message Nothing to merge from #{@merge_request.source_branch} into #{@merge_request.target_branch}
- else
  %h4.nothing_here_message
    Can't load diff.
    You can
    = link_to "download it", project_merge_request_path(@merge_request.source_project, @merge_request), format: :diff, class: "vlink"
    instead.

Fix link for MR diff download

- if @merge_request_diff.collected?
  = render "projects/commits/diffs", diffs: @merge_request.diffs, project: @merge_request.source_project
- elsif @merge_request_diff.empty?
  %h4.nothing_here_message Nothing to merge from #{@merge_request.source_branch} into #{@merge_request.target_branch}
- else
  .bs-callout.bs-callout-warning
    %h4
      Diff for this comparison is extremely large.
    %p
      You can
      = link_to "download it", project_merge_request_path(@merge_request.source_project, @merge_request, format: :diff), class: "vlink"
      instead.


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

  .control-group
    = f.label :name, 'Name this configuration', class: 'control-label'
    .controls
      = f.text_field :name, class: 'input-xlarge'
  .control-group
    = f.label :address, 'Web page address (URL)', class: 'control-label'
    .controls
      = f.text_area :address, rows: 3, class: 'input-xlarge'
  .control-group
    = f.label :viewport_width, 'Viewport width (in pixels)', class: 'control-label'
    .controls
      = f.text_field :viewport_width, class: 'input-small'
  .control-group
    .controls
      = f.submit 'Save', class: 'btn btn-primary'

Improve HAML in url/form partial

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

  .control-group
    = f.label :name, 'Name this configuration', class: 'control-label'
    .controls
      = f.text_field :name, class: 'input-xlarge'
  .control-group
    = f.label :address, 'Web page address (URL)', class: 'control-label'
    .controls
      = f.text_area :address, rows: 3, class: 'input-xlarge'
  .control-group
    = f.label :viewport_width, 'Viewport width (in pixels)',
      class: 'control-label'
    .controls
      = f.text_field :viewport_width, class: 'input-small'
  .control-group
    .controls
      = f.submit 'Save', class: 'btn btn-primary'


.row
  .col-lg-5
  .col-lg-2
    %h1.text-center
      = gravatar_for @user
      = @user.name

    %table.table
      - @tags.each do |tag|
        %tr.active
          %td
            = tag.name
          %td
            - if @user.id != current_user.id
              - if current_user.followed_tags.include? tag

                = form_tag( {controller: :follower_tag_relationships, action: :destroy}, method: :delete, html: {class: "nifty_form"} )do

                  = hidden_field_tag :tag_id,   tag.id
                  = submit_tag "Unfollow", class: "btn btn-danger"
              - else
                = form_tag( {controller: :follower_tag_relationships, action: :create}, html: {class: "nifty_form"} )do
                  = hidden_field_tag :tag_id,  tag.id
                  = submit_tag "Follow", class: "btn btn-primary"

      = paginate @tags

Add follower count to user page

.row
  .col-lg-4
  .col-lg-4
    %h1.text-center
      = gravatar_for @user
      = @user.name

    %table.table.text-center
      %tr.active
        %th.text-center
          Tag

        %th.text-center
          Follower count
        %th.text-center
      - @tags.each do |tag|

        %tr.active
          %td
            = tag.name
          %td
            %span.badge
              = tag.followers.count

          %td
            - if @user.id != current_user.id
              - if current_user.followed_tags.include? tag

                = form_tag( {controller: :follower_tag_relationships, action: :destroy}, method: :delete, html: {class: "nifty_form"} )do

                  = hidden_field_tag :tag_id,   tag.id
                  = submit_tag "Unfollow", class: "btn btn-danger"
              - else
                = form_tag( {controller: :follower_tag_relationships, action: :create}, html: {class: "nifty_form"} )do
                  = hidden_field_tag :tag_id,  tag.id
                  = submit_tag "Follow", class: "btn btn-primary"

      = paginate @tags


.container
  %h1 Receipts

  = paginate @receipts

  - @receipts.each do |receipt|
    %div.panel.panel-default
      %div.panel-heading
        = time_ago_in_words(receipt.date)
        ago
        (#{receipt.date.to_s(:long)})

      %div.panel-body
        %table.table
          %thead
            %tr
              %th Stock Code
              %th Desc
              %th Qty
              %th Total
          %tbody
            - receipt.line_items.each do |line_item|
              %tr
                %td= line_item.product.stock_code
                %td= line_item.product.description
                %td= line_item.quantity
                %td
                  = "$" + "%.2f" % line_item.total_inc_gst

Use full words in headings

.container
  %h1 Receipts

  = paginate @receipts

  - @receipts.each do |receipt|
    %div.panel.panel-default
      %div.panel-heading
        = time_ago_in_words(receipt.date)
        ago
        (#{receipt.date.to_s(:long)})

      %div.panel-body
        %table.table
          %thead
            %tr
              %th Stock Code
              %th Description
              %th Quantity
              %th Total
          %tbody
            - receipt.line_items.each do |line_item|
              %tr
                %td= line_item.product.stock_code
                %td= line_item.product.description
                %td= line_item.quantity
                %td
                  = "$" + "%.2f" % line_item.total_inc_gst


#slide-menu
  = render 'semi_static/shared/slide_menu'
#top
  #top-inner
    = render 'semi_static/shared/bar'
  #overlay
    #overlay-inner
      = render 'semi_static/shared/menu'
      #logo-wrapper
        #logo
      #tag-wrapper
        #tagline
          = t('TagLine')
#frame
  #banner
    #bannerBg
      = image_tag('banners/banner.jpg')
    #banner0.bg
      = image_tag('banners/banner.jpg')
    #banner1.bg
      = image_tag('banners/banner.jpg')
    #banner4.bg
      = image_tag('banners/banner.jpg')
    #custom-banner-overlay.bg
      = render :partial =>  'semi_static/site/banner-overlay' rescue nil
    #banner-loading
  #container
    #content
      =yield

Add page_attr option to remove banner in banerette theme

#slide-menu
  = render 'semi_static/shared/slide_menu'
#top
  #top-inner
    = render 'semi_static/shared/bar'
  #overlay
    #overlay-inner
      = render 'semi_static/shared/menu'
      #logo-wrapper
        #logo
      #tag-wrapper
        #tagline
          = t('TagLine')
#frame
  -# The banner can be disabled on this theme by providing a home tag page attribute
  -# called 'disableBanner'
  - unless @tag.get_page_attr('disableBanner').present?
    #banner
      #bannerBg
        = image_tag('banners/banner.jpg')
      #banner0.bg
        = image_tag('banners/banner.jpg')
      #banner1.bg
        = image_tag('banners/banner.jpg')
      #banner4.bg
        = image_tag('banners/banner.jpg')
      #custom-banner-overlay.bg
        = render :partial =>  'semi_static/site/banner-overlay' rescue nil
      #banner-loading
  #container
    #content
      =yield


%link{rel: 'stylesheet', href:'/mailer.css'}
%table.row
  %tbody
    %tr
      %th
        %table
          %tr
            %td.main-content
              %p.paragraph
                = "Hi #{@greeted_users}."
                I hope your term is going well. I noticed that your students hadn't
                yet enrolled on your
                %a.link{href: @alert.url}> course page
                , and I just wanted to reach out to see if you needed any help or
                had any questions. Again, your students can enroll with this link:
              %p.paragraph
                = @enroll_link
              %p.paragraph
                It's critical that they enroll on the dashboard so both you and
                my team can see what work they're doing on Wikipedia.
            %td.expander
        %table
          %tr
            %td.main-content
              %p.paragraph
                Best regards,
                %br
                %em
                  = @alert.from_user&.real_name || 'Wiki Ed'

.hidden
  %p -- DO NOT DELETE ANYTHING BELOW THIS LINE --
  %p ignore_creating_dashboard_ticket
  - if @course.tags.include?('first_time_instructor')
    %p first_time_instructor_no_enrolled_students

Fix hidden text for NoEnrolledStudentsAlert

%link{rel: 'stylesheet', href:'/mailer.css'}
%table.row
  %tbody
    %tr
      %th
        %table
          %tr
            %td.main-content
              %p.paragraph
                = "Hi #{@greeted_users}."
                I hope your term is going well. I noticed that your students hadn't
                yet enrolled on your
                %a.link{href: @alert.url}> course page
                , and I just wanted to reach out to see if you needed any help or
                had any questions. Again, your students can enroll with this link:
              %p.paragraph
                = @enroll_link
              %p.paragraph
                It's critical that they enroll on the dashboard so both you and
                my team can see what work they're doing on Wikipedia.
            %td.expander
        %table
          %tr
            %td.main-content
              %p.paragraph
                Best regards,
                %br
                %em
                  = @alert.from_user&.real_name || 'Wiki Ed'

.hidden
  %p -- DO NOT DELETE ANYTHING BELOW THIS LINE --
  %p ignore_creating_dashboard_ticket
  - if @course.tag?('first_time_instructor')
    %p first_time_instructor_no_enrolled_students


- content_for :outside_container do
  #banner
    #title
      %h1 GSOH
      %h2 Great Sense of Home!
#blurb
  %h3 Helping you find that perfect place to live
  %h3
    %b Answer
    some simple questions to find your perfect neighbourhood
- if current_user
  #action
    - if current_user.unanswered_questions.any?
      = link_to new_answer_path, class: 'btn btn-primary btn-lg' do
        Answer more questions
        %span.glyphicon.glyphicon-chevron-right
    - else
      = link_to matches_path, class: 'btn btn-primary btn-lg' do
        See your matches
        %span.glyphicon.glyphicon-chevron-right
- else
  #first-q
    %h2 Start by answering your first question!
    = render 'answers/form', answer: @answer, no_skip: true
  .clearfix

Fix layout bug on responsive devices

- content_for :outside_container do
  #banner
    #title
      %h1 GSOH
      %h2 Great Sense of Home!
.row
  #blurb
    %h3 Helping you find that perfect place to live
    %h3
      %b Answer
      some simple questions to find your perfect neighbourhood
.row
  - if current_user
    #action
      - if current_user.unanswered_questions.any?
        = link_to new_answer_path, class: 'btn btn-primary btn-lg' do
          Answer more questions
          %span.glyphicon.glyphicon-chevron-right
      - else
        = link_to matches_path, class: 'btn btn-primary btn-lg' do
          See your matches
          %span.glyphicon.glyphicon-chevron-right
  - else
    #first-q
      %h2 Start by answering your first question!
      = render 'answers/form', answer: @answer, no_skip: true
    .clearfix


- content_for :column do
  - unless @organization.new_record?
    = organization_navigation(@organization)

  .todo{ :style => 'color:red; display: none' }
    Invite to organization (UserController#create has some logic)
    Leave org, delete org

    Users should be observable (User#show) when you share an organization or project (spec)

    Careful with premium checks for Groups on hosted..

    Revisit mobile version completely

    Invitation emails should..
    Have organization's name

    Invite people from the organization
    Invite people already in the org to a project

Remove hidden todo's from the source code


%ul.nav
  %li
    %a.btn.btn-default{:href => "#{site.base_url}/docs"}
      %i.fa.fa-arrow-left
      Back to documentation
  %li.active
    %a{:href => "#push-resource"} Push Resource

  %li.active
    %a{:href => "#aliases"} Aliases
    %ul.nav
      %li
        %a{:href => "#retrieving-the-alias"} Retrieving the Alias
      %li
        %a{:href => "#alias-based-subscriptions"} Alias Based Subscriptionss
      %li
        %a{:href => "#securing-the-alias-endpoint"} Securing the Alias Endpoint
  %li
    %a{:href => "#ubuntu"} Subscriptions
    %ul.nav
      %li
        %a{:href => "#creating-a-subscription"} Creating a Subscription
      %li
        %a{:href => "#securing-the-subscriptions-endpoint"} Securing the Subscriptions Endpoint

Fix push nav to have correct hierarchy

%ul.nav
  %li
    %a.btn.btn-default{:href => "#{site.base_url}/docs"}
      %i.fa.fa-arrow-left
      Back to documentation
  %li.active
    %a{:href => "#push-resource"} Push Resource
    %ul.nav
      %li.active
        %a{:href => "#aliases"} Aliases
        %ul
          %li
            %a{:href => "#retrieving-the-alias"} Retrieving the Alias
          %li
            %a{:href => "#alias-based-subscriptions"} Alias Based Subscriptionss
          %li
            %a{:href => "#securing-the-alias-endpoint"} Securing the Alias Endpoint
      %li
        %a{:href => "#ubuntu"} Subscriptions
        %ul
          %li
            %a{:href => "#creating-a-subscription"} Creating a Subscription
          %li
            %a{:href => "#securing-the-subscriptions-endpoint"} Securing the Subscriptions Endpoint


.row
  .col-md-12{:style => 'height:150px;overflow-y:auto;'}
    - if @asset.images.empty?
      %p There are no photos for this asset.
    - else
      - @asset.images.each do |p|
        = link_to image_tag(p.image.url(:thumb)), p.image.url, :alt => "#{p.description}", :class => "img-responsive gallery-image thumbnail col-md-2 col-sm-4 col-xs-6", :data => {:lightbox => 'true '}

.row
  .col-md-12
    %fieldset
      %legend Add Photo
      = simple_form_for([@asset, Image.new],
          :url => inventory_images_path(@asset, Image.new),
          :html => {:multipart => true, :class => 'form-vertical' },
          :wrapper => :vertical_form,
          :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
        = f.input :image, :required => true
        = f.input :description, :as => :text, :placeholder => 'Enter a brief description of the photo...', :required => true, :minlength => 10
        = f.submit "Add Photo", :class => 'btn btn-primary', :id => 'image_submit'

Fix layout of asset photos

.row
  .col-md-12
    - if @asset.images.empty?
      %p There are no photos for this asset.
    - else
      - @asset.images.each do |p|
        = link_to image_tag(p.image.url(:thumb)), p.image.url, :alt => "#{p.description}", :class => "img-responsive gallery-image thumbnail col-md-2 col-sm-4 col-xs-4", :data => {:lightbox => 'true '}

.row
  .col-md-12
    %fieldset
      %legend Add Photo
      = simple_form_for([@asset, Image.new],
          :url => inventory_images_path(@asset, Image.new),
          :html => {:multipart => true, :class => 'form-vertical' },
          :wrapper => :vertical_form,
          :wrapper_mappings => {:check_boxes => :vertical_radio_and_checkboxes, :radio_buttons => :vertical_radio_and_checkboxes, :file => :vertical_file_input, :boolean => :vertical_boolean}) do |f|
        = f.input :image, :required => true
        = f.input :description, :as => :text, :placeholder => 'Enter a brief description of the photo...', :required => true, :minlength => 10
        = f.submit "Add Photo", :class => 'btn btn-primary', :id => 'image_submit'


.instance-panel
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:value => @text_search, :type => "text", :name => "text_search"}/
.container.no-gutter
  .row.no-gutter
    .col-md-12.schema-wrapper.text-left
      = content_tag(:p, "No se han encontrado resultados",
        class:"text-center") if @schemas.empty?
      - @schemas.each do |schema|
        .box-schema(data-categories="category-#{schema.schema_category.id}")
          .title
            = link_to [schema, schema.last_version] do
              = truncate(schema.name, :length => 56)
          .body
            %span
              Descripción:
            = truncate(schema.description, :length => 183)

Fix box title length on schema boxes

.instance-panel
  .container
    .col-md-12{:class => "text-center"}
      %h1
        Directorio de Esquemas
      .form-group.col-md-6.container-form
        = form_tag(search_schemas_path, method: "get") do
          .inner-addon.left-addon
            %i.glyphicon.glyphicon-search
            %input#search-schema.form-control{:value => @text_search, :type => "text", :name => "text_search"}/
.container.no-gutter
  .row.no-gutter
    .col-md-12.schema-wrapper.text-left
      = content_tag(:p, "No se han encontrado resultados",
        class:"text-center") if @schemas.empty?
      - @schemas.each do |schema|
        .box-schema(data-categories="category-#{schema.schema_category.id}")
          .title
            = link_to [schema, schema.last_version] do
              = truncate(schema.name, :length => 50)
          .body
            %span
              Descripción:
            = truncate(schema.description, :length => 183)


%article.welcome
  = image_tag "https://d1015h9unskp4y.cloudfront.net/attachments/bae8bafd-4081-4b2b-b6f4-c9d4c367ded8/verba.png", width: "200px"
  %p.col-md-6
    Welcome
    %span= current_user.username + "!"
  %p.col-md-6
    You're here because you want to become a better writer and communicator. Verba is here to help.

  %p.col-md-6
    Here's how Verba works:

  %ul.col-md-6
    %li
      You'll receive a daily e-mail with a writing prompt to get you started, if you aren't feeling particularly inspired. When you log in, you can simply begin writing, either using the prompt or your own topic. You could talk about what you are going to do during your day or an issue that you have had on your mind.
    %br/
    %li
      Verba supports writing in Markdown for formatting your posts.
      = link_to "Daring Fireball", "http://daringfireball.net/projects/markdown/"
      has a great introduction to Markdown.
    %br/
    %li
      We'll keep track for you some key stats including word count, number of posts, and streaks of consecutive days that you wrote.
    %br/
    %li
      Your writing is private by default. You may choose, though, to publish a post and get feedback from other writers in the community.

  = link_to "Let's get started!", root_path, class: "button get-started"

Fix copy on welcome page.

%article.welcome
  = image_tag "https://d1015h9unskp4y.cloudfront.net/attachments/bae8bafd-4081-4b2b-b6f4-c9d4c367ded8/verba.png", width: "200px"
  %p.col-md-6
    Welcome
    %span= current_user.username + "!"
  %p.col-md-6
    You're here because you want to become a better writer and communicator. Verba is here to help.

  %p.col-md-6
    Here's how Verba works:

  %ul.col-md-6
    %li
      You'll receive a daily e-mail with a writing prompt to get you started, if you aren't feeling particularly inspired. When you log in, you can simply begin writing, either using the prompt or your own topic. You could talk about what you are going to do during your day or an issue that you have had on your mind.
    %br/
    %li
      Verba supports writing in Markdown for formatting your posts.
      = link_to "Daring Fireball", "http://daringfireball.net/projects/markdown/"
      has a great introduction to Markdown.
    %br/
    %li
      We'll keep track of some key stats including word count, number of posts, and streaks of consecutive days that you wrote.
    %br/
    %li
      Your writing is private by default. You may choose, though, to publish a post and get feedback from other writers in the community.

  = link_to "Let's get started!", root_path, class: "button get-started"


- provide :title, @url.title

= render 'shared/breadcrumbs',
  crumbs: [[@url.project.name, @url.project],
           [@url.title]]

.page-header
  %h1
    = yield :title
    %small
      = link_to @url, method: :delete, title: 'Delete',
                      data: { confirm: 'Are you sure?' } do
        %span.glyphicon.glyphicon-remove<>
  %p
    = link_to snapshots_path(url: @url.id),
              method: :post,
              title:  'Create new snapshots for this URL',
              class:  'btn btn-primary' do
      %span.glyphicon.glyphicon-camera
      Create new snapshots

    = link_to @url.simplified_address, @url.address

- @url.snapshots.includes(:viewport).group_by(&:viewport).each do |viewport, snapshots|
  .panel.panel-default{ id: "viewport-#{viewport.id}" }
    .panel-heading
      %h3.panel-title= viewport
    .panel-body.snapshots
      = render snapshots

Add bookmark icon to URL show page

- provide :title, @url.title

= render 'shared/breadcrumbs',
  crumbs: [[@url.project.name, @url.project],
           [@url.title]]

.page-header
  %h1
    %span.glyphicon.glyphicon-bookmark
    = yield :title
    %small
      = link_to @url, method: :delete, title: 'Delete',
                      data: { confirm: 'Are you sure?' } do
        %span.glyphicon.glyphicon-remove<>
  %p
    = link_to snapshots_path(url: @url.id),
              method: :post,
              title:  'Create new snapshots for this URL',
              class:  'btn btn-primary' do
      %span.glyphicon.glyphicon-camera
      Create new snapshots

    = link_to @url.simplified_address, @url.address

- @url.snapshots.includes(:viewport).group_by(&:viewport).each do |viewport, snapshots|
  .panel.panel-default{ id: "viewport-#{viewport.id}" }
    .panel-heading
      %h3.panel-title= viewport
    .panel-body.snapshots
      = render snapshots


= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "form-horizontal" }) do |f|
  %legend Sign in
  .form-inputs
    %ol.unstyled
      %li
        = f.input :email,
          autofocus: true,
          required: false,
          placeholder: "me@example.com"
      %li
        = f.input :password
  .form-actions
    = f.button :submit, "Sign in", class: 'btn-large'
  = render "devise/shared/links"

Add flash error messages to login.

= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "form-horizontal" }) do |f|
  - if flash.any?
    .alert.alert-error= flash[:alert]
  %fieldset#signin
    %legend Sign in
    .form-inputs
      = f.input :email,
        autofocus: true,
        placeholder: "me@example.com"
      = f.input :password
    .form-actions
      = f.button :submit, "Sign in", class: 'btn-large'
= render "devise/shared/links"


!!!html
%html{:lang => I18n.locale}
  %head
    %title SCOOBAR
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=edge")
    %meta(name="viewport" content="width=device-width, initial-scale=1")
    = stylesheet_link_tag    'application', media: 'all',   'data-turbolinks-track' => true
    = stylesheet_link_tag    'print',       media: 'print'
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body

    = render 'layouts/navbar'

    .container

      = render 'layouts/flash_messages', flash: flash

      = yield

Add page class to body tag

!!!html
%html{:lang => I18n.locale}
  %head
    %title SCOOBAR
    %meta(charset="utf-8")
    %meta(http-equiv="X-UA-Compatible" content="IE=edge")
    %meta(name="viewport" content="width=device-width, initial-scale=1")
    = stylesheet_link_tag    'application', media: 'all',   'data-turbolinks-track' => true
    = stylesheet_link_tag    'print',       media: 'print'
    = javascript_include_tag 'application', 'data-turbolinks-track' => true
    = csrf_meta_tags
  %body{class: page_class}

    = render 'layouts/navbar'

    .container

      = render 'layouts/flash_messages', flash: flash

      = yield


#policy_list_div
  #main_div
    = render :partial => 'layouts/gtl', :locals => {:action_url => "policy_get_all", :button_div => 'policy_bar'}

Remove duplicate main_div from policies list view

#policy_list_div
  = render :partial => 'layouts/gtl', :locals => {:action_url => "policy_get_all", :button_div => 'policy_bar'}


!!! XML
= xml_stylesheet 'main'
= xml_stylesheet 'coderay'
%feed{:xmlns => "http://www.w3.org/2005/Atom"}
  %title
    - if @post
      == #{h @post.title} :
    Comments : Nex3
  %id= objects_url
  - unless @comments.empty? && @post.nil?
    %updated= (@comments[-1] || @post).created_at.xmlschema
  %icon= image_path('favicon.png')
  %link{:rel => 'self', :href => objects_path + '.atom'}/
  - for comment in current_objects
    %entry
      %id= comment.uid
      %title= h truncate(comment.content.gsub(/\s+/, ' '), 50)
      %updated= comment.updated_at.xmlschema
      %published= comment.created_at.xmlschema
      %author
        %name= h comment.user.name
        %uri= h comment.user.href
      %content{:type => 'xhtml'}
        .model{:xmlns => "http://www.w3.org/1999/xhtml"}[comment]
          = stylesheet_link_tag 'main'
          = stylesheet_link_tag 'coderay'
          .content= find_and_preserve(comment.render)
      %link{:rel => 'alternate', :href => object_path(comment)}/

Fix links on /comments.atom entries.

!!! XML
= xml_stylesheet 'main'
= xml_stylesheet 'coderay'
%feed{:xmlns => "http://www.w3.org/2005/Atom"}
  %title
    - if @post
      == #{h @post.title} :
    Comments : Nex3
  %id= objects_url
  - unless @comments.empty? && @post.nil?
    %updated= (@comments[-1] || @post).created_at.xmlschema
  %icon= image_path('favicon.png')
  %link{:rel => 'self', :href => objects_path + '.atom'}/
  - for comment in current_objects
    %entry
      %id= comment.uid
      %title= h truncate(comment.content.gsub(/\s+/, ' '), 50)
      %updated= comment.updated_at.xmlschema
      %published= comment.created_at.xmlschema
      %author
        %name= h comment.user.name
        %uri= h comment.user.href
      %content{:type => 'xhtml'}
        .model{:xmlns => "http://www.w3.org/1999/xhtml"}[comment]
          = stylesheet_link_tag 'main'
          = stylesheet_link_tag 'coderay'
          .content= find_and_preserve(comment.render)
      %link{:rel => 'alternate', :href => comment_path(comment.post_id, comment)}/


.row
  .ten.columns
    %ul.link-list
      %li
        = link_to "About", "https://github.com/Growstuff/project/wiki/About%20Growstuff"
      %li
        = link_to "License", "https://github.com/Growstuff/growstuff/blob/dev/LICENSE.txt"
      %li
        = link_to "Github", "https://github.com/Growstuff/"
      %li
        = link_to "Wiki", "http://wiki.growstuff.org"
      %li
        = link_to "Mailing list", "http://lists.growstuff.org/mailman/listinfo/discuss"
      %li
        = link_to "Community Guidelines", "https://github.com/Growstuff/policy/blob/master/community-guidelines.md"

Make the About link in the footer point to the new wiki

.row
  .ten.columns
    %ul.link-list
      %li
        = link_to "About", "http://wiki.growstuff.org"
      %li
        = link_to "License", "https://github.com/Growstuff/growstuff/blob/dev/LICENSE.txt"
      %li
        = link_to "Github", "https://github.com/Growstuff/"
      %li
        = link_to "Wiki", "http://wiki.growstuff.org"
      %li
        = link_to "Mailing list", "http://lists.growstuff.org/mailman/listinfo/discuss"
      %li
        = link_to "Community Guidelines", "https://github.com/Growstuff/policy/blob/master/community-guidelines.md"


-# This is currently also used on galleries#show
-# TODO Decide on using special thumbnail format (e.g. x200)
-# TODO Responsive Images (with lazy loading), remove jquery.unveil

- if picture.plain?
  = image_tag '',
    data: { src: url_for(picture.image_file.variant(resize: Settings.sizes.medium)) },
    title: picture,
    alt: picture

  %noscript
    = image_tag picture.image_file.variant(resize: Settings.sizes.medium),
    title: picture,
    alt: picture

- else
  = react_component 'crypto/LazyEncryptedImage',
    { src: url_for(picture.image_file),
      title: picture.to_s }

Use smaller images as thumbnails

-# This is currently also used on galleries#show
-# TODO Decide on using special thumbnail format (e.g. x200)
-# TODO Responsive Images (with lazy loading), remove jquery.unveil

- if picture.plain?
  = image_tag '',
    data: { src: url_for(picture.image_file.variant(resize: Settings.sizes.small)) },
    title: picture,
    alt: picture

  %noscript
    = image_tag picture.image_file.variant(resize: Settings.sizes.small),
    title: picture,
    alt: picture

- else
  = react_component 'crypto/LazyEncryptedImage',
    { src: url_for(picture.image_file),
      title: picture.to_s }


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

%p

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

Add new greeting table in order cancel mail

%table.social.white-bg{:width => "100%"}
  %tr
    %td
      %table.column{:align => "left"}
        %tr
          %td
            %h3
              = t(".customer_greeting", name: @order.bill_address.firstname)
            %h4
              = t(".instructions_html", distributor: @order.distributor.name )
            %img.float-left{:src => "#{@order.distributor.logo.url(:medium)}"}/
      %span.clear

%p.callout
  = t(".dont_cancel", email: @order.distributor.contact.email)

%p

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


%ul.nav.navbar-nav
  %li.dropdown.tasks-menu
    %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
      %i.glyphicon.glyphicon-user
      %span
        = @logged_in.name
        %i.caret
    %ul.dropdown-menu
      %li.header
        = @logged_in.email
      %li
        = link_to @logged_in do
          = icon 'fa fa-user'
          = t('nav.profile_sub.show')
      %li
        = link_to edit_person_path(@logged_in) do
          = icon 'fa fa-pencil'
          = t('nav.profile_sub.edit')
      %li
        = link_to edit_person_account_path(@logged_in) do
          = icon 'fa fa-key'
          = t('nav.profile_sub.password')
      - if setting(:features, :groups)
        %li
          = link_to edit_person_path(@logged_in, email: true) do
            = icon 'fa fa-envelope'
            = t('nav.profile_sub.email')
      %li
        = link_to edit_person_privacy_path(@logged_in) do
          = icon 'fa fa-lock'
          = t('nav.profile_sub.privacy')
      %li
        = link_to session_path, method: :delete do
          = icon 'fa fa-sign-out'
          = t("session.sign_out")

Fix missing icon… Use font-awesome instead.

%ul.nav.navbar-nav
  %li.dropdown.tasks-menu
    %a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
      %i.fa.fa-user
      %span
        = @logged_in.name
        %i.caret
    %ul.dropdown-menu
      %li.header
        = @logged_in.email
      %li
        = link_to @logged_in do
          = icon 'fa fa-user'
          = t('nav.profile_sub.show')
      %li
        = link_to edit_person_path(@logged_in) do
          = icon 'fa fa-pencil'
          = t('nav.profile_sub.edit')
      %li
        = link_to edit_person_account_path(@logged_in) do
          = icon 'fa fa-key'
          = t('nav.profile_sub.password')
      - if setting(:features, :groups)
        %li
          = link_to edit_person_path(@logged_in, email: true) do
            = icon 'fa fa-envelope'
            = t('nav.profile_sub.email')
      %li
        = link_to edit_person_privacy_path(@logged_in) do
          = icon 'fa fa-lock'
          = t('nav.profile_sub.privacy')
      %li
        = link_to session_path, method: :delete do
          = icon 'fa fa-sign-out'
          = t("session.sign_out")


= form_for @user, :html => { :multipart => true, :role => "form", :class => "form-horizontal" } do |f|
  - if @user.errors.any?
    .alert.alert-danger
      %h2 #{pluralize(@user.errors.count, "error")} prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg
  .form-group
    = f.label :email
    = f.text_field :email, :value => @user.email, :class => "form-control"

  .form-group
    = f.label :name
    = f.text_field :name, :value => @user.name, :class => "form-control"

  .form-group
    = f.label "Company or Organization"
    = f.text_field :company_or_org, :value => @user.company_or_org, :class => "form-control"

  .form-group
    = f.hidden_field :approved, :value => (user_signed_in? && current_user.has_role? admin)
    = f.submit 'Update', :class => 'btn btn-primary'

Add missing colon for symbol

= form_for @user, :html => { :multipart => true, :role => "form", :class => "form-horizontal" } do |f|
  - if @user.errors.any?
    .alert.alert-danger
      %h2 #{pluralize(@user.errors.count, "error")} prohibited this user from being saved:
      %ul
        - @user.errors.full_messages.each do |msg|
          %li= msg
  .form-group
    = f.label :email
    = f.text_field :email, :value => @user.email, :class => "form-control"

  .form-group
    = f.label :name
    = f.text_field :name, :value => @user.name, :class => "form-control"

  .form-group
    = f.label "Company or Organization"
    = f.text_field :company_or_org, :value => @user.company_or_org, :class => "form-control"

  .form-group
    = f.hidden_field :approved, :value => (user_signed_in? && (current_user.has_role? :admin))
    = f.submit 'Update', :class => 'btn btn-primary'