<!DOCTYPE html>
<html>
  <head>
    <title>RailsOnlineShop</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>
  <% if logged_in?%>
    <%= link_to "PROFILE", current_user %> | <%= link_to "LOGOUT", logout %>
  <% else %>
    <%= link_to "REGISTER", new_user_path %> | <%= link_to "LOGIN", login_path %>
  <% end %>
    <%= yield %>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <title>RailsOnlineShop</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>
  <% if logged_in?%>
    <%= link_to "HOME", items_path %> | <%= link_to "PROFILE", current_user %> | <%= link_to "LOGOUT", logout %>
  <% else %>
    <%= link_to "HOME", items_path %> | <%= link_to "REGISTER", new_user_path %> | <%= link_to "LOGIN", login_path %>
  <% end %>
    <%= yield %>
  </body>
</html>

Include home link to nav

Include home link to nav


<%= question.question %>

<% question.choices.each do |choice| %>
  <%= erb :"surveys/_choice", locals: {choice: choice, question: question}, layout: false %>
<% end %>

Fix question not showing up

Fix question not showing up


Listing topics

      Title

    <% @topics.each do |topic| %>

        <%= link_to topic.title, topic %>
        <%= pluralize(topic.votes.count, "vote") %>
        <%= button_to '+1', upvote_topic_path(topic), method: :post %>
        <%= link_to 'Show', topic %>
        <%= link_to 'Edit', edit_topic_path(topic) %>
        <%= link_to 'Destroy', topic, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= link_to 'New Topic', new_topic_path %>

Listing topics

      Title

    <% @topics.each do |topic| %>

        <%= link_to topic.title, topic %>
        <%= pluralize(topic.votes.count, "vote") %>
        <%= button_to '+1', upvote_topic_path(topic), method: :post %>
        <%= link_to 'Delete', topic, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= link_to 'New Topic', new_topic_path %>

Remove Show & Edit, rename Destroy -> Delete


        Analytics

      <%= line_chart Visit.group(:search_keyword).count, title: "Search Keyword", ytitle: "Count" %>

      <%= line_chart Visit.group(:referring_domain).count.delete_if { |k, v| k.nil? }, title: "Referring Domain", ytitle: "Count" %>

      <%= line_chart Visit.group(:country).count, title: "Country", ytitle: "Count" %>

      <%= line_chart Visit.group_by_day(:started_at).count, title: "Started At", ytitle: "Count" %>

    <%= render 'layouts/made_with_love_panel' %>

<%= render 'layouts/default_side_bar' %>

        Analytics

    <%
      visit_dict = ActiveSupport::OrderedHash.new

      visit_dict[:country] = nil
      visit_dict[:referring_domain] = "juliaobserver.com"
      visit_dict[:search_keyword] = nil
    %>

      <% visit_dict.each do |cur_key, cur_value| %>

        <%
          cur_visit = Visit.group(cur_key).count

          cur_visit.delete_if { |k, v| k.nil? }
          cur_visit.delete_if { |k, v| k.ends_with?(cur_value) } if cur_value.present?

          cur_visit = Hash[
            cur_visit.sort_by{|k, v| v}.reverse
          ]
        %>

        <%= line_chart cur_visit, title: cur_key.to_s.titleize, ytitle: "Count" %>

      <% end %>

      <%= line_chart Visit.group_by_day(:started_at).count, title: "Started At", ytitle: "Count" %>

    <%= render 'layouts/made_with_love_panel' %>

<%= render 'layouts/default_side_bar' %>

Improve plots used on visits page (i.e. sort them)


<% # text items %>
<% if item.text.present? %>
  <%= sanitize(item.text) %>

  <% # include submitter name and add link to response if appropriate %>
  <% if item.submitter_name.present? %>

      <%= t("report/report.submitted_by_at", user: item.submitter_name, datetime: item.created_at) %>,
      <a href="<%= responses_path(item.response_id) %>">
        <%= t("report/report.view_response", id: item.response_id) %>

  <% end %>

<% # tally items %>
<% elsif item.count.present? %>
  <%= number_with_precision(item.pct, precision: 1) %>%
  (<%= number_with_precision(item.count, precision: 0) %>)

<% # statistical items %>
<% elsif item.stat.present? %>
  <% if item.qtype_name == "datetime" || item.qtype_name == "time" %>
    <%= item.stat %>
  <% else %>
    <%= number_with_precision(item.stat, precision: 1) %>
  <% end %>
<% end %>

<% # text items %>
<% if item.text.present? %>
  <%= sanitize(item.text) %>

  <% # include submitter name and add link to response if appropriate %>
  <% if item.submitter_name.present? %>

      <%= t("report/report.submitted_by_at", user: item.submitter_name, datetime: item.created_at) %>,
      <a href="<%= response_path(item.response_id) %>">
        <%= t("report/report.view_response", id: item.response_id) %>

  <% end %>

<% # tally items %>
<% elsif item.count.present? %>
  <%= number_with_precision(item.pct, precision: 1) %>%
  (<%= number_with_precision(item.count, precision: 0) %>)

<% # statistical items %>
<% elsif item.stat.present? %>
  <% if item.qtype_name == "datetime" || item.qtype_name == "time" %>
    <%= item.stat %>
  <% else %>
    <%= number_with_precision(item.stat, precision: 1) %>
  <% end %>
<% end %>

Fix path to response view

10996: Fix path to response view


<tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">

    <% if f.object.persisted? && can?(:edit, f.object) %>
      <%= svg_icon name: "sort.svg", width: '18', height: '18' %>
      <%= f.hidden_field :id %>
    <% end %>

    <%= f.text_field :property_name, class: 'autocomplete form-control' %>

    <%= f.text_field :value, class: 'form-control' %>

    <%= f.check_box :show_property %>

    <% if f.object.persisted? && can?(:destroy, f.object) %>
      <%= link_to_delete f.object, no_text: true %>
    <% end %>

<tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">
  <% if f.object.persisted? && can?(:edit, f.object) %>

    <%= svg_icon name: "sort.svg", width: '18', height: '18' %>
    <%= f.hidden_field :id %>

  <% else %>

    <%= svg_icon name: "sort.svg", width: '18', height: '18' %>
    <%= f.hidden_field :id %>

  <% end %>

    <%= f.text_field :property_name, class: 'autocomplete form-control' %>

    <%= f.text_field :value, class: 'form-control' %>

    <%= f.check_box :show_property %>

    <% if f.object.persisted? && can?(:destroy, f.object) %>
      <%= link_to_delete f.object, no_text: true %>
    <% else %>

      <%= svg_icon name: "delete.svg", width: '18', height: '18' %>

    <% end %>

Make properties form nicer. Stop sortable on new unset fields.


    <%= render 'shared/user_info', user: current_user %>

    <%= render 'form' %>

    <%= render 'shared/links' %>

Add user info to new event view

feat: Add user info to new event view


<%= @list.name.capitalize %>

  <% @items.each do |item|  %>

<%= item.name %>

  <% end %>

    Item
    Store
    Date Purchased

  <% @list.items.each do |item|  %>

        <%= item.name %>

        <%= item.store.name %>

      <%= localize(item.updated_at, format: :long) %>

        <%= form_tag edit_list_item_path(@list, item), method: :get, class: "form-inline" do %>
          <%= submit_tag "RENAME", class: "btn btn-default btn-sm" %>
        <% end %>
        <%= form_tag list_item_path(@list, item), method: :delete do %>
          <%= submit_tag "DELETE", class: "btn btn-default btn-sm" %>
        <% end %>

  <% end %>

<%= link_to "Add New Item", new_list_item_path(@list) %>

<%= @list.name.capitalize %>

  <% @items.each do |item|  %>

<%= item.name %>

  <% end %>

    Item
    Store
    Date Purchased

  <% @list.items.each do |item|  %>

        <%= item.name %>

        <%= item.store.name %>

      <%= localize(item.updated_at, format: :long) %>

        <%= form_tag edit_list_item_path(@list, item), method: :get, class: "form-inline" do %>
          <%= submit_tag "EDIT", class: "btn btn-default btn-sm" %>
        <% end %>
        <%= form_tag list_item_path(@list, item), method: :delete do %>
          <%= submit_tag "DELETE", class: "btn btn-default btn-sm" %>
        <% end %>

  <% end %>

<%= link_to "Add New Item", new_list_item_path(@list) %>

Change Rename to Edit on list show page

Change Rename to Edit on list show page


    <%= link_to 'Return', root_path, :class => 'btn btn-default' %>

Who are you?

    <%= link_to 'New User', new_user_path %>

  <% @users.each do |user| %>

    <%= link_to pour_path(@pour, pour: {user_id: user.id}), method: 'put' do %>
      <%= image_tag user.gravatar_url(size: 100), alt: "#{user.name} Avatar", class: 'std-avatar' %>

<%= user.name %>

<%= last_pour(user) %>

    <% end %>

  <% end %>

    <%= link_to 'Return', :back, :class => 'btn btn-default' %>

Who are you?

    <%= link_to 'New User', new_user_path %>

  <% @users.each do |user| %>

    <%= link_to pour_path(@pour, pour: {user_id: user.id}), method: 'put' do %>
      <%= image_tag user.gravatar_url(size: 100), alt: "#{user.name} Avatar", class: 'std-avatar' %>

<%= user.name %>

<%= last_pour(user) %>

    <% end %>

  <% end %>

Make the return link work correctly

Make the return link work correctly

The are 2 places you might return to


description "Whitehall Admin Delayed job background worker"

<%- if govuk_platform != 'development' -%>
start on runlevel [2345]
<%- end -%>
stop on runlevel [!2345]

respawn

# If the app respawns more than 5 times in 20 seconds, it has deeper problems
# and should be killed off.
respawn limit 5 20

exec govuk_setenv whitehall-admin govuk_run_delayed_job_worker

description "Whitehall Admin Delayed job background worker"

<%- if govuk_platform != 'development' -%>
start on runlevel [2345]
<%- end -%>
stop on runlevel [!2345]

respawn

# If the app respawns more than 5 times in 20 seconds, it has deeper problems
# and should be killed off.
respawn limit 5 20

exec govuk_setenv whitehall govuk_run_delayed_job_worker

Fix outdated whitehall-admin reference in worker

This has since changed to just be `whitehall`. This job is currently
failing in production, probably for this reason.


<% if google_maps_qs.present? %>
  <script type='text/javascript' src="//maps.google.com/maps/api/js?<%= google_maps_qs %>&v=3.25"></script>
<% end %>

<% if google_maps_qs.present? %>
  <script type='text/javascript' src="//maps.google.com/maps/api/js?<%= google_maps_qs %>&v=3.26"></script>
<% end %>

Update to google maps 3.26

Update to google maps 3.26


  <%= link_to 'new source image', :controller => :src_images, :action => :new %>

  <% @src_images.each do |si| %>

          <%= render :partial => si %>

  <% end %>

  <% @gend_images.each do |gi| %>

          <%= render :partial => gi %>

  <% end %>

Add temporary new source image link.

Add temporary new source image link.


  <%= form_for(:user, url: signup_path) do |f| %>
   <%= f.label :username %>
   <%= f.text_field :username %>
   <%= f.label :password %>
   <%= f.password_field :password %>
   <%= f.label :password_confirmation %>
   <%= f.password_field :password_confirmation %>
   <%= f.label :first_name %>
   <%= f.text_field :first_name %>
   <%= f.label :last_name %>
   <%= f.text_field :last_name %>
   <%= f.label :email %>
   <%= f.text_field :email %>
   <%= f.label :pic_url%>
   <%= f.text_field :pic_url %>
   <%= f.label :url %>
   <%= f.text_field :url %>
   <%= f.label :bio %>
   <%= f.text_area :bio %>
   <%= f.submit "Sign Up" %>
  <% end %>

Create views for edit and show

Create views for edit and show


                <%= gravatar_for @user, size: 1000 %>

@<%= @user.username %>

            <%= render "articles/article", obj: @user.articles %>

                <%= gravatar_for @user, size: 1000 %>

