Get some bad news

<% @countries.each do |country_name| %>

  At <%= country_name %>:

  Send "<%= @payment_details[country_name][:keyword] %>" to short number "<%= @payment_details[country_name][:shortcode] %>"

      <% @promotional_texts[country_name].each do |lang, text| %>
        <%= text %>
      <% end %>

<% end %>

Get some bad news

<% @countries.each do |country_name| %>

  In <%= country_name %>:

  Send "<%= @payment_details[country_name][:keyword] %>" to short number "<%= @payment_details[country_name][:shortcode] %>"

      <% @promotional_texts[country_name].each do |lang, text| %>
        <%= raw text.gsub(/\n/, '
') %>
      <% end %>

<% end %>

Improve landing page a little

Improve landing page a little


<%= form_for(@report, role: "form") do |f| %>

    <%= f.text_field :school, autofocus: true, required: true, placeholder: 'School', class: "form-control" %>
    <%= f.text_field :dbn, autofocus: true, placeholder: 'DBN', class: "form-control" %>
    <%= f.date_field :date, autofocus: true, required: true, class: "form-control" %>
    <%= f.text_field :purpose, autofocus: true, required: true, placeholder: 'Purpose', class: "form-control" %>
    <%= f.text_field :comments, autofocus: true, required: true, placeholder: 'What questions, concerns, and/or issues were raised?', class: "form-control" %>
    <%= f.text_field :next_steps, autofocus: true, required: true, placeholder: 'Next Steps/Follow-Up', class: "form-control" %>
    <%= f.text_field :additional_info, autofocus: true, required: true, placeholder: 'Anything else?', class: "form-control" %>

<%= f.submit "Submit", class: "btn btn-lg btn-primary btn-block" %>

<% end%>

<%= form_for([@user, @report], role: "form") do |f| %>

    <%= f.text_field :school, autofocus: true, required: true, placeholder: 'School', class: "form-control" %>
    <%= f.text_field :dbn, autofocus: true, placeholder: 'DBN', class: "form-control" %>
    <%= f.date_field :date, autofocus: true, required: true, class: "form-control" %>
    <%= f.text_field :purpose, autofocus: true, required: true, placeholder: 'Purpose', class: "form-control" %>
    <%= f.text_field :comments, autofocus: true, required: true, placeholder: 'What questions, concerns, and/or issues were raised?', class: "form-control" %>
    <%= f.text_field :next_steps, autofocus: true, required: true, placeholder: 'Next Steps/Follow-Up', class: "form-control" %>
    <%= f.text_field :additional_info, autofocus: true, required: true, placeholder: 'Anything else?', class: "form-control" %>

<%= f.submit "Submit", class: "btn btn-lg btn-primary btn-block" %>

<% end%>

Modify form to be a rails helper form

Modify form to be a rails helper form


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<%= stylesheet_link_tag "mailer/ink" %>
<%= stylesheet_link_tag "mailer/layout" %>

                          <%= image_tag "logo.png" %>

                          <%= yield %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<%#= stylesheet_link_tag "mailer/ink" %>
<%#= stylesheet_link_tag "mailer/layout" %>

                          <%= image_tag "logo.png" %>

                          <%= yield %>

Disable email stylesheets for the moment.


<%= render request %>

<if @request.fulfilled?>

<%= render "votes/vote_form", :object => @user, :vote => @vote %>

      <% else %>
        <%= render :partial => "votes/disabled_votes", locals: {object: @user} %>
    <% end %>

<%= render request %>

<if @request.is_fulfilled>

<%= render "votes/vote_form", :object => @user, :vote => @vote %>

<% end %>

Change method name being called on request


upstream <%= app %> {
  <% ports.each do |port| %>
  server localhost:<%= port %> fail_timeout=0;
  <% end %>
}

server {
  access_log <%= log %>/nginx-access.log combined buffer=0k;

  listen 80;
  server_name <%= app %>.<%= ENV['BASE_DOMAIN'] %>;
  <% (ENV['ADDITIONAL_DOMAINS'] || '').split(',').each do |domain| %>
  server_name <%= domain %>;
  <% end %>

  root <%= engine.root %>/public;

  try_files $uri/index.html $uri.html $uri @app;

  location @app {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;

    proxy_pass http://<%= app %>;
  }

  error_page 500 502 503 504 /500.html;
  location = /500.html {
    root <%= engine.root %>/public;
  }
}

upstream <%= app %> {
  <% ports.each do |port| %>
  server localhost:<%= port %> fail_timeout=0;
  <% end %>
}

server {
  access_log <%= log %>/<%= app %>-nginx-access.log combined buffer=0k;
  error_log  <%= log %>/<%= app %>-nginx-error.log;

  listen 80;
  server_name <%= app %>.<%= ENV['BASE_DOMAIN'] %> <%= (ENV['ADDITIONAL_DOMAINS'] || '').split(',').join(' ') %>;

  root <%= engine.root %>/public;

  try_files $uri/index.html $uri.html $uri @app;

  location @app {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;

    proxy_pass http://<%= app %>;
  }

  error_page 500 502 503 504 /500.html;
  location = /500.html {
    root <%= engine.root %>/public;
  }
}

Split error log out; Use combined log directory


<!DOCTYPE html>

  <meta charset="utf-8" />

  <%= stylesheet_link_tag 'guides-print', media: 'all' %>
  <%= javascript_include_tag 'jquery-1.7.2.min.js', 'print' %>

GOV.UK

<!DOCTYPE html>

  <meta charset="utf-8" />

  <%= stylesheet_link_tag 'guides-print', media: 'all' %>
  <%= javascript_include_tag 'libs/jquery/jquery-1.7.2.js' %>

GOV.UK

Fix Javascript error in print template

Fix Javascript error in print template


spec:
  x-sub-request-filters:
    - type: default
      name: http
      options:
        allow:
          - pattern: /^https?:\/\//
  title: The Change Propagation root
  paths:
    /sys/links:
      x-modules:
        - path: sys/backlinks.js
          options:
            templates:
              mw_api:
                  uri: 'http://localhost<%= scope['::port_fragment'] %>/w/api.php'
    /sys/queue:
      x-modules:
        - path: sys/kafka.js
          options:
            uri: 127.0.0.1:2181
            dc_name: datacenter1
            templates:
              summary_rerender:
                topic: resource_change
                match:
                  meta:
                    uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
                  tags:
                    - restbase
                exec:
                  method: get
                  # Don't encode title since it should be already encoded
                  uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri[1]}}'
                  query:
                    redirect: false
                  headers:
                    cache-control: no-cache

              mobile_rerender:
                topic: resource_change
                match:
                  meta:
                    uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
                  tags:
                    - restbase
                exec:
                  method: get
                  # Don't encode title since it should be already encoded
                  uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{{match.meta.uri[1]}}'
                  query:
                    redirect: false
                  headers:
                    cache-control: no-cache

Enable mobile rerenders in change-propagation

Change-Id: I64125dcdfb966268d743cd271760609b13d96891


global
    log 127.0.0.1   syslog info
    daemon
    user vcap
    group vcap
    maxconn 64000
    spread-checks 4
    stats socket /var/vcap/jobs/haproxy/config/haproxy.sock mode 600 level operator

defaults
    log global
    timeout connect 30000ms
    maxconn 64000
    <% if p("router.haproxy.request_timeout_in_seconds").to_i > 0 %>
        timeout client <%= p("router.haproxy.request_timeout_in_seconds").to_i * 1000 %>ms
        timeout server <%= p("router.haproxy.request_timeout_in_seconds").to_i * 1000 %>ms
    <% end %>

frontend http-in
    mode http
    bind :<%= p("router.haproxy.health_check_port") %>
    option forwardfor
    reqadd X-Forwarded-Proto:\ http

global
    log 127.0.0.1   syslog info
    daemon
    user vcap
    group vcap
    maxconn 64000
    spread-checks 4
    stats socket /var/vcap/jobs/haproxy/config/haproxy.sock user vcap mode 600 level operator

defaults
    log global
    timeout connect 30000ms
    maxconn 64000
    <% if p("router.haproxy.request_timeout_in_seconds").to_i > 0 %>
        timeout client <%= p("router.haproxy.request_timeout_in_seconds").to_i * 1000 %>ms
        timeout server <%= p("router.haproxy.request_timeout_in_seconds").to_i * 1000 %>ms
    <% end %>

frontend http-in
    mode http
    bind :<%= p("router.haproxy.health_check_port") %>
    option forwardfor
    reqadd X-Forwarded-Proto:\ http

Set user on stats socket to vcap

Set user on stats socket to vcap

[#119932437]

Signed-off-by: Mark St.Godard <c658bdde7d0e2722483697104148a0afc73ce15b@gmail.com>


Welcome!

Select an option:

Report a Visit  View Your Schools

Add views file for users controller with one view - home


<%= @user.nick_name %>'s Profile

<button id="<%= @user.id %>"type="button" class="btn btn-primary black-background edit-nickname">Change nickname</button>

Your SoundTreks:

  <% @user.sound_treks.each do |sound_trek|%>

<%= link_to sound_trek.title, sound_trek_path(sound_trek) %>

  <% end %>

Your Profile, <%= current_user.nick_name %>

<button id="<%= @user.id %>"type="button" class="btn btn-primary black-background edit-nickname">Change nickname</button>

Your SoundTreks:

  <% @user.sound_treks.each do |sound_trek|%>

<%= link_to sound_trek.title, sound_trek_path(sound_trek) %>

  <% end %>

Change header on profile page

Change header on profile page


### File managed with puppet ###
## Module: '<%= scope.to_hash['module_name'] %>'
## Template source: 'MODULES<%= template_source.gsub(Regexp.new("^#{Puppet::Node::Environment.current[:modulepath].gsub(':','|')}"),"") %>'
<% if @trusted_cert_authorities.respond_to?(:sort_by) -%>
<%   @trusted_cert_authorities.sort_by { |name| name }.each  do |name, key| -%>
<%     if key.is_a?(String) -%>
# key for <%= name %>
@cert-authority * ssh-rsa <%= key %>
<%     elsif key.is_a?(Hash) -%>
# key for <%= name %>
@cert-authority <%= key['hostaliases'] || '*' %> <%= key['type'] || 'ssh-rsa' %> <%= key['content'] %>
<%     end -%>
<%   end -%>
<% end -%>

<% if @generated_known_hosts -%>
# automatically generated known hosts (managed hostkeys)
<%= @generated_known_hosts %>
<% end -%>
# explicitly configured known hosts via ssh::known_hosts::additional_known_hosts
<% if @additional_known_hosts -%>
<%= @additional_known_hosts %>
<% end -%>

### File managed with puppet ###
## Module: '<%= scope.to_hash['module_name'] %>'
<% if @trusted_cert_authorities.respond_to?(:sort_by) -%>
<%   @trusted_cert_authorities.sort_by { |name| name }.each  do |name, key| -%>
<%     if key.is_a?(String) -%>
# key for <%= name %>
@cert-authority * ssh-rsa <%= key %>
<%     elsif key.is_a?(Hash) -%>
# key for <%= name %>
@cert-authority <%= key['hostaliases'] || '*' %> <%= key['type'] || 'ssh-rsa' %> <%= key['content'] %>
<%     end -%>
<%   end -%>
<% end -%>

<% if @generated_known_hosts -%>
# automatically generated known hosts (managed hostkeys)
<%= @generated_known_hosts %>
<% end -%>
# explicitly configured known hosts via ssh::known_hosts::additional_known_hosts
<% if @additional_known_hosts -%>
<%= @additional_known_hosts %>
<% end -%>

Remove puppet-version specific stuff from template


      <%= "#{t('spree.date')}/#{t('spree.time')}" %>
      <%= t(:description) %>
      <%= t(:amount) %>

    <% @order.adjustments.each do |adjustment|
         @edit_url = edit_admin_order_adjustment_path(@order, adjustment)
         @delete_url = admin_order_adjustment_path(@order, adjustment)
    %>
      <tr id="<%= spree_dom_id(adjustment) %>" data-hook="adjustment_row" class="<%= cycle('odd', 'even')%>">
        <%= adjustment.created_at.to_s(:date_time24) %>
        <%= adjustment.label %>
        <%= adjustment.display_amount %>

          <%= link_to_edit adjustment, :no_text => true %>
          <%= link_to_delete adjustment, :no_text => true %>

    <% end %>

      <%= "#{t('spree.date')}/#{t('spree.time')}" %>
      <%= t(:description) %>
      <%= t(:amount) %>

    <% @order.adjustments.each do |adjustment|
         @edit_url = edit_admin_order_adjustment_path(@order, adjustment)
         @delete_url = admin_order_adjustment_path(@order, adjustment)
    %>
      <tr id="<%= spree_dom_id(adjustment) %>" data-hook="adjustment_row" class="<%= cycle('odd', 'even')%>">
        <%= l(adjustment.created_at) %>
        <%= adjustment.label %>
        <%= adjustment.display_amount %>

          <%= link_to_edit adjustment, :no_text => true %>
          <%= link_to_delete adjustment, :no_text => true %>

    <% end %>

Format adjustment time better in adjustments_table


<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
<Node "<%= @title %>">
<%- else -%>
<Carbon>
<%- end -%>
  Host "<%= @graphitehost %>"
  Port "<%= @graphiteport %>"
  Prefix "<%= @graphiteprefix %>"
<%- if @graphitepostfix -%>
  Postfix "<%= @graphitepostfix %>"
<%- end -%>
  EscapeCharacter "<%= @escapecharacter %>"
  StoreRates <%=  @storerates %>
  AlwaysAppendDS <%= @alwaysappendds %>
  SeparateInstances <%= @separateinstances %>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
  LogSendErrors <%= @logsenderrors %>
  Protocol "<%= @protocol %>"
<%- end -%>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
</Node>
<%- else -%>
</Carbon>
<%- end -%>

<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
<Node "<%= @title %>">
<%- else -%>
<Carbon>
<%- end -%>
  Host "<%= @graphitehost %>"
  Port "<%= @graphiteport %>"
  Prefix "<%= @graphiteprefix %>"
<%- if @graphitepostfix -%>
  Postfix "<%= @graphitepostfix %>"
<%- end -%>
  EscapeCharacter "<%= @escapecharacter %>"
  StoreRates <%=  @storerates %>
  AlwaysAppendDS <%= @alwaysappendds %>
  SeparateInstances <%= @separateinstances %>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
  LogSendErrors <%= @logsenderrors %>
  Protocol "<%= @protocol %>"
<%- end -%>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.6']) >= 0) -%>
  ReconnectInterval <%= @reconnectinterval %>
<%- end -%>
stores<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
</Node>
<%- else -%>
</Carbon>
<%- end -%>

Add ReconnectInterval parameter to write_graphite template (introduce in version 5.6, defaults to zero)


<%= simple_fields_for :question_group, @question_group do |qg| %>
      <%= qg.simple_fields_for :questions do |q| %>

          <%= q.hidden_field :survey_section_id, value: @survey_section_id %>
          <%= q.hidden_field :id %>
          <%= q.input :text, label: false, as: :string, wrapper_html:{class: "question"} %>
          <%= q.input :question_type_id, label: false, collection: QuestionType.all.map{|t|[t.text, t.id]}[0..11].uniq.select{|c| [:box,:number,:date,:string,:dropdown,:pick_one,:pick_any, :slider, :stars].include? c[1]}, wrapper_html:{class: "question"}   %>
          <%= q.input :answers_textbox, label: false, as: :text, wrapper_html:{class: "question group_answers_textbox"} %>

          <%= q.hidden_field :display_order %>
          <%= q.hidden_field :display_type %>
          <%= q.hidden_field :pick %>

            <%= link_to_remove_fields "remove", q, ".group_inline_question" %>

      <% end -%>
<% end -%>

<%= simple_fields_for :question_group, @question_group do |qg| %>
      <%= qg.simple_fields_for :questions do |q| %>

          <%= q.hidden_field :survey_section_id, value: @survey_section_id %>
          <%= q.hidden_field :id %>
          <%= q.input :text, label: false, as: :string, wrapper_html:{class: "question"} %>
          <%= q.input :question_type_id, label: false, collection: QuestionType.all.map{|t|[t.text, t.id]}[0..13].uniq.select{|c| [:box,:number,:date,:string,:dropdown,:pick_one,:pick_any, :slider, :stars, :file].include? c[1]}, wrapper_html:{class: "question"}   %>
          <%= q.input :answers_textbox, label: false, as: :text, wrapper_html:{class: "question group_answers_textbox"} %>

          <%= q.hidden_field :display_order %>
          <%= q.hidden_field :display_type %>
          <%= q.hidden_field :pick %>

            <%= link_to_remove_fields "remove", q, ".group_inline_question" %>

      <% end -%>
<% end -%>

Add file upload as a question type in group questions.

	modified:   app/views/question_groups/_group_inline_field.html.erb


Reports: Cab Log

<%= form_for @query, :url=>url_for(:action=>:cab), :html=>{:method=>:get} do |f| %>
  <fieldset>

      <%= f.date_select  :start_date, :discard_day=>true %>
      <%= f.submit "Report" %>

  </fieldset>
<% end %>

Date
Name
Trip purpose
Pick-Up Point
Destination
Time

<% for trip in @trips %>

<%= trip.pickup_time.to_date %>
<%= trip.customer.name %>
<%= trip.trip_purpose %>
<%= trip.pickup_address.text %>
<%= trip.dropoff_address.text %>
<%= trip.pickup_time.time %>

<% end %>

Reports: Cab Log

<%= form_for @query, :url=>url_for(:action=>:cab), :html=>{:method=>:get} do |f| %>
  <fieldset>

      <%= f.date_select  :start_date, :discard_day=>true %>
      <%= f.submit "Report" %>

  </fieldset>
<% end %>

Date
Name
Trip purpose
Pick-Up Point
Destination
Time

<% for trip in @trips %>

<%= trip.pickup_time.to_date %>
<%= trip.customer.name %>
<%= trip.trip_purpose %>
<%= trip.pickup_address.try(:text) || '(Unspecified Address)' %>
<%= trip.dropoff_address.try(:text) || '(Unspecified Address)' %>
<%= trip.pickup_time.time %>

<% end %>

Make cab log report work with missing addresses


  <%= simple_form_for @page, as: :page, remote: true, html: {class: 'form-vertical'} do |f| %>

    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

New <%= instance_name.titleize %>

    <%= text_field_tag :title %>

    <%= link_to 'Cancel', '#', class: 'btn',  data: {dismiss: 'modal'} %>
    <%= f.submit 'Create', class: 'btn btn-primary' %>

  <% end -%>

  <%= simple_form_for @page, as: :page, remote: true, html: {class: 'form-vertical'} do |f| %>

    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

New <%= instance_name.titleize %>

    <%= label_tag :title %>
    <%= text_field_tag :title %>

    <%= link_to 'Cancel', '#', class: 'btn',  data: {dismiss: 'modal'} %>
    <%= f.submit 'Create', class: 'btn btn-primary' %>

  <% end -%>

Add title label to pages/_new partial

Add title label to pages/_new partial


<label>
  <%= check_box_tag 'terms_of_service', 1, nil, { data: { activate: 'activate-submit' } } %><strong> I have read and do agree to <%= link_to t('sufia.deposit_agreement'), '/agreement/', target: "_blank" %>.</strong>
</label>

<label>
  <%= check_box_tag 'terms_of_service', 1, nil, { data: { activate: 'activate-submit' } } %><strong> I have read and do agree to <%= link_to t('sufia.deposit_agreement'), sufia.static_path(:agreement), target: "_blank" %>.</strong>
</label>

Use resourceful route helper for link to upload agreement

Fixes #1575


<% page_title "Policy advisory groups" %>

    <%= link_to "Create policy advisory group", new_admin_policy_advisory_group_path, class: "btn new_resource", title: "Create a policy team" %>

Policy advisory groups

        Name
        Email

      <% @policy_advisory_groups.each do |policy_advisory_group| %>
        <%= content_tag_for(:tr, policy_advisory_group) do %>
          <%= link_to policy_advisory_group.name, edit_admin_policy_advisory_group_path(policy_advisory_group), title: "Edit policy advisory group #{policy_advisory_group.name}" %>
          <%= policy_advisory_group.email %>

            <%= button_to 'Delete', admin_policy_advisory_group_path(policy_advisory_group), method: :delete, title: "Delete", confirm: "Are you sure you want to delete the policy advisory group?", class: "btn btn-danger" %>

        <% end %>
      <% end %>

<% page_title "Policy advisory groups" %>

    <%= link_to "Create policy advisory group", new_admin_policy_advisory_group_path, class: "btn new_resource", title: "Create a policy team" %>

Policy advisory groups

        Name
        Email

      <% @policy_advisory_groups.each do |policy_advisory_group| %>
        <%= content_tag_for(:tr, policy_advisory_group) do %>
          <%= link_to policy_advisory_group.name, edit_admin_policy_advisory_group_path(policy_advisory_group), title: "Edit policy advisory group #{policy_advisory_group.name}" %>
          <%= policy_advisory_group.email %>

            <% if can?(:delete, PolicyAdvisoryGroup) %>
            <%= button_to 'Delete', admin_policy_advisory_group_path(policy_advisory_group), method: :delete, title: "Delete", confirm: "Are you sure you want to delete the policy advisory group?", class: "btn btn-danger" %>
            <% end %>

        <% end %>
      <% end %>

Add in view level persmission to hide the button


Loan approved

Hi <%= @borrower %>,

<%= @owner %> is going to loan you <%= @item %>!

If you need to contact <%= @owner %> then just reply to this email.

You can review all your borrowed items, and items borrowed from you
on your <%= link_to "loans page", loans_url %>.

Loan approved

Hi <%= @borrower %>,

<%= @owner %> is going to loan you <%= @item %>!

Now it's time to arrange how you're going to pick it up.
You can contact <%= @owner %> by replying to this email.

You can review all your borrowed items, and items borrowed from you
on your <%= link_to "loans page", loans_url %>.

Add note to approved mail about picking up the item.


  <%= render :partial => 'shared/welcome_navigation', :locals => { :club => discussion_board.club } %>

    <%= best_in_place_if can?(:update, discussion_board), discussion_board, :name, :type => :input, :html_attrs => { :rows => '1' } %>

    <%= best_in_place_if can?(:update, discussion_board), discussion_board, :description, :type => :textarea, :html_attrs => { :rows => '10' } %>

      <%- if discussion_board.topics.blank? %>

No Topics Yet
          <%- if can? :update, discussion_board %>
            - Go Ahead and <a href="<%= new_discussion_board_topic_path(discussion_board) %>" class="create-first-topic-link">Create the First!
          <%- end %>

      <%- else %>

          <%= render :partial => 'topics/list', :locals => { :discussion_board => discussion_board } %>

      <%- end %>

  <%= render :partial => 'shared/welcome_navigation', :locals => { :club => discussion_board.club } %>

    <%= best_in_place_if can?(:update, discussion_board), discussion_board, :name, :type => :input, :html_attrs => { :rows => '1' } %>

    <%= best_in_place_if can?(:update, discussion_board), discussion_board, :description, :type => :textarea, :html_attrs => { :rows => '10' } %>

      <%- if discussion_board.topics.blank? %>

No Topics Yet
          - Go Ahead and
          <%- if can? :create, discussion_board.topics.build %>
            <a href="<%= new_discussion_board_topic_path(discussion_board) %>" class="create-first-topic-link">Create the First!
          <%- else %>
            <a href="<%= subscribe_to_club_path(discussion_board.club) %>" class="create-first-topic-link">Create the First!
          <%- end %>

      <%- else %>

          <%= render :partial => 'topics/list', :locals => { :discussion_board => discussion_board } %>

      <%- end %>

Update Discussion Board for Basic User Topic

Update the Discussion Board view to include the ability for a basic
subscriber to click the "Add Topic" button and be directed to the
upgrade page.


<%= render :partial => "spree/admin/variants/autocomplete", :formats => :js %>

  <fieldset>
    <legend><%= t(:add_product) %></legend>

      <%= label_tag :add_product_name, t(:name_or_sku) %>
      <%= hidden_field_tag :add_variant_id, "", :class => "variant_autocomplete" %>

      <%= label_tag :add_quantity, t(:qty) %>
      <%= number_field_tag :add_quantity,  1, :min => 0 %>

      <%= link_to_with_icon 'icon-plus', t(:add), admin_order_line_items_url(@order),
                  :method => :post,
                  :id => 'add_line_item_to_order',
                  :class => 'button fullwidth',
                  'data-update' => 'order-form-wrapper' %>

  </fieldset>

<%= render :partial => "spree/admin/variants/autocomplete", :formats => :js %>

  <fieldset>
    <legend><%= t(:add_product) %></legend>

      <%= label_tag :add_product_name, t(:name_or_sku) %>
      <%= hidden_field_tag :add_variant_id, "", :class => "variant_autocomplete fullwidth" %>

      <%= label_tag :add_quantity, t(:qty) %>
      <%= number_field_tag :add_quantity,  1, :min => 0 %>

      <%= link_to_with_icon 'icon-plus', t(:add), admin_order_line_items_url(@order),
                  :method => :post,
                  :id => 'add_line_item_to_order',
                  :class => 'button fullwidth',
                  'data-update' => 'order-form-wrapper' %>

  </fieldset>

Set fullwidth class on variant_autocomplete for orders/new


  <%= link_to(
        render_icon('filter'),
          alchemy.admin_pictures_path(merge_params(:filter => 'last_upload')),
          :remote => true,
          :title => t("last_upload_only"),
          :class => "icon_button please_wait"
      ) %>
  <%= link_to(
        render_icon('filter'),
          alchemy.admin_pictures_path(merge_params(:filter => 'recent')),
          :remote => true,
          :title => t("recently_uploaded_only"),
          :class => "icon_button please_wait"
      ) %>
  <%= link_to(
        render_icon('filter'),
          alchemy.admin_pictures_path(merge_params_without([:filter])),
          :remote => true,
          :title => t("all_pictures"),
          :class => "icon_button please_wait"
      ) %>
  <%= t('Filter') %>

  <%= link_to(
    render_icon('filter'),
    alchemy.admin_pictures_path(merge_params(:filter => 'last_upload')),
    :remote => request.xhr?,
    :title => t("last_upload_only"),
    :class => "icon_button please_wait"
  ) %>
  <%= link_to(
    render_icon('filter'),
    alchemy.admin_pictures_path(merge_params(:filter => 'recent')),
    :remote => request.xhr?,
    :title => t("recently_uploaded_only"),
    :class => "icon_button please_wait"
  ) %>
  <%= link_to(
    render_icon('filter'),
    alchemy.admin_pictures_path(merge_params_without([:filter])),
    :remote => request.xhr?,
    :title => t("all_pictures"),
    :class => "icon_button please_wait"
  ) %>
  <%= t('Filter') %>

Make picture library filterbar ajax requests dependent of location.

If the filter bar is used inside the library it has to be standard GET requests. We only need ajax requests if in assignment overlay.


<%= sub_nav_tag({}) do %>

		<%= link_to organizations_path do %> <%= "My Organizations (#{current_user.organizations.count})" %>
		<% end %>

		<%= link_to users_path do %>
		 <%= "Users (#{@org.users.count})"%>
		<% end %>

		<%= link_to map_organization_path(@org) do %>
		 Map
		<% end %>

	<% if can? :update, @org %>

			<%= link_to edit_organization_path(@org) do %>
			 Update
			<% end %>

	<% end %>
<% end %>

Fix layout of org subnav

Fix layout of org subnav


#!/bin/sh
set -e # fail on errors

# Redirect stderr -> stdout
exec 2>&1

cd <%= node['gitlab']['gitlab-git-http-server']['dir'] %>

exec chpst -P \
  -U <%= node['gitlab']['user']['username'] %> \
  -u <%= node['gitlab']['user']['username'] %> \
  /usr/bin/env \
    PATH=/opt/gitlab/bin:/opt/gitlab/embedded/bin:/usr/local/bin:/usr/bin:/bin \
    /opt/gitlab/embedded/bin/gitlab-git-http-server \
      -listenNetwork <%= node['gitlab']['gitlab-git-http-server']['listen_network'] %> \
      -listenUmask <%= node['gitlab']['gitlab-git-http-server']['listen_umask'] %> \
      -listenAddr <%= node['gitlab']['gitlab-git-http-server']['listen_addr'] %> \
      -authBackend <%= node['gitlab']['gitlab-git-http-server']['auth_backend'] %> \
      <%= node['gitlab']['gitlab-git-http-server']['repo_root'] %>

#!/bin/sh
set -e # fail on errors

# Redirect stderr -> stdout
exec 2>&1

<%= render("mount_point_check.erb") %>

cd <%= node['gitlab']['gitlab-git-http-server']['dir'] %>

exec chpst -P \
  -U <%= node['gitlab']['user']['username'] %> \
  -u <%= node['gitlab']['user']['username'] %> \
  /usr/bin/env \
    PATH=/opt/gitlab/bin:/opt/gitlab/embedded/bin:/usr/local/bin:/usr/bin:/bin \
    /opt/gitlab/embedded/bin/gitlab-git-http-server \
      -listenNetwork <%= node['gitlab']['gitlab-git-http-server']['listen_network'] %> \
      -listenUmask <%= node['gitlab']['gitlab-git-http-server']['listen_umask'] %> \
      -listenAddr <%= node['gitlab']['gitlab-git-http-server']['listen_addr'] %> \
      -authBackend <%= node['gitlab']['gitlab-git-http-server']['auth_backend'] %> \
      <%= node['gitlab']['gitlab-git-http-server']['repo_root'] %>

Include the 'mount point check'

Include the 'mount point check'


<% content_for :title, @signup.page_title %>

  <% if @signup.beta? %>
    <%= render partial: 'govuk_component/beta_label' %>
  <% end %>

    Email alert subscription
    <%= @signup.name %>

    <%= form_tag email_alert_subscriptions_path, class: 'signup-choices form' do %>
      <% if @signup.choices? %>
        <fieldset>
          <legend>
            Select the email alerts you need
          </legend>
          <% @signup.choices.each do |choice| %>
            <%= label_tag "choices[#{@signup.choice_key}][#{choice.key}]", class: 'block-label' do %>
              <%= check_box_tag "choices[#{@signup.choice_key}][#{choice.key}]", 1, true, class: 'checkbox' %>
              <%= choice.name %>
            <% end %>
          <% end %>
        </fieldset>
      <% end %>

<%= @signup.body %>

      <%= submit_tag 'Create subscription', class: "button" %>
    <% end %>

<% content_for :title, @signup.page_title %>

  <% if @signup.beta? %>
    <%= render partial: 'govuk_component/beta_label' %>
  <% end %>

    Email alert subscription
    <%= @signup.name %>

    <%= form_tag email_alert_subscriptions_path, class: 'signup-choices form' do %>
      <% if @signup.choices? %>
        <fieldset>
          <legend>
            Select the email alerts you need
          </legend>
          <% @signup.choices.each do |choice| %>
            <%= label_tag "choices[#{@signup.choice_key}][#{choice.key}]", class: 'block-label' do %>
              <%= check_box_tag "choices[#{@signup.choice_key}][#{choice.key}]", 1, choice.prechecked, class: 'checkbox' %>
              <%= choice.name %>
            <% end %>
          <% end %>
        </fieldset>
      <% end %>

<%= @signup.body %>

      <%= submit_tag 'Create subscription', class: "button" %>
    <% end %>

Use default prechecked state on page load

Rather than always prechecking select boxes, use the prechecked state
from the metadata about an email signup currently pulled from finder-api.


Please select the Subject in the hierarchy tree where you would like to add your new Subject

<%= javascript_include_tag 'kmaps_engine/kmaps_fancytree' %>
<%= javascript_on_load do %>
        $("#relation_tree_container").kmapsTree({
          termindex_root: "<%= Feature.config.url %>",
          kmindex_root: "<%= MmsIntegration::Picture.config.url %>",
          type: "<%= Feature.uid_prefix %>", //subjects
          root_kmap_path: '',
          baseUrl: "<%= new_admin_feature_path %>?parent_id=%%ID%%",
          expand_path: "",
          perspective: "<%= current_perspective.code %>",
          displayPopup: false
        });
<% end %>

Please select the Subject in the hierarchy tree where you would like to add your new Subject

<%= javascript_include_tag 'kmaps_engine/kmaps_fancytree' %>
<%= javascript_on_load do %>
  $("#relation_tree_container").kmapsFancytree({
    featureId: "",
    termIndex: "<%= Feature.config.url %>",
    assetIndex: "<%= Flare.config.asset_url %>",
    perspective: "<%= current_perspective.code %>",
    tree: "<%= Feature.uid_prefix %>", //subjects
    domain: "<%= Feature.uid_prefix %>", //subjects
    seedTree: {
      descendants: true,
      directAncestors: true,
    },
    displayPopup: true
  });
<% end %>

Update view select_ancestor to use new kmapsFancyTree

The modification in kmapsFancyTree allows to have multiple roots and when
the featureId is not pressent it returns the tree with all the main root
nodes depending on the current perspective.


 Please Sign Up

  <% if @errors %>

    <% @errors.each do |message| %>

 <%= message %>

    <% end %>

  <% end %>

  <form action = '/users' method= "POST">
    <input type= "text" name= "user[username]" placeholder= "Username">
    <input type= "password" name= "user[password]" placeholder= "Password">
    <input type= "submit" value= "Sign Up">
  </form>

Add sign up and login pages

Add sign up and login pages


Client {
    Name           = <%= @name %>-fd
    Address        = <%= @address %>
    FDPort         = <%= @port %>
    Catalog        = MyCatalog
    Password       = "<%= @password %>"
    File Retention = <%= @file_retention %>
    Job Retention  = <%= @job_retention %>
    AutoPrune      = <%= @autoprune %>
<%= scope.function_template(['bacula/_ssl.erb']) %>
}

Client {
    Name           = <%= @name %>-fd
    Address        = <%= @address %>
    FDPort         = <%= @port %>
    Catalog        = MyCatalog
    Password       = "<%= @password %>"
    File Retention = <%= @file_retention %>
    Job Retention  = <%= @job_retention %>
    AutoPrune      = <%= @autoprune %>
<%= scope.function_template(['bacula/_ssl.erb']) %>
<%= scope.function_template(['bacula/_sslkeypair.erb']) %>
}

Add missing TLS Certificate / Key

Add missing TLS Certificate / Key

They are required for client certificates, adding this settings allow
stop setting tls_verify_peer to 'no'.


<!DOCTYPE html>

  <title>Ratings</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<%= notice %>

<%= alert %>

<%= yield %>

<!DOCTYPE html>

  <title>Ratings</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<% if user_signed_in? %>
	Signed in as <%= current_user.email %>. Not you?
	<%= link_to "Sign out", destroy_user_session_path, method: :delete %>
<% else %>
	<%= link_to "Sign up", new_user_registration_path %> or
	<%= link_to "Sign in", new_user_session_path %>
<% end %>

<%= notice %>

<%= alert %>

<%= yield %>

Add sign in, sign out, etc in all views

Add sign in, sign out, etc in all views


upstream app {
    server 127.0.0.1:3000;
}

server {
    listen 80 default;

    access_log <%= node.themis.basedir %>/logs/nginx_access.log;
    error_log <%= node.themis.basedir %>/logs/nginx_error.log;

    keepalive_timeout 100;
    charset utf-8;

    location / {
        root <%= node.themis.basedir %>/www/build/html;
        rewrite ^(.*)$ /index.html break;
    }

    location /assets/ {
        root <%= node.themis.basedir %>/www/build;
    }

    location /api/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header CLIENT_IP $remote_addr;

        proxy_pass http://app/;
        proxy_redirect off;

        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
}

upstream app {
    server 127.0.0.1:3000;
}

server {
    listen 80 default;

    access_log <%= node.themis.basedir %>/logs/nginx_access.log;
    error_log <%= node.themis.basedir %>/logs/nginx_error.log;

    keepalive_timeout 100;
    charset utf-8;

    location / {
        root <%= node.themis.basedir %>/www/build/html;
        rewrite ^(.*)$ /index.html break;
    }

    location /assets/ {
        root <%= node.themis.basedir %>/www/build;
    }

    location /api/ {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;

        proxy_pass http://app/;
        proxy_redirect off;

        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;

        client_max_body_size 1k;
    }
}

Remove unneeded headers and set client max upload size.


<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="images/favicon.ico">
  <title>AFTERBURNER | Training Tomorrow's Software Engineers</title>

  <script src="/js/jquery.min.js" type="text/javascript"></script>
  <link href="/css/bootstrap.min.css" rel="stylesheet">
  <link href="/css/icons-font.min.css" rel="stylesheet">
  <link href="/css/ionicons.min.css" rel="stylesheet">
  <link href="/css/afterburner.css" rel="stylesheet">
  <script src="/js/bootstrap.min.js"></script>
</head>

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="images/favicon.ico">
  <title><%= @title + " | " if @title %>AFTERBURNER<%= " | Training Tomorrow's Software Engineers" unless @title %></title>

  <script src="/js/jquery.min.js" type="text/javascript"></script>
  <link href="/css/bootstrap.min.css" rel="stylesheet">
  <link href="/css/icons-font.min.css" rel="stylesheet">
  <link href="/css/ionicons.min.css" rel="stylesheet">
  <link href="/css/afterburner.css" rel="stylesheet">
  <script src="/js/bootstrap.min.js"></script>
</head>

Add support for page titles

Add support for page titles


<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="./css/layout.css">
  <script src="./js/jquery/jquery.min.js"></script>
  <title><%= @title || "Sinatra App" %></title>
  <%= bootstrap_css true %>
</head>
<body>
  <%= yield %>
</body>
</html>

<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="./css/layout.css">
  <script src="./js/jquery/jquery.min.js"></script>
  <title><%= @title || "Sinatra App" %></title>
  <%= bootstrap_css true %>
</head>
<body>
  <% container :div do %>
    <%= yield %>
  <% end %>
</body>
</html>

Add an div tag container

Add an div tag container


          <%= "#{exercise.number}. #{exercise.name}" %>
          <%= teacher_info_button exercise %>
          <%= link_to_bibliotheca_exercise exercise %>

              <%= exercise.description_context %>

        <button class="btn btn-complementary w-100" data-waiting="<%= t :loading %>" data-bs-dismiss="modal" aria-label="<%= t :continue_exercise %>"> <%= t :continue_exercise %> </button>

Fix teacher info and edit buttons positioning on kids modals


<% list_items = capture do %>
  <%
    docs_grouped_by_parent = imported_docs.each_with_object({}) do |page, hash|
      path_to_dir = page[:path].split("/").take(page[:path].split("/").count - 1).join("/")
      hash[path_to_dir] = [] unless hash[path_to_dir]
      hash[path_to_dir] << page
      hash[path_to_dir].sort_by! { |hash| hash[:title] }
    end
  %>
  <% docs_grouped_by_parent.keys.each do |subpath| %>
    <% list_of_links = capture do %>
      <% docs_grouped_by_parent[subpath].each do |page| %>
        <%= "
#{page[:title]}
" %>
      <% end %>
    <% end %>

    <% if subpath == path_to_app_docs %>
      <%= list_of_links %>
    <% else %>

<%= subpath.sub(path_to_app_docs, "") %>

        <%= list_of_links %>

    <% end %>
  <% end %>
<% end %>

<%= list_items.strip %>

<% list_items = capture do %>
  <%
    docs_grouped_by_parent = imported_docs.each_with_object({}) do |page, hash|
      path_to_dir = page[:path].split("/").take(page[:path].split("/").count - 1).join("/")
      hash[path_to_dir] = [] unless hash[path_to_dir]
      hash[path_to_dir] << page
    end
  %>
  <% docs_grouped_by_parent.keys.each do |subpath| %>
    <% list_of_links = capture do %>
      <% docs_grouped_by_parent[subpath].sort_by { |hash| hash[:title] }.each do |page| %>
        <%= "
#{page[:title]}
" %>
      <% end %>
    <% end %>

    <% if subpath == path_to_app_docs %>
      <%= list_of_links %>
    <% else %>

<%= subpath.sub(path_to_app_docs, "") %>

        <%= list_of_links %>

    <% end %>
  <% end %>
<% end %>

<%= list_items.strip %>

Sort at the point of use

Sort at the point of use

More efficient and conventional.


<!DOCTYPE html>
<html>
<head>
  <title>Dummy</title>
  <%= stylesheet_link_tag    "discerner/application", :media => "all" %>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "discerner/application" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body class="discerner">

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Dummy</title>
  <%= stylesheet_link_tag    "discerner/application", :media => "all" %>
  <%= javascript_include_tag "discerner/application" %>
  <%= csrf_meta_tags %>
</head>
<body class="discerner">
   <% flash.each do |message_type, message| %>
      <div class="<%= message %>", id="<%= message_type %>">
         <%= message %>
      </div>
   <% end %>
   <%= yield %>
</body>
</html>

Add flash display to the dummy application layout


<% if @page %>
  <meta charset="utf8">
  <title><%= page_title prefix: local_assigns.fetch(:title_prefix, nil), separator: local_assigns.fetch(:title_separator, nil) %></title>
  <%= tag(:meta, name: 'created', content: @page.updated_at) %>
  <%= tag(:meta, name: 'robots', content: meta_robots) %>
  <%= tag(:meta, name: 'description', content: meta_description, lang: @page.language_code) if meta_description.present? %>
  <%= tag(:meta, name: 'keywords', content: meta_keywords, lang: @page.language_code) if meta_keywords.present? %>
  <%= auto_discovery_link_tag(:rss, show_alchemy_page_url(@page, format: :rss)) if @page.contains_feed? %>
<% end %>

<% if @page %>
  <meta charset="utf-8">
  <title><%= page_title prefix: local_assigns.fetch(:title_prefix, nil), separator: local_assigns.fetch(:title_separator, nil) %></title>
  <%= tag(:meta, name: 'created', content: @page.updated_at) %>
  <%= tag(:meta, name: 'robots', content: meta_robots) %>
  <%= tag(:meta, name: 'description', content: meta_description, lang: @page.language_code) if meta_description.present? %>
  <%= tag(:meta, name: 'keywords', content: meta_keywords, lang: @page.language_code) if meta_keywords.present? %>
  <%= auto_discovery_link_tag(:rss, show_alchemy_page_url(@page, format: :rss)) if @page.contains_feed? %>
<% end %>

Change meta charset from 'utf8' to 'utf-8'


<%= pluralize resources_instance_variable.total_count, resource_model.model_name.human %>

    <%= resources_instance_variable.total_count %>
    <%= resource_model.model_name.human(count: resources_instance_variable.total_count) %>

Fix pluralization of resource table header

Somehow Rails' `pluralize` helper does not pluralize the model name correctly. Using `model_name.human` with `count` option instead.


Connect With Code Fellows!

Tired of finding the right match for your company?  The Partner Dashboard allows you to easily connect with graduates and current students of Code Fellows that meet
        the requirements for your job opening.

      <%= link_to "Request Invitation", new_invite_request_path, class: "btn btn-primary" %>

<%= render "sign_in" %>

    <%= render "devise/shared/links" %>

Change class from 'row' to 'row-fluid' to allow links to lineup with the rest of the content


<!DOCTYPE html>

  <title>Onboarding</title>
  <%= csrf_meta_tags %>
  <%= stylesheet_link_tag 'application', media: 'all' %>

  <%= yield %>

  <%= javascript_include_tag 'application' %>

<!DOCTYPE html>

  <title>Onboarding</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <%= csrf_meta_tags %>
  <%= stylesheet_link_tag 'application', media: 'all' %>

  <%= yield %>

  <%= javascript_include_tag 'application' %>

Set screen width to device-width

Set screen width to device-width


<!DOCTYPE html>

  <title><%= yield(:title) %></title>
  <%= stylesheet_link_tag :all %>
  <%= javascript_include_tag :defaults %>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag 'application' %>
  <%= yield(:head) %>
  <%= csrf_meta_tag %>

<% flash.each do |key, msg| %>
  <%= content_tag :div, msg, :id => key %>
<% end %>

<%= yield (:title) %>

<%= yield %>

<!DOCTYPE html>

  <title><%= yield(:title) %></title>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag 'application' %>

  <%= yield(:head) %>
  <%= csrf_meta_tag %>

<% flash.each do |key, msg| %>
  <%= content_tag :div, msg, :id => key %>
<% end %>

<%= yield :title %>

<%= yield %>

Clean up application layout template

Clean up application layout template

- Don't include all the css files, resulting in duplicates
- Don't include the default js files, which messes up jquery
- Include jquery


<% post = post_subject %>
<% cache(post, namespace: 'post_subject', expires_in: 6.hours, race_condition_ttl: 30.seconds) do %>
<%= link_to raw(htmlic_title(post.subject)), post %> by
<span class="short-post-author author-tag-for-<%= post.user_id %>"><%= post.author %>
on <%= post.created_at %>
<%= raw 'New' if post.new_reply? %>
<%= raw 'Locked' if post.locked %>
<%= raw 'Poofed' if post.poofed %>
<%= raw 'Edited' if post.previous_version %>
<%= raw 'Previous Version' if post.next_version %>
<% post.tags.each do |tag| %>
<%= tag.name %>
<% end %>
<% end %>

<% post = post_subject %>
<% cache(post, namespace: 'post_subject', expires_in: 6.hours, race_condition_ttl: 30.seconds) do %>
<%= link_to raw(htmlic_title(post.subject)), post %> by
<span class="short-post-author author-tag-for-<%= post.user_id %>"><%= post.author %>
on <%= post.created_at %>
<%= raw ' ' if post.new_reply? %>
<%= raw 'Locked' if post.locked %>
<%= raw 'Poofed' if post.poofed %>
<%= raw 'Edited' if post.previous_version %>
<%= raw 'Previous Version' if post.next_version %>
<% post.tags.each do |tag| %>
<%= tag.name %>
<% end %>
<% end %>

Make the new post market less obnoxious

Make the new post market less obnoxious


<% if user_signed_in? %>

<%= link_to "Order History", orders_path %>

      Account

<%= link_to "Profile", current_user %>

<%= link_to "Update Profile", edit_user_registration_path %>

        <%= link_to "Log out", destroy_user_session_path, :method => :delete %>

<% else %>

<%= link_to "Log in", new_user_session_path %>

<%= link_to "Sign up", new_user_registration_path %>

<% end %>

<% if user_signed_in? %>

<%= link_to "Order History", orders_path %>

      Account

<%= link_to "Profile", profile_path(current_user) %>

<%= link_to "Update Profile", edit_user_registration_path %>

        <%= link_to "Log out", destroy_user_session_path, :method => :delete %>

<% else %>

<%= link_to "Log in", new_user_session_path %>

<%= link_to "Sign up", new_user_registration_path %>

<% end %>

Add profile to navigation_links partial

Add profile to navigation_links partial


<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "REFUGE Restrooms" %></title>
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Refuge Restrooms" %>">
<meta name="keywords" content="gender neutral restrooms,gender,neutral,restrooms, unisex restrooms, unisex, restrooms, refuge restrooms, refuge, restrooms">
<meta name="author" content="RefugeRestrooms.org">
<script language="javascript" type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>

<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "REFUGE Restrooms" %></title>
<meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Refuge Restrooms" %>">
<meta name="keywords" content="gender neutral restrooms,gender,neutral,restrooms, unisex restrooms, unisex, restrooms, refuge restrooms, refuge, restrooms">
<meta name="author" content="RefugeRestrooms.org">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>

<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>

Remove jquery <script> since its in asset pipeline


/*
 * Generated by Chef
 */

<% @realm_types.each_pair do |k,v| %>
<%= k %> {
<%= v %> required;
};
<% end %>

Change whitespace so it is similar to the source files


# /etc/mcollective/policies/<%= @agent -%>.policy
<% if( @default ) then -%>
policy default <%= @default %>
<% end -%>
<% @rules.each do |comment, rule| -%>
# <%= comment %>
<%= rule['policy'] %>	<%= rule['caller'] %>	<%= rule['actions'] %>	<%= rule['facts'] %>	<%= rule['classes'] %>
<% end -%>

# /etc/mcollective/policies/<%= @agent -%>.policy
<% if( @default ) then -%>
policy default <%= @default %>
<% end -%>
<% @rules.sort.map do |comment, rule| -%>
# <%= comment %>
<%= rule['policy'] %>	<%= rule['caller'] %>	<%= rule['actions'] %>	<%= rule['facts'] %>	<%= rule['classes'] %>
<% end -%>

Sort the rules on output to ensure proper ordering.


/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.jpa.qualified_aggregate_entity_test_name) %>;

@java.lang.SuppressWarnings( { "UnusedDeclaration" } )
@javax.annotation.Generated( "Domgen" )
public class <%= repository.jpa.aggregate_entity_test_name %>
{
  @org.testng.annotations.Test
  public void ensureTestsPresent()
    throws java.lang.Exception
  {
<%
  repository.data_modules.select{|dm|dm.jpa?}.each do |data_module|
    data_module.daos.select{|d|d.jpa? && d.queries.any?{|q|!q.jpa.standard_query?}}.each do |dao|
-%>
    org.testng.Assert.assertFalse( java.lang.reflect.Modifier.isAbstract( <%= dao.jpa.qualified_concrete_dao_test_name %>.class.getModifiers() ) );
<% dao.queries.select{|q|!q.jpa.standard_query?}.each do |query| -%>
    org.testng.Assert.assertNotNull( <%= dao.jpa.qualified_concrete_dao_test_name %>.class.getMethod( "<%= Reality::Naming.camelize(query.name) %>" ).getAnnotation( org.testng.annotations.Test.class ) );
<% end -%>
<%
    end
  end
-%>
  }
}

/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.jpa.qualified_aggregate_entity_test_name) %>;

@java.lang.SuppressWarnings( { "UnusedDeclaration" } )
@javax.annotation.Generated( "Domgen" )
public class <%= repository.jpa.aggregate_entity_test_name %>
{
  @org.testng.annotations.Test
  public void ensureTestsPresent()
    throws java.lang.Exception
  {
<%
  repository.data_modules.select{|dm|dm.jpa?}.each do |data_module|
    data_module.daos.select{|d|d.jpa? && d.queries.any?{|q|q.jpa? && !q.jpa.standard_query?}}.each do |dao|
-%>
    org.testng.Assert.assertFalse( java.lang.reflect.Modifier.isAbstract( <%= dao.jpa.qualified_concrete_dao_test_name %>.class.getModifiers() ) );
<% dao.queries.select{|q|q.jpa? && !q.jpa.standard_query?}.each do |query| -%>
    org.testng.Assert.assertNotNull( <%= dao.jpa.qualified_concrete_dao_test_name %>.class.getMethod( "<%= Reality::Naming.camelize(query.name) %>" ).getAnnotation( org.testng.annotations.Test.class ) );
<% end -%>
<%
    end
  end
-%>
  }
}

Support non-jpa queries that are omitted for finders


###
### File managed by Puppet
###
<%- (0..(@ipaddress.length-1)).each do |id| -%>
<%= @ipaddress[id] %>/<%= @netmask[id] %> via <%= @gateway[id] %> dev <%= @interface %><%- if @table -%> table <%= @table[id] %><%- end -%>
<%- end %>

###
### File managed by Puppet
###
<%- (0..(@ipaddress.length-1)).each do |id| -%>
<%= @ipaddress[id] %>/<%= @netmask[id] %> via <%= @gateway[id] %> dev <%= @interface %><%- if @table -%> table <%= @table[id] %><% end %>
<%- end %>

Fix looping error on Redhat Network Routes

Fixed the erb syntax to ensure a new line is added in to the relevant network scripts after each static route.


Hi <%= @user.first_name %>,

Thank you for submitting your company to Open Door.

Our team will process and evaluate your submission to assess
the validity of your place of work. Please expect to hear back within
1-2 business days.

If you do not hear back from us, please email us atopendoorteam2017@gmail.com .

Best,

The OpenDoor Team

San Fransisco, CA

Edit the company name and adress

Edit the company name and adress


$("#profiles-table").html("<%= escape_javascript(render partial: 'testing_grounds/profile_table', locals: {topology: @topology, testing_ground_profile: @testing_ground_profile.as_json } ) %>")

window.currentProfileTable.append();
window.currentProfileTable.updateProfiles();

$("#profiles-table").html("<%= escape_javascript(render partial: 'testing_grounds/profile_table', locals: {topology: @topology, testing_ground_profile: @testing_ground_profile } ) %>")

window.currentProfileTable.append();
window.currentProfileTable.updateProfiles();

Fix calculate concurrency to pass the tech list

Closes #472


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Foo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= stylesheet_link_tag 'screen', :media => 'all' %>
    <%= csrf_meta_tags %>
    <%= javascript_include_tag :modernizr %>

    <%= render 'shared/flash' %>
    <%= yield %>

    <%= javascript_include_tag 'application' %>
    <%# all page specific javascript so go into content_for(:extra_js) %>
    <%= yield :extra_js %>

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Foo</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= stylesheet_link_tag 'screen', :media => 'all' %>
    <%= csrf_meta_tags %>
    <%= javascript_include_tag :modernizr %>

    <%= render 'shared/flash' %>
    <%= yield %>

    <%= javascript_include_tag 'application' %>
    <%# all page-specific elements go into content_for(:body_close) %>
    <%= yield :body_close %>

Update extra_js to body_close to be more abstract/semantic


<% # this custom result template is currently tested on the next-steps-for-your-business flow %>
<% outcome = @presenter.current_node %>
<% content_for :outcome_title do %>
  <% if outcome.title.present? %><%= outcome.title %><% else %>Outcome<% end %>
<% end %>
<% content_for :head do %>
  <meta name="robots" content="noindex">
<% end %>

    <%= render "govuk_publishing_components/components/title", {
      title: outcome.title,
      margin_bottom: 6
    } %>

    <%= outcome.description %>

    <%= outcome.body %>

    <%= render "govuk_publishing_components/components/heading", {
      text: "Change your answers",
      font_size: "l",
      border_top: 2,
      padding: true
    } %>

    <%= tag.p class: "govuk-body govuk-!-margin-bottom-8" do %>
      <%= link_to "Start again",
        restart_flow_path(@presenter),
        class: "govuk-link",
        data: {
          module: "gem-track-click",
          "track-action": "Start again",
          "track-category": "StartAgain",
          "track-label": @presenter.current_node.title
        } %>
    <% end %>

    <%= render "govuk_publishing_components/components/print_link" %>
    <%= render 'smart_answers/shared/debug' %>

<% # this custom result template is currently tested on the next-steps-for-your-business flow %>
<% outcome = @presenter.current_node %>
<% content_for :outcome_title do %>
  <% if outcome.title.present? %><%= outcome.title %><% else %>Outcome<% end %>
<% end %>
<% content_for :head do %>
  <meta name="robots" content="noindex">
<% end %>

    <%= render "govuk_publishing_components/components/title", {
      title: outcome.title,
      margin_bottom: 6
    } %>

    <%= outcome.description %>

    <%= outcome.body %>

    <%= render "govuk_publishing_components/components/heading", {
      text: "Change your answers",
      font_size: "l",
      border_top: 2,
      padding: true
    } %>

    <%= tag.p class: "govuk-body govuk-!-margin-bottom-8" do %>
      <%= link_to "Answer the questions again to change the results",
        restart_flow_path(@presenter),
        class: "govuk-link",
        data: {
          module: "gem-track-click",
          "track-action": "Answer the questions again to change the results",
          "track-category": "StartAgain",
          "track-label": @presenter.current_node.title
        } %>
    <% end %>

    <%= render "govuk_publishing_components/components/print_link" %>
    <%= render 'smart_answers/shared/debug' %>

Update link copy for change answers

Update link copy for change answers


  <%=
    instagram_block_patterns = [
      /<blockquote (.*)<\/blockquote>(\s+)

Use new pattern to match Instagram embed codes


<% page_title @document_series.name, @organisation.name %>
<% page_class "document-series" %>

<%= @document_series.name %>

A document series from <%= link_to @organisation.name, organisation_path(@organisation) %>. Back to <%= link_to "all series", organisation_document_series_path(@organisation) %>.

      <% if @document_series.published_editions.any? %>

          <% @document_series.published_editions.each do |edition| %>
            <%= content_tag_for :li, edition do %>
              <%= link_to edition.title, public_document_path(edition) %>
            <% end %>
          <% end %>

      <% else %>

There are no documents in this series at the moment.

      <% end %>

<% page_title @document_series.name, @organisation.name %>
<% page_class "document-series" %>

<%= @document_series.name %>

A document series from <%= link_to @organisation.name, organisation_path(@organisation) %>.

      <% if @document_series.published_editions.any? %>

          <% @document_series.published_editions.each do |edition| %>
            <%= content_tag_for :li, edition do %>
              <%= link_to edition.title, public_document_path(edition) %>
            <% end %>
          <% end %>

      <% else %>

There are no documents in this series at the moment.

      <% end %>

Remove link to non-existent series index page.


About this search app

Quick search at the MIT Libraries can be used to find books, movies, music, articles, journals, archives and manuscript collections, and other great stuff we have at the library. Learn more

Not finding what you need? <%= link_to('Ask us', 'https://libraries.mit.edu/ask/') %>

About this search app

Quick search at the MIT Libraries can be used to find books, movies, music, articles, journals, archives and manuscript collections, and other great stuff we have at the library.

Not finding what you need? <%= link_to('Ask us', 'https://libraries.mit.edu/ask/') %>

Remove 'Learn more' link from footer

Remove 'Learn more' link from footer

Why these changes are being introduced:

A link in the footer goes to a WP page that will be removed after we
launch Primo.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/IMP-2176

How this addresses that need:

This removes the link that is no longer needed.

Side effects of this change:

None.


<% provide(:title, 'Reset password') %>

Reset password

    <%= form_for(@user, url: password_resets_path(params[:id])) do |f| %>
      <%= render 'shared/error_messages', object: f.object %>

      <%= hidden_field_tag :email, @user.email %>

      <%= f.label :password %>
      <%= f.password_field :password, class: 'form-control' %>

      <%= f.label :password_confirmation, 'Confirmation' %>
      <%= f.password_field :password_confirmation, class: 'form-control' %>

      <%= f.submit 'Update password', class: 'btn btn-primary' %>
    <% end %>

<% provide(:title, 'Reset password') %>

Reset password

    <%= form_for(@user, url: password_reset_path(params[:id])) do |f| %>
      <%= render 'shared/error_messages', object: f.object %>

      <%= hidden_field_tag :email, @user.email %>

      <%= f.label :password %>
      <%= f.password_field :password, class: 'form-control' %>

      <%= f.label :password_confirmation, 'Confirmation' %>
      <%= f.password_field :password_confirmation, class: 'form-control' %>

      <%= f.submit 'Update password', class: 'btn btn-primary' %>
    <% end %>

Fix bug of password reset

Fix bug of password reset


Home page for StudentMember ID <%= @thisID %>

Total Alumni Allotted: <%= @allalums.length %>

		id
		name
		department
		hall
		search
		response

		<% @allalums.each do |alumni| %>

			<%= alumni.id %>
			<%= alumni.name %>
			<%= alumni.department %>
			<%= alumni.hall %>
			<%= AlumniStatus.where({ :Alumni_id => "#{alumni.id}" })[0].search %>
			<%= AlumniStatus.where({ :Alumni_id => "#{alumni.id}" })[0].response %>
			<a href="<%= alumni_path(alumni.id) %>">OPEN

		<% end %>

Home page for StudentMember ID <%= @thisID %>

Total Alumni Allotted: <%= @allalums.length %>

		id
		name
		department
		hall
		call next at
		search
		response

		<% @allalums.each do |alumni| %>

			<%= alumni.id %>
			<%= alumni.name %>
			<%= alumni.department %>
			<%= alumni.hall %>
			<%= AlumniData.where({ :Alumni_id => "#{alumni.id}"})[0].call_next_at %>
			<%= AlumniStatus.where({ :Alumni_id => "#{alumni.id}" })[0].search %>
			<%= AlumniStatus.where({ :Alumni_id => "#{alumni.id}" })[0].response %>
			<a href="<%= alumni_path(alumni.id) %>">OPEN

		<% end %>

Add call_next_at to the student member homepage.

Signed-off-by: Siddharth Kannan <805f056820c7a1cecc4ab591b8a0a604b501a0b7@gmail.com>


<% [:success, :notice, :error, :alert].each do |type| %>
  <%- alert_class = case type
    when :success then "flash-success alert-success"
    when :notice  then "flash-notice alert-info"
    when :alert   then "flash-alert alert-warning"
    when :error   then "flash-error alert-danger"
    else "flash-#{type} alert-#{type}"
    end
  -%>
  <% if flash[type] %>
      <% if !@submission.nil? %>
        <div class="alert <%= alert_class %>" aria-live="polite"><%= flash[type] %>
          <% if !@submission.errors.empty? %>

              <% @submission.errors.messages.each do |key, value| %>
                <% if key == :items %>

<%= error_key_format(key) %> <%= value.first.values[0]['text'].html_safe %>

                <% else %>

<%= error_key_format(key) %> <%= value.first.html_safe %>

                <% end %>
              <% end %>

          <% else %>
            <%= return_message @submission %>
          <% end %>
          ×

      <% end %>
  <% end %>
<% end %>

<% [:success, :notice, :error, :alert].each do |type| %>
  <%- alert_class = case type
    when :success then "flash-success alert-success"
    when :notice  then "flash-notice alert-info"
    when :alert   then "flash-alert alert-warning"
    when :error   then "flash-error alert-danger"
    else "flash-#{type} alert-#{type}"
    end
  -%>
  <% if flash[type] %>
      <% if !@submission.nil? %>
        <div class="alert <%= alert_class %>" aria-live="polite"><%= flash[type] %>
          <% if !@submission.errors.empty? %>
            ×

              <% @submission.errors.messages.each do |key, value| %>
                <% if key == :items %>

<%= error_key_format(key) %> <%= value.first.values[0]['text'].html_safe %>

                <% else %>

<%= error_key_format(key) %> <%= value.first.html_safe %>

                <% end %>
              <% end %>

          <% else %>
            <%= return_message @submission %>
          <% end %>

      <% end %>
  <% end %>
<% end %>

Move x close in the red alert

Move x close in the red alert

Co-authored-by: Nikitas Tampakis <047cff491185db6bc34b93ab840967e758fe8117@gmail.com>


You may be able to register a civil partnership or get married at the British embassy or consulate in Peru.

[Make an appointment at the embassy in Lima.](https://www.book-consular-appointment.service.gov.uk/TimeSelection?location=125&service=10)

##What documents you’ll need

You need to have been living in Peru for 21 days. You and your partner will need to sign a declaration and provide proof of residence for example, an employer’s letter or a bank statement.

You’ll both need to bring your original passports. You’ll also need evidence that your partner is free to marry - a document from their government or their passport that says they are unmarried. If either of you have been divorced, widowed or in a civil partnership before, you’ll also need to provide:

- a [decree absolute or final order](/copy-decree-absolute-final-order)
- the [death certificate](/order-copy-birth-death-marriage-certificate/)

##What you need to do

At your appointment the embassy or consulate will give you:

-  a notice of registration
-  a declaration that you and your partner will need to swear, stating that you’re legally entitled to marry or enter into a civil partnership

Once you’ve completed these and paid the registration fee, the embassy or consulate will display your notice publicly for 14 days.

As long as nobody registers an objection you can get married or enter into a civil partnership up to 3 months after you gave notice.

You’ll need to bring two witnesses to your ceremony - they’ll need to show their photo ID (for example passport or driver’s licence).

You’ll need to pay a fee to register your marriage or civil partnership and a fee for your marriage or civil partnership certificate.

^All same-sex marriages must take place under English and Welsh or Scottish law even if you live in or are from Northern Ireland. Tell the embassy or consulate which law you want to get married under at your appointment.^

##Naturalisation of your partner if they move to the UK

Your partner can apply to [become a British citizen](/becoming-a-british-citizen/if-your-spouse-is-a-british-citizen) once they’ve lived in the UK for 3 years.

## Fees

<%= render partial: 'consular_fees_table_items',
    collection: calculator.services,
    as: :service,
    locals: { calculator: calculator } %>

You normally have to pay fees for consular services in the local currency - these are shown in the list of [consular fees for Peru](/government/publications/peru-consular-fees).

You can pay by cash or credit card, but not by personal cheque.

It’s not possible to get legal recognition for your same-sex relationship in Peru.

Remove same-sex option for Peru - other, local 1


<% if current_user.direct_otp %>

Enter the code that was sent to you

<% else %>

Enter the code from your authenticator app

<% end %>

<%= flash[:notice] %>

<%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
  <%= text_field_tag :code %>
  <%= submit_tag "Submit" %>
<% end %>

<% if current_user.direct_otp %>
<%= link_to "Resend Code", resend_code_user_two_factor_authentication_path, action: :get %>
<% else %>
<%= link_to "Send me a code instead", resend_code_user_two_factor_authentication_path, action: :get %>
<% end %>
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>

<% if resource.direct_otp %>

Enter the code that was sent to you

<% else %>

Enter the code from your authenticator app

<% end %>

<%= flash[:notice] %>

<%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %>
  <%= text_field_tag :code %>
  <%= submit_tag "Submit" %>
<% end %>

<% if resource.direct_otp %>
<%= link_to "Resend Code", resend_code_user_two_factor_authentication_path, action: :get %>
<% else %>
<%= link_to "Send me a code instead", resend_code_user_two_factor_authentication_path, action: :get %>
<% end %>
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>

Stop hardcoding User, use generic resource

User can also be called Admin. so use generic "resource" same way devise uses.


#!/bin/sh -ex

BACKUP_DIR="<%= @backup_dir %>"

DATE_TODAY=$(date +%F)
TMP_FILE=$(mktemp --tmpdir=${BACKUP_DIR} --suffix=_${DATE_TODAY}.sql.gz)
BACKUP_FILE="${BACKUP_DIR}/postgres_whole_database_${DATE_TODAY}.sql.gz"

export PGUSER=postgres

# Dump the entire database as one thing. See pp-manual for restore instructions.

pg_dumpall --clean --oids |gzip > ${TMP_FILE}

mv ${TMP_FILE} ${BACKUP_FILE}

# clean backups older than 30 days

find ${BACKUP_DIR} -mtime +30 -exec rm {} +

#!/bin/sh -ex

BACKUP_DIR="<%= @backup_dir %>"

DATE_TODAY=$(date +%F)
TMP_FILE=$(mktemp --tmpdir=${BACKUP_DIR} --suffix=_${DATE_TODAY}.sql.gz)
BACKUP_FILE="${BACKUP_DIR}/postgres_whole_database_${DATE_TODAY}.sql.gz"

export PGUSER=postgres

# Dump the entire database as one thing. See pp-manual for restore instructions.

pg_dumpall --clean --oids |gzip > ${TMP_FILE}

mv ${TMP_FILE} ${BACKUP_FILE}
chmod +r ${BACKUP_FILE}

# clean backups older than 30 days

find ${BACKUP_DIR} -mtime +30 -exec rm {} +

Make PostgreSQL backups readable with chmod

So that our deploy user can fish them off the box and copy them to the
backups box.


<%= if @mode -%>mode=<%= @mode -%> <% end -%>
<%= if @miimon -%>miimon=<%= @miimon -%> <% end -%>
<%= if @downdelay -%>downdelay=<%= @downdelay -%> <% end -%>
<%= if @updelay -%>updelay=<%= @updelay -%> <% end -%>
<%= if @lacp_rate -%>lacp_rate=<%= @lacp_rate -%> <% end -%>
<%= if @primary -%>primary=<%= @primary -%> <% end -%>
<%= if @primary_reselect -%>primary_reselect=<%= @primary_reselect -%> <% end -%>
<%= if @xmit_hash_policy -%>xmit_hash_policy=<%= @xmit_hash_policy -%> <% end -%>

<%= %w[mode miimon downdelay updelay lacp_rate primary primary_reselect xmit_hash_policy].select { |thing| scope[thing] }.map {|thing| "#{thing}=#{scope[thing]}"}.join(' ') -%>

Replace hacky template with shorter hacky template


<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ::OstConfig.google_analytics_4_measurement_id %>"></script>
<script>
    window.dataLayer = window.dataLayer || []
    function gtag() { dataLayer.push(arguments) }

    window.gtag("js", new Date())

    const trackGoogleAnalytics = (event) => {
        window.gtag("config", "<%= ::OstConfig.google_analytics_4_measurement_id %>", {
            "cookie_flags": "max-age=7200;secure;samesite=none"
        })
    }

    document.addEventListener("turbo:load", trackGoogleAnalytics)
</script>

<script async src="https://www.googletagmanager.com/gtag/js?id=<%= ::OstConfig.google_analytics_4_measurement_id %>"></script>
<script>
    window.dataLayer = window.dataLayer || []
    function gtag() { dataLayer.push(arguments) }

    window.gtag("js", new Date())

    const trackGoogleAnalytics = (event) => {
        window.gtag("config", "<%= ::OstConfig.google_analytics_4_measurement_id %>", {
            cookie_flags: "max-age=7200;secure;samesite=none",
            page_location: event.detail.url,
        })
    }

    document.addEventListener("turbo:load", trackGoogleAnalytics)
</script>

Add page location to gtag config

Add page location to gtag config


  <% beginning_of_day = Time.parse('08:50:00+09:00') - Time.now.beginning_of_day %>
  <% end_of_day = Time.parse('18:20:00+09:00') - Time.now.beginning_of_day %>
  <% day = end_of_day - beginning_of_day %>
  <% row.each do |cell| %>
    <% left = (cell.period.start_time_to_f - beginning_of_day) / day * 100 %>
    <% width = cell.period.length / day * 100 %>
    <% cell.lectures.each.with_index do |lecture, i| %>
      <% top = i / cell.lectures.size.to_f * 100 %>
      <% height = 1 / cell.lectures.size.to_f * 100 %>
      <li class="item" style="left: <%= left %>%; top: <%= top %>%; width: <%= width %>%; height: <%= height %>%;">
        <%= lecture.name %>

    <% end %>
  <% end %>

<%= render partial: 'shared/timeline/cell', collection: row.cells, as: :cell %>

Use shared/timeline/cell partial in shared/timeline/timeline partial


<!DOCTYPE html>

  <title>Dummy</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>

<%= notice %>

<%= alert %>

<%= yield %>

<!DOCTYPE html>

  <title>Dummy</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>

<%= notice %>

<%= alert %>

<%= link_to('Login', new_user_session_path) %>
<%= yield %>

Add login link to application layout

Add login link to application layout


<% if notice.present? %>

      <%= notice %>

<% end %>

      <%= link_to 'ActivityNotification', root_path %>

        <% if user_signed_in? %>
          <%= current_user.name %>
          <%= "(admin)" if current_user.admin? %>
          <%= link_to 'Logout', destroy_user_session_path, method: :delete %>
        <% else %>
          <%= link_to 'Login', new_user_session_path %>
        <% end %>

      <% if user_signed_in? %>
        <%= render_notifications_of current_user, fallback: :default, index_content: :with_attributes %>
      <% end %>

        <%= link_to 'Preview email', "rails/mailers" %>
        <%= " · " unless user_signed_in? %>

<% if notice.present? %>

      <%= notice %>

<% end %>

      <%= link_to 'ActivityNotification', root_path %>

        <% if user_signed_in? %>
          <%= current_user.name %>
          <%= "(admin)" if current_user.admin? %>
          <%= link_to 'Logout', destroy_user_session_path, method: :delete %>
        <% else %>
          <%= link_to 'Login', new_user_session_path %>
        <% end %>

      <% if user_signed_in? %>
        <%= render_notifications_of current_user, fallback: :default, index_content: :with_attributes %>
      <% end %>

        <%= link_to 'Preview email', "/rails/mailers" %>
        <%= " · " unless user_signed_in? %>

Fix link to preview notification email

Fix link to preview notification email


[Unit]
Description=Starts and stops a single elasticsearch instance on this system
Documentation=http://www.elasticsearch.org

[Service]
Type=forking
EnvironmentFile=<%= @defaults_location %>/elasticsearch-<%= @name %>
User=<%= @user %>
Group=<%= @group %>
PIDFile=<%= @pid_dir %>/elasticsearch-<%= @name %>.pid
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d -p <%= @pid_dir %>/elasticsearch-<%= @name %>.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.work=${WORK_DIR} -Des.default.path.conf=${CONF_DIR}
# See MAX_OPEN_FILES in sysconfig
LimitNOFILE=<%= @nofile %>
# See MAX_LOCKED_MEMORY in sysconfig, use "infinity" when MAX_LOCKED_MEMORY=unlimited and using bootstrap.mlockall: true
<% if @memlock == 'unlimited' %>
LimitMEMLOCK=infinity
<% elsif @memlock %>
LimitMEMLOCK=<%= @memlock %>
<% end %>
# Shutdown delay in seconds, before process is tried to be killed with KILL (if configured)
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

[Unit]
Description=Starts and stops a single elasticsearch instance on this system
Documentation=http://www.elasticsearch.org
Wants=network-online.target
After=network-online.target

[Service]
Type=forking
EnvironmentFile=<%= @defaults_location %>/elasticsearch-<%= @name %>
User=<%= @user %>
Group=<%= @group %>
PIDFile=<%= @pid_dir %>/elasticsearch-<%= @name %>.pid
ExecStart=/usr/share/elasticsearch/bin/elasticsearch -d -p <%= @pid_dir %>/elasticsearch-<%= @name %>.pid -Des.default.path.home=${ES_HOME} -Des.default.path.logs=${LOG_DIR} -Des.default.path.data=${DATA_DIR} -Des.default.path.work=${WORK_DIR} -Des.default.path.conf=${CONF_DIR}
# See MAX_OPEN_FILES in sysconfig
LimitNOFILE=<%= @nofile %>
# See MAX_LOCKED_MEMORY in sysconfig, use "infinity" when MAX_LOCKED_MEMORY=unlimited and using bootstrap.mlockall: true
<% if @memlock == 'unlimited' %>
LimitMEMLOCK=infinity
<% elsif @memlock %>
LimitMEMLOCK=<%= @memlock %>
<% end %>
# Shutdown delay in seconds, before process is tried to be killed with KILL (if configured)
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

Add ordering directives to SystemD unit file

Without any ordering directives instances start too early
during the boot process. This causes problems in cases
with data directory on the iSCSI device for example.

These directives (also present in the original SystemD service
file distributed in Elasticsearch RPM) fix the ordering problem.


<%=@school.name %> is live on Energy Sparks

  You can now use Energy Sparks to see how much energy your school is using,
  set up alerts to warn you about high energy use and explore our activities and
  educational resources designed to teach your pupils about energy whilst
  saving money for their school.

  For help using Energy Sparks please read our
  User Guide,
  watch our Training Videos
  or join one of our live webinar training sessions.

  We hope Energy Sparks will empower your pupils, school staff, and wider
  school community to take action to make your school more energy efficient.

<%= link_to 'View your school', school_url(@school), class: 'btn btn-primary mt-3 mb-3'%>

Add link to training page

Add link to training page


<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  if (Spree.routes == undefined) {
    Spree.routes = {}
  }
  Spree.routes.states_search = "<%= spree.api_states_path(:format => 'json') %>"
  Spree.routes.apply_coupon_code = function(order_id) {
    return "<%= spree.api_orders_path %>/" + order_id + "/apply_coupon_code"
  }
</script>

<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  if (Spree.routes == undefined) {
    Spree.routes = {}
  }
  Spree.routes.states_search = "<%= spree.api_states_path(:format => 'json') %>"
  Spree.routes.apply_coupon_code = function(order_id) {
    return "<%= spree.api_orders_path %>/" + order_id + "/apply_coupon_code"
  }
  Spree.routes.root = "<%= spree.root_url if spree.respond_to? :root_url %>"
</script>

Set up a Spree.routes.root property via js

Provide the application a global accessor for the root path in js as
stores are not always mounted on the root domain "/"

Conflicts:
	core/app/views/spree/shared/_routes.html.erb


DEBUG = <%= node['geoq']['debug'] ? "True":"False" %>
DATABASES = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.postgis',
        'NAME': '<%= @database[:name] %>',
        'USER': '<%= @database[:user] %>',
        'PASSWORD': '<%= @database[:password] %>',
        'HOST': '<%= @database[:host] %>',
        'PORT': '<%= @database[:port] %>',
        }
    }

STATIC_ROOT = '<%= node['geoq']['settings']['static_root'] %>'
STATIC_URL = '<%= node['geoq']['settings']['static_url'] %>'

STATICFILES_DIRS = ('<%= node['geoq']['virtualenv']['location'] %>/local/lib/python2.7/site-packages/django/contrib/admin/static/',)

Fix for admin pages css being auto-included


<% if Spree::Config.show_store_currency_selector && stores.size > 1 %>

      <button id="stores-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t('nav_bar.change_country')%>">
        <%= icon(name: 'global',
                classes: 'd-none d-xl-inline-block',
                width: 41,
                height: 36)  %>
        <%= icon(name: 'arrow-down',
                classes: 'd-inline-block d-xl-none',
                width: 15,
                height: 15)  %>
      </button>

        <% stores.each do |store| %>
          <div class="pl-3 d-flex justify-content-between align-items-center <%= 'active' if store.id == current_store.id %>">
            <span class="flag-icon flag-icon-<%= store_country_iso(store) %>">
            <%= link_to "#{store.default_country&.name} (#{store_currency_symbol(store)})", "//#{store.url}", class: 'dropdown-item text-uppercase' %>

        <% end %>

<% end %>

[SD-1074] Hide country picker from header on mobile


<%= link_to(idea.title, idea_path(idea)) %>

<%= truncate(idea.body, :length => 300, :omission => "... ") { link_to "continue reading", idea_path(idea) } %>

  <div id="button_<%= idea.id %>"><%= render :partial => "votes/button", :locals => { :idea => idea } %>

<%= link_to(idea.title, idea_path(idea)) %>

<%= truncate(raw(idea.formatted_body), :length => 300, :omission => "... ") { link_to "continue reading", idea_path(idea) } %>

  <div id="button_<%= idea.id %>"><%= render :partial => "votes/button", :locals => { :idea => idea } %>

Fix for improper formatting on home page


<% content_for :header do %>

How to import your OhLife entries

<% end %>

      If you haven't exported your OhLife entries yet, do so now. (And hurry,
      exports won't be available after October 4th!) Export your entries by
      visiting the OhLife
      <%= link_to "export page", "https://ohlife.com/export" %>.

      Click "Choose File" below, and select the export you just downloaded.

      Click "Start Import"

<%= form_for @import, url: imports_path, html: { multipart: true } do |form| %>

    <%= form.file_field :ohlife_export %>

  <%= form.submit "Start Import", class: "btn btn-default btn-lg" %>
<% end %>

Make import page a little less bad

Make import page a little less bad


  <% cache [post.id, post.updated_at] do %>
    <%= content_tag :h1, link_to(post.title, post) %>
    <%= content_tag :p, class: "text-muted" do %>
      <%= content_tag :span, class: "post-author" do %>
        <%= image_tag post.author_avatar_url, width: 20 %>
        <%= link_to ["@", post.author_login].join, post.author_url %>
      <% end %>
      <%= content_tag :span, post.published_at.httpdate, class: "post-published-at" %>
      <%= content_tag :span, "Last updated: #{post.updated_at.httpdate}", class: "post-updated-at"if post.updated_at > post.published_at %>
      <%= link_to "#{post.comments_count} #{"comment".pluralize(post.comments_count)}", post.comments_url, class: "post-comments-link" %>
    <% end %>
    <%= content_tag :div, raw(post.content), class: "markdown-body post-content-body" %>
  <% end %>

  <% cache [post.id, post.updated_at] do %>
    <%= content_tag :h1, link_to(post.title, post) %>
    <%= content_tag :p, class: "text-muted" do %>
      <%= content_tag :span, class: "post-author" do %>
        <%= image_tag post.author_avatar_url, width: 20 %>
        <%= link_to ["@", post.author_login].join, post.author_url %>
      <% end %>
      <%= content_tag :span, post.published_at.httpdate, class: "post-published-at" if post.published_at %>
      <%= content_tag :span, "Last updated: #{post.updated_at.httpdate}", class: "post-updated-at"if post.published_at && post.updated_at > post.published_at %>
      <%= link_to "#{post.comments_count} #{"comment".pluralize(post.comments_count)}", post.comments_url, class: "post-comments-link" %>
    <% end %>
    <%= content_tag :div, raw(post.content), class: "markdown-body post-content-body" %>
  <% end %>

Fix for previewing unpublished articles

Fix for previewing unpublished articles


## Description:
High CPU utilization for the last 10 minutes on
Host: {{host.dbname}}
DB: {{host.dbname}}

## Escalation Path:
Depends on the DB.

* ccdb: [page CAPI](https://cfoundry.pagerduty.com/services/P2JWWPW/integrations)

## Possible Causes:
Traffic has increased substantially
Slow queries overwhelming database
RDS Migrations

## Potential Solutions:
Increase RDS instance type (This WILL cause downtime of about 30 seconds)
In extreme cases we have tracked down a user who posts consistently long running queries and suspended their apps.  Do this with extreme caution.
 You can check the currently running tasks in the database using the script in <%= environment %>-aws/scripts/ccdb-job-list while logged into the <%= environment %> jumpbox

##Feedback:
 Have feedback for this alert? [File an issue](https://github.com/pivotal-cf/datadog-config/issues/new) @pagerduty-CAPI-ccdb-non-critical

High database CPU utilization on {{host.name}}

Question: avg(last_10m):avg:aws.rds.cpuutilization{host:ccdb-mysql5-6,!host:bosh-replica,!host:ccdb-replica1,!host:uaadb-replica} by {host} > 75

Update ccdb cpu usage monitor to point at new ccdb-mysql5-6

[#158199219]


Hello!

  Thanks for volunteering to help review Rails 3 in Action. It's quite a big book, and so I don't expect you to review it all. Whatever you can do will help a lot, though!

You can confirm your account email through the link below:

<%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>

After you've confirmed your account...

  You can start reviewing right away. Just pick a chapter and leave a note on whatever you think needs one. Don't worry about being too harsh, I've got a pretty thick skin.

  Thanks again!

  Ryan Bigg

Make confirmation instructions more awesome


<%= t('stats.related-countries.title') %>

  <% if country_children %>

<%= t('stats.related-countries.title-child') %>

      <% country_children.each do |child| %>

          <%= child['name'] %>
          <%= child['iso_3'] %>
          <%= link_to 'View', country_path(child['iso_3']), title: '', class: 'list__right list__a' %>

      <% end %>

  <% end %>

  <% if country_parent %>

<%= t('stats.related-countries.title-parent') %>

        <%= country_parent['name'] %>
        <%= country_parent['iso_3'] %>
        <%= link_to 'View', country_path(country_parent['iso_3']), title: '', class: 'list__right list__a' %>

  <% end %>

<%= t('stats.related-countries.title') %>

  <% if country_children %>

      <% country_children.each do |child| %>

          <%= child['name'] %>
          <%= child['iso_3'] %>
          <%= link_to 'View', country_path(child['iso_3']), title: '', class: 'list__right list__a' %>

      <% end %>

  <% end %>

  <% if country_parent %>

        <%= country_parent['name'] %>
        <%= country_parent['iso_3'] %>
        <%= link_to 'View', country_path(country_parent['iso_3']), title: '', class: 'list__right list__a' %>

  <% end %>

Remove redundant header for related countries and territories


<%- snippet = capture do %>

<%= Spree.t(:loading) %>...

<%- end %>

  <%= snippet %>

<button id="loading-test-button">Toggle Loading</button>

Set duration 0 to remove animation from toggle

Replace `click` with `mousedown` because the `on` binding method is too fast and the event is fired during the
current event.
All jQuery effects, including .toggle(), can be turned off globally by setting jQuery.fx.off = true, which effectively
sets the duration to 0. For more information, see jQuery.fx.off.
ref http://api.jquery.com/toggle/


<%= @question.title %>

  <%= @question.body %>

    <% if session[:user_id] == @question.user_id %>
      <%= button_to 'Edit Question', {action: "edit", id: @question.id}, method: :get %>
      <%= button_to 'Delete Question', {action: "destroy", id: @question.id}, method: :delete %>
    <% end %>

    <% @article = @question %>

 <%= link_to 'Reply', new_question_comment_path(@article) %>

<%= link_to 'View Comments', question_comments_path(@article)%>

    <%= render 'comments/index', locals: {article: @article} %>

 Answers

 <%= link_to 'Post an Answer', new_question_answer_path(@article) %>

    <% @question.answers.each do |answer| %>
      <%= render partial: "answers/show", locals: {answer: answer} %>

    <% end %>

Add classes and structure to main question.


<%= content_tag_for(:tr, document_series) do %>

    <%= link_to document_series.name, admin_organisation_document_series_path(document_series.organisation, document_series), title: "view document series #{document_series.name}" %>
    <%= link_to "(edit)", edit_admin_organisation_document_series_path(document_series.organisation, document_series), title: "view document series #{document_series.name}" %>
    <%= button_to 'Delete', admin_organisation_document_series_path(document_series.organisation, document_series), method: :delete, title: "Delete", confirm: "Are you sure you want to delete the document series?", class: "btn btn-danger"
 %>

  <%= document_series.organisation.name %>
  <%= document_series.editions.count %>
<% end %>

<%= content_tag_for(:tr, document_series) do %>

    <%= link_to document_series.name, admin_organisation_document_series_path(document_series.organisation, document_series), title: "view document series #{document_series.name}" %>

  <%= document_series.organisation.name %>
  <%= document_series.editions.count %>

    <%= link_to "Edit", edit_admin_organisation_document_series_path(document_series.organisation, document_series), class: 'btn', title: "view document series #{document_series.name}" %>

    <%= button_to 'Delete', admin_organisation_document_series_path(document_series.organisation, document_series), method: :delete, title: "Delete", confirm: "Are you sure you want to delete the document series?", class: "btn btn-danger" %>

<% end %>

Fix broken looking admin UI for doc series


<%= form_for [@user, @vehicle, @purchase] do |f| %>
  <%= f.error_messages %>

      <%= f.label :amount, "Amount (#{@vehicle.vehicle_fuel_unit.abbreviation})"%>
      <%= f.text_field :amount %>

      <%= f.label :purchased_on, "Date" %>
      <%= f.date_select :purchased_on, :order => [:day, :month, :year] %>

      <%= f.label :vehicle_fuel_type, "Fuel Type" %>
      <%= f.collection_select :vehicle_fuel_type_id, @vehicle_fuel_types, :id, :name %>

      <%= f.label :distance, "Odometer Reading (#{@vehicle.vehicle_distance_unit.abbreviation})" %>

        <%= f.text_field :distance %>
        (optional)
        <%= help("Enter your car's TOTAL distance travelled.")%>

<% end %>

<%= render "shared/error_messages", :target => @purchase %>

<%= form_for [@user, @vehicle, @purchase] do |f| %>

      <%= f.label :amount, "Amount (#{@vehicle.vehicle_fuel_unit.abbreviation})"%>
      <%= f.text_field :amount %>

      <%= f.label :purchased_on, "Date" %>
      <%= f.date_select :purchased_on, :order => [:day, :month, :year] %>

      <%= f.label :vehicle_fuel_type, "Fuel Type" %>
      <%= f.collection_select :vehicle_fuel_type_id, @vehicle_fuel_types, :id, :name %>

      <%= f.label :distance, "Odometer Reading (#{@vehicle.vehicle_distance_unit.abbreviation})" %>

        <%= f.text_field :distance %>
        (optional)
        <%= help("Enter your car's TOTAL distance travelled.")%>

<% end %>

Use error partial for vehicle fuel purchases


<!DOCTYPE html>

    <title>Personal Website</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, maxmimum-scale=1.0, minimum-scale=1.0  initial-scale=1.0"/>

    <%= stylesheet_link_tag    'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>
    <%= csrf_meta_tags %>

        <%= yield %>

        <%= link_to "Home", root_path %>
        About Me
        Projects
        <%= link_to "Blogs", blogs_path %>
        Contact

          <%= link_to  image_tag('linkedin.png', size: "40x40"), "https://www.linkedin.com/in/ryanlesson" %>
          <%= link_to image_tag('Octocat.png', size:"40x40"), "https://www.GitHub.com/Bigless27" %>

<!DOCTYPE html>

    <title>Personal Website</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, maxmimum-scale=1.0, minimum-scale=1.0  initial-scale=1.0"/>

    <%= stylesheet_link_tag    'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>
    <%= csrf_meta_tags %>

        <%= yield %>

        <%= link_to "Home", root_path %>
        Projects
        <%= link_to "Blogs", blogs_path %>
        Contact

          <%= link_to  image_tag('linkedin.png', size: "40x40"), "https://www.linkedin.com/in/ryanlesson" %>
          <%= link_to image_tag('Octocat.png', size:"40x40"), "https://www.GitHub.com/Bigless27" %>

Delete about me from nav bar actually

Delete about me from nav bar actually


  <%= tab :marketing_lists %>
  <%= tab :marketing_campaigns %>

  <%= tab :lists, url: admin_marketing_lists_path %>
  <%= tab :campaigns, url: admin_marketing_campaigns_path %>

Remove Marketing from tab labels

Remove Marketing from tab labels


Waiter Resources

  <%= @waiters.map {|waiter| linkify waiter }.join(", ") %>

Waiter Resource States

This service supports a list of resource states that can be polled using
  the <%= resolve_links "{waitFor}" %> method. The resource states are:

  <%= @waiters.map {|waiter| linkify waiter }.join(", ") %>

Add link to waitFor method in waiter resource summary


  <%= link_to article_url(article) do %>

<%= full_title(article) %>

<%= article.average_views %>

<%= article.revisions.last.wp10 %>

  <% end %>

Add article links to article_finder results rows


<script>
'use strict';
$(() => {

  cd.showStartingInfoDialog = (onOff) => {
    if (cd.kata.index() === 0 && onOff !== 'off') {
      cd.trafficLightsButton().click();
    }
  };

});
</script>

<script>
'use strict';
$(() => {

  cd.showStartingInfoDialog = (onOff) => {
    if (cd.kata.index() === 1 && onOff !== 'off') {
      cd.trafficLightsButton().click();
    }
  };

});
</script>

Fix starting-info-dialog now kata.index increments in browser now server controller.


<!DOCTYPE html>

    <%= stylesheet_link_tag "application", :media => "all" %>
    <%= stylesheet_link_tag "print.css", media: "print" %>
    <title><%= yield :title %> - GOV.UK</title>
    <%= yield :head %>

    <% if @content_item %>
      <%= render partial: 'govuk_component/analytics_meta_tags', locals: { content_item: @content_item } %>
    <% end %>

  <%= yield :before_wrapper %>

    <%= yield %>

<!DOCTYPE html>
<html>
  <head>
    <%= stylesheet_link_tag "application", :media => "all" %>
    <%= stylesheet_link_tag "print.css", media: "print" %>
    <title><%= yield :title %> - GOV.UK</title>
    <%= yield :head %>

    <% if @content_item %>
      <%= render partial: 'govuk_component/analytics_meta_tags', locals: { content_item: @content_item } %>
    <% end %>
  </head>
<body class="mainstream">
  <%= yield :before_wrapper %>

  <div id="wrapper" class="answer smart_answer">
    <%= yield %>
  </div>
</body>
</html>

Remove redundant tag for removing breadcrumb

This app uses the GOV.UK Component to render the breadcrumb. The tag
removed in this was previously necessary to instruct Slimmer to hide
the old breadcrumb. We no longer need it because the CSS and HTML have
been completely removed from static in
https://github.com/alphagov/static/pull/879.

https://trello.com/c/7wohUbyo


<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title><%= content_for?(:title) ? yield(:title) : "YesAnd" %></title>

    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "vendor/modernizr" %>
    <%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>

YesAnd

          <% if session[:user_id] %>

          <% else %>

          <% end %>

    <%= yield %>

Add tooltips for login and logout buttons


<!DOCTYPE html>
<html>
<head>
  <title>How much has your school been robbed?</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
  <!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

	<!-- Optional theme -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>

  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

</head>
<body>

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>How much has your school been robbed?</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
  <!-- Latest compiled and minified CSS -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

	<!-- Optional theme -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>

  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

</head>
<body>

<%= yield %>

</body>
</html>

Remove link to font not being used

Remove link to font not being used


<!DOCTYPE html>

    <title>NeedOTron</title>
    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>

<%= link_to 'Need-O-Tron 5000', root_path %>

        <% flash.each do |k, v| %>
        <p class="<%= k %> flash-<%= k %>"><%= v %>

        <% end %>

        <%= yield %>

      © 2010-<%= Date.today.year %> Ket Lai Ltd.

    <%= javascript_include_tag :defaults %>
    <%= yield :extra_javascript %>

<!DOCTYPE html>

    <title>NeedOTron</title>
    <%= stylesheet_link_tag    "application" %>
    <%= csrf_meta_tags %>

<%= link_to 'Need-O-Tron 5000', root_path %>

        <% flash.each do |k, v| %>
        <p class="<%= k %> flash-<%= k %>"><%= v %>

        <% end %>

        <%= yield %>

      © 2010-<%= Date.today.year %> Ket Lai Ltd.

    <%= javascript_include_tag "application" %>
    <%= yield :extra_javascript %>

Move all javascript to footer

Move all javascript to footer