= error_messages_for :account

%div
  %label{:for => 'settingsFormSiteName'}= :site_name.l
  = text_field 'account', 'site_name', :id => 'settingsFormSiteName', :class => 'long'
  %p.desc= :site_name_info.l

%div
  %label{:for => 'settingsFormHostName'}= :host_name.l
  = text_field 'account', 'host_name', :id => 'settingsFormHostName', :class => 'long'
  %p.desc= :host_name_info.l

%div
  = check_box 'account', 'openid_enabled', :id => 'settingsFormOpenID'
  %label.checkbox{:for => 'settingsFormOpenID'}= :openid_enabled.l
  %p.desc= :openid_info.l

Tweak hostname on settings form

= error_messages_for :account

%div
  %label{:for => 'settingsFormSiteName'}= :site_name.l
  = text_field 'account', 'site_name', :id => 'settingsFormSiteName', :class => 'long'
  %p.desc= :site_name_info.l

%div
  %label{:for => 'settingsFormHostName'}= :host_name.l
  = text_field 'account', 'host_name', :id => 'settingsFormHostName', :class => 'moderate'
  %p.desc= :host_name_info.l

%div
  = check_box 'account', 'openid_enabled', :id => 'settingsFormOpenID'
  %label.checkbox{:for => 'settingsFormOpenID'}= :openid_enabled.l
  %p.desc= :openid_info.l


#main-header.navbar.navbar-default.navbar-fixed-top{role: "navigation"}
  .container
    .navbar-header
      %button.navbar-toggle.collapsed{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
    - if current_user
      .navbar-collapse.collapse{style: "height: 1px;"}
        %ul.nav.navbar-nav.navbar-left
          = render 'shared/user_links'

          - if current_user.admin?
            = render 'shared/admin_links'

        %ul.nav.navbar-nav.navbar-right
          %li
            %h1= Time.now.strftime('%B %d, %Y')
          %li.pink
            = link_to logout_path, target: "_self" do
              %i.fa.fa-sign-out.fa-3x
              %p Sign Out
          %li.pink
            = link_to current_user, :target => "_self", :class => '', :title => "#{current_user.name}" do
              = image_tag current_user.image || "http://lorempixel.com/100/100/cats/", :size => "70x70", :class => "img-rounded"

Use abbreviated month name ("Sep" intend of September)

#main-header.navbar.navbar-default.navbar-fixed-top{role: "navigation"}
  .container
    .navbar-header
      %button.navbar-toggle.collapsed{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
    - if current_user
      .navbar-collapse.collapse{style: "height: 1px;"}
        %ul.nav.navbar-nav.navbar-left
          = render 'shared/user_links'

          - if current_user.admin?
            = render 'shared/admin_links'

        %ul.nav.navbar-nav.navbar-right
          %li
            %h1= Time.now.strftime('%b %d, %Y')
          %li.pink
            = link_to logout_path, target: "_self" do
              %i.fa.fa-sign-out.fa-3x
              %p Sign Out
          %li.pink
            = link_to current_user, :target => "_self", :class => '', :title => "#{current_user.name}" do
              = image_tag current_user.image || "http://lorempixel.com/100/100/cats/", :size => "70x70", :class => "img-rounded"


- 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 @url.simplified_address, @url.address

.button-group
  = link_to snapshots_path(url: @url.id),
            method: :post,
            title:  'Create new snapshots for this URL',
            class:  'btn btn-info' do
    %span.glyphicon.glyphicon-camera
    Create new snapshots

- @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

Move "Create new snapshots" button into header

- 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-info' 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


= tab :dashboard, :route => :admin, :icon => 'icon-dashboard'
= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons, :url => admin_products_path, :icon => 'icon-th-large'
= tab :order_cycles, :url => main_app.admin_order_cycles_path
= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations, :url => admin_orders_path('q[s]' => 'completed_at desc'), :icon => 'icon-shopping-cart'
= tab :reports, :icon => 'icon-file'
= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration', :icon => 'icon-wrench', :url => edit_admin_general_settings_path
= tab :enterprises, :url => main_app.admin_enterprises_path
= tab :customers, :url => main_app.admin_customers_path
= tab :enterprise_groups, :url => main_app.admin_enterprise_groups_path, label: 'groups'

Add icon to OC menu entry

= tab :dashboard, :route => :admin, :icon => 'icon-dashboard'
= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons, :url => admin_products_path, :icon => 'icon-th-large'
= tab :order_cycles, :url => main_app.admin_order_cycles_path, :icon => 'icon-refresh'
= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations, :url => admin_orders_path('q[s]' => 'completed_at desc'), :icon => 'icon-shopping-cart'
= tab :reports, :icon => 'icon-file'
= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration', :icon => 'icon-wrench', :url => edit_admin_general_settings_path
= tab :enterprises, :url => main_app.admin_enterprises_path
= tab :customers, :url => main_app.admin_customers_path
= tab :enterprise_groups, :url => main_app.admin_enterprise_groups_path, label: 'groups'


- if object.errors.any?
  #error-messages
    %ul
    - object.errors.full_messages.each do |message|
      %li
        = message

Fix indentation on error_messages partial


!!!
%html(id="adminsimple_#{Adminsimple.configuration.themes[0]}")
  %head
    %title= t('adminsimple.site_name')
    %meta{ charset: "UTF-8" }
    %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0" }
    = content_for :head
    = csrf_meta_tags
    :javascript
      if(typeof Storage !== undefined && localStorage.theme) {document.querySelector('html').setAttribute('id', "adminsimple_" + localStorage.theme);}
    = stylesheet_link_tag 'adminsimple'
    = stylesheet_link_tag Adminsimple.configuration.app_css_overrides if Adminsimple.configuration.app_css_overrides

  %body{class: @body_class}
    = render partial: "/adminsimple/layout/navbar"
    - Adminsimple.configuration.layout.each do |partial|
      = render partial: "/adminsimple/layout/#{partial}"
    = javascript_include_tag "#{Adminsimple.configuration.app_js_overrides ? Adminsimple.configuration.app_js_overrides : 'adminsimple'}"

Use yield to drop in content, not content_for

!!!
%html(id="adminsimple_#{Adminsimple.configuration.themes[0]}")
  %head
    %title= t('adminsimple.site_name')
    %meta{ charset: "UTF-8" }
    %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0" }
    = yield :head
    = csrf_meta_tags
    :javascript
      if(typeof Storage !== undefined && localStorage.theme) {document.querySelector('html').setAttribute('id', "adminsimple_" + localStorage.theme);}
    = stylesheet_link_tag 'adminsimple'
    = stylesheet_link_tag Adminsimple.configuration.app_css_overrides if Adminsimple.configuration.app_css_overrides

  %body{class: @body_class}
    = render partial: "/adminsimple/layout/navbar"
    - Adminsimple.configuration.layout.each do |partial|
      = render partial: "/adminsimple/layout/#{partial}"
    = javascript_include_tag "#{Adminsimple.configuration.app_js_overrides ? Adminsimple.configuration.app_js_overrides : 'adminsimple'}"


%h1
  = @settings_group
  settings page

= form_tag admin_site_settings_path, :method => :put do
  - @settings.each do |s|
    = fields_for "site_settings[]", s do |f|
      .field
        = f.label s.setting_name
        = f.text_field :setting_value, :class => s.setting_type
  .actions
    %button{type: "submit"} Save

= @settings.inspect

%script
  $("input.color_field").minicolors({
  swatches: #{raw(@site_settings[:brand][:colors].values)}
  });

Support for image upload field in settings (no working upload yet tho)

%h1
  = @settings_group
  settings page

= form_tag admin_site_settings_path, :method => :put do
  - @settings.each do |s|
    = fields_for "site_settings[]", s do |f|
      .field
        = f.label s.setting_name
        - if s.setting_type == "text_field" || s.setting_type == "color_field"
          = f.text_field :setting_value, :class => s.setting_type
        - elsif s.setting_type == "file_field"
          = f.file_field :setting_value, 'class': 'image_upload_input'

  .actions
    %button{type: "submit"} Save

= @settings.inspect

%script
  $("input.color_field").minicolors({
  swatches: #{raw(@site_settings[:brand][:colors].values)}
  });


.activity-list
  .activity-list__title.copy--h5<
    = activity_list[:title]

  %ul.activity-list__container
    - activity_list[:items].each_with_index do |item,i|
      %li.media.media--rev
        .activity-list__item{ class: activity_list[:rowClass] ? "activity-list--icon #{activity_list[:rowClass]}" : "" }
          %span.media__body
            %a.activity-list__link{ href: "/profiles/#{item[:user][:username]}" }
              = item[:user][:name]
            = item[:action]
            %a.activity-list__link{ href: item[:link][:url], class: item[:link][:icon] ? "activity-list--icon text-icon--#{item[:link][:icon]}" : "" }
              = item[:link][:text]
          %time.activity-list__icon.activity-list__time.media__img{:datetime => Time.new(item[:timestamp])}<
            = time_ago_in_words(Time.at(item[:timestamp]))
            ago

Fix activity list icon class in markup.

.activity-list
  .activity-list__title.copy--h5<
    = activity_list[:title]

  %ul.activity-list__container
    - activity_list[:items].each_with_index do |item,i|
      %li.media.media--rev
        .activity-list__item{ class: activity_list[:rowClass] ? "activity-list--icon #{activity_list[:rowClass]}" : "" }
          %span.media__body
            %a.activity-list__link{ href: "/profiles/#{item[:user][:username]}" }
              = item[:user][:name]
            = item[:action]
            %a.activity-list__link{ href: item[:link][:url], class: item[:link][:icon] ? "activity-list__icon text-icon--#{item[:link][:icon]}" : "" }
              = item[:link][:text]
          %time.activity-list__icon.activity-list__time.media__img{:datetime => Time.new(item[:timestamp])}<
            = time_ago_in_words(Time.at(item[:timestamp]))
            ago


= render "shared/profile_menu"
.edit-user-form
  %h1= t ".title"
  = semantic_form_for resource, as: resource_name, url: registration_path(resource_name), html: {method: :put} do |f|
    = devise_error_messages!
    = f.inputs do
      = f.input :full_name
      = f.input :display_name
      = f.input :email
      = f.input :password
      = f.input :password_confirmation
      = f.input :current_password, required: true
    = f.actions do
      = f.action :submit
  = render :partial => "devise/shared/links"
.cancel-form
  %h2 Cancel my account
  %p
    Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete}.
  = link_to "Back", :back

Remove the shared links for the account update page.

= render "shared/profile_menu"
.edit-user-form
  %h1= t ".title"
  = semantic_form_for resource, as: resource_name, url: registration_path(resource_name), html: {method: :put} do |f|
    = devise_error_messages!
    = f.inputs do
      = f.input :full_name
      = f.input :display_name
      = f.input :email
      = f.input :password
      = f.input :password_confirmation
      = f.input :current_password, required: true
    = f.actions do
      = f.action :submit
.cancel-form
  %h2 Cancel my account
  %p
    Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete}.
  = link_to "Back", :back


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

Update request_date partial to improve wording and default to 180 days.

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


= form_tag project_entities_path, method: 'get' do
  %fieldset
    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:scope].blank?)}
        = link_to project_filter_path(scope: nil) do
          Everyone's
      %li{class: ("active" if params[:scope] == 'assigned-to-me')}
        = link_to project_filter_path(scope: 'assigned-to-me') do
          Assigned to me
      %li{class: ("active" if params[:scope] == 'created-by-me')}
        = link_to project_filter_path(scope: 'created-by-me') do
          Created by me

    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:state].blank?)}
        = link_to project_filter_path(state: nil) do
          Open
      %li{class: ("active" if params[:state] == 'closed')}
        = link_to project_filter_path(state: 'closed') do
          Closed
      %li{class: ("active" if params[:state] == 'all')}
        = link_to project_filter_path(state: 'all') do
          All

  %fieldset
    - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any?
      = link_to project_entities_path, class: 'cgray pull-right' do
        %i.icon-remove
        %strong Clear filter

Hide some filters if current_user is nil

= form_tag project_entities_path, method: 'get' do
  %fieldset
    - if current_user
      %ul.nav.nav-pills.nav-stacked
        %li{class: ("active" if params[:scope].blank?)}
          = link_to project_filter_path(scope: nil) do
            Everyone's
        %li{class: ("active" if params[:scope] == 'assigned-to-me')}
          = link_to project_filter_path(scope: 'assigned-to-me') do
            Assigned to me
        %li{class: ("active" if params[:scope] == 'created-by-me')}
          = link_to project_filter_path(scope: 'created-by-me') do
            Created by me

    %ul.nav.nav-pills.nav-stacked
      %li{class: ("active" if params[:state].blank?)}
        = link_to project_filter_path(state: nil) do
          Open
      %li{class: ("active" if params[:state] == 'closed')}
        = link_to project_filter_path(state: 'closed') do
          Closed
      %li{class: ("active" if params[:state] == 'all')}
        = link_to project_filter_path(state: 'all') do
          All

  %fieldset
    - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any?
      = link_to project_entities_path, class: 'cgray pull-right' do
        %i.icon-remove
        %strong Clear filter


.row
  .col-xs-12
    %i.fa.fa-info-circle.fa-2x.modal-text{"aria-hidden" => "true", "data-target" => "#newsModal", "data-toggle" => "modal", :style => "color: #4f2170"}
#newsModal.modal.fade{:role => "dialog"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"data-dismiss" => "modal", :type => "button"} ×
        %h4.modal-title.modal-text Welcome to South Devon College, 2016/17!
      .modal-body
        %p You can use LEAP to support your learning throughout this year. You can look at your timetable, check the progress of your studies and be updated on the latest news and upcoming events.
        %p Remember to also check Moodle regularly, this is where you will find lots of information and support materials about your programme of study; including English, maths and tutorial.
      .modal-footer
        %a{:href => "http://moodle.southdevon.ac.uk", :target => "_blank"}
          %button.btn.btn-default.center.modal-button.width-100{:type => "button"} Click Here to go to Moodle
- if @notify
  :javascript
    $( document ).ready(function() {
      $('#newsModal').modal('show');
    });

Remove year from Welcome message

.row
  .col-xs-12
    %i.fa.fa-info-circle.fa-2x.modal-text{"aria-hidden" => "true", "data-target" => "#newsModal", "data-toggle" => "modal", :style => "color: #4f2170"}
#newsModal.modal.fade{:role => "dialog"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"data-dismiss" => "modal", :type => "button"} ×
        %h4.modal-title.modal-text Welcome to South Devon College
      .modal-body
        %p You can use LEAP to support your learning throughout this year. You can look at your timetable, check the progress of your studies and be updated on the latest news and upcoming events.
        %p Remember to also check Moodle regularly, this is where you will find lots of information and support materials about your programme of study; including English, maths and tutorial.
      .modal-footer
        %a{:href => "http://moodle.southdevon.ac.uk", :target => "_blank"}
          %button.btn.btn-default.center.modal-button.width-100{:type => "button"} Click Here to go to Moodle
- if @notify
  :javascript
    $( document ).ready(function() {
      $('#newsModal').modal('show');
    });


- link_text = current_user.portal_teacher || current_user.has_role?("manager", "admin") ? teacher_preview_button_for(resource_page) : ""
- link_text += preview_button_for(resource_page) + name_for_component(resource_page, :hide_componenent_name => true)

= accordion_for(resource_page, link_text, :resource_page) do
  %div.action_menu
    %div.action_menu_header_left
      %span.author
        = resource_page.user.name
    %div.action_menu_header_right
      %ul.menu
        - if (resource_page.changeable?(current_user))
          %li.menu=link_to 'edit', resource_page
          %li.menu=link_to 'delete', resource_page, :class => 'delete', :confirm => "Are you sure you want to delete Resource Page #{resource_page.id}", :method => :delete
  %div{:id => dom_id_for(resource_page, :details), :class => 'tiny'}
    %p=resource_page.description
    %p
      %i= updated_time_text(resource_page)
    %p
      %i
        Used in: #{resource_page.offerings.length} classes.

Update preview button for resource page list

- link_text = link_button("preview.png", resource_page, :title => "View the Resource Page: '#{resource_page.name}'.")
- link_text += name_for_component(resource_page, :hide_componenent_name => true)

= accordion_for(resource_page, link_text, :resource_page) do
  %div.action_menu
    %div.action_menu_header_left
      %span.author
        = resource_page.user.name
    %div.action_menu_header_right
      %ul.menu
        - if (resource_page.changeable?(current_user))
          %li.menu=link_to 'edit', edit_resource_page_url(resource_page)
          %li.menu=link_to 'delete', resource_page, :class => 'delete', :confirm => "Are you sure you want to delete Resource Page #{resource_page.id}", :method => :delete
  %div{:id => dom_id_for(resource_page, :details), :class => 'tiny'}
    %p=resource_page.description
    %p
      %i= updated_time_text(resource_page)
    %p
      %i
        Used in: #{resource_page.offerings.length} classes.


= breadcrumb do |items|
  - if parent?
    -items << link_to(parent_resource_name.pluralize, parent_collection_url)
    -items << link_to(parent.to_s, parent_url)
  - if params[:id]
    -items << link_to(resource_name.pluralize, collection_url)
    -items << resource.to_s
  - else
    -items << resource_name.pluralize

Improve non resource breadcrumb rendering

= breadcrumb do |items|
  - items << link_to(Settings.app_name, controller_namespaces + [:root])
  - if parent?
    -items << link_to(parent_resource_name.pluralize, parent_collection_url)
    -items << link_to(parent.to_s, parent_url)
  - if resource?
    -items << link_to(resource_name.pluralize, collection_url)
    -items << resource.to_s
  - elsif collection?
    -items << resource_name.pluralize
  - else
    -items << controller_name.humanize


.alert.alert-warning
  Internet Explorer はサポートしていないので最新のブラウザを使用してください。
  %ul
    %li= link_to "Firefox", "https://getfirefox.com/"
    %li= link_to "Chrome", "https://www.google.com/chrome/browser/desktop/"

Use alert-danger instead of alert-warning

.alert.alert-danger
  Internet Explorer はサポートしていないので最新のブラウザを使用してください。
  %ul
    %li= link_to "Firefox", "https://getfirefox.com/"
    %li= link_to "Chrome", "https://www.google.com/chrome/browser/desktop/"


- @disable_logo_link  = true
- content_for :html_attributes, 'ng-app="peoplefinderApp"'.html_safe
= render partial: 'layouts/peoplefinder/shared'
- content_for :content do
  #wrapper
    %main#content{role: 'main'}
      =flash_messages
      .inner-block
        #home-page= yield

= render 'layouts/peoplefinder/ga'
= render template: "layouts/peoplefinder/peoplefinder"

Add alpha banner to the homepage

- @disable_logo_link  = true
- content_for :html_attributes, 'ng-app="peoplefinderApp"'.html_safe
= render partial: 'layouts/peoplefinder/shared'
- content_for :content do
  #wrapper
    %main#content{role: 'main'}
      = render partial: 'layouts/partials/phase'
      =flash_messages
      .inner-block
        #home-page= yield

= render 'layouts/peoplefinder/ga'
= render template: "layouts/peoplefinder/peoplefinder"


- unless guides.empty?
  %div.card.card--b.mbm
    %ul.list
      - guides.each do |guide|
        - if guide.content.size > 100
          .split.mbs
            .split-item
              .split-cell
                %h1.h2.dib= guide.title.titleize
                = find_and_preserve do
                  = markdown(guide.content || "No content")

              .split-cell
                = link_to "View Guide", guide_path(guide), class: 'tsm'
        - else
          .mbs
            %h1.h2.dib= guide.title.titleize

Fix broken link to article guides.

- unless guides.empty?
  %div.card.card--b.mbm
    %ul.list
      - guides.each do |guide|
        - if guide.content.size > 100
          .split.mbs
            .split-item
              .split-cell
                %h1.h2.dib= guide.title.titleize
                = find_and_preserve do
                  = markdown(guide.content || "No content")

              .split-cell
                = link_to "View Guide", article_path(guide), class: 'tsm'
        - else
          .mbs
            %h1.h2.dib= guide.title.titleize


- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_user
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")
      - else
        = link_to new_machine_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "Add a new Machine")

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine

Fix bug in indexes UI, test

- cache ["v1", Machine.last_updated_at] do
- title "Machines"

  .row.top
    .col-lg-12
    %h2 Machines
  .row.row-no-padding
    .col-md-8.main-info
      %p
      All Fab Labs share common tools and processes in order to build a global network, a distributed laboratory for research and invention. Here you can find and add all the Machines available in the global Fab Lab Network, a global database of technologies locally available.

    .col-md-4
      %h4 Expand the Network
      %p Here you can add new Machines to the list.
      - if current_or_null_user.can_create?(Machine)
        = link_to new_machine_path, class: "btn btn-success" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "New Machine")
      - else
        = link_to new_machine_path, class: "btn btn-success", data: {toggle: "tooltip", placement: "bottom" }, title: "You need to be signed in to add a Machine" do
          = fa_icon "plus", text: t("views.labs.index.add_a_machine", default: "New Machine")

  .row.row-no-padding
    .col-lg-12
      = render "breadcrumbs"

  - @machines.in_groups_of(4, false) do |group|
    .row
      - group.each do |machine|
        .col-lg-3
          = render 'machine', machine: machine


= form_for @project, html: { role: 'form' } do |f|
  = render 'shared/error_explanation', instance: @project

  .form-group
    = f.label :name, 'Name', class: 'control-label'
    = f.text_field :name, class: 'form-control', autofocus: true
  .form-group
    = f.label :viewport_widths, 'Viewport widths', class: 'control-label'
    %small One per line
    = f.text_area :viewport_widths, rows: 4, class: 'form-control'
  .form-group
    = f.label :url_addresses, 'Web page addresses (URLs)', class: 'control-label'
    %small One per line
    = f.text_area :url_addresses, rows: 10, class: 'form-control'
  .form-group
    = f.submit 'Save', class: 'btn btn-primary'

Add required attribute to Project name field

= form_for @project, html: { role: 'form' } do |f|
  = render 'shared/error_explanation', instance: @project

  .form-group
    = f.label :name, 'Name', class: 'control-label'
    = f.text_field :name, class: 'form-control',
      autofocus: true, required: true
  .form-group
    = f.label :viewport_widths, 'Viewport widths', class: 'control-label'
    %small One per line
    = f.text_area :viewport_widths, rows: 4, class: 'form-control'
  .form-group
    = f.label :url_addresses, 'Web page addresses (URLs)', class: 'control-label'
    %small One per line
    = f.text_area :url_addresses, rows: 10, class: 'form-control'
  .form-group
    = f.submit 'Save', class: 'btn btn-primary'


%li
  %h4.snippet-title
    = link_to reliable_snippet_path(snippet) do
      = truncate(snippet.title, length: 60)
    %span.cgray.monospace.tiny.pull-right
      = snippet.file_name

  %small.pull-right.cgray
    Expires:
    - if snippet.expires_at
      = snippet.expires_at.to_date.to_s(:short)
    - else
      Never

  .snippet-info
    = "##{snippet.id}"
    %span
      by
      = image_tag avatar_icon(snippet.author_email), class: "avatar avatar-inline s16"
      = snippet.author_name
      %span.light
        #{time_ago_with_tooltip(snippet.created_at)}

Remove snippet expiration date from UI

%li
  %h4.snippet-title
    = link_to reliable_snippet_path(snippet) do
      = truncate(snippet.title, length: 60)
    %span.cgray.monospace.tiny.pull-right
      = snippet.file_name

  .snippet-info
    = "##{snippet.id}"
    %span
      by
      = image_tag avatar_icon(snippet.author_email), class: "avatar avatar-inline s16"
      = snippet.author_name
      %span.light
        #{time_ago_with_tooltip(snippet.created_at)}


---
title: Contact
---

.page-content.contact
  %h1 Contact
  %p
    Need to get in touch? Drop us a line!
    We’ll do our best to answer you quickly.

  .contact-form
    %form{ action: "https://formspree.io/#{data.site.contact_email}",
           method: "POST" }
      %input{ name: "full_name", type: "text", required: "",
              placeholder: "Name", maxlength: "100" }
      %input{ name: "_replyto", type: "email", required: "",
              placeholder: "Email", maxlength: "100" }
      %textarea{ name: "message", cols: "30", rows: "10", required: "",
              placeholder: "Your message", maxlength: "3000" }
      %input{ name: "_subject", type: "hidden",
              value: "[euroteamoutreach.org] New Contact Request" }
      %input{ name: "_next", type: "hidden",
              value: "http://#{data.site.human_url}/contact/thanks/" }
      %input{ name: "_gotcha", style: "display:none", type: "text" }
      %input{ name: "_format", style: "display:none", type: "text",
              value: "plain" }
      %input{ type: "submit", value: "Send" }

Update URL in contact form.

---
title: Contact
---

.page-content.contact
  %h1 Contact
  %p
    Need to get in touch? Drop us a line!
    We'll do our best to answer you quickly.

  .contact-form
    %form{ action: "https://formspree.io/#{data.site.contact_email}",
           method: "POST" }
      %input{ name: "full_name", type: "text", required: "",
              placeholder: "Name", maxlength: "100" }
      %input{ name: "_replyto", type: "email", required: "",
              placeholder: "Email", maxlength: "100" }
      %textarea{ name: "message", cols: "30", rows: "10", required: "",
              placeholder: "Your message", maxlength: "3000" }
      %input{ name: "_subject", type: "hidden",
              value: "[euroteamoutreach.org] New Contact Request" }
      %input{ name: "_next", type: "hidden",
              value: "#{data.site.url}/contact/thanks/" }
      %input{ name: "_gotcha", style: "display:none", type: "text" }
      %input{ name: "_format", style: "display:none", type: "text",
              value: "plain" }
      %input{ type: "submit", value: "Send" }


= render :partial => "layouts/flash_msg"
.container-fluid.container-tiles-pf.cloud-tenant-dashboard
  .row.row-tile-pf
    = react 'AggregateStatusCard', {:providerId => @record.id.to_s, :providerType => 'cloud_tenant'}
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-instances-line-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-images-line-chart"
  :javascript
    ManageIQ.angular.app.value('#{@record.id}');
    miq_bootstrap('.cloud-tenant-dashboard');

Convert cloud tenant charts to carbon

= render :partial => "layouts/flash_msg"
.container-fluid.container-tiles-pf.cloud-tenant-dashboard
  .row.row-tile-pf
    = react 'AggregateStatusCard', {:providerId => @record.id.to_s, :providerType => 'cloud_tenant'}
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = react('RecentVmGraph', :providerId => @record.id.to_s, :title => _('Recent Instances'),
       :config => 'recentInstancesConfig', :apiUrl => 'cloud_tenant_dashboard/recent_instances_data', :dataPoint => 'recentResources')
    .col-xs-12.col-sm-12.col-md-6
      = react('RecentVmGraph', :providerId => @record.id.to_s, :title => _('Recent Images'),
       :config => 'recentImagesConfig', :apiUrl => 'cloud_tenant_dashboard/recent_images_data', :dataPoint => 'recentResources')
  :javascript
    ManageIQ.angular.app.value('#{@record.id}');
    miq_bootstrap('.cloud-tenant-dashboard');


!= render partial: "jobs", locals: { admission: admission }

%div{class:'separate-admission', id:'separate_admission'}
  %h3
    = t('admissions.groups_with_separate_admission')
  :markdown
    #{Admission.first.groups_with_separate_admission}

Add red samfundet container for groups with separate admissions

!= render partial: "jobs", locals: { admission: admission }

%div{class:'separate-admission', id:'separate_admission'}
  .samf-container.white.mt-3
    %h2.text-Align.p-1.bg-red.title.white= t('admissions.groups_with_separate_admission')
    :markdown
      #{Admission.first.groups_with_separate_admission}


= simple_form_for @booking, :url => invoice_simple_bookings_path do |f|
  = f.input :debit_account_id, :as => :hidden
  = f.input :credit_account_id, :as => :hidden
  = f.input :reference_id, :as => :hidden
  = f.input :reference_type, :as => :hidden

  .row-fluid
    .span6
      = f.input :title, :input_html => {"data-autofocus" => true}
    .span6
      = f.input :value_date, :as => :date_field
  .row-fluid
    .span6
      = f.input :amount, :as => :string

  .row-fluid
    .span12
      = f.input :comments, :input_html => {:rows => 4, :class => 'span12'}

Use bookings form fields for simple_bookings.

= simple_form_for @booking, :url => invoice_simple_bookings_path do |f|
  = render 'bookings/form_fields', resource: @booking, f: f


%form.post{ action: @post.new_record? ? '/admin/new' : "/admin/edit/#{@post.id}", method: 'post' }
  = form_field @post, :title, placeholder: "Title of your post."
  = form_field @post, :link, placeholder: "Optional link to external URL."
  = form_field @post, :body, type: :textarea, placeholder: "Your post's body of text. Markdown formatting available."
  = form_field @post, :summary, placeholder: "An optional summary of your post. Markdown formatting available."
  = form_field @post, :read_more, label: "'Read More' Link Text", placeholder: "When supplying a summary text, this will be the link to the full post."

  .row
    .four.columns
      = form_field @post, :slug, label: 'URL Slug', placeholder: "Your post's URL slug.", hint: @post.previous_slugs.any? ? "Previous slugs: #{@post.previous_slugs.join ', '}" : nil
    .four.columns
      = form_field @post, :published_at, placeholder: 'You can use natural language. Try "now", "tomorrow", "next Monday".'
    .four.columns
      = form_field @post, :status, type: :dropdown, options: [[:draft, "Draft"], [:published, "Published"]]

  .row
    .buttons.twelve.columns
      %input{ type: 'submit', value: @post.new_record? ? 'Create Post' : 'Update Post' }

Make published_at form field placeholder shorter.

%form.post{ action: @post.new_record? ? '/admin/new' : "/admin/edit/#{@post.id}", method: 'post' }
  = form_field @post, :title, placeholder: "Title of your post."
  = form_field @post, :link, placeholder: "Optional link to external URL."
  = form_field @post, :body, type: :textarea, placeholder: "Your post's body of text. Markdown formatting available."
  = form_field @post, :summary, placeholder: "An optional summary of your post. Markdown formatting available."
  = form_field @post, :read_more, label: "'Read More' Link Text", placeholder: "When supplying a summary text, this will be the link to the full post."

  .row
    .four.columns
      = form_field @post, :slug, label: 'URL Slug', placeholder: "Your post's URL slug.", hint: @post.previous_slugs.any? ? "Previous slugs: #{@post.previous_slugs.join ', '}" : nil
    .four.columns
      = form_field @post, :published_at, placeholder: 'Try "now", "in 3 days", ...'
    .four.columns
      = form_field @post, :status, type: :dropdown, options: [[:draft, "Draft"], [:published, "Published"]]

  .row
    .buttons.twelve.columns
      %input{ type: 'submit', value: @post.new_record? ? 'Create Post' : 'Update Post' }


%div.status_info
  %strong Pending:
  Your application has not yet been posted for review. You can
  = link_to('revise it', edit_application_path(app.id))
  or
  = link_to('post it for review', post_application_url(app), :method => :post) + "."
  %strong Once an application is posted you will not be able to edit it.

Add a confirmation to posting an application.

%div.status_info
  %strong Pending:
  Your application has not yet been posted for review. You can
  = link_to('revise it', edit_application_path(app.id))
  or
  = link_to('post it for review', post_application_url(app), :method => :post, :confirm => "Are you sure? Once an application is posted it cannot be edited.") + "."
  %strong Once an application is posted you will not be able to edit it.


%ul.nav-links.new-session-tabs.nav-tabs.nav{ role: 'tablist' }
  %li.nav-item{ role: 'presentation' }
    %a.nav-link.qa-sign-in-tab.active{ href: '#login-pane', data: { toggle: 'tab' }, role: 'tab' } Sign in
  - if allow_signup?
    %li.nav-item{ role: 'presentation' }
      %a.nav-link.qa-register-tab{ href: '#register-pane', data: { toggle: 'tab' }, role: 'tab' } Register

Add trackEvent when accessing the Register tab

%ul.nav-links.new-session-tabs.nav-tabs.nav{ role: 'tablist' }
  %li.nav-item{ role: 'presentation' }
    %a.nav-link.qa-sign-in-tab.active{ href: '#login-pane', data: { toggle: 'tab' }, role: 'tab' } Sign in
  - if allow_signup?
    %li.nav-item{ role: 'presentation' }
      %a.nav-link.qa-register-tab{ href: '#register-pane', data: { track_label: 'sign_in_register', track_property: 'sign_in', track_event: 'click_button', track_value: 'register', toggle: 'tab' }, role: 'tab' } Register


.search
  - form_tag(:controller=>:relations, :action=>:entities) do
    %table
      %tr
        %td.label=tc("search")
        %td.field=text_field_tag :key, session[:entity_key]
        %td.submit=submit_tag tg("search_go")

Set entity search in get mode in order to simplify previous process in web navigation

.search
  - form_tag({:controller=>:relations, :action=>:entities}, :method=>:get) do
    %table
      %tr
        %td.label=tc("search")
        %td.field=text_field_tag :key, params[:key]||session[:entity_key]
        %td.submit=submit_tag tg("search_go"), :name=>nil


- @title = "Sign in"

- @theme = "dark-blue"

.page-box.last-box.d-flex.flex-column.justify-content-center{ class: "theme-#{@theme}-focus-bg" }
  .container
    %p.lead.text-center.text-white Welcome back!

    .sign-up-form
      .sign-up-form-title
        Sign in

      = form_with model: resource, url: user_session_path, local: true do |form|
        .form-group
          = form.label :email
          = form.text_field :email, class: "form-control#{" is-invalid" if flash[:alert].present?}", autocomplete: "off"

        .form-group
          = form.label :password
          %small= link_to "(Forgot password?)", new_password_path(resource_name), tabindex: "-1"
          = form.password_field :password, class: "form-control#{" is-invalid" if flash[:alert].present?}", autocomplete: "current-password"
          - if flash[:alert].present?
            .invalid-feedback= flash[:alert].html_safe

        .form-group.submit-btn-container
          = form.submit "Sign in", class: "btn btn-primary btn-block btn-shadow"

        - flash[:alert] = nil

    .sign-up-form.text-center
      New to MyApnea?
      = link_to "Create an account.", new_user_registration_path

Fix spellcheck showing up on email field

- @title = "Sign in"

- @theme = "dark-blue"

.page-box.last-box.d-flex.flex-column.justify-content-center{ class: "theme-#{@theme}-focus-bg" }
  .container
    %p.lead.text-center.text-white Welcome back!

    .sign-up-form
      .sign-up-form-title
        Sign in

      = form_with model: resource, url: user_session_path, local: true do |form|
        .form-group
          = form.label :email
          = form.email_field :email, class: "form-control#{" is-invalid" if flash[:alert].present?}", autocomplete: "off", autocorrect: "off", autocapitalize: "none", spellcheck: "false"

        .form-group
          = form.label :password
          %small= link_to "(Forgot password?)", new_password_path(resource_name), tabindex: "-1"
          = form.password_field :password, class: "form-control#{" is-invalid" if flash[:alert].present?}", autocomplete: "current-password"
          - if flash[:alert].present?
            .invalid-feedback= flash[:alert].html_safe

        .form-group.submit-btn-container
          = form.submit "Sign in", class: "btn btn-primary btn-block btn-shadow"

        - flash[:alert] = nil

    .sign-up-form.text-center
      New to MyApnea?
      = link_to "Create an account.", new_user_registration_path


!!! 5
%html
  %head
    %title= ["Snoonet", yield(:page_title)].reject(&:empty?).compact.join(': ').html_safe
    = stylesheet_link_tag 'application-screen', media: 'screen'
    %script{src: 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js', type: 'text/javascript'}
    = javascript_include_tag 'application'
    %link{href: 'https://fonts.googleapis.com/css?family=Roboto:100,400,500,700,italic,bolditalic', rel: 'stylesheet', type: 'text/css'}
    = csrf_meta_tags

  %body{class: @page ? @page.cssclass : ''}
    %header#header
      = render 'layouts/partials/header', :page => @page
    #content
      - if flash[:notice]
        %p.notice= flash[:notice]
      - if flash[:error]
        %p.error= flash[:error]
      %aside#sidebar
        = render 'layouts/partials/sidebar'
      #spin-container
        #main
          = yield
          %div{style:"clear:both"}
          = render 'layouts/partials/footer'
    %div{style:"clear:both"}

Move JavaScript to page bottom

!!! 5
%html
  %head
    %title= ["Snoonet", yield(:page_title)].reject(&:empty?).compact.join(': ').html_safe
    = stylesheet_link_tag 'application-screen', media: 'screen'
    %link{href: 'https://fonts.googleapis.com/css?family=Roboto:100,400,500,700,italic,bolditalic', rel: 'stylesheet', type: 'text/css'}
    = csrf_meta_tags

  %body{class: @page ? @page.cssclass : ''}
    %header#header
      = render 'layouts/partials/header', :page => @page
    #content
      - if flash[:notice]
        %p.notice= flash[:notice]
      - if flash[:error]
        %p.error= flash[:error]
      %aside#sidebar
        = render 'layouts/partials/sidebar'
      #spin-container
        #main
          = yield
          %div{style:"clear:both"}
          = render 'layouts/partials/footer'
    %div{style:"clear:both"}

    %script{src: 'https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js', type: 'text/javascript'}
    = javascript_include_tag 'application'


= render :partial => "layouts/flash_msg"
.container-fluid.container-tiles-pf.ems-infra-dashboard
  .row.row-tile-pf
    %aggregate-status-card{:provider_id => @record.id, :provider_type => 'ems_infra'}
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "utilization-trend-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "heatmap"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-hosts-line-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-vms-line-chart"

  :javascript
    ManageIQ.angular.app.value('providerId', '#{@record.id}');
    miq_bootstrap('.ems-infra-dashboard');

Switch to React for part of infra provider dashboard.

= render :partial => "layouts/flash_msg"
.container-fluid.container-tiles-pf.ems-infra-dashboard
  .row.row-tile-pf
    = react 'AggregateStatusCard', {:providerId => @record.id.to_s, :providerType => 'ems_infra'}
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "utilization-trend-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "heatmap"
  .row.row-tile-pf
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-hosts-line-chart"
    .col-xs-12.col-sm-12.col-md-6
      = render :partial => "recent-vms-line-chart"

  :javascript
    ManageIQ.angular.app.value('providerId', '#{@record.id}');
    miq_bootstrap('.ems-infra-dashboard');


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

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

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

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

Update contact markup to reflect new design

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

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

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


- unless @edit[:new][:emstype].blank?
  .form-group
    %label.control-label.col-md-2
      = _('Hostname or IP address')
    .col-md-8
      = text_field_tag("hostname",
        @edit[:new][:hostname],
        :maxlength         => MAX_HOSTNAME_LEN,
        "class"            => "form-control",
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json,
        :title             => _('Hostname or IPv4/IPv6 address'))
  .form-group
    %label.control-label.col-md-2
      = _('Port')
    .col-md-8
      = text_field_tag("port",
        @edit[:new][:port],
        :maxlength         => 5,
        "class"            => "form-control",
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json)

Reduce IP and port input field length

- unless @edit[:new][:emstype].blank?
  .form-group
    %label.control-label.col-md-2
      = _('Hostname or IP address')
    .col-md-4
      = text_field_tag("hostname",
        @edit[:new][:hostname],
        :maxlength         => MAX_HOSTNAME_LEN,
        "class"            => "form-control",
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json,
        :title             => _('Hostname or IPv4/IPv6 address'))
  .form-group
    %label.control-label.col-md-2
      = _('Port')
    .col-md-2
      = text_field_tag("port",
        @edit[:new][:port],
        :maxlength         => 5,
        "class"            => "form-control",
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json)


Hi #{@user.nickname},

Only #{25 - Date.today.day} days left until Christmas!

We've got some suggested projects for you to send pull requests to this #{this_time}
- if @user.pull_requests.year(CURRENT_YEAR).any?
  You can view the pull requests you've made so far at http://24pullrequests.com/dashboard/.
- else
  You haven't sent any pull requests yet. Once you send a pull request, you can view your progress at http://24pullrequests.com/dashboard/.
You can customise which types of project we suggest by setting your favourite languages in the preferences area here: http://24pullrequests.com/preferences

Suggested Projects
- @suggested_projects.each do |project|
  = project.name
  (#{project.main_language})
  \#{project.github_url}#{project.description}
= render partial: 'reminder_mailer/sign_off_msg'

See you #{next_time}!

Fix _mail_content haml file with missing tags

%p Hi #{@user.nickname},

%p
  Only
  = 25 - Date.today.day
  days left until Christmas!

%p We've got some suggested projects for you to send pull requests to this #{this_time}.

%p
  - if @user.pull_requests.year(CURRENT_YEAR).any?
    You can view the pull requests you've made so far at http://24pullrequests.com/dashboard/.
  - else
    You haven't sent any pull requests yet. Once you send a pull request, you can view your progress at http://24pullrequests.com/dashboard/.

%p
  You can customise which types of project we suggest by setting your favourite languages in the preferences area here: http://24pullrequests.com/preferences

%h3 Suggested projects:

%ul
  - @suggested_projects.each do |project|
    %li
      %h4
        = project.name
        (#{project.main_language})
        = link_to project.github_url, project.github_url
      %p= project.description

= render partial: 'reminder_mailer/sign_off_msg'

%p See you next #{next_time}!


:ruby
  unless params.has_key?(:list_url)
    if @features[:show]
      action = url_for( :action => 'show', :id => @resource.id )
    elsif @features[:edit]
      action = url_for( :action => 'edit', :id => @resource.id )
    else
      action = url_for( :action => 'index' )
    end
  else
    action = params[:list_url]
  end

.body.dialog.delete-restricted-dialog
  .content
    %i.icon-ban-circle
    .message= t('delete_restricted', :scope => 'admin.global')
    .description= t("Deletion of %{resource} restricted, due to existing relations:", :scope => "admin.global", :default => "Deletion of %{resource} restricted, due to existing relations:", :resource => resource_to_text(@resource))
    %ul.block.restricted_relations
      - @restrict_relations.each do |resource|
        %li= resource_to_text resource, :to_s

  .footer.clearInside
    %a.button{ :href => action, data: {type: 'cancel'} }
      %i.icon-ok
      %span= t('ok', :scope => 'admin.global')

Fix tests by using undercored css class name

:ruby
  unless params.has_key?(:list_url)
    if @features[:show]
      action = url_for( :action => 'show', :id => @resource.id )
    elsif @features[:edit]
      action = url_for( :action => 'edit', :id => @resource.id )
    else
      action = url_for( :action => 'index' )
    end
  else
    action = params[:list_url]
  end

.body.dialog.delete_restricted_dialog
  .content
    %i.icon-ban-circle
    .message= t('delete_restricted', :scope => 'admin.global')
    .description= t("Deletion of %{resource} restricted, due to existing relations:", :scope => "admin.global", :default => "Deletion of %{resource} restricted, due to existing relations:", :resource => resource_to_text(@resource))
    %ul.block.restricted_relations
      - @restrict_relations.each do |resource|
        %li= resource_to_text resource, :to_s

  .footer.clearInside
    %a.button{ :href => action, data: {type: 'cancel'} }
      %i.icon-ok
      %span= t('ok', :scope => 'admin.global')


- content_for :head do
  =stylesheet_link_tag 'fassets_core/application'
  =javascript_include_tag 'fassets_core/application'
  =yield :head

- content_for :catalogs_selector do
  =collection_select :catalog, :id, Catalog.all, :id, :title, options ={:prompt => "Catalogs ..."},  :onchange => "javascript:window.location= '/catalogs/' + this.value"

- content_for :tray do
  =render :partial => "shared/tray"
//  - if user_signed_in?
//    =form_tag(main_app.replace_user_tray_positions_path(current_user), :id => "tray", :method => :put) do
//      %ul#create_links
//        %li=link_to "New Assets", "", :id => "new_asset_link"
//        =yield :create_asset_link
//      %ol.sortable{:id => "users.#{current_user.id}.tray_positions.replace",:class => "sortable_tray"}
//        -current_user.tray_positions.each do |tp|
//          -if tp.clipboard_type
//            =render :partial => "shared/clipboard", :locals => {:tp => tp}
//          -else
//            =render :partial => "shared/asset", :locals => {:tp => tp, :asset => tp.asset}

=render :template => 'layouts/application'

Remove some commented code that was move to shared/tray.

- content_for :head do
  =stylesheet_link_tag 'fassets_core/application'
  =javascript_include_tag 'fassets_core/application'
  =yield :head

- content_for :catalogs_selector do
  =collection_select :catalog, :id, Catalog.all, :id, :title, options ={:prompt => "Catalogs ..."},  :onchange => "javascript:window.location= '/catalogs/' + this.value"

- content_for :tray do
  =render :partial => "shared/tray"

=render :template => 'layouts/application'


- collapsed = false unless defined?(collapsed)
%article.issue.collapsible
  .wrapper
    %header
      %h3= link_to issue.title, issue
      %span.tally
        = t ".tally", count: issue.plusminus
      %span.author
        = t ".created_by"
        = link_to_profile issue.created_by
      %time{datetime: issue.created_at}
        = time_ago_in_words(issue.created_at) + " ago"
    %div{class: ("collapse" if collapsed)}
      .description
        = truncate issue.description, length: 90, separator: ".", omission: "\u2026"
      .map
        - m = tiny_display_map(issue, geometry_issue_path(issue, :json)) do |map, page, html_id|
          %div{id: html_id, class: "tinymap"}
        != m.to_html
      .threads
        = pluralize(issue.threads.public.count, "public thread") + ", "
        = pluralize(issue.threads.private.count, "private thread")

Remove collapsible from issue items until it works properly.

- collapsed = false unless defined?(collapsed)
%article.issue
  .wrapper
    %header
      %h3= link_to issue.title, issue
      %span.tally
        = t ".tally", count: issue.plusminus
      %span.author
        = t ".created_by"
        = link_to_profile issue.created_by
      %time{datetime: issue.created_at}
        = time_ago_in_words(issue.created_at) + " ago"
    %div{class: ("collapse" if collapsed)}
      .description
        = truncate issue.description, length: 90, separator: ".", omission: "\u2026"
      .map
        - m = tiny_display_map(issue, geometry_issue_path(issue, :json)) do |map, page, html_id|
          %div{id: html_id, class: "tinymap"}
        != m.to_html
      .threads
        = pluralize(issue.threads.public.count, "public thread") + ", "
        = pluralize(issue.threads.private.count, "private thread")


= f.error_messages
.field-group
  .label-container
    = f.label :title
  .field
    = f.text_field :title, :class => "text-field"
.field-group
  .label-container
    = f.label :body
  = f.text_area :body, :class => "text-area huge", :id => "markdown_editor"

  #markdown_preview
.field-group
  .label-container
    = f.label :tags
  .field
    = f.text_field :tags, :class => "text-field"

Fix the form for edit tags

= f.error_messages
.field-group
  .label-container
    = f.label :title
  .field
    = f.text_field :title, :class => "text-field"
.field-group
  .label-container
    = f.label :body
  = f.text_area :body, :class => "text-area huge", :id => "markdown_editor"

  #markdown_preview
.field-group
  .label-container
    = f.label :tags
  .field
    = f.text_field :tags, :value => @question.tags.join(", "),:class => "text-field"


%a.twitter-share-button{"data-size" => "large", "data-text" => "Check out #{model.name.strip}'s #UserGroup profile#{model.twitter_account.present? ? " and follow @#{model.twitter_account.screen_name}" : ''}", "data-url" => user_group_url(model), "data-via" => "uglst", href: "https://twitter.com/share"}
  Tweet
  @#{model.twitter_account.screen_name}

:javascript
  !function (d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
      if (!d.getElementById(id)) {
        js = d.createElement(s);
        js.id = id;
        js.src = p + '://platform.twitter.com/widgets.js';
        fjs.parentNode.insertBefore(js, fjs);
      }
    }(document, 'script', 'twitter-wjs');

Check if UG has a Twitter Account

- if model.respond_to?(:screen_name)
  %a.twitter-share-button{"data-size" => "large", "data-text" => "Check out #{model.name.strip}'s #UserGroup profile#{model.twitter_account.present? ? " and follow @#{model.twitter_account.screen_name}" : ''}", "data-url" => user_group_url(model), "data-via" => "uglst", href: "https://twitter.com/share"}
    Tweet
    @#{model.twitter_account.screen_name}

  :javascript
    !function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
        if (!d.getElementById(id)) {
          js = d.createElement(s);
          js.id = id;
          js.src = p + '://platform.twitter.com/widgets.js';
          fjs.parentNode.insertBefore(js, fjs);
        }
      }(document, 'script', 'twitter-wjs');


= form_tag(options[:url], class: options[:class], method: options[:method] || :get) do
  = search_field_tag 'q', nil, class: 'form-input search-input', placeholder: options[:placeholder] || 'Buscar...'
  - if options[:cse]
    = hidden_field_tag 'cx', options[:cse][:cx]
    = hidden_field_tag 'cof', options[:cse][:cof]
    = hidden_field_tag 'site', options[:cse][:site]
  = button_tag '', class: 'search-button poar' do
    = fa_icon 'search'

Add q value to the search_box element

= form_tag(options[:url], class: options[:class], method: options[:method] || :get) do
  = search_field_tag 'q', options[:q].presence, class: 'form-input search-input', placeholder: options[:placeholder] || 'Buscar...'
  - if options[:cse]
    = hidden_field_tag 'cx', options[:cse][:cx]
    = hidden_field_tag 'cof', options[:cse][:cof]
    = hidden_field_tag 'site', options[:cse][:site]
  = button_tag '', class: 'search-button poar' do
    = fa_icon 'search'


%fieldset
  %legend All Transit Operators
  %table.table
    %thead
      %tr
        %th.left Fiscal Year
        %th.left Type
        %th.left Sub Type
        %th.right Count
        %th.right Replacement Cost
    %tbody
      - sum_cost = 0
      - @data.assets.includes(:asset_subtype).group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
        %tr
          %td.left= format_as_fiscal_year(@data.fy)
          %td.left= subtype.asset_type
          %td.left= subtype
          %td.right= format_as_integer(assets_by_subtype.count)
          - cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
          - sum_cost += cost
          %td.right= format_as_currency(cost)
    %tfoot
      %tr
        %td{:colspan => 3}
        %td.right= format_as_integer(@data.assets.count)
        %td.right= format_as_currency(sum_cost)

Add book value to report rollup header

%fieldset
  %legend All Transit Operators
  %table.table
    %thead
      %tr
        %th.left Fiscal Year
        %th.left Type
        %th.left Sub Type
        %th.right Count
        %th.right Book Value
        %th.right Replacement Cost
    %tbody
      - sum_book_val = 0
      - sum_cost = 0
      - @data.assets.includes(:asset_subtype).group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
        %tr
          %td.left= format_as_fiscal_year(@data.fy)
          %td.left= subtype.asset_type
          %td.left= subtype
          %td.right= format_as_integer(assets_by_subtype.count)
          - book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
          - cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
          - sum_book_val += book_val
          - sum_cost += cost
          %td.right= format_as_currency(book_val)
          %td.right= format_as_currency(cost)
    %tfoot
      %tr
        %td{:colspan => 3}
        %td.right= format_as_integer(@data.assets.count)
        %td.right= format_as_currency(sum_book_val)
        %td.right= format_as_currency(sum_cost)


%p To your Gemfile add

%pre
  :preserve
    gem 'rest-client'
    gem 'json'

%p Then run bundle install.

%pre
  :preserve
    # Get data from the morph.io api
    require 'rest-client'
    require 'json'

    # We're always asking for json because it's the easiest to deal with
    morph_api_url = '#{api_root}#{@scraper.full_name}/data.json'

    # Keep this key secret!
    morph_api_key = '#{current_user.api_key}'

    result = RestClient.get morph_api_url, params:
      {
        key: morph_api_key,
        query: %q[#{@query}]
      }

    p JSON.parse(result)

Make ruby code work when logged out as well

%p To your Gemfile add

%pre
  :preserve
    gem 'rest-client'
    gem 'json'

%p Then run bundle install.

%pre
  :preserve
    # Get data from the morph.io api
    require 'rest-client'
    require 'json'

    # We're always asking for json because it's the easiest to deal with
    morph_api_url = '#{api_root}#{@scraper.full_name}/data.json'

    # Keep this key secret!
    morph_api_key = '#{current_user ? current_user.api_key : "[api_key]"}'

    result = RestClient.get morph_api_url, params:
      {
        key: morph_api_key,
        query: %q[#{@query}]
      }

    p JSON.parse(result)


A new motion was created in a Loomio group that you belong to.
:plain

= "View motion: #{motion_url(@motion)}"
:plain

!= "Motion: #{@motion.name}"
!= "Group: #{@motion.group.name}"
- if @motion.description.present?
  != "Description: " + @motion.description

Add author name to new motion email.

A new motion was created in a Loomio group that you belong to.
:plain

= "View motion: #{motion_url(@motion)}"
:plain

!= "Motion: #{@motion.name}"
!= "Group: #{@motion.group.name}"
!= "Author: #{@motion.author.name}"
:plain

- if @motion.description.present?
  != "Description: \n#{@motion.description}"


!!!
%html{lang: "en"}
  = render "layouts/head"
  %body{"data-turbolinks" => content_for?(:disable_turbolinks) ? "false" : nil}
    .container{class: @empty_page ? "empty_page" : ""}
      .row.logo_row
        .col-12.col-md-6
          %h1
            %a.site_logo{href: "/"}= APP_NAME
        .col-12.col-md-6.signin_status
          - if signed_in?
            signed in as #{current_user}
            %br
            = link_to controller: "session" action: "preferences" do
              Preferences
            •
            %a{href: "/logout"} Sign out
          - else
            %a{href: "/auth/discord"} Sign in with Discord
      = form_tag("/card", method: :get, class: "search row search_form_row", enforce_utf8: false) do
        .col-12.col-md-10
          = text_field_tag(:q, @search, {class: 'form-control', tabindex: 1, autofocus: @empty_page})
        .col-12.col-md-2
          = submit_tag("Search", name: nil, class: "btn btn-outline-primary")
      = yield
      = render "layouts/footer"

Fix syntax error in application.haml

!!!
%html{lang: "en"}
  = render "layouts/head"
  %body{"data-turbolinks" => content_for?(:disable_turbolinks) ? "false" : nil}
    .container{class: @empty_page ? "empty_page" : ""}
      .row.logo_row
        .col-12.col-md-6
          %h1
            %a.site_logo{href: "/"}= APP_NAME
        .col-12.col-md-6.signin_status
          - if signed_in?
            signed in as #{current_user}
            %br
            = link_to controller: "session", action: "preferences" do
              Preferences
            •
            %a{href: "/logout"} Sign out
          - else
            %a{href: "/auth/discord"} Sign in with Discord
      = form_tag("/card", method: :get, class: "search row search_form_row", enforce_utf8: false) do
        .col-12.col-md-10
          = text_field_tag(:q, @search, {class: 'form-control', tabindex: 1, autofocus: @empty_page})
        .col-12.col-md-2
          = submit_tag("Search", name: nil, class: "btn btn-outline-primary")
      = yield
      = render "layouts/footer"


- if current_user
  %p
    -#= link_to 'Browse games', games_path
  %h3 Courses
  - Script.all.each do |script|
    = link_to script.name, script_level_path(script, ScriptLevel::NEXT)
    %br/

  - if current_user.teachers.length > 0
    %h3 Teacher
    - current_user.teachers.each do |teacher|
      = teacher.name
      %br/
    %br/
    Add a teacher
    = form_for([Follower.new]) do |f|
      .field
        = f.label :email
        = text_field_tag :email
      .actions
        = f.submit

  = link_to "Add a teacher", root_path

  - if current_user.students.length > 0
    %h3 Students
    - current_user.students.each do |student|
      = student.name
      %br/
    %br/

- else
  = link_to "Sign up", new_user_registration_path
  ,
  = link_to "sign in", new_user_session_path
  , or try out our
  = link_to "demo", script_level_path(Script.first, ScriptLevel::NEXT)

Allow people without teachers to add a teacher by email

- if current_user
  %p
    -#= link_to 'Browse games', games_path
  %h3 Courses
  - Script.all.each do |script|
    = link_to script.name, script_level_path(script, ScriptLevel::NEXT)
    %br/

  - if current_user.teachers.length > 0
    %h3 Teacher
    - current_user.teachers.each do |teacher|
      = teacher.name
      %br/
    %br/
  Add a teacher by email address:
  = form_for([Follower.new]) do |f|
    .field
      = text_field_tag :email
    .actions
      = f.submit

  - if current_user.students.length > 0
    %h3 Students
    - current_user.students.each do |student|
      = student.name
      %br/
    %br/

- else
  = link_to "Sign up", new_user_registration_path
  ,
  = link_to "sign in", new_user_session_path
  , or try out our
  = link_to "demo", script_level_path(Script.first, ScriptLevel::NEXT)


.add-options-buttons.text-center
  .container
    .row
      .customer-block.col-xs-12.col-md-4
        %h4 Already a GitLab Enterprise Edition customer?
        %a.btn.featured-item-button.btn-margin-top{ href: data.pricing.payment_url } Add #{feature_name}
      .customer-block.col-xs-12.col-md-4
        %h4 Not a GitLab Enterprise Edition customer?
        %a.btn.featured-item-button.btn-margin-top{ href: "/free-trial/" } Try it risk-free for 30 days
      .customer-block.col-xs-12.col-md-4
        %h4 Have more questions?
        %a.btn.featured-item-button.btn-margin-top{href: "https://about.gitlab.com/sales/"} Contact sales

Update to promote an upgrade to EE Premium

.add-options-buttons.text-center
  .container
    .row
      .customer-block.col-xs-12.col-md-4
        %h4 Already a GitLab EE Starter customer?
        %a.btn.featured-item-button.btn-margin-top{ href: data.pricing.payment_url } Upgrade to GitLab EE Premium
      .customer-block.col-xs-12.col-md-4
        %h4 Not a GitLab Enterprise Edition customer?
        %a.btn.featured-item-button.btn-margin-top{ href: "/free-trial/" } Try it risk-free for 30 days
      .customer-block.col-xs-12.col-md-4
        %h4 Have more questions?
        %a.btn.featured-item-button.btn-margin-top{href: "https://about.gitlab.com/sales/"} Contact sales


%link{rel: 'stylesheet', href:'/mailer.css'}
%table.row
  %tbody
    %tr
      %th
        %table
          %tr
            %td.main-content
              %h1.headline
                = "#{@course.title}: application submitted."
              %p.paragraph
                = "Dear #{@instructor.real_name || @instructor.username},"
              %p.paragraph
                Thank you for submitting your Wiki Education course page. Your application is now complete.
              %p.paragraph
                If you are applying for a spot in our Fall 2020 cohort, we will notify you of our decision by August 7.
              %p.paragraph
                If you've submitted your course page for Summer 2020 or another academic term, we will follow up accordingly.
              %p.paragraph
                If you have any questions, please reach out to Helaine Blumenthal (helaine@wikiedu.org)
              %p.paragraph
                You can access — and continue to edit — your course page here:
            %td.expander
        %table
          %tr
            %td.main-content.link-cell
              %a.button_link{:href => @course_link}
                = @course.title
            %td.expander
        %table
          %tr
            %td.main-content
              %p.paragraph
                Best regards,
                %br
                %em
                  The Wiki Ed team

Update course submission email for Spring 2021

%link{rel: 'stylesheet', href:'/mailer.css'}
%table.row
  %tbody
    %tr
      %th
        %table
          %tr
            %td.main-content
              %h1.headline
                = "#{@course.title}: application submitted."
              %p.paragraph
                = "Dear #{@instructor.real_name || @instructor.username},"
              %p.paragraph
                Thank you for submitting your Wiki Education course page. Your application is now complete.
              %p.paragraph
                If you are submitting your course page for Winter/Spring 2021, we will notify you by December 11 whether we will have a spot for you.
              %p.paragraph
                If you have any questions, please reach out to Helaine Blumenthal (helaine@wikiedu.org)
              %p.paragraph
                You can access — and continue to edit — your course page here:
            %td.expander
        %table
          %tr
            %td.main-content.link-cell
              %a.button_link{:href => @course_link}
                = @course.title
            %td.expander
        %table
          %tr
            %td.main-content
              %p.paragraph
                Best regards,
                %br
                %em
                  The Wiki Ed team


= resource_form(@asset_group, :as => :asset_group) do |f|
  = content do
    = f.input(:name)
    = f.input(:asset_group_id, :collection => @asset_collections, :label => 'Collection')

  = footer do
    = f.submit 'Save'

Tidy up the asset groups form.

= resource_form(@asset_group, :as => :asset_group) do |f|
  = content do
    = f.fieldset(:class => 'primary') do
      = f.input(:name)
      - unless @asset_collections.empty?
        = f.input(:asset_group_id, :collection => @asset_collections, :label => 'Collection')

  = footer do
    = save_button


%dt
  %dd.remove-name.patient-name{role: "menuitem"}
    = link_to "#{@patient.full_name}", clinical_summary_patient_path(@patient), title:  "Clinical Summary", "data-tooltip aria-haspopup": true
  %dd{role: "menuitem"}
    = link_to "Letters", "#", title:  "Letters"
  %dd{role: "menuitem"}
    = link_to "Admin", demographics_patient_path(@patient), title:  "Demographics"
  %dd{role: "menuitem"}
    = link_to "Modal", patient_modalities_path(@patient), title:  "Patient Modality"
  %dd{role: "menuitem"}
    = link_to "Problems (#{@patient.patient_problems.length})", problems_patient_path(@patient), title:  "Manage Problems"
  %dd{role: "menuitem"}
    = link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title:  "Manage Medications"
  %dd{role: "menuitem"}
    = link_to "Events (#{@patient.patient_events.length})", patient_patient_events_path(@patient), title:  "Patient Events"

Simplify 'Clinical Summary' link in pat nav

%dt
  %dd{role: "menuitem"}
    = link_to "ClinSumm", clinical_summary_patient_path(@patient), title:  "Clinical Summary"
  %dd{role: "menuitem"}
    = link_to "Admin", demographics_patient_path(@patient), title:  "Demographics"
  %dd{role: "menuitem"}
    = link_to "Modal", patient_modalities_path(@patient), title:  "Patient Modality"
  %dd{role: "menuitem"}
    = link_to "Problems (#{@patient.patient_problems.length})", problems_patient_path(@patient), title:  "Manage Problems"
  %dd{role: "menuitem"}
    = link_to "Meds (#{@patient.medications.length})", manage_medications_patient_path(@patient), title:  "Manage Medications"
  %dd{role: "menuitem"}
    = link_to "Events (#{@patient.patient_events.length})", patient_patient_events_path(@patient), title:  "Patient Events"


.per-page{'ng-show' => '!RequestMonitor.loading && orders.length > 0'}
  %input.per-page-select.ofn-select2{type: 'number', data: 'per_page_options', 'ng-model' => 'per_page'}

  %span.per-page-feedback
    {{ 'spree.admin.orders.index.results_found' | t:{number: pagination.results} }}
    {{ 'spree.admin.orders.index.viewing' | t:{start: ((pagination.page -1) * pagination.per_page) +1, end: ((pagination.page -1) * pagination.per_page) + orders.length} }}

Update results on dropdown select

.per-page{'ng-show' => '!RequestMonitor.loading && orders.length > 0'}
  %input.per-page-select.ofn-select2{type: 'number', data: 'per_page_options', 'ng-model' => 'per_page', 'ng-change' => 'fetchResults()'}

  %span.per-page-feedback
    {{ 'spree.admin.orders.index.results_found' | t:{number: pagination.results} }}
    {{ 'spree.admin.orders.index.viewing' | t:{start: ((pagination.page -1) * pagination.per_page) +1, end: ((pagination.page -1) * pagination.per_page) + orders.length} }}


%ol
  - if controller_name != 'sessions'
    %li= link_to t(".sign_in"), new_session_path(resource_name)
  - if devise_mapping.registerable? && controller_name != 'registrations'
    %li= link_to t(".sign_up"), new_registration_path(resource_name)
  - if devise_mapping.recoverable? && controller_name != 'passwords'
    %li= link_to t(".forgot_password"), new_password_path(resource_name)
  - if devise_mapping.confirmable? && controller_name != 'confirmations'
    %li= link_to t(".no_confirmation_instructions"), new_confirmation_path(resource_name)
  - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
    %li= link_to t(".no_unlock_instructions"), new_unlock_path(resource_name)
  - if devise_mapping.omniauthable?
    - resource_class.omniauth_providers.each do |provider|
      %li= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)

Remove duplicated omni auth links


- @activities = resource.activities
- if @activities.empty?
  = boot_alert(t('activities.alerts.empty'))
  .activities.collection

- else
  = render 'activities/list', :collection => @project.activities unless @activities.empty?

.contextual
  = icon_link_to :new, new_project_activity_path(resource)

Use by_period scope in projects activities view.

- @activities = resource.activities.where(:date => current_month_period(:by_period))
- if @activities.empty?
  = boot_alert(t('activities.alerts.empty'))
  .activities.collection

- else
  = render 'activities/list', :collection => @activities unless @activities.empty?

.contextual
  = icon_link_to :new, new_project_activity_path(resource)


- content_for :injection_data do
  - if Stripe.publishable_key
    :javascript
      angular.module('Darkswarm').value("stripeObject", Stripe("#{Stripe.publishable_key}"))

%div{"data-controller": "stripe-cards"}
  - if @saved_credit_cards.length > 0
    .checkout-input
      %label
        = t('split_checkout.step2.form.stripe.use_saved_card')
      = select_tag :card,
        options_for_select(stripe_card_options(@saved_credit_cards) + [[t('split_checkout.step2.form.stripe.create_new_card'), ""]], @selected_card),
        { "data-action": "change->stripe-cards#onSelectCard", "data-stripe-cards-target": "select" }

  .checkout-input{"data-stripe-cards-target": "stripeelements"}
    - if @saved_credit_cards.length == 0
      %label
        = t('split_checkout.step2.form.stripe.use_new_card')
    %stripe-elements

  - if spree_current_user
    .checkout-input
      = check_box_tag :save_card, {id: "save_card", name: "save_card", checked: false, value: "1"}
      = label :save_card, t('split_checkout.step2.form.stripe.save_card'), { for: "save_card" }

Tidy up checks on Enumerable objects

- content_for :injection_data do
  - if Stripe.publishable_key
    :javascript
      angular.module('Darkswarm').value("stripeObject", Stripe("#{Stripe.publishable_key}"))

%div{"data-controller": "stripe-cards"}
  - if @saved_credit_cards.any?
    .checkout-input
      %label
        = t('split_checkout.step2.form.stripe.use_saved_card')
      = select_tag :card,
        options_for_select(stripe_card_options(@saved_credit_cards) + [[t('split_checkout.step2.form.stripe.create_new_card'), ""]], @selected_card),
        { "data-action": "change->stripe-cards#onSelectCard", "data-stripe-cards-target": "select" }

  .checkout-input{"data-stripe-cards-target": "stripeelements"}
    - if @saved_credit_cards.none?
      %label
        = t('split_checkout.step2.form.stripe.use_new_card')
    %stripe-elements

  - if spree_current_user
    .checkout-input
      = check_box_tag :save_card, {id: "save_card", name: "save_card", checked: false, value: "1"}
      = label :save_card, t('split_checkout.step2.form.stripe.save_card'), { for: "save_card" }


.breadcrumbs
  = link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom: cookies[:last_zoom]}.to_param), class: 'btn back' do
    Zurück zur Karte
  %ol.unstyled
    = list_of(node_breadcrumbs.breadcrumbs) do |i|
      =fa_icon 'angle-right', text: i
  =link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom: cookies[:last_zoom]}.to_param), class: 'btn close' do
    = fa_icon "remove"

Use translation for back link.

.breadcrumbs
  = link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom: cookies[:last_zoom]}.to_param), class: 'btn back' do
    =t('nodes.show.link.back')
  %ol.unstyled
    = list_of(node_breadcrumbs.breadcrumbs) do |i|
      =fa_icon 'angle-right', text: i
  =link_to root_path(anchor: "/?" + {lat: @node.lat, lon: @node.lon, node_id: @node.osm_id, zoom: cookies[:last_zoom]}.to_param), class: 'btn close' do
    = fa_icon "remove"


!!! 5
%html{:lang => "en"}
  %head
    = stylesheet_link_tag "https://fonts.googleapis.com/css?family=Cutive"
    = stylesheet_link_tag 'application', media: 'all'
  %body
    %nav{:class => "navbar navbar-inverse navbar-fixed-top"}
      .container
        .navbar-header
          %h1
            SuiteSparse Matrix Collection
            %small Formerly the University of Florida Sparse Matrix Collection
    .container.theme-showcase.main{role: "main"}
      %p
        A new matrix has been submitted to the Collection:
      %table.table.table-striped
        %tbody
          %tr
            %th Submitter Name
            %td= @new_matrix.submitter_name
          %tr
            %th Submitter Email
            %td= @new_matrix.submitter_email
          %tr
            %th Display Publically?
            %td= @new_matrix.display_email
          %tr
            %th Matrix Name
            %td= @new_matrix.name
          %tr
            %th Kind/Problem Domain
            %td= @new_matrix.kind
          %tr
            %th Notes
            %td= @new_matrix.notes
          %tr
            %th Matrix File URL
            %td= @new_matrix.submitter_url
          %tr
            %th Permission Granted to Display Publically
            %td= @new_matrix.submitter_confidentiality

Add inline CSS for email styling

!!! 5
%html{:lang => "en"}
  %head
    %meta{'http-equiv': "Content-Type", content: "text/html; charset=utf-8"}
  %body
    %div{style: "height: 50px; margin-bottom: 20px; background-color: #000;"}
      %h1{style: "margin-top: -6px; font-size: 20.7px; font-family: 'cutive'; color: #fff;"}
        SuiteSparse Matrix Collection
        %small Formerly the University of Florida Sparse Matrix Collection
    .main{role: "main"}
      %p
        A new matrix has been submitted to the Collection:
      %table
        %tbody
          %tr{style: "background-color: #f9f9f9;"}
            %th Submitter Name
            %td= @new_matrix.submitter_name
          %tr
            %th Submitter Email
            %td= @new_matrix.submitter_email
          %tr{style: "background-color: #f9f9f9;"}
            %th Display Publically?
            %td= @new_matrix.display_email
          %tr
            %th Matrix Name
            %td= @new_matrix.name
          %tr{style: "background-color: #f9f9f9;"}
            %th Kind/Problem Domain
            %td= @new_matrix.kind
          %tr
            %th Notes
            %td= @new_matrix.notes
          %tr{style: "background-color: #f9f9f9;"}
            %th Matrix File URL
            %td= @new_matrix.submitter_url
          %tr
            %th Permission Granted to Display Publically
            %td= @new_matrix.submitter_confidentiality


= resource_form(@product) do |f|
  = content do
    = f.fieldset(:class => 'primary') do
      = f.input(:name)
      = f.input(:published, :col => 'first-inline')
      = f.input(:status, :collection => @product.statuses, :col => 'inline', :as => 'radio_buttons')

    = f.fieldset('Product', :class => 'tab') do
      = f.input(:description, :as => 'text')
      = f.input(:product_category_id, :collection => @categories, :label => 'Category')
      = f.input(:product_range_id, :collection => @ranges, :label => 'Range')

      = asset_picker(f)

      - f.metadata do |attrs|
        - attrs.each do |name, opts|
          = f.metadata_input(name, opts)

    = f.fieldset('SKUs', :class => 'tab association', :id => 'product-skus') do
      = f.fields_for(:skus) do |sf|
        = sf.fieldset("SKU ##{sf.object.id || '--'}", :class => "associated template-#{sf.object.template}") do
          = sf.input(:_destroy, :as => 'boolean')
          = sf.input(:position, :class => 'small')

          = sf.input(:published, :col => 'first-inline')
          = sf.input(:status, :col => 'inline', :collection => sf.object.statuses, :as => 'radio_buttons')

          = sf.input(:name)

          %div.pricing
            = sf.input(:price, :class => 'small')
            = sf.input(:batch_size, :class => 'small')
            = sf.input(:batch_price, :class => 'small')

          %div.attributes
            = sf.input(:volume, :class => 'small', :label => 'Volume (ml)')
            = sf.input(:weight, :class => 'small', :label => 'Weight (g)')
            = sf.input(:size, :class => 'small')

          - sf.metadata do |attrs|
            %div.attributes
              - attrs.each do |name, opts|
                = sf.metadata_input(name, opts)

          = sf.hidden_field(:template)

  = footer do
    = save_button
    = cancel_button(@product)

Remove SKU editing from the product form.

= resource_form(@product) do |f|
  = content do
    = f.fieldset(:class => 'primary') do
      = f.input(:name)
      = f.input(:published, :col => 'first-inline')
      = f.input(:status, :collection => @product.statuses, :col => 'inline', :as => 'radio_buttons')

    = f.fieldset('Product') do
      = f.input(:description, :as => 'text')
      = f.input(:product_category_id, :collection => @categories, :label => 'Category')
      = f.input(:product_range_id, :collection => @ranges, :label => 'Range')

      = asset_picker(f)

      - f.metadata do |attrs|
        = f.fieldset('Attributes') do
          - attrs.each do |name, opts|
            = f.metadata_input(name, opts)

  = footer do
    = save_button
    = cancel_button(@product)


.container
  %h1 Feedback

  %h3 Timestamp
  %p= @response.created_at

  %h3 Username
  %p= link_to @user.username, "/users/#{@user.url_encoded_username}"

  %h3 Subject
  %p= @response.subject

  %h3 Body
  %p= @response.body

Fix error with anonymous feedback

.container
  %h1 Feedback

  %h3 Timestamp
  %p= @response.created_at

  %h3 Username
  %p= link_to @user.username, "/users/#{@user.url_encoded_username}" if @user

  %h3 Subject
  %p= @response.subject

  %h3 Body
  %p= @response.body


:css
  .course_progress {
    margin: 10px 0;
  }

- user_script ||= nil
.course_progress
  .row#lesson
    .span9#heading
      %h3.whitetext{style: 'margin: 0'}
        %a.expando{style: 'color: white'}
          %i.fa.fa-plus-square
        = data_t_suffix('script.name', script.name, "title")
        - if script.beta?
          %span.betatext
            != "  beta"
    .span3#heading{style: 'text-align: right;'}
      - if user_script.try(:completed_at)
        %a{href: script_certificate_image_url(current_user, script)}
          %button.btn{style: "background: #0ebe0e; color: white; text-shadow: none"} Print Certificate
      - elsif current_user.next_unpassed_progression_level(script)
        = link_to build_script_level_url(current_user.next_unpassed_progression_level(script)) do
          %button.btn.btn-primary.button-continue#continue_button= t('continue')

  .row#stats{style: 'display: none', 'data-script-id' => "#{script.id}"}
    .span12.content#rightside{style: 'margin-left: 10px;'}
      Loading...

Fix unit test by showing beta text outside of h3 tag.

:css
  .course_progress {
    margin: 10px 0;
  }

- user_script ||= nil
.course_progress
  .row#lesson
    .span9#heading
      %h3.whitetext{style: 'margin: 0; display: inline-block'}
        %a.expando{style: 'color: white'}
          %i.fa.fa-plus-square
        = data_t_suffix('script.name', script.name, "title")
      - if script.beta?
        %span.betatext{style: 'font-size: 24.5px'}
          != "  beta"

    .span3#heading{style: 'text-align: right;'}
      - if user_script.try(:completed_at)
        %a{href: script_certificate_image_url(current_user, script)}
          %button.btn{style: "background: #0ebe0e; color: white; text-shadow: none"} Print Certificate
      - elsif current_user.next_unpassed_progression_level(script)
        = link_to build_script_level_url(current_user.next_unpassed_progression_level(script)) do
          %button.btn.btn-primary.button-continue#continue_button= t('continue')

  .row#stats{style: 'display: none', 'data-script-id' => "#{script.id}"}
    .span12.content#rightside{style: 'margin-left: 10px;'}
      Loading...


%div
  #{payload.push_data.pusher} pushed #{payload.repository.repo_name}:#{payload.push_data.tag}
  %br
  #{payload.repository.repo_url}

Simplify DockerHub template format, link repo name to the repository


!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= "#{page_title}"
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、仮名遣いなどでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。 / #{page_title}")
    %meta(name="keywords" content="青空文庫,全文検索")
    %link(href="vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="css/aozorasearch.css" rel="stylesheet" media="screen")
    %link(rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false

Use noindex for search result

!!!
%html
  %head
    %meta(charset="UTF-8")
    %title= "#{page_title}"
    %meta(name="viewport" content="width=device-width" initial-scale="1.0")
    - if url_for(only_path: true) == "/"
      %meta(name="description" content="青空文庫の本文を検索できるサイト。キーワードの前後を部分表示します。著者やNDC、仮名遣いなどでの絞り込み機能付き。全文検索エンジンとしてGroongaを使用。")
      %meta(name="keywords" content="青空文庫,全文検索")
    - else
      %meta(name="robots" content="noindex")
    %link(href="vendor/bootstrap/css/bootstrap.min.css"
          rel="stylesheet" media="screen")
    %link(href="css/aozorasearch.css" rel="stylesheet" media="screen")
    %link(rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico")
  %body
    = render :_header, layout: false

    .container
      = yield

    #footer.container.text-right
      = render :_footer, layout: false


- if flash && (flash[:error] || flash[:notice])
  .flash
    - if flash && flash[:error] && !flash[:error].empty?
      .message.error
        %p= flash[:error]

    - if flash && flash[:notice] && !flash[:notice].empty?
      .message.notice
        %p= flash[:notice]

Use .present? instead of .empty?

- if flash && (flash[:error] || flash[:notice])
  .flash
    - if flash && flash[:error].present?
      .message.error
        %p= flash[:error]

    - if flash && flash[:notice].present?
      .message.notice
        %p= flash[:notice]


.edit-post

  %h1 Editing Post

  = link_to "<--- back", admin_posts_path

  = render :partial => "form"

Move back button above the header

.edit-post

  = link_to "back", admin_posts_path, :class => "back-button"

  %h1 Editing Post

  = render :partial => "form"


%section#messages
  .timeline
    %h4
      Communication tool
    - if @messages.none?
      %span
        No messages found
    - else
      %ul.days
        %li
          %ul
            = render partial: 'shared/message', collection: @messages

      = simple_form_for @message do |f|
        = f.input :claim_id, value: @claim.id, as: :hidden
        = f.input :subject, placeholder: 'Subject', label: false
        = f.input :body, placeholder: 'Message', label: false
        = f.submit 'Post', class: 'button'

Fix claim messages bug where form is not visible if no messages present

%section#messages
  .timeline
    %h4
      Communication tool
      %ul.days
        %li
          %ul
            - if @messages.none?
              %span
                No messages found
            - else
              = render partial: 'shared/message', collection: @messages

    = simple_form_for @message do |f|
      = f.input :claim_id, value: @claim.id, as: :hidden
      = f.input :subject, placeholder: 'Subject', label: false
      = f.input :body, placeholder: 'Message', label: false
      = f.submit 'Post', class: 'button'


- title = _('Bitbucket Server import')
- page_title title
- breadcrumb_title title
- header_title "Projects", root_path

%h3.page-title
  = icon 'bitbucket-square', text: _('Import repositories from Bitbucket Server')

%p
  = _('Enter in your Bitbucket Server URL and personal access token below')

= form_tag configure_import_bitbucket_server_path, method: :post do
  .form-group.row
    = label_tag :bitbucket_server_url, 'Bitbucket Server URL', class: 'col-form-label col-md-2'
    .col-md-4
      = text_field_tag :bitbucket_server_url, '', class: 'form-control append-right-8', placeholder: _('https://your-bitbucket-server'), size: 40
  .form-group.row
    = label_tag :bitbucket_server_url, 'Username', class: 'col-form-label col-md-2'
    .col-md-4
      = text_field_tag :bitbucket_username, '', class: 'form-control append-right-8', placeholder: _('username'), size: 40
  .form-group.row
    = label_tag :personal_access_token, 'Password/Personal Access Token', class: 'col-form-label col-md-2'
    .col-md-4
      = text_field_tag :personal_access_token, '', class: 'form-control append-right-8', placeholder: _('Personal Access Token'), size: 40
  .form-actions
    = submit_tag _('List your Bitbucket Server repositories'), class: 'btn btn-success'

Convert Bitbucket field to password field

- title = _('Bitbucket Server import')
- page_title title
- breadcrumb_title title
- header_title "Projects", root_path

%h3.page-title
  = icon 'bitbucket-square', text: _('Import repositories from Bitbucket Server')

%p
  = _('Enter in your Bitbucket Server URL and personal access token below')

= form_tag configure_import_bitbucket_server_path, method: :post do
  .form-group.row
    = label_tag :bitbucket_server_url, 'Bitbucket Server URL', class: 'col-form-label col-md-2'
    .col-md-4
      = text_field_tag :bitbucket_server_url, '', class: 'form-control append-right-8', placeholder: _('https://your-bitbucket-server'), size: 40
  .form-group.row
    = label_tag :bitbucket_server_url, 'Username', class: 'col-form-label col-md-2'
    .col-md-4
      = text_field_tag :bitbucket_username, '', class: 'form-control append-right-8', placeholder: _('username'), size: 40
  .form-group.row
    = label_tag :personal_access_token, 'Password/Personal Access Token', class: 'col-form-label col-md-2'
    .col-md-4
      = password_field_tag :personal_access_token, '', class: 'form-control append-right-8', placeholder: _('Personal Access Token'), size: 40
  .form-actions
    = submit_tag _('List your Bitbucket Server repositories'), class: 'btn btn-success'


.container
  %h2 can't parse that
  %p
    For some reason we couldn't parse that file. We currently support splits from WSplit (both 1.4.x and Nitrofski's
    1.5.x fork), Time Split Tracker, SplitterZ, and LiveSplit (1.2 and up). Llanfair is in the works.
  %p
    If that file
    %em did
    come from a program we support, please
    %a{href: "mailto:qhiiyr@gmail.com"} send me an email
    with the file attached so that I can fix whatever issue is happening here!
  %p
    If it wasn't, and you'd like support for that program (I want to be all-encompassing), please email me and let me
    know you'd like support for it!

Fix header layout for "can't parse" page

- content_for(:header) do
  %h2 can't parse that
%article
  %p
    For some reason we couldn't parse that file. We currently support splits from WSplit (both 1.4.x and Nitrofski's
    1.5.x fork), Time Split Tracker, SplitterZ, and LiveSplit (1.2 and up). Llanfair is in the works.
  %p
    If that file
    %em did
    come from a program we support, please
    %a{href: "mailto:qhiiyr@gmail.com"} send me an email
    with the file attached so that I can fix whatever issue is happening here!
  %p
    If it wasn't, and you'd like support for that program (I want to be all-encompassing), please email me and let me
    know you'd like support for it!


.contextual
  = icon_link_to :new, [:new, resource, :attachment], :remote => true

- @attachments = resource.attachments
- if @attachments.empty?
  = boot_alert(t('attachments.alerts.empty'))
  .attachments.collection
- else
  = render 'attachments/list' unless @attachments.empty?

Use form-actions row instead of context action for new in attachments tab view.

- @attachments = resource.attachments
- if @attachments.empty?
  = boot_alert(t('attachments.alerts.empty'))
  .attachments.collection
- else
  = render 'attachments/list' unless @attachments.empty?

.form-actions
  = icon_link_to :new, [:new, resource, :attachment], :remote => true


%ordercycle{"ng-controller" => "OrderCycleCtrl"}
  :javascript
    angular.module('Darkswarm').value('orderCycleData', #{render "json/order_cycle"})

  - if @order_cycles and @order_cycles.empty?
    Orders are currently closed for this hub
    %p
      Please contact your hub directly to see if they accept late orders,
      or wait until the next cycle opens.

    = render partial: "shopping_shared/next_order_cycle"
    = render partial: "shopping_shared/last_order_cycle"

  - else
    %form.custom
      = yield :order_cycle_form

Tweak styling for closed shoptfront

%ordercycle{"ng-controller" => "OrderCycleCtrl"}
  :javascript
    angular.module('Darkswarm').value('orderCycleData', #{render "json/order_cycle"})

  - if @order_cycles and @order_cycles.empty?
    %h4.text-right
      %i.ofn-i_032-closed-sign
      Orders are closed
    %p.text-right Please wait until the next cycle opens (or contact us directly to see if we can accept any late orders)
    .text-right
      %small
        %em
          = render partial: "shopping_shared/next_order_cycle"
          = render partial: "shopping_shared/last_order_cycle"

  - else
    %form.custom
      = yield :order_cycle_form


- tl_json ||= nil
%script{:type => "text/javascript"}
  - if tl_json
    var json = JSON.parse('#{tl_json}'.replace(/"/g, '"'));
    var start, end;
    if (!ManageIQ.calendar.calDateFrom || !ManageIQ.calendar.calDateTo) {
    // set timeline to start one week ago and end today
    end = new Date();
    start = new Date(end - 24 * 60 * 60 * 1000 * 7);
    } else {
    start = new Date(ManageIQ.calendar.calDateFrom);
    end = new Date(ManageIQ.calendar.calDateTo);
    }
    ManageIQ.Timeline.load(json, start, end);

Fix javascript parse error on a timeline screen

- tl_json ||= nil
%script{:type => "text/javascript"}
  - if tl_json
    var json = JSON.parse('#{tl_json}'.replace(/"/g, '"'));
    var start, end;
    if (!ManageIQ.calendar.calDateFrom || !ManageIQ.calendar.calDateTo) {
    end = new Date();
    start = new Date(end - 24 * 60 * 60 * 1000 * 7);
    } else {
    start = new Date(ManageIQ.calendar.calDateFrom);
    end = new Date(ManageIQ.calendar.calDateTo);
    }
    ManageIQ.Timeline.load(json, start, end);


:markdown
  The [Poltergeist](https://github.com/teampoltergeist/poltergeist) Gem provides a PhantomJS driver for [Capybara](https://github.com/jnicklas/capybara).

  To install it, add `poltergeist` to your scraper Gemfile:
:coderay
  #!ruby
  gem "poltergeist"

:markdown
  Then in your scraper configure Capybara to use it as your default driver:
:coderay
  #!ruby
  require 'capybara/poltergeist'
  Capybara.default_driver = :poltergeist

Change the suggested way of using Capybara in a scraper

:markdown
  The [Poltergeist](https://github.com/teampoltergeist/poltergeist) Gem provides a PhantomJS driver for [Capybara](https://github.com/jnicklas/capybara).

  To install it, add `poltergeist` to your scraper Gemfile:
:coderay
  #!ruby
  gem "poltergeist"

:markdown
  Then in your scraper start a Capybara session using Poltergeist:
:coderay
  #!ruby
  require 'capybara/poltergeist'

  capybara = Capybara::Session.new(:poltergeist)
  # Start scraping
  capybara.visit("https://morph.io/")