@<%= @user.username %>

                <%= will_paginate @user_articles, renderer: MaterializeRenderer %>

            <%= render "articles/article", obj: @user_articles %>

                <%= will_paginate @user_articles, renderer: MaterializeRenderer %>

Add paginate to articles in the user show view


<% content_for(:title) { "#{I18n.t('.teams_page.title')} #{I18n.t(".teams.#{team.iso_code}")}" } %>

            <select id="teams-filter" class="form-control">
              <% teams.each do |v_team|%>
                <option value="<%= v_team.iso_code %>" <%= v_team.iso_code == team.iso_code ? 'selected' : '' %>><%= I18n.t(".teams.#{v_team.iso_code}") %></option>
              <% end %>
            </select>

            <% matches.each do |match| %>
              <%= partial("shared/_match_row_small.html", match: Match[match.id]) %>
            <% end %>

<%= render("views/shared/_prediction_modal.html.erb", id: current_user.id, redirect: req.path[1..req.path.size]) %>

Remove table-striped for team matches.

Remove table-striped for team matches.


Students of MIPT

<% @students.each do |student| %>

<%= student.last_name %>, <%= student.first_name %>

  <% if student.teacher %>
    Current teacher: <%=  student.teacher.full_name %>
  <% end %>

<% end %>

Students of MIPT

<% @students.each do |student| %>

<%= link_to "#{student.last_name}, #{ student.first_name }", student_path(student) %>

  <% if student.teacher %>
    Current teacher: <%= link_to "#{student.teacher.full_name}", teacher_path(student.teacher) %>
  <% end %>

<% end %>

Add link functionality to students index


start on runlevel [2345]
stop on shutdown
respawn
post-stop script
   # To avoid stomping on runsv's owned by a different runsvdir
   # process, kill any runsv process that has been orphaned, and is
   # now owned by init (process 1).
   pkill -HUP -P 1 runsv$
end script
exec <%= @install_path %>/embedded/bin/runsvdir-start

start on runlevel [2345]
stop on shutdown
respawn
pre-stop script
   # To avoid Enterprise Chef service processes from being orphaned,
   # we need to ensure everything is stopped before we kill our
   # runsvdir process.
   /usr/bin/private-chef-ctl stop
end script
post-stop script
   # To avoid stomping on runsv's owned by a different runsvdir
   # process, kill any runsv process that has been orphaned, and is
   # now owned by init (process 1).
   pkill -HUP -P 1 runsv$
end script
exec <%= @install_path %>/embedded/bin/runsvdir-start

Stop all EC processes before stopping Upstart job


# Spotlight serves assets from the public directory
# of the currently deployed version of the app.
location /spotlight/ {
  expires 1d;
  rewrite ^/spotlight(.*)$ $1 break;
  root /opt/spotlight/current/public;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
  }

location /stagecraft/ {
  expires 1h;
  rewrite ^/stagecraft(.*)$ $1 break;
  root /opt/stagecraft/current/assets;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
}

Add /stagecraft location to nginx for assets


Need help? Live chat with our specialists

Make webchat load outside of iframe

Make webchat load outside of iframe


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>there's a board</title>
    <%= stylesheet_link_tag    'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>
    <%= csrf_meta_tags %>
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
    <link href="/assets/css/icomoon/styles.css" rel="stylesheet" type="text/css">

    <%= render partial: "shared/nav" %>
    <%= yield %>

Add edit-user-modal to main layout

Add edit-user-modal to main layout


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

<%= yield %>

</body>
</html>

<!DOCTYPE html>

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

<%= yield %>

Add all important fork me ribbon

Add all important fork me ribbon


<!DOCTYPE html>

  <link href='https://fonts.googleapis.com/css?family=Shadows+Into+Light' rel='stylesheet' type='text/css'>
  <title>MollyNick</title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>

   Nick and Molly
   Timeline
   Our Story
   Location
   Wedding Party
   Gifts
   RSVP

<%= yield %>

Update http to https for heroku

Update http to https for heroku


<%= question.title%>

<%= question.content%>

<%= link_to "comment", new_question_response_path(question) %>

Add link to comment on question

Add link to  comment on question


<tr id="post_<%=@post.id%>">
<%= link_to(highlight_all(@post.topic.title, @keys || []), topic_path(@post.forum, @post.topic))  %>
<%= highlight_all(excerpt(@post.body, @keys[0]), @keys || []) %>

<tr id="post_<%=@post.id%>">
<%= link_to(highlight_all(@post.topic.title, @keys || []), forum_topic_path(@post.forum, @post.topic))  %>
<%= highlight_all(excerpt(@post.body, @keys[0]), @keys || []) %>

Update route name in search view.

Update route name in search view.


<%= image_tag('note.png', :alt => I18n.t('notes.note'), :class => 'icon')%> <%= I18n.t('notes.note') %>

  <% form_for :note, :url => notes_path do |form| %>
    <%= hidden_field_tag :redirect_to, request.request_uri %>
    <%= form.hidden_field :group_id %>

      <%= I18n.t('notes.share_note_description') %>
      <%= form.text_area :body, :rows => 2, :cols => 80 %>
      <%= form.submit I18n.t('notes.share_note') %>
      <%= I18n.t('stream.create_blog_post', :url => new_note_path) %>

  <% end %>
  <% unless params[:controller] != 'streams' or @logged_in.share_activity? %>
    <%= render :partial => 'people/not_sharing_activity' %>
  <% end %>

<%= image_tag('note.png', :alt => I18n.t('notes.note'), :class => 'icon')%> <%= I18n.t('notes.note') %>

  <% form_for :note, :url => notes_path do |form| %>
    <%= hidden_field_tag :redirect_to, request.request_uri %>
    <%= form.hidden_field :group_id %>

      <%= I18n.t('notes.share_note_description') %>
      <%= form.text_area :body, :rows => 2, :cols => 80 %>
      <%= form.submit I18n.t('notes.share_note') %>
      <%= I18n.t('stream.create_blog_post', :url => @note && @note.group_id ? new_group_note_path(@note.group_id) : new_note_path) %>

  <% end %>
  <% unless params[:controller] != 'streams' or @logged_in.share_activity? %>
    <%= render :partial => 'people/not_sharing_activity' %>
  <% end %>

Fix new formatted note path for groups.

Fix new formatted note path for groups.


  <%= form_for @student_support_program, html: { multipart: true } do |f| %>
    <%= render 'student_support_programs/forms/fields/name_logo', f: f %>
    <%= render 'student_support_programs/forms/fields/video_link', f: f %>
    <%= render 'student_support_programs/forms/fields/images', f: f %>
    <%= render 'student_support_programs/forms/fields/mission_statement', f: f %>
    <%= render 'student_support_programs/forms/fields/vision_statement', f: f %>
    <%= render 'student_support_programs/forms/fields/program_description', f: f %>
    <%= render 'student_support_programs/forms/fields/target_population', f: f %>
    <%= render 'student_support_programs/forms/fields/institution_information', f: f%>

      <%= f.submit "Create Program" %>

  <% end %>

  <%= form_for @student_support_program, html: { multipart: true } do |f| %>
    <%= render 'student_support_programs/forms/fields/name_logo', f: f %>
    <%= render 'student_support_programs/forms/fields/video_link', f: f %>
    <%= render 'student_support_programs/forms/fields/images', f: f %>
    <%= render 'student_support_programs/forms/fields/mission_statement', f: f %>
    <%= render 'student_support_programs/forms/fields/vision_statement', f: f %>
    <%= render 'student_support_programs/forms/fields/program_description', f: f %>
    <%= render 'student_support_programs/forms/fields/target_population', f: f %>
    <%= render 'student_support_programs/forms/fields/institution_information', f: f%>

      <%= f.submit "Create Program", id: :create_student_support_program_button %>

  <% end %>

Add id to student_support_programs new submit button


<% content_for :context, attachable.title %>
<% content_for :page_title, "Reorder attachments" %>
<% content_for :title, "Reorder attachments" %>
<% content_for :title_margin_bottom, 6 %>
<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", {
    href: attachable_attachments_path(attachable)
  } %>
<% end %>

    <%= form_tag [:order, :admin, typecast_for_attachable_routing(attachable), Attachment], method: :put do %>
      <%= render "govuk_publishing_components/components/reorderable_list", {
        items: attachable.attachments.includes(:attachment_data).each
      } %>

      <%= render "govuk_publishing_components/components/button", {
        text: "Update order",
        margin_bottom: 8,
      } %>
    <% end %>

<% content_for :context, attachable.title %>
<% content_for :page_title, "Reorder attachments" %>
<% content_for :title, "Reorder attachments" %>
<% content_for :title_margin_bottom, 6 %>
<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", {
    href: attachable_attachments_path(attachable)
  } %>
<% end %>

    <%= form_tag [:order, :admin, typecast_for_attachable_routing(attachable), Attachment], method: :put do %>
      <%= render "govuk_publishing_components/components/reorderable_list", {
        items: attachable.attachments.includes(:attachment_data).map do |attachment|
          {
            id: attachment.id,
            title: attachment.title,
            description: attachment_attributes(attachment)
          }
        end
      } %>

      <%= render "govuk_publishing_components/components/button", {
        text: "Update order",
        margin_bottom: 8,
      } %>
    <% end %>

Add attachment attributes to reorder page

Display the attachment attributes so users can differentiate between files with the same name.


  County:

  <%= order.organization.county %>

  Organization:

  <%= link_to "#{order.organization.name}", edit_organization_path(order.organization, redirect_to: "order", redirect_id: order.id) %>

  Mailing Address:

  <%= order.organization.address %>

Remove org address from order view as it could be confused for ship to


# Config file for collectd(1).
#
# Some plugins need additional configuration and are disabled by default.
# Please read collectd.conf(5) for details.
#
# You should also read /usr/share/doc/collectd-core/README.Debian.plugins
# before enabling any more plugins.

Hostname "<%= @fqdn_metrics %>"
FQDNLookup false
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
#Interval 10
#Timeout 2
#ReadThreads 5

Include "/etc/collectd/types.conf"
Include "/etc/collectd/conf.d/*.conf"

# Config file for collectd(1).
#
# Some plugins need additional configuration and are disabled by default.
# Please read collectd.conf(5) for details.
#
# You should also read /usr/share/doc/collectd-core/README.Debian.plugins
# before enabling any more plugins.

<% if scope.lookupvar('::aws_migration') -%>
Hostname "<%= scope.lookupvar('::govuk_node_class') %>-<%= @fqdn %>"
<% else -%>
Hostname "<%= @fqdn_metrics %>"
<% end -%>
FQDNLookup false
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
#Interval 10
#Timeout 2
#ReadThreads 5

Include "/etc/collectd/types.conf"
Include "/etc/collectd/conf.d/*.conf"

Change the collectd naming scheme when on AWS

  We need to change the way we name machines on collectd when
on AWS since the machines have different hostnames now.


<tr data-target="toggle<%= @row['idx'] %>" data-jsonFile="files/json/<%= @config[:filename] %>_<%= @row['idx'] %>.json">
  <%= @row['idx'] %>
  <td data-score="<%= @row['overall_score'] %>">

<div class="full-stars" style="width:<%= @row['overall_score'] * 0.85 %>%;">

  <%= @row['definition'] %>
  <%= @row['no_hits'] %>
<% @row['validations'].each do |_short_header, item| %>
  <td title="<%=item['header']%>" class="<%=item['status']%>"><%= item['print']%>
<% end %>
<% if @row['validations'].select{|_short_header, item| item['graphs'] != nil}.map{|_short_header, item| item['graphs'].length}.inject(0){|r, e| r+e } != 0 %>
  <button title="Show plots" class="plot_btn btn btn-default"></button>
<% else %>

<% end %>

<tr data-target="toggle<%= @row['idx'] %>" data-jsonFile="files/json/<%= @config[:filename] %>_<%= @row['idx'] %>.json">
  <%= @row['idx'] %>
  <td data-score="<%= @row['overall_score'] %>">

<div class="full-stars" style="width:<%= @row['overall_score'] * 0.85 %>%;">

  <%= @row['definition'] %>
  <%= @row['no_hits'] %>
<% @row['validations'].each do |_short_header, item| %>
  <td title="<%=item['header']%>" class="<%=item['status']%>"><%= item['print'].gsub(' ', ' ').gsub('; ', '; ')
 %>
<% end %>
<% if @row['validations'].select{|_short_header, item| item['graphs'] != nil}.map{|_short_header, item| item['graphs'].length}.inject(0){|r, e| r+e } != 0 %>
  <button title="Show plots" class="plot_btn btn btn-default"></button>
<% else %>

<% end %>

Add   to the HTML output derived from JSON


ALL THE TWEETS

<% @tweet.each do |tweet|%>

<%= p tweet.body %>

<% end %>

Add body of all tweets from all users.

Add body of all tweets from all users.


---
- job:
    name: record_superfluous_taggings_metrics
    display-name: Record the number of superfluous taggings in the Topic Taxonomy
    project-type: freestyle
    description: |
      This job runs a rake task in Content Tagger to send the number of superfluous taggings
      in the Topic Taxonomy to statsd. These are content items that are tagged to a particular
      taxon and to an ancestor taxon.
    logrotate:
      daysToKeep: 30
    triggers:
      - timed: |
          TZ=Europe/London
          H 3 * * *
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          #!/bin/bash
          set -eu

          cd "${WORKSPACE}"

          CONTENT_TAGGER=$(govuk_node_list --single-node -c backend)

          ssh deploy@$CONTENT_TAGGER "cd /var/apps/content-tagger && govuk_setenv content-tagger bundle exec rake metrics:taxonomy:record_number_of_superfluous_taggings_metrics"

---
- job:
    name: record_superfluous_taggings_metrics
    display-name: Record the number of superfluous taggings in the Topic Taxonomy
    project-type: freestyle
    description: |
      This job runs a rake task in Content Tagger to send the number of superfluous taggings
      in the Topic Taxonomy to statsd. These are content items that are tagged to a particular
      taxon and to an ancestor taxon.
    logrotate:
      daysToKeep: 30
    triggers:
      - timed: |
          TZ=Europe/London
          H 3 * * *
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - trigger-builds:
          - project: run-rake-task
            block: true
            predefined-parameters: |
              TARGET_APPLICATION=content-tagger
              MACHINE_CLASS=backend
              RAKE_TASK=metrics:taxonomy:record_number_of_superfluous_taggings_metrics

Use run-rake-task in record_superfluous_taggings_metrics job


Items with tag "<%= tag.title %>"

      <% tag.tagged_documents.each do |list_item| %>
        <tr class='item'
            data-title='<%= list_item.title %>'
            data-base-path='<%= list_item.base_path %>'>

            <%= raw list_item.title %>

            <%= raw list_item.base_path %>

            <%= button_to '#',
              method: :delete,
              data: { toggle: 'tooltip' },
              title: 'Remove item from list',
              class: 'remove-button btn btn-xs btn-default' do %>
              <%= icon :remove %>
            <% end %>

      <% end %>

Items with tag "<%= tag.title %>"

      <% tag.tagged_documents.each do |item| %>
        <tr class='item'
            data-title='<%= item.title %>'
            data-base-path='<%= item.base_path %>'>

            <%= raw item.title %>

            <%= raw item.base_path %>

            <%= button_to '#',
              method: :delete,
              data: { toggle: 'tooltip' },
              title: 'Remove item from list',
              class: 'remove-button btn btn-xs btn-default' do %>
              <%= icon :remove %>
            <% end %>

      <% end %>

Rename list_item variable to item

Rename list_item variable to item

Rename for clarity - list_item is an actual domain type, so avoid it
as a name unless actually using that type.


<% if person.currently_in_a_role? %>
  <section id="current-roles" <%= direction_rtl_class(prefix: true) %> <%= dir_attribute %> <%= lang_attribute %>>
    <% person.current_roles.each do |role| %>

        <%= render "govuk_publishing_components/components/heading", {
          text: role["title"],
          margin_bottom: 2,
        } %>

        <%= render "govuk_publishing_components/components/govspeak", {
        } do %>
          <%= role["details"]["body"].html_safe %>
        <% end  %>

        <% if role["document_type"] == "ministerial_role" %>

            <a href="<%= role["base_path"] %>" <%= t_lang("roles.read_more") %> class="govuk-link">
              <%= t("roles.read_more") %>

        <% end %>

          <%= role["links"].fetch("ordered_parent_organisations", [])
            .map { |parent| link_to(parent["title"], parent["base_path"], class: "govuk-link") }
            .to_sentence
            .html_safe %>

    <% end %>

<% end %>

Switch section to div on people roles

Switch section to div on people roles


<%if @user.avatar%>
    <%= image_tag @user.avatar %>
  <% end %>

  State:
  <%= @user.state %>

  Average Rating:
  <% if @ratings.average(:rating) == nil %>
    <%= "This user has not yet been rated." %>
  <% else %>
    <%= @ratings.average(:rating).round(2) %>
  <% end %>

<%= link_to "Detailed reviews", "/users/#{@user.id}/feedback" %>

Past events

<% @user.events.each do |event| %>
  <% if event.time_start.past? %>
    <%= link_to "#{event.name}", event_path(event.id) %>

  <% end %>
<% end %>

<%if @user.avatar%>
    <%= image_tag @user.avatar %>
  <% end %>

  Average Rating:
  <% if @ratings.average(:rating) == nil %>
    <%= "This user has not yet been rated." %>
  <% else %>
    <%= @ratings.average(:rating).round(2) %>
  <% end %>

<%= link_to "Detailed reviews", "/users/#{@user.id}/feedback" %>

Past events

<% @user.events.each do |event| %>
  <% if event.time_start.past? %>
    <%= link_to "#{event.name}", event_path(event.id) %>

  <% end %>
<% end %>

Remove state from public profile

Remove state from public profile


uwsgi:
  enable-threads: 1
  threads: 1
  workers: <%= (@physicalprocessorcount) %>
  master: 1
  socket: :8001
  plugin: python
  chown-socket: nginx:nginx
  pythonpath: <%= @venv %>/lib/python2.6/site-packages/nailgun
  touch-reload: /var/lib/nailgun-uwsgi
  virtualenv: <%= @venv %>
  module: nailgun.wsgi
  buffer-size: 49180
  listen: <%= @somaxconn %>
  pidfile: /tmp/nailgun.pid
  logto: /var/log/nailgun/app.log
  mule: 1
  lazy: true
  shared-pyimport: <%= @venv %>/lib/python2.6/site-packages/nailgun/utils/mule.py

Add mule to uwsgi config

Add mule to uwsgi config

We will be using uwsgi mule config to move some nailgun tasks to
background and we need to change the config for uwsgi to spawn needed
workers

Change-Id: I92e0ae73e455582d8895bec6caec422c3ed6f92f
blueprint: 200-nodes-support


# Generated via
#  `rails generate hyrax:work <%= class_name %>`
require 'rails_helper'
include Warden::Test::Helpers

# NOTE: If you generated more than one work, you have to set "js: true"
RSpec.feature 'Create a <%= class_name %>', js: false do
  context 'a logged in user' do
    let(:user_attributes) do
      { <%= Hydra.config.user_key_field %>: 'test@example.com' }
    end
    let(:user) do
      User.new(user_attributes) { |u| u.save(validate: false) }
    end

    before do
      AdminSet.find_or_create_default_admin_set_id
      login_as user
    end

    scenario do
      visit '/dashboard'
      click_link "Works"
      click_link "Add new work"

      # If you generate more than one work uncomment these lines
      # choose "payload_concern", option: "<%= class_name %>"
      # click_button "Create work"

      expect(page).to have_content "Add New <%= human_name %>"
    end
  end
end

# Generated via
#  `rails generate hyrax:work <%= class_name %>`
require 'rails_helper'
include Warden::Test::Helpers

# NOTE: If you generated more than one work, you have to set "js: true"
RSpec.feature 'Create a <%= class_name %>', js: false do
  context 'a logged in user' do
    let(:user_attributes) do
      { <%= Hydra.config.user_key_field %>: 'test@example.com' }
    end
    let(:user) do
      User.new(user_attributes) { |u| u.save(validate: false) }
    end
    let(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
    let(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(admin_set_id: admin_set_id) }

    before do
      # Grant the user access to deposit into the admin set.
      Hyrax::PermissionTemplateAccess.create!(
        permission_template_id: permission_template.id,
        agent_type: 'user',
        agent_id: user.user_key,
        access: 'deposit'
      )
      login_as user
    end

    scenario do
      visit '/dashboard'
      click_link "Works"
      click_link "Add new work"

      # If you generate more than one work uncomment these lines
      # choose "payload_concern", option: "<%= class_name %>"
      # click_button "Create work"

      expect(page).to have_content "Add New <%= human_name %>"
    end
  end
end

Create PermissionTemplateAccess in the generated feature spec

Previously this generated test would fail, because the user didn't have
access to deposit into the admin set that was created.


class AddClearanceToUsers < ActiveRecord::Migration<%= migration_version %>
  def self.up
    change_table :users do |t|
<% config[:new_columns].values.each do |column| -%>
      <%= column %>
<% end -%>
    end

<% config[:new_indexes].values.each do |index| -%>
    <%= index %>
<% end -%>

    users = select_all("SELECT id FROM users WHERE remember_token IS NULL")

    users.each do |user|
      update <<-SQL
        UPDATE users
        SET remember_token = '#{Clearance::Token.new}'
        WHERE id = '#{user['id']}'
      SQL
    end
  end

  def self.down
    change_table :users do |t|
<% if config[:new_columns].any? -%>
      t.remove <%= new_columns.keys.map { |column| ":#{column}" }.join(", ") %>
<% end -%>
    end
  end
end

class AddClearanceToUsers < ActiveRecord::Migration<%= migration_version %>
  def self.up
    change_table :users do |t|
<% config[:new_columns].values.each do |column| -%>
      <%= column %>
<% end -%>
    end

<% config[:new_indexes].values.each do |index| -%>
    <%= index %>
<% end -%>

    users = select_all("SELECT id FROM users WHERE remember_token IS NULL")

    users.each do |user|
      update <<-SQL.squish
        UPDATE users
        SET remember_token = '#{Clearance::Token.new}'
        WHERE id = '#{user['id']}'
      SQL
    end
  end

  def self.down
    change_table :users do |t|
<% if config[:new_columns].any? -%>
      t.remove <%= new_columns.keys.map { |column| ":#{column}" }.join(", ") %>
<% end -%>
    end
  end
end

Clean up sql output in generated migration

Adding the `squish` here has the effect of slightly cleaning up the eventual SQL
generated by the migration we are helping create here. Before this change the
migration would be full of newlines (or `\n`). Post-change, each sql statement
should come out cleaner in the logs with the line breaks and tabs/spaces
replaced by just one space each.

The SQL that is run stays the same, it just looks slightly nicer in the log
output.


<%= form_for([@game, @game.guesses.build]) do |f| %>
  <%# with service model, this will be @errors, assigned in controller %>
  <% if @errors and @errors.any? %>

<%= t("%{errors} prohibited this %{thing} from being saved", errors: t(:error, count: @errors.count), thing: Guess.model_name.human.downcase) %>:

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

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :guess %>
    <%= f.text_field :guess %>

    <%= f.submit %>

<% end %>

<%= form_for([@game, @game.guesses.build]) do |f| %>
  <%# with service model, this will be @errors, assigned in controller %>
  <% if @errors and @errors.any? %>

<%= t("%{errors} prohibited this %{thing} from being saved", errors: t(:error, count: @errors.count), thing: Guess.model_name.human.downcase) %>:

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

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :guess %>
    <%= f.text_field :guess, maxlength: 1 %>

    <%= f.submit %>

<% end %>

Add max length for guess

Add max length for guess


<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title>
  <%= page_title %>
</title>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= javascript_pack_tag 'browser-warning', defer: true %>
<%= javascript_pack_tag 'application', defer: true, type: 'module' %>
<script type="application/javascript">
  if (typeof(Rollbar) !== 'undefined') {
    Rollbar.configure({
      payload: {
        person: {
          id: #{current_user&.id.to_json.html_safe},
          email: #{current_user&.email.to_json.html_safe}
        }
      }
    });
  }
</script>
<%= csrf_meta_tags %>
<meta content="width=device-width, initial-scale=1" name="viewport"/>

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title>
  <%= page_title %>
</title>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= javascript_pack_tag 'browser-warning', defer: true %>
<%= javascript_pack_tag 'application', defer: true, type: 'module' %>
<script type="application/javascript">
  if (typeof(Rollbar) !== 'undefined') {
    Rollbar.configure({
      payload: {
        person: {
          id: <%= current_user&.id.to_json.html_safe %>,
          email: <%= current_user&.email.to_json.html_safe %>
        }
      }
    });
  }
</script>
<%= csrf_meta_tags %>
<meta content="width=device-width, initial-scale=1" name="viewport"/>

Fix up some stray HAML syntax

Fix up some stray HAML syntax


Listing schools

    <% @schools.each do |school| %>

        <%= school.name%>
        <%= link_to 'Show', school %>
        <%= link_to 'Edit', edit_school_path(school) %>
        <%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= link_to 'New School', new_school_path %>

Listing schools in <%= @district.jurisdiction_name %>

    <% @schools.each do |school| %>

        <%= school.name%>
        <%= link_to 'Show', district_school_path(@district.id,school.id) %>

    <% end %>

Remove edit and destroy link next to each school's name


      <a href="<%= admin_users_url(:only_path => true) %>" class="list-group-item">

         Users

      <a href="<%= admin_assignments_url(:only_path => true) %>" class="list-group-item">

         Assignments

      Cras justo odio
      Cras justo odio

      <a href="<%= admin_users_url(:only_path => true) %>" class="list-group-item">

         Users

      <a href="<%= admin_assignments_url(:only_path => true) %>" class="list-group-item">

         Assignments

      <a href="<%= admin_problem_templates_url(:only_path => true) %>" class="list-group-item">

         Problem Templates

Add problem_template link to admin sidebar


<% @scripts.each do |script| %>

      <a href="https://github.com/github/hubot-scripts/blob/master/src/scripts/<%=h script['name'] %>">
        <%=h script['name'] %>

      <% if script['description'].empty? %>

No description available.

      <% else %>

<%= format_description script['description'] %>

      <% end %>

      <% if !script['commands'].empty? %>

<%=h script['commands'] %>

      <% end %>

<% end %>

  Last updated: <%= @last_updated %>

Hubot Script Catalog

  Last updated: <%= ((Time.now - @last_updated) / 60).round %> mins ago

<% @scripts.each do |script| %>

        <a href="https://github.com/github/hubot-scripts/blob/master/src/scripts/<%=h script['name'] %>" class="name">
          <%= h script['name'] %>

      <% if script['author'] %>
        by <%= h script['author'] %>
      <% end %>

      <% if script['description'] %>

<%= format_description script['description'] %>

      <% end %>

      <% if script['commands'] %>

Commands

<%= h script['commands'] %>

      <% end %>

      <% if script['configuration'] %>

Configuration

<%= h script['configuration'] %>

      <% end %>

<% end %>

Update views to reflect new header information


<% if content_for?(:proposition_header) %>
        <%= yield(:proposition_header) %>
      <% else %>

            <%= "#{config_item(:proposition_title)}" %>
            <a href="https://www.gov.uk/service-manual/phases/<%= "#{config_item(:phase).to_s.downcase}" %>.html" class="proposition-phase"><%= "#{config_item(:phase).to_s.capitalize}" %>
            <%= yield(:proposition_links) %>

      <% end %>

<% if content_for?(:proposition_header) %>
        <%= yield(:proposition_header) %>
      <% else %>

            <%= "#{config_item(:proposition_title)}" %>
            <%= yield(:proposition_links) %>

      <% end %>

Remove phase tag from proposition header To match latest GDS phase banner design pattern


  Latest Guides
  <%= link_to 'New Guide', new_guide_path, class: 'btn btn-primary pull-right' %>
  <%= link_to 'Show All Categories', guide_categories_path, class: 'btn btn-primary pull-right category-btn' %>

<% @guide_categories.select do |category| %>
  <% if category.guides.exists? %>

<%= category.name %>

  <% end %>

      <% category.guides.each do |post| %>

            <% if post.instance_of? Guide %>
              <%= image_tag 'Guide.png', alt: 'Guides', class: 'guide-xs pull-left show', width: 25 %>
            <% end %>
            <%= link_to post.title, post_path(post) %>

Submitted by <%= post.username %> on <%= post.created_at.strftime("%m/%d/%Y") %>

<%= render 'posts/tags', post: post %>

            <%= render 'votes/vote', post: post %>
            <span class="badge pull-right" title="<%= pluralize(post.number_of_comments, 'comment') %>"><%= post.number_of_comments %>

      <% end %>

<% end %>

  Latest Guides
  <%= link_to 'New Guide', new_guide_path, class: 'btn btn-primary pull-right' %>
  <%= link_to 'Show All Categories', guide_categories_path, class: 'btn btn-primary pull-right category-btn' %>

  <%if @guide_revisions.exists? %>
    <%= link_to 'My Revisions', guide_revisions_path, class: 'btn btn-primary pull-right' %>
  <% end %>

<% @guide_categories.select do |category| %>
  <% if category.guides.exists? %>

<%= category.name %>

  <% end %>

      <% category.guides.each do |post| %>

            <% if post.instance_of? Guide %>
              <%= image_tag 'Guide.png', alt: 'Guides', class: 'guide-xs pull-left show', width: 25 %>
            <% end %>
            <%= link_to post.title, post_path(post) %>

Submitted by <%= post.username %> on <%= post.created_at.strftime("%m/%d/%Y") %>

<%= render 'posts/tags', post: post %>

            <%= render 'votes/vote', post: post %>
            <span class="badge pull-right" title="<%= pluralize(post.number_of_comments, 'comment') %>"><%= post.number_of_comments %>

      <% end %>

<% end %>

Add option for the user to see all his revisions


<% form_for(@ad) do |f| %>
  <%= f.error_messages %>

    <%= f.label :image_url %>
    <%= f.text_field :image_url %>

    <%= f.label :referral_url %>
    <%= f.text_field :referral_url %>

    <%= f.label :ad_type %>
    <%= f.select :ad_type, ['horizontal', 'vertical'] %>

    <%= f.label :status %>
    <%= f.text_field :status %>

    <%= f.submit %>

<% end %>

<% form_for(@ad) do |f| %>
  <%= f.error_messages %>

    <%= f.label :image_url %>
    <%= f.text_field :image_url %>

    <%= f.label :width %>
    <%= f.text_field :width %>

    <%= f.label :height %>
    <%= f.text_field :height %>

    <%= f.label :referral_url %>
    <%= f.text_field :referral_url %>

    <%= f.label :ad_type %>
    <%= f.select :ad_type, ['horizontal', 'vertical'] %>

    <%= f.label :status %>
    <%= f.text_field :status %>

    <%= f.submit %>

<% end %>

Allow manual modification of ad's width and height for now.


  <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
    <%= list.tag :li do %>
      <%= link_to child.display_title, scrivito_path(child) %>
    <% end %>
  <% end %>

　<%= content_tag(:div,  scrivito_value(@obj.created.strftime("%Y年%m月%d日")), :class => "text-muted h4") %>

  <%= scrivito_tag :h1, @obj, :title %>
  <%= scrivito_tag(:div, @obj, :abstract) %>
  <%= scrivito_image_tag(@obj, :image ,:class => "img-responsive")%>
  <%= scrivito_tag :div, @obj, :body %>

  <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
    <%= list.tag :li do %>
      <%= link_to child.display_title, scrivito_path(child) %>
    <% end %>
  <% end %>

　<%= content_tag(:div,  scrivito_value(@obj.created.strftime("%Y年%m月%d日")), :class => "text-muted h4") %>

  <%= scrivito_tag :h1,  @obj, :title %>
  <%= scrivito_tag :div, @obj, :abstract %>
  <%= scrivito_image_tag @obj, :image ,:class => "img-responsive" %>
  <%= scrivito_tag :div, @obj, :body %>

Tweak indent in Blog Post Page for readability


<form class="filter_panel">
	Filter by:
  <div class="float_left"> <%= select_tag :filter, options_for_select([["Active","active"],[ "All", "all" ],["Reunited","reunited"],["Flagged","flagged"]], params[:filter]), { :onchange => "this.form.submit();"} %> </div>
</form>

<form class="filter_panel">
	Filter by:
  <span> <%= select_tag :filter, options_for_select([[ "All", "all" ],["Active","active"],["Reunited","reunited"],["Flagged","flagged"]], params[:filter]), { :onchange => "this.form.submit();"} %> </span>
</form>

Fix - Ashok - Changed the order of filter box and made some styling changes


<!DOCTYPE html>

  <meta charset="utf-8" />
  <title>Memdash</title>
  <link href="<%= u 'reset.css' %>" media="screen" rel="stylesheet" type="text/css">
  <link href="<%= u 'jquery.jqplot.min.css' %>" media="screen" rel="stylesheet" type="text/css">
  <link href="<%= u 'style.css' %>" media="screen" rel="stylesheet" type="text/css">

  <%= yield %>

Powered by Memdash.

Add a period after powered by memdash

Add a period after powered by memdash


<% param_prefix = "payment_source[#{payment_method.id}]" %>

  <%= label_tag nil, Spree.t(:date_of_birth_day) %>*

  <%= text_field_tag "#{param_prefix}[dob_day]", nil,
    class: "required",
    autocomplete: "off",
    size: 2,
    maxlength: 2
  %>

  <%= label_tag nil, Spree.t(:date_of_birth_month) %>*

  <%= text_field_tag "#{param_prefix}[dob_month]", nil,
    class: "required",
    autocomplete: "off",
    size: 2,
    maxlength: 2
  %>

  <%= label_tag nil, Spree.t(:date_of_birth_year) %>*

  <%= text_field_tag "#{param_prefix}[dob_year]", nil,
    class: "required",
    autocomplete: "off",
    size: 4,
    maxlength: 4
  %>

Create simple ratepay payment view

Create simple ratepay payment view


  <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
    <%= list.tag :li do %>
      <%= link_to child.display_title, scrivito_path(child) %>
    <% end %>
  <% end %>

  <%= scrivito_tag :h1,  @obj, :title %>
  <%= scrivito_tag :div, @obj, :abstract %>
  <%= scrivito_image_tag @obj, :image, class: "img-responsive" %>
  <%= scrivito_tag :div, @obj, :body %>

  <%= content_tag  :div, scrivito_value(@obj.created.strftime("作成日:%Y年%m月%d日")),
                   class: "text-muted text-right h5" %>

<%= render 'shared/sitemap_sotechsha' if @sts_posts %>
<%= render 'shared/footer' %>

Add missing closing div tag to blog post


<% table :caption => link_to('Results', :only_path  => false, :host => RAILS_HOST, :controller => 'results'),
         :class => "no_top_margin",
         :insert_header => true,
         :id => "home_page_results" do %>

  <%- for standings in @recent_results -%>

    <%= link_to standings.full_name, :only_path  => false, :host => RAILS_HOST, :controller => 'results', :action => 'event', :id => standings.event_id %>

  <%- end -%>
  <%- if @recent_results.empty? -%>

    No results in the last two weeks

  <%- end -%>

    <%= link_to 'More …',
  :only_path  => false, :host => RAILS_HOST, :controller => 'results' %>

<% end -%>

Fix double-caption in recent results on homepage


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 your original passports. If either of you have been divorced, widowed or in a civil partnership before, you’ll also need either:

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

Remove same-sex option for Peru - UK, British 1


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title><%= content_for?(:page_title) ? yield(:page_title) : default_page_title %></title>
    <meta name="viewport" content="width=device-width">
    <%= csrf_meta_tag %>

    <%= stylesheet_link_tag 'application' %>
    <%= javascript_include_tag 'application' %>
    <%= render partial: 'shared/ga', formats: [:html] %>

    <%= content_for?(:body) ? yield(:body) : yield %>

    <% unless Rails.env.production? %>

    <% end %>

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title><%= content_for?(:page_title) ? yield(:page_title) : default_page_title %></title>
    <meta name="viewport" content="width=device-width">
    <%= csrf_meta_tag %>
    <%= stylesheet_link_tag 'application' %>
    <%= javascript_include_tag 'application' %>
    <%= render partial: 'shared/ga', formats: [:html] %>
  </head>
  <body>

    <%= content_for?(:body) ? yield(:body) : yield %>

    <%= render 'shared/ajax_modal' %>
  </body>
</html>

Fix "more" facets modal window

Fix "more" facets modal window


<%= form_tag upload_path, multipart: true, class: 'form-inline upload-form js-upload-form' do %>
  <%= hidden_field_tag :authenticity_token, form_authenticity_token %>

    <%= label_tag :file, 'Insert an image' %>
    <%= file_field_tag :file %>
    Max file size <%= SiteSetting['MaxUploadSize'] %>.

<% end %>

<%= form_tag upload_path, multipart: true, class: 'form-inline upload-form js-upload-form' do %>
  <%= hidden_field_tag :authenticity_token, form_authenticity_token %>

    <%= label_tag :file, 'Insert an image', class: "form-element" %>

You can upload files, which are smaller than <%= SiteSetting['MaxUploadSize'] %>.

    <%= file_field_tag :file, class: "form-element" %>

<% end %>

Use CD for image uploader

Use CD for image uploader


<%= response.content %>

Commented by: <%= response.responder_name %>

<%= render "votes/vote_count", :object => response%>
<% if logged_in? %>
  <% if response.vote_on_this?(current_user.id)  %>
    <%= render "votes/vote_form", :object => response, :vote => @vote %>
  <% end %>
<% end %>

<%= response.content %> | <%= link_to response.responder_name, user_path(response.responder_id) %>

Add tags for styling and removed the ability to vote on a response


<%= image_tag('note.png', :alt => 'Note', :class => 'icon') %> Note

  <% form_for(@note || :note, :url => @note ? note_path(@note) : notes_path, :method => @note ? 'post' : 'put') do |form| %>
    <%= hidden_field_tag :redirect_to, request.request_uri %>
    <%= form.hidden_field :group_id %>

      What are you doing? · What's on your mind?
      <%= form.text_area :body, :rows => 2, :cols => 80 %>
      <%= form.submit 'Share Note' %>
      Or, create a <%= link_to 'blog post', new_note_path %> with a title and formatting...

  <% end %>
  <% unless params[:controller] != 'streams' or @logged_in.share_activity? %>
    <%= render :partial => 'people/not_sharing_activity' %>
  <% end %>

<%= image_tag('note.png', :alt => 'Note', :class => 'icon') %> Note

  <% form_for :note, :url => notes_path do |form| %>
    <%= hidden_field_tag :redirect_to, request.request_uri %>
    <%= form.hidden_field :group_id %>

      What are you doing? · What's on your mind?
      <%= form.text_area :body, :rows => 2, :cols => 80 %>
      <%= form.submit 'Share Note' %>
      Or, create a <%= link_to 'blog post', new_note_path %> with a title and formatting...

  <% end %>
  <% unless params[:controller] != 'streams' or @logged_in.share_activity? %>
    <%= render :partial => 'people/not_sharing_activity' %>
  <% end %>

Fix note sharing for groups.

Fix note sharing for groups.


<%= simple_form_for @page do |f| %>

                <div class="scanned-image" style="background-image: url('<%= @page.scanned_image.url %>')">

              <%= f.input :content, class: 'form-control input-lg', wrapper: false, label: false %>

        <%= f.button :submit, "Envoyer cette page", class: 'btn-info'  %>

<% end %>

<%= simple_form_for @page do |f| %>

                <div class="scanned-image" style="background-image: url('<%= @page.scanned_image.url %>')">

              <%= f.input :content, input_html: { class: 'input-lg' }, wrapper: false, label: false %>

        <%= f.button :submit, "Envoyer cette page", class: 'btn-info'  %>

<% end %>

Fix editor textarea font size

Fix editor textarea font size


<%= @user.name %>

<% if @user.avatar.url.present? %>
<%= image_tag(@user.avatar.normal.url, :class => "avatar-normal") %>
<% end %>

<% if @user.about %>

About This User: <%= @user.about%>

<% end %>

Total hours spent: <%= @user.hours_spent %>

Total words written: <%= @user.words_written %>

Projects

  <%= render @user.projects %>

View all updates for this user

<%= @user.name %>

<% if @user.avatar.url.present? %>
<%= image_tag(@user.avatar.normal.url, :class => "avatar-normal") %>
<% end %>

<% if @user.about %>

About This User: <%= @user.about%>

<% end %>

Total hours spent: <%= @user.hours_spent %>

Total words written: <%= @user.words_written %>

Projects

  <%= render @user.projects %>

 <a href="/users/<%=@user.id%>/updates">View all updates from this user

Add view updates from this user link

Add view updates from this user link


<% content_for :title do %>
  Based on the answers you’ve given, you’re not affected by the benefit cap.
<% end %>

<% content_for :body do %>
  These benefits are exempt from the benefit cap:

  <% exempt_benefits.each do |exempt_benefit| %>
     - <%= exempt_benefit %>
  <% end %>

  You may be affected by the cap if your circumstances change.

  Contact the Department for Work and Pensions if you need further help:

  <%= render partial: 'dwp_contact_details.govspeak.erb' %>
<% end %>

<% content_for :title do %>
  Based on the answers you’ve given, you’re not affected by the benefit cap.
<% end %>

<% content_for :body do %>
  These benefits are exempt from the benefit cap:

- Working Tax Credit
  <% exempt_benefits.each do |exempt_benefit| %>
     - <%= exempt_benefit %>
  <% end %>

  You may be affected by the cap if your circumstances change.

  Contact the Department for Work and Pensions if you need further help:

  <%= render partial: 'dwp_contact_details.govspeak.erb' %>
<% end %>

Add Working Tax Credits to the list of exempt benefits on the outcome

If you claim Working Tax Credits you are exempt from the benefit cap.
However, as Working Tax Credits is asked as a separate question, it does not
appear on the exempt benefits question page but it does need to appear in
list of exempt benefits on the outcome.


        <%= link_to 'Categories', categories_path %>

        <% Category.all.each_with_index do |category, index| %>

          <% unless index.zero? %>

          <% end %>

              <%= link_to category.name, category_path(category), class: "btn btn-default cs-full-width cs-left-align cs-no-margin" %>

        <% end %>

        <%= fa_icon "github lg" %>
          fork us on github

        <%= link_to 'Categories', categories_path %>

        <%
          query_params = {}
          query_params[:sort] = params[:sort] \
            if params[:sort].present?
        %>

        <% Category.all.each_with_index do |category, index| %>

          <% unless index.zero? %>

          <% end %>

              <%=
                link_to category.name,
                  category_path(category, query_params),
                  class: "btn btn-default cs-full-width cs-left-align cs-no-margin #{ 'active' if current_page?(category_path(category)) }"
              %>

        <% end %>

        <%= fa_icon "github lg" %>
          fork us on github

Add sorting and active links to category sidebar


<%= form_for request do |f| %>

      <%= f.text_field :content, class: 'request-field', placeholder: 'How can a neighbor help you today?' %>

  <%= f.submit 'Ping your neighbors!', class: 'button round ping' %>

<% end %>

<%= form_for request do |f| %>

      <%= f.text_field :content, class: 'request-field', placeholder: 'How can a neighbor help you today?' %>

  <%= f.submit 'Ping your neighbors!', class: 'large button round ping' %>

<% end %>

Change button to be large

Change button to be large


<div id="in_tail_format" class="form-group"
  formatOptionsJson="<%= formats.to_json %>"
  initialSelected="<%= initialSelected %>"
  targetFile="<%= file %>"
  paramsJson="<%= params.to_json %>"
  >

{{{ highlightedLines }}}

    <%= raw t('fluentd.settings.in_tail_option_guide') %>

<div id="in_tail_format"
  formatOptionsJson="<%= formats.to_json %>"
  initialSelected="<%= initialSelected %>"
  targetFile="<%= file %>"
  paramsJson="<%= params.to_json %>"
  >

{{{ highlightedLines }}}

    <%= raw t('fluentd.settings.in_tail_option_guide') %>

Add "form-group" class to input/select tag instead of whole div


<script>
  Spree.routes = <%== {
    :variants_search       => admin_search_variants_path(:format => 'json'),
    :taxon_search          => spree.api_taxons_path(:format => 'json'),
    :user_search           => spree.admin_search_users_path(:format => 'json'),
    :product_search        => spree.api_products_path(:format => 'json'),
    :option_type_search    => spree.api_option_types_path(:format => 'json'),
    :states_search         => spree.api_states_path(:format => 'json')
  }.to_json %>;
</script>

<script>
  Spree.routes = <%== {
    :variants_search       => admin_search_variants_path(:format => 'json'),
    :taxons_search         => spree.api_taxons_path(:format => 'json'),
    :user_search           => spree.admin_search_users_path(:format => 'json'),
    :product_search        => spree.api_products_path(:format => 'json'),
    :option_type_search    => spree.api_option_types_path(:format => 'json'),
    :states_search         => spree.api_states_path(:format => 'json')
  }.to_json %>;
</script>

Fix Spree taxons route reference

Fix Spree taxons route reference


version: '3'

services:
  db:
    image: postgres
    environment:
      POSTGRES_DB: concourse
      POSTGRES_USER: dev
      POSTGRES_PASSWORD: dev
    volumes:
     - /data/concourse/postgres-data:/var/lib/postgresql/data

  web:
    image: concourse/concourse:4.2.2
    command: quickstart
    privileged: true
    depends_on: [db]
    ports: ["8080:8080"]
    environment:
      CONCOURSE_POSTGRES_HOST: db
      CONCOURSE_POSTGRES_USER: dev
      CONCOURSE_POSTGRES_PASSWORD: dev
      CONCOURSE_POSTGRES_DATABASE: concourse
      CONCOURSE_EXTERNAL_URL: https://ci.go2tech.de
      CONCOURSE_GITHUB_CLIENT_ID: <%= scope().call_function('hiera', ['concourse::github::client_id']) %>
      CONCOURSE_GITHUB_CLIENT_SECRET: <%= scope().call_function('hiera', ['concourse::github::client_secret']) %>
      CONCOURSE_MAIN_TEAM_GITHUB_ORG: droidwiki
      CONCOURSE_GARDEN_DNS_SERVER: 8.8.8.8
      CONCOURSE_EPHEMERAL: "true"
    dns:
      - 8.8.8.8
      - 8.8.4.4

version: '3'

services:
  db:
    image: postgres
    environment:
      POSTGRES_DB: concourse
      POSTGRES_USER: dev
      POSTGRES_PASSWORD: dev
    volumes:
     - /data/concourse/postgres-data:/var/lib/postgresql/data

  web:
    image: concourse/concourse:4.2.2
    command: web
    links: [db]
    depends_on: [db]
    ports: ["8080:8080"]
    volumes: ["./keys/web:/concourse-keys"]
    environment:
      CONCOURSE_POSTGRES_HOST: db
      CONCOURSE_POSTGRES_USER: dev
      CONCOURSE_POSTGRES_PASSWORD: dev
      CONCOURSE_POSTGRES_DATABASE: concourse
      CONCOURSE_EXTERNAL_URL: https://ci.go2tech.de
      CONCOURSE_GITHUB_CLIENT_ID: <%= scope().call_function('hiera', ['concourse::github::client_id']) %>
      CONCOURSE_GITHUB_CLIENT_SECRET: <%= scope().call_function('hiera', ['concourse::github::client_secret']) %>
      CONCOURSE_MAIN_TEAM_GITHUB_ORG: droidwiki
    dns:
      - 8.8.8.8
      - 8.8.4.4

  worker:
    image: concourse/concourse:4.2.2
    command: worker
    privileged: true
    links: [web]
    depends_on: [web]
    volumes: ["./keys/worker:/concourse-keys"]
    environment:
      CONCOURSE_TSA_HOST: web:2222
      CONCOURSE_GARDEN_NETWORK: "true"
      CONCOURSE_EPHEMERAL: "true"
      CONCOURSE_GARDEN_DNS_SERVER: 8.8.8.8
    dns:
      - 8.8.8.8
      - 8.8.4.4

Add own worker so that it is not stalled anymore


Mean Time

Total Time

Most Frequent

Long Running

All Active

<a href="<%= PGPerformance.root_url %>">Mean Time

<a href="<%= PGPerformance.root_url %>total-time">Total Time

<a href="<%= PGPerformance.root_url %>most-frequent">Most Frequent

<a href="<%= PGPerformance.root_url %>long-running">Long Running

<a href="<%= PGPerformance.root_url %>all-active">All Active

Replace '/' with root_url to ensure correct path


Import a CSV and update Needs it refers to

  <%= form_for(Import.new, :multipart => true) do |f| %>

      <%= f.label :csv, 'CSV file' %>
      <%= f.file_field :csv %>

Update the following fields:

Note that the column names in the CSV must match the names below

      <% Import::IMPORT_OPTIONS.each do |import_option| %>

<%= f.label import_option %><%= f.check_box import_option %>

      <% end %>

<%= f.submit 'Upload', class: 'button' %>

  <% end %>

Import a CSV and update Needs it refers to

  <%= semantic_form_for(Import.new, :multipart => true) do |f| %>
    <%= f.label :csv, 'CSV file' %>
    <%= f.file_field :csv %>

Update the following fields:

Note that the column names in the CSV must match the names below

    <% Import::IMPORT_OPTIONS.each do |import_option| %>
        <%= f.label import_option, :input_html => { :class => "checkbox" } do %>
          <%= f.check_box import_option %> <%= import_option %>
        <% end %>
    <% end %>

    <%= f.actions do %>
      <%= f.submit "Upload", :class => "btn btn-primary" %>
    <% end %>
  <% end %>

Tidy up the import csv form

Tidy up the import csv form


<%= video_tag("/videos/clouds.mp4", controls: false, autoplay: true, :loop => true, :class => "bgvid") %>

<%= image_tag("plane_side.png", :id => "plane") %>

<%= video_tag("/videos/bgclouds.mp4", controls: false, autoplay: true, :loop => true, :class => "bgvid") %>

<%= image_tag("plane_side.png", :id => "plane") %>

Change path in video tag

Change path in video tag


<% if !value.nil? %>
    <% if value.size == 1 %>

<%= format_attr key %>:

        <% if attr == "birthday" || attr == "memberSince" %>

<%= format_date value[0] %>

        <% elsif attr == "mail" %>

<a href="mailto:<%= value[0] %>"><%= value[0] %>

        <% elsif attr == "mobile" %>

<a href="tel:<%= value[0].tr("() -", "") %>"><%= value[0] %>

	<% elsif attr == "github" %>

<a href="https://github.com/:<%= value[0].tr("() -", "") %>"><%= value[0] %>

        <% else %>

<%= value[0] %>

        <% end %>
    <% else %>

<%= format_attr key %>:

            <% value.each do |elem| %>
            <% if attr == "mail" %>

<a href="mailto:<%= elem %>"><%= elem %>

            <% elsif attr == "mobile" %>

                    <a href="tel:<%= value[0].tr("() -", "") %>"><%= value[0] %>

            <% else %>

<%= elem %>

            <% end %>
        <% end %>

    <% end %>
<% end %>

<% if !value.nil? %>
    <% if value.size == 1 %>

<%= format_attr key %>:

        <% if attr == "birthday" || attr == "memberSince" %>

<%= format_date value[0] %>

        <% elsif attr == "mail" %>

<a href="mailto:<%= value[0] %>"><%= value[0] %>

        <% elsif attr == "mobile" %>

<a href="tel:<%= value[0].tr("() -", "") %>"><%= value[0] %>

	<% elsif attr == "github" %>

<a href="https://github.com/<%= value[0].tr("() -", "") %>"><%= value[0] %>

        <% else %>

<%= value[0] %>

        <% end %>
    <% else %>

<%= format_attr key %>:

            <% value.each do |elem| %>
            <% if attr == "mail" %>

<a href="mailto:<%= elem %>"><%= elem %>

            <% elsif attr == "mobile" %>

                    <a href="tel:<%= value[0].tr("() -", "") %>"><%= value[0] %>

            <% else %>

<%= elem %>

            <% end %>
        <% end %>

    <% end %>
<% end %>

Fix syntax in github url

Fix syntax in github url


<%= @place.name %>

<%= @place.description %>

Address: <%= @place.address %>

Capacity: <%= @place.capacity %>

<% if logged_in? %>

<%= link_to "Check-in", new_user_checkin_path(current_user) %>

<% end %>

Add link to create a check-in if a user is logged in


---
layout: default
title: Categories
---

Categories

There are currently <%= site.categories.count %> categories on the site.

<% ('a'..'z').each do |letter| %>
  <% unless (slugs = site.categories.keys.select { |key| key[0] == letter }.sort).empty? %>
    <h3 id="<%= letter %>"><%= letter.upcase %>

      <% slugs.each do |slug| %>

<a href="/categories/<%= slug %>/" title="All the <%= site.categories[slug].name %> interviews."><%= site.categories[slug].name %>

      <% end %>

  <% end %>
<% end %>

---
layout: default
title: Categories
---

Categories

There are currently <%= site.categories.count %> categories on the site.

<% ('a'..'z').each do |letter| %>
  <% unless (slugs = site.categories.keys.select { |key| key[0] == letter }.sort).empty? %>
    <h3 id="<%= letter %>"><%= letter.upcase %>

      <% slugs.each do |slug| %>

          <a href="/categories/<%= slug %>/" title="All the <%= site.categories[slug].name %> interviews."><%= site.categories[slug].name %>

          <%= site.categories[slug].posts.count %> interview<%= 's' unless site.categories[slug].posts.count == 1 %>

      <% end %>

  <% end %>
<% end %>

Add back the category interview count

Add back the category interview count


Welcome to Pizza Shop!

	<% @products.each do |p| %>

<%= p.title%>

<img src="<%= p.path_to_image%>"/>

<%= p.description%>

Size: <%= p.size%> cm.

Price: <%= p.price%> UAH.

	<% end %>

<button class = "btn btn-primary" onclick="something()">Click me!</button>

Welcome to Pizza Shop!

	<% @products.each do |p| %>

<%= p.title%>

<img src="<%= p.path_to_image%>"/>

<%= p.description%>

Size: <%= p.size%> cm.

Price: <%= p.price%> UAH.

				<button type="button" class="btn btn-success btn-sm">Add to cart</button>

	<% end %>

<button class = "btn btn-primary" onclick="something()">Click me!</button>

Add small button to product

Add small button to product


Address:

    <%= @event.address %>

Description:

    <%= @event.description %>

Shifts

      <% @event.shifts.each do |shift| %>
        <il class="list-group-item"><%= format_shift(shift) %>

      <% end %>

Address:

    <%= @event.address %>

Description:

    <%= @event.description %>

Shifts

      <% @event.shifts.each do |shift| %>

<%= format_shift(shift) %>

      <% end %>

Fix list typo that led to weird nested list


Members

    <% @users.each do |user| %>

        <%= user.name %>
        <%= link_to_image user.image_url, user_path(user.id), class: "img-circle img-responsive", width: "50", height: "50" %>

      <% end %>

<%= link_to 'Back', root_path, class: "btn btn-primary" %>

Members

    <% @users.each do |user| %>

        <%= link_to user_path(user.id) do %>
          <%= image_tag user.image_url, class: "img-circle img-responsive", width: 150, height: 150 %>
        <% end %>

<%= link_to user.name, user_path(user.id) %>
            <%= user.title %>

    <% end %>

<%= link_to 'Back', root_path, class: "btn btn-primary" %>

Add grid to users index page

Add grid to users index page


# File managed by Puppet
<%-
  def bool2str(v)
    case v
    when true
      'yes'
    when false
      'no'
    else
      v
    end
  end
-%>
<%- @options.sort.each do |k, v| -%>
<%-   if v.is_a?(Hash) -%>
<%=     k %>
<%-     v.sort.each do |key, value| -%>
    <%-   if value.is_a?(Array) -%>
    <%-     value.each do |a| -%>
    <%-       if a != '' -%>
    <%=         key %> <%= bool2str(a) %>
    <%-       end -%>
    <%-     end -%>
    <%-   elsif value != '' -%>
    <%=     key %> <%= bool2str(value) %>
    <%-   end -%>
<%-     end -%>
<%-   else -%>
<%-     if v.is_a?(Array) -%>
<%-       v.each do |a| -%>
<%-         if a != '' -%>
<%=           k %> <%= bool2str(a) %>
<%-         end -%>
<%-       end -%>
<%-     elsif v != :undef and v != '' -%>
<%=       k %> <%= bool2str(v) %>
<%-     end -%>
<%-   end -%>
<%- end -%>

Add new parameters to users::ssh

Add new parameters to users::ssh


      <% if issue_type == :parse %>
        Species Name
      <% end %>
      CSV Location
      Problem
      Possible Solution

  <% issues.each do |issue| %>

    <% if issue_type == :parse %>
      <%= issue.row_name[:genus] %> <%= issue.row_name[:species] %>
    <% end %>
    <%= issue.location %>
    <%= issue.issue_description %>
    <%= issue.suggested_solution %>

  <% end %>

      <% if issue_type == :parse %>
        Species Name
      <% end %>
      CSV Location
      Problem
      Possible Solution

  <% issues.each do |issue| %>

    <% if issue_type == :parse %>
      <%= issue.row_name['genus'] %> <%= issue.row_name['species'] %>
    <% end %>
    <%= issue.location %>
    <%= issue.issue_description %>
    <%= issue.suggested_solution %>

  <% end %>

Fix display of species name when showing import issues


<% scited = @scited.nil? ? (signed_in? && @scited_ids.include?(paper.id)) : @scited %>

<div class="scite-toggle <%= scited ? 'active' : '' %>" data-paper-uid="<%= paper.uid %>" >

    <button class="btn unscite btn-success">Scited</button>

      <a href="<%= paper_scites_path(paper) %>"><button class="btn btn-default count"><%= paper.scites_count + (scited ? 0 : 1)%></button>

    <button class="btn btn-default scite">Scite!</button>

      <button class="btn btn-default count"><%= paper.scites_count - (scited ? 1 : 0) %></button>

<% scited = @scited.nil? ? (signed_in? && @scited_ids.include?(paper.id)) : @scited %>

<div class="scite-toggle <%= scited ? 'active' : '' %>" data-paper-uid="<%= paper.uid %>" >

    <button class="btn unscite btn-success">Scited</button>

      <a href="<%= paper_scites_path(paper) %>"><button class="btn btn-default count"><%= paper.scites_count + (scited ? 0 : 1)%></button>

    <button class="btn btn-default scite">Scite!</button>

      <a href="<%= paper_scites_path(paper) %>"><button class="btn btn-default count"><%= paper.scites_count - (scited ? 1 : 0)%></button>

Fix scites button link when unscited

Fix scites button link when unscited


      <%= link_to land_parcel.title_reference,
        url_for(:controller => 'land_parcel_records',
          :action => 'show',
          :id => land_parcel.title_reference) %>

    <% unless land_parcel.common_property? %>
      <% information = land_parcel.address_information %>
      <% unless information.blank? || !information.has_key?(:street_address) %>
      <address>
        <% if information[:street_address].has_key? :street %>
          <%= information[:street_address][:street] %>
        <% end %>

        <% if information[:street_address].has_key? :suburb %>
          <%= information[:street_address][:suburb] %>
        <% end %>

      </address>
      <% else %>
        No address found
      <% end %>
    <% else %>
      Common Property
    <% end %>

Fix spacing issue on search results page


  <%= form_for(:user, html: {class: "small-6 small-centered columns"}) do |f| %>
      <%= f.label :email %>
      <%= f.text_field :email %>

      <%= f.label :password %>
      <%= f.text_field :password %>

      <%= f.submit "Login" %>
  <% end %>

  <%= form_for(:user, html: {class: "small-6 small-centered columns"}) do |f| %>
      <%= f.label :email %>
      <%= f.text_field :email %>

      <%= f.label :password %>
      <%= f.text_field :password %>

      <%= f.submit "Login", :class => "button radius" %>
  <% end %>

Update login button with style

Update login button with style


    <%= link_to root_path do %>
      <%= image_tag 'logo.png' %>
    <% end %>

Client Login

Contact Us

<%= link_to about_path do %>About Us<% end %>

        Our Products

          <% Category.all.each do |category| %>

<%= link_to category.name, category_path(category) %>

          <% end %>

    <%= link_to root_path do %>
      <%= image_tag 'logo.png' %>
    <% end %>

Client Login

Contact Us

<%= link_to about_path do %>About Us<% end %>

        <%= link_to "Our Products", products_path %>

          <% Category.all.each do |category| %>

<%= link_to category.name, category_path(category) %>

          <% end %>

Add link to products page to topbar

Add link to products page to topbar

Now links to products page


{{#is_alert}}

## Diego has more LRP running than expected

# Actions

## Who to escalate to:

\<%= diego_oncall %>

## Statuspage update:

## How to confirm a false positive:

## How to confirm a true positive:

{{/is_alert}}

## Background:
When Diego wants to add more apps, the converger will send a request to the auctioneer to spin up additional Long Running Processes(LRPs).

LRPsExtra is the total number of LRP instances that are no longer desired but still have a BBS record.

<%= cloudops_non_critical_pagerduty %>

<%= environment %>: Diego has more LRP running than expected

Question: min(last_30m):avg:datadog.nozzle.bbs.LRPsExtra{deployment:<%= metron_agent_diego_deployment %>} > 0.5

Add datadog config for extra LRP instances

[#133679837] As a PWS operator, I expect to receive an alert if there are consistently some extra LRP instances in the system

Signed-off-by: Derek Reeve <f9fd75776d978d4bbd37faa6a6be4a4d4697be0e@pivotal.io>


Sign Up

  <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
    <%= f.error_notification %>
    <%= f.input :name,                  :autofocus => true %>
    <%= f.input :email,                 :required => true %>
    <%= f.input :password,              :required => true %>
    <%= f.input :password_confirmation, :required => true %>

    <%= f.button :submit, 'Sign Up', :class => 'btn-primary' %>
  <% end %>

  Already a member? <%= link_to "Sign in", new_session_path(resource_name) %>

Add Sign-In Link for Registration View

Add Sign-In Link for Registration View

Update the Devise registrations view to add a sign-in link (in the case
where the user is already a member).


Sign Up

<% if mixpanel? %>

<% end %>

After Signing up, you will receive a confirmation E-mail that you must open to confirm your e-mail address

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

<%= f.label :email %>

  <%= f.email_field :email %>

<%= f.label :password %>

  <%= f.password_field :password %>

<%= f.label :password_confirmation %>

  <%= f.password_field :password_confirmation %>

<%= f.submit "Sign Up", :class => "focus_button" %>

<% end %>

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

Sign Up

<% if mixpanel? %>

<% end %>

After Signing up, you will receive a confirmation E-mail that you must open to confirm your e-mail address

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

<%= f.label :email %>

  <%= f.email_field :email %>

<%= f.label :password %>
(minimum 6 characters)

  <%= f.password_field :password %>

<%= f.label :password_confirmation %>

  <%= f.password_field :password_confirmation %>

<%= f.submit "Sign Up", :class => "focus_button" %>

<% end %>

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

Add text to inform people of the password-minimum-requirements


# DO NOT EDIT - This file is being maintained by Chef

<%= node[:web][:log_directory] %>/*.log {
  daily
  missingok
  rotate 7
  compress
  delaycompress
  notifempty
  create 0660 rails rails
  sharedscripts
  postrotate
<% if File.directory?("#{node[:web][:base_directory]}/rails") -%>
    PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> /usr/bin/passenger-config restart-app --ignore-app-not-running <%= node[:web][:base_directory] %>/rails > /dev/null
<% if node[:recipes].include?("logstash::forwarder") -%>
    /etc/init.d/logstash-forwarder restart > /dev/null
<% end -%>
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%>
    /bin/systemctl try-reload-or-restart gpx-import
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
    /bin/systemctl reload cgimap
    /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
<% end -%>
  endscript
}

# DO NOT EDIT - This file is being maintained by Chef

<%= node[:web][:log_directory] %>/*.log {
  daily
  missingok
  rotate 7
  compress
  delaycompress
  notifempty
  create 0660 rails rails
  sharedscripts
  postrotate
<% if File.directory?("#{node[:web][:base_directory]}/rails") -%>
    PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> /usr/bin/passenger-config restart-app --ignore-app-not-running <%= node[:web][:base_directory] %>/rails > /dev/null
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%>
    /bin/systemctl try-reload-or-restart gpx-import
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
    /bin/systemctl reload cgimap
    /usr/bin/rsync --preallocate <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
<% end -%>
  endscript
}

Remove code to restart logstash-forwarder on log rotation


<%# Form UI behavior code and details;
Code:
  app/assets/javascripts/hyrax/relationships
CSS:
  [data-behavior="remove-relationship"] : Button to remove its parent TR from the table
  [data-behavior="add-relationship"] : Button to clone its parent TR and inject a new row into the table
  .message.has-warning : Used to display UI errors related to input values and server errors
HTML Properties:
  table:
    [data-behavior="child-relationships"] : allows the javascript to be initialized
    data-param-key : the parameter key value for this model type %>

<%= t("hyrax.works.form.in_collections") %>

<div class="form-group" data-behavior="collection-relationships" data-param-key="<%= f.object.model_name.param_key %>" data-members="<%= f.object.member_of_collections_json %>">

      <%= f.label :member_of_collection_ids %> required
      <%= f.input_field :member_of_collection_ids,
                  prompt: :translate,
                  data: {
                    autocomplete: 'collection',
                    'autocomplete-url' => Rails.application.routes.url_helpers.qa_path + '/search/collections?access=deposit'
                  } %>
      Add

<%= t('.caption') %>

      <%= t('.header.title') %>
      <%= t('.header.actions') %>

Add project ids to form

Add project ids to form


<%
  lead_organisations ||= []
  organisations ||= []
  show_hm_government = lead_organisations.length == 0
%>

  <% if show_hm_government %>
    HM Government,
  <% end %>
  <%= organisations_link_sentence(lead_organisations, organisations) %>

<%
  lead_organisations ||= []
  organisations ||= []
  show_hm_government = lead_organisations.length == 0
%>

  <% if show_hm_government %>
    HM Government<% if organisations.length > 0 %>, <% end %>
  <% end %>
  <%= organisations_link_sentence(lead_organisations, organisations) %>

Remove comma from empty orgs list

Remove comma from empty orgs list

https://www.pivotaltracker.com/s/projects/367813/stories/59037594


# Generated by Chef for <%= node['fqdn'] %>
<% @path.each do |p| -%>
<%= p %> {
  <%= @frequency %>
<%- if @size %>
  size <%= @size %>
<%- end %>
<%- if @minsize %>
  minsize <%= @minsize %>
<%- end %>
  rotate <%= @rotate %>
<%- if @create %>
  create <%= @create %>
<%- end %>
<%- if @olddir %>
  olddir <%= @olddir %>
<%- end %>
<% @options.each do |o| -%>
  <%= o %>
<% end -%>
<%- if @sharedscripts %>
  sharedscripts
<%- end %>
<%- if @postrotate %>
  postrotate
<%= @postrotate %>
  endscript
<%- end %>
<%- if @prerotate %>
  prerotate
<%= @prerotate %>
  endscript
<%- end %>
<%- if @firstaction %>
  firstaction
<%= @firstaction %>
  endscript
<%- end %>
<%- if @lastaction %>
  lastaction
<%= @lastaction %>
  endscript
<%- end %>
}
<%- end %>

# Generated by Chef for <%= node['fqdn'] %>
<% @path.each do |p| -%>
<%= p %> {
<%- if @frequency %>
  <%= @frequency %>
<%- end %>
<%- if @size %>
  size <%= @size %>
<%- end %>
<%- if @minsize %>
  minsize <%= @minsize %>
<%- end %>
<%- if @rotate %>
  rotate <%= @rotate %>
<%- end %>
<%- if @create %>
  create <%= @create %>
<%- end %>
<%- if @olddir %>
  olddir <%= @olddir %>
<%- end %>
<% @options.each do |o| -%>
  <%= o %>
<% end -%>
<%- if @sharedscripts %>
  sharedscripts
<%- end %>
<%- if @postrotate %>
  postrotate
<%= @postrotate %>
  endscript
<%- end %>
<%- if @prerotate %>
  prerotate
<%= @prerotate %>
  endscript
<%- end %>
<%- if @firstaction %>
  firstaction
<%= @firstaction %>
  endscript
<%- end %>
<%- if @lastaction %>
  lastaction
<%= @lastaction %>
  endscript
<%- end %>
}
<%- end %>

Add frequency and rotate options

Add frequency and rotate options

Signed-off-by: Seth Vargo <81550dbf04dfd8537ff7b3c014c6fbf86e0889dc@gmail.com>


<!DOCTYPE html>

<meta charset=utf-8 />
<meta name="viewport" content="width=620" />

<title>Geepivo</title>

Geepivo - Pivotal Tracker integration for Google Apps

Pivotal Tracker™ integration for Google Apps™. Provides a gadget for Gmail which allows you to create Stories directly from emails.

Soon in the Google Solutions Marketplace.

Install alpha version:
<form action='/install' method='POST'>
	Your Google Apps domain: <input type='text' name='domain' />
  <input type='submit' value='Install' />
</form>

Source code on Github (Open Source)

support</a

<!DOCTYPE html>

<meta charset=utf-8 />
<meta name="viewport" content="width=620" />

<title>Geepivo</title>

Geepivo - Pivotal Tracker integration for Google Apps

Pivotal Tracker™ integration for Google Apps™. Provides a gadget for Gmail which allows you to create Stories directly from emails.

Soon in the Google Solutions Marketplace.

Install alpha version:
<form action='/install' method='POST'>
  Your Google Apps domain: <input type='text' name='domain' />
  <input type='submit' value='Install' />
</form>

Note: It sometimes takes up to half an hour after installing the app before the gadget starts appearing below your emails.

Source code on Github (Open Source)

support</a

Add notice about delay in gadgets appearing.


[<% @taxons.each_with_index do |t,i| %>
  { "attr" :
    { "id" : "<%= t.id %>" },
    "data" : "<%= escape_javascript(raw(t.name)) %>"
    <% unless t.children.empty? %>
      ,"state" : "closed"
    <% end %>
  }<%= "," if i < (@taxons.size - 1) %>
<% end %>]

[<% @taxons.each_with_index do |t,i| %>
  { "attr" :
    { "id" : "<%= t.id %>" },
    "data" : "<%= raw(t.name.gsub('"','\"')) %>"
    <% unless t.children.empty? %>
      ,"state" : "closed"
    <% end %>
  }<%= "," if i < (@taxons.size - 1) %>
<% end %>]

Fix issue where single quotes would break taxonomies/get_children response

Fixes #2413


<%= myp_text_field(f, :height_amount, "myplaceonline.heights.height_amount", obj.height_amount, autofocus) %>
<%= myp_select(f, :amount_type, "myplaceonline.heights.amount_type", Myp.translate_options(Myp::DIMENSIONS), obj.amount_type) %>

<%= t("myplaceonline.heights.input_by_feet_inches") %>

<input type="number" class="input_feet" placeholder="<%= t("myplaceonline.heights.feet") %>" />

<input type="number" class="input_inches" placeholder="<%= t("myplaceonline.heights.inches") %>" />

<%= t("myplaceonline.heights.calculate") %>

<%= myp_date_field(f, :measurement_date, "myplaceonline.heights.measurement_date", obj.measurement_date) %>
<%= myp_text_field(f, :measurement_source, "myplaceonline.heights.measurement_source", obj.measurement_source) %>

<%= myp_text_field(f, :height_amount, "myplaceonline.heights.height_amount", obj.height_amount, autofocus) %>
<%= myp_select(f, :amount_type, "myplaceonline.heights.amount_type", Myp.translate_options(Myp::DIMENSIONS), obj.amount_type) %>

<%= t("myplaceonline.heights.input_by_feet_inches") %>

<input type="number" class="input_feet" placeholder="<%= t("myplaceonline.heights.feet") %>" />

<input type="number" class="input_inches" placeholder="<%= t("myplaceonline.heights.inches") %>" />

<a href="#" class="ui-btn" onclick="$('#height_height_amount').val('' + (((parseInt($('.input_feet').val()) || 0) * 12) + (parseInt($('.input_inches').val()) || 0))); $('#height_amount_type').val('<%= Myp::DIMENSIONS[0][1] %>'); $('#height_amount_type').selectmenu('refresh'); return false;"><%= t("myplaceonline.heights.calculate") %>

<%= myp_date_field(f, :measurement_date, "myplaceonline.heights.measurement_date", obj.measurement_date) %>
<%= myp_text_field(f, :measurement_source, "myplaceonline.heights.measurement_source", obj.measurement_source, remote_autocomplete_model: obj.class, remote_autocomplete_all: true) %>

Add height measurement source autocomplete


<li id="listed_time_<%= listed.id %>">
  <%= link_to h(listed.name), listed.object_url %>
  <%= link_to render_icon('stop', :stop_time.l), stop_time_path(:id => listed.id), :class => 'blank stopTime' %>

<li id="listed_time_<%= listed.id %>">
  <%= link_to h(listed.name), listed.object_url %>
  <%= link_to render_icon('stop', :stop_time.l), stop_time_path(:active_project => listed.project_id , :id => listed.id), :class => 'blank stopTime' %>

Fix active times list on dashboard

Fix active times list on dashboard


---
layout: default
title: Categories
---

Not just Macs

There are currently <%= @site.categories.count %> categories on the site.

<% @site.categories.keys.sort.each do |slug| %>

    <a href="/categories/<%= slug %>/" title="All the <%= @site.categories[slug].name %> interviews."><%= @site.categories[slug].name %>

    <%= @site.categories[slug].posts.count %> interview<% if @site.categories[slug].posts.count != 1 %>s<% end %>.

<% end %>

---
layout: default
title: Categories
---

Not just Macs

There are currently <%= @site.categories.count %> categories on the site.

<% @site.categories.keys.map { |key| key[0] }.uniq.sort.each do |letter| %>

<%= letter.upcase %>

    <% @site.categories.keys.select { |key| key[0] == letter }.sort.each do |slug| %>

        <a href="/categories/<%= slug %>/" title="All the <%= @site.categories[slug].name %> interviews."><%= @site.categories[slug].name %>

        <%= @site.categories[slug].posts.count %> interview<% if @site.categories[slug].posts.count != 1 %>s<% end %>.

    <% end %>

<% end %>

Break categories out by letter

Break categories out by letter


<% if session[:current_user] %>

<%= notice %>

    <%= render 'form' %>

<% else %>

    <%= render '/login' %>

    <%= render 'users/new' %>

<% end %>

Add Partials for Form Modals

Add Partials for Form Modals


<%= foundation_form.error_messages %>

<fieldset>
  <legend>User details</legend>
  <%= foundation_form.label :name %>
  <%= foundation_form.text_field :name %>
  <%= foundation_form.label :email %>
  <%= foundation_form.text_field :email %>
  <%= foundation_form.label :password %>
  <%= foundation_form.password_field :password %>
  <%= foundation_form.label :password_confirmation %>
  <%= foundation_form.password_field :password_confirmation %>
</fieldset>

<fieldset>
  <legend>Security privileges</legend>
  <label for="user_roles_admin">
    <%= check_box_tag 'user[roles][]', 'admin', foundation_form.object.admin?,
                      :id => 'user_roles_admin' %>
    Admin
  </label>
  <input type="hidden" name="user[roles][]" value="none">
</fieldset>

<fieldset>
  <legend>LGA access</legend>
  <%= foundation_form.label :local_government_area_ids, 'Local government areas' %>
  <%= foundation_form.collection_select :local_government_area_ids,
  LocalGovernmentArea.all,
  :id, :to_s, {}, {:multiple => true} %>
</fieldset>

<%= foundation_form.error_messages %>

<fieldset>
  <legend>User details</legend>
  <%= foundation_form.label :name %>
  <%= foundation_form.text_field :name %>
  <%= foundation_form.label :email %>
  <%= foundation_form.email_field :email %>
  <%= foundation_form.label :password %>
  <%= foundation_form.password_field :password %>
  <%= foundation_form.label :password_confirmation %>
  <%= foundation_form.password_field :password_confirmation %>
</fieldset>

<fieldset>
  <legend>Security privileges</legend>
  <label for="user_roles_admin">
    <%= check_box_tag 'user[roles][]', 'admin', foundation_form.object.admin?,
                      :id => 'user_roles_admin' %>
    Admin
  </label>
  <input type="hidden" name="user[roles][]" value="none">
</fieldset>

<fieldset>
  <legend>LGA access</legend>
  <%= foundation_form.label :local_government_area_ids, 'Local government areas' %>
  <%= foundation_form.collection_select :local_government_area_ids,
  LocalGovernmentArea.all,
  :id, :to_s, {}, {:multiple => true} %>
</fieldset>

Make user email field type="email"

Make user email field type="email"


---
- job:
    name: Trade_Tariff_Reindex_ElsaticSearch
    display-name: Trade_Tariff_Reindex_ElsaticSearch
    project-type: freestyle
    description: '
Drops and rebuilds the search index
'
    builders:
        - shell: |
           "ssh deploy@backend-1.backend 'cd /var/apps/tariff-api && govuk_setenv tariff-api bundle exec rake tariff:rei      ndex'"
    publishers:
        - trigger:
            project: Smokey_Production
    wrappers:
        - ansicolor:
            colormap: xterm
    triggers:
        - timed: '5 6 * * *'
    logrotate:
      artifactNumToKeep: 3

---
- job:
    name: Trade_Tariff_Reindex_ElsaticSearch
    display-name: Trade_Tariff_Reindex_ElsaticSearch
    project-type: freestyle
    description: '
Drops and rebuilds the search index
'
    builders:
        - shell: |
           "ssh deploy@backend-1.backend 'cd /var/apps/tariff-api && govuk_setenv tariff-api bundle exec rake tariff:reindex'"
    publishers:
        - trigger:
            project: Smokey_Production
    wrappers:
        - ansicolor:
            colormap: xterm
    triggers:
        - timed: '5 6 * * *'
    logrotate:
      artifactNumToKeep: 3

Remove incorrect whitespace from Jenkins job


  <%= link_to t('nlt.all'), url_for, class: type_scope.nil? ? "actual" : "''" %>

  <%= link_to t('nlt.available'), url_for(type: 'give', status: 'available'),
    class: type_scope == "give" && status_scope == "available" ? "actual" : "''" %>
  <%= link_to t('nlt.booked'), url_for(type: 'give', status: 'booked'),
    class: type_scope == "give" && status_scope == "booked" ? "actual" : "''" %>
  <%= link_to t('nlt.delivered'), url_for(type: 'give', status: 'delivered'),
    class: type_scope == "give" && status_scope == "delivered" ? "actual" : "''" %>

  <%= link_to t('nlt.requests'), url_for(type: 'want'),
    class: type_scope == "want" ? "actual" : "''" %>

  <%= link_to t('nlt.all'), url_for, class: type_scope.nil? ? "actual" : "''" %>

  <%= link_to t('nlt.available'), url_for(type: 'give', status: 'available'),
    class: status_scope == "available" ? "actual" : "''" %>
  <%= link_to t('nlt.booked'), url_for(type: 'give', status: 'booked'),
    class: status_scope == "booked" ? "actual" : "''" %>
  <%= link_to t('nlt.delivered'), url_for(type: 'give', status: 'delivered'),
    class: status_scope == "delivered" ? "actual" : "''" %>

  <%= link_to t('nlt.requests'), url_for(type: 'want'),
    class: type_scope == "want" ? "actual" : "''" %>

Simplify some checks in a partial

Simplify some checks in a partial

The issue mentioned in the comment is not yet closed, but the specific
problem with routes that made those checks necessary _is_ now fixed.


#!/bin/sh

exec \
  <%= @script_fullpath %> \
    <% if defined? @force_polling and @force_polling -%>
    --force-polling \
    <% end -%>
    <% if defined? @filename_pattern and @filename_pattern.is_a?(Array) and not @filename_pattern.empty? -%>
    --filename-pattern <%= "'#{@filename_pattern.join("' '")}'" %> \
    <% end -%>
    <% if defined? @regex_pattern and @regex_pattern.is_a?(Array) and not @regex_pattern.empty? -%>
    --filename-pattern <%= "'#{@regex_pattern.join("' '")}'" %> \
    <% end -%>
    --delay <%= @delay %> \
    --watch '<%= @path_to_watch %>' \
    --command '<%= @command_to_execute %>'

#!/bin/sh

exec \
  <%= @script_fullpath %> \
    --quiet \
    <% if defined? @force_polling and @force_polling -%>
    --force-polling \
    <% end -%>
    <% if defined? @filename_pattern and @filename_pattern.is_a?(Array) and not @filename_pattern.empty? -%>
    --filename-pattern <%= "'#{@filename_pattern.join("' '")}'" %> \
    <% end -%>
    <% if defined? @regex_pattern and @regex_pattern.is_a?(Array) and not @regex_pattern.empty? -%>
    --filename-pattern <%= "'#{@regex_pattern.join("' '")}'" %> \
    <% end -%>
    --delay <%= @delay %> \
    --watch '<%= @path_to_watch %>' \
    --command '<%= @command_to_execute %>'

Update the watcher daemon to not print anything


Summary

Still current at: <%= Date.today.strftime("%e %B %Y") %>

Updated: <%= publication.updated_at.strftime("%e %B %Y") %>

<% if publication.alert_status.present? %>

    <% publication.alert_status.each do |alert| %>

<%= raw t("travel_advice.alert_status.#{alert}") %>

    <% end %>

<% end %>

<% if publication.image %>

    <img src="<%= publication.image.web_url %>" alt="" />

<% end %>
<% if publication.document %>

    <a href="<%= publication.document.web_url %>">Download map (PDF)

<% end %>

<%= raw publication.summary %>

<% if publication.parts.present? then %>

Summary

<% end %>

Still current at: <%= Date.today.strftime("%e %B %Y") %>

Updated: <%= publication.updated_at.strftime("%e %B %Y") %>

<% if publication.alert_status.present? %>

    <% publication.alert_status.each do |alert| %>

<%= raw t("travel_advice.alert_status.#{alert}") %>

    <% end %>

<% end %>

<% if publication.image %>

    <img src="<%= publication.image.web_url %>" alt="" />

<% end %>
<% if publication.document %>

    <a href="<%= publication.document.web_url %>">Download map (PDF)

<% end %>

<%= raw publication.summary %>

Remove summary heading for single page advice