  <% @all_bills.map do |bill| %>

      <% y = bill[:link].match(/bills\/(.*).json/)[1] %>
      <a href="/bills/<%= y %>"><%= bill[:number] %>

<%= bill[:title] %>

<%= bill[:link] %>

<%= y = bill[:link].match(/bills\/(.*).json/)[1] %>

  <% end %>

    Home

  <% @all_bills.map do |bill| %>

      <% y = bill[:link].match(/bills\/(.*).json/)[1] %>
      <a href="/bills/<%= y %>"><%= bill[:number] %>

<%= bill[:title] %>

  <% end %>

    Home

Remove link to json file and debugger display in index page


<%= notice %>

  Origin system:
  <%= @group.origin_system %>

  Name:
  <%= @group.name %>

  Description:
  <%= @group.description %>

  Summary:
  <%= @group.summary %>

  Browser url:
  <%= @group.browser_url %>

  Featured image url:
  <%= @group.featured_image_url %>

  Creator:
  <%= @group.creator_id %>

<%= link_to 'Edit', edit_group_path(@group) %> |
<%= link_to 'Back', groups_path %>

Use React for Groups pages.

Use React for Groups pages.


Shift Dash

Check out your shifts!

<%= month_calendar events: @shifts do |date, shifts| %>
  <%= date %>

  <% shifts.each do |shift|%>

Earnings: <%= shift.earnings%> [<%=link_to "Details", user_shift_path(@user.id, shift.id), method: :get %>]

  <%end%>

  <%=link_to "Add Shift", new_user_shift_path(@user.id), method: :get %>

<% end %>

Shift Dash

Check out your shifts!

<%= month_calendar events: @shifts do |date, shifts| %>
  <%= date %>

  <% shifts.each do |shift|%>

Earnings: $<%= number_with_precision(shift.earnings, :precision => 2)%> [<%=link_to "Details", user_shift_path(@user.id, shift.id), method: :get %>]

  <%end%>

  <%=link_to "Add Shift", new_user_shift_path(@user.id), method: :get %>

<% end %>

Add $ symbol and 2 decimal places to earnings on Shift Index [not branch related]


<!DOCTYPE html>

    <title>Personal Website</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <%= stylesheet_link_tag    'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>
    <%= csrf_meta_tags %>

        RL

        <%= yield %>

        About Me
        Services
        Blog
        Contact

        &copy: Ryan Lesson

<!DOCTYPE html>

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

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

        RL

        <%= yield %>

        About Me
        Services
        Blog
        Contact

        &copy Ryan Lesson

Add support for IE < 9

Add support for IE < 9


#!/bin/sh
TARGETS="<%= @targets.flatten.join(' ') -%>"

if [ -z "$TARGETS"]; then
  logger -t mirrorer empty target received for govuk mirror
fi

START_UPLOAD=$(($(date +%s%N)/1000000))

for TARGET in $TARGETS; do
  logger -t mirrorer Started uploading to $TARGET
  rsync -rLptgoD -z --delete /var/lib/govuk_mirror/current/. \
               $TARGET:/srv/mirror_data/www-origin
  EXITCODE=$?
  if [ "$EXITCODE" != "0" ]; then
     logger -p user.crit -t mirrorer Uploading mirror $TARGET failed with exit code: $EXITCODE
  fi
  logger -t mirrorer Finished uploading to mirror $TARGET
done

STOP_UPLOAD=$(($(date +%s%N)/1000000))
DURATION_UPLOAD=$(expr $STOP_UPLOAD - $START_UPLOAD)
echo "govuk.app.mirrorer.upload_duration:$DURATION_UPLOAD|ms" | nc -w 1 -u localhost 8125

#!/bin/sh
TARGETS="<%= @targets.flatten.join(' ') -%>"

if [ -z "$TARGETS"]; then
  logger -t mirrorer empty target received for govuk mirror
fi

START_UPLOAD=$(($(date +%s%N)/1000000))

for TARGET in $TARGETS; do
  logger -t mirrorer Started uploading to $TARGET
  rsync -rLptgoD -z /var/lib/govuk_mirror/current/. \
               $TARGET:/srv/mirror_data/www-origin
  EXITCODE=$?
  if [ "$EXITCODE" != "0" ]; then
     logger -p user.crit -t mirrorer Uploading mirror $TARGET failed with exit code: $EXITCODE
  fi
  logger -t mirrorer Finished uploading to mirror $TARGET
done

STOP_UPLOAD=$(($(date +%s%N)/1000000))
DURATION_UPLOAD=$(expr $STOP_UPLOAD - $START_UPLOAD)
echo "govuk.app.mirrorer.upload_duration:$DURATION_UPLOAD|ms" | nc -w 1 -u localhost 8125

Remove the `--delete` flag for rsync

Remove the `--delete` flag for rsync

Prevent `rsync(1)` from deleting content on the remote machine when it
has been deleted locally.

This is primarily to prevent rsync from deleting the majority of the
content on the remote mirrors if the GOV.UK Crawler Worker has not yet
completed crawling the whole site.


<% if @feeds.empty? %>

    No news at the moment

<% else %>
  <% @feeds.each do |feed| %>

<%= feed.title %>

    <% feed.newsitems.where(unread: 1) \
         .order("published desc").limit(3).each do |news| %>

<%= link_to news.title, news.permalink, target: "_blank" %>

          <%= content(news).html_safe %>

    <% end %>

  <% end %>
<% end %>

<% if @feeds.empty? %>

    No news at the moment

<% else %>
  <% @feeds.each do |feed| %>

<%= link_to feed.title, feed %>

    <% feed.newsitems.where(unread: 1) \
         .order("published desc").limit(3).each do |news| %>

<%= link_to news.title, news.permalink, target: "_blank" %>

          <%= content(news).html_safe %>

    <% end %>

  <% end %>
<% end %>

Add link to feed's title.

Add link to feed's title.


<%
  add_body_class "new_invite"
  @page_title = t("invite.new_invite")
%>

  <%= link_to t("invites.invites"), invites_path %>
  »
  <%= link_to t("new"), new_invite_path %>

<%= form_for @invite, builder: Sugar::FormBuilder do |f| %>
  <%= f.labelled_text_field :email, size: 60 %>
  <%= f.labelled_text_area(:message,
                           cols: 60,
                           rows: 10,
                           description: t("invite.message_description")) %>

    <button type="submit">
      <%= t("invite.send_invite") %>
    </button>

<% end %>

<%
  add_body_class "new_invite"
  @page_title = t("invite.new_invite")
%>

  <%= link_to t("invites.invites"), invites_path %>
  »
  <%= link_to t("new"), new_invite_path %>

<%= form_for @invite, builder: Sugar::FormBuilder do |f| %>
  <%= f.labelled_text_field :email, size: 60, type: 'email' %>
  <%= f.labelled_text_area(:message,
                           cols: 60,
                           rows: 10,
                           description: t("invite.message_description")) %>

    <button type="submit">
      <%= t("invite.send_invite") %>
    </button>

<% end %>

Set invitation email field to type "email".


<%= tag_header @tag, 'Lists' %>

<% unless @tag.draft? %>
  <%= render 'publish_button', tag: @tag %>
<% end %>

    <%= render 'all_list_items', lists: @lists, tag: @tag %>

    <%= render 'list_editor', lists: @lists, tag: @tag %>

New list

    <%= render 'new_list', tag: @tag %>

<%= tag_header @tag, 'Lists' %>

<%= render 'publish_button', tag: @tag %>

    <%= render 'all_list_items', lists: @lists, tag: @tag %>

    <%= render 'list_editor', lists: @lists, tag: @tag %>

New list

    <%= render 'new_list', tag: @tag %>

Allow users to publish draft tag lists

Allow users to publish draft tag lists

Draft tags are no longer different from published tags when considering
lists. We can allow the users to publish the lists of draft items.


		Position
		Namen
		Score

	<% RanksController.rankList(0,10).each do |rank, pos| %>

			<%= pos %>.
			<%= rank.user.username %>
			<%= rank.score %>

	<% end %>

    Position
    Namen
    Score

  <% RanksController.rankList(0,10).each do |rank, pos| %>

      <%= pos %>.
      <%=  link_to(rank.user.username, rank.user.username) %>
      <%= rank.score %>

  <% end %>

Create Link to User on RankList in RankView


Tasks!

<%= render "form", task: @task %>

<%= pluralize(@tasks.count, "task") %>

    <ul id="tasks" class="small-12 columns" data-update-url="<%= sort_list_tasks_url %>">
    <% if !@tasks.empty? %>
      <% @tasks.each do |task| %>
          <%= render task %>
      <% end %>
    <% end %>

Tasks!

<%= render "form", task: @task %>

    <ul id="tasks" class="small-12 columns" data-update-url="<%= sort_list_tasks_url %>">
    <% if !@tasks.empty? %>
      <% @tasks.each do |task| %>
          <%= render task %>
      <% end %>
    <% end %>

Remove count from the task index

Remove count from the task index


<%= simple_form_for user do |form| %>
  <%= form.input :first_name %>
  <%= form.input :last_name %>
  <%= form.input :email %>
  <%= form.input :url, :label => 'Website URL' %>
  <%= form.input :bio, :as => :text %>
  <%= form.input :new_password, :as => :password, :label => "New password" %>
  <%= form.button :submit %>
<% end %>

<%= simple_form_for user do |form| %>
  <%= form.input :first_name %>
  <%= form.input :last_name %>
  <%= form.input :email %>
  <%= form.input :url, :label => 'Website URL' %>
  <%= form.input :new_password, :as => :password, :label => "New password" %>
  <%= form.button :submit %>
<% end %>

Remove the Bio field from the user profile.


<% political_membership = role_appointment.historical_account.try(:political_membership) %>
  <%= content_tag_for :div, role_appointment, class: 'govuk-grid-column-one-quarter', role: "listitem" do %>
    <%# Content for "theresa-may' does not exist at present, temporary check to remove link %>
    <% if historic_appointment_path(role.historic_param, role_appointment.person) != "/government/history/past-prime-ministers/theresa-may" %>
      <%= render "govuk_publishing_components/components/image_card", {
        href: historic_appointment_path(role.historic_param, role_appointment.person),
        image_src: role_appointment.person.image_url(:s216),
        image_loading: "lazy",
        heading_text: role_appointment.person.name,
        extra_links: previous_dates_in_office_prime(role, role_appointment.person, political_membership),
        extra_links_no_indent: true
      } %>
    <% else %>
      <%= render "govuk_publishing_components/components/image_card", {
        image_src: role_appointment.person.image_url(:s216),
        image_loading: "lazy",
        heading_text: role_appointment.person.name,
        extra_links: previous_dates_in_office_prime(role, role_appointment.person, political_membership),
        extra_links_no_indent: true
      } %>
    <% end %>
<% end %>

<% political_membership = role_appointment.historical_account.try(:political_membership) %>
  <%= content_tag_for :div, role_appointment, class: 'govuk-grid-column-one-quarter', role: "listitem" do %>
    <%# Content for "theresa-may' does not exist at present, temporary check to remove link %>
    <% if historic_appointment_path(role.historic_param, role_appointment.person) != "/government/history/past-prime-ministers/theresa-may" %>
      <%= render "govuk_publishing_components/components/image_card", {
        href: historic_appointment_path(role.historic_param, role_appointment.person),
        image_src: role_appointment.person.image_url(:s216),
        image_loading: "lazy",
        heading_text: role_appointment.person.name,
        extra_details: previous_dates_in_office_prime(role, role_appointment.person, political_membership),
        extra_details_no_indent: true
      } %>
    <% else %>
      <%= render "govuk_publishing_components/components/image_card", {
        image_src: role_appointment.person.image_url(:s216),
        image_loading: "lazy",
        heading_text: role_appointment.person.name,
        extra_details: previous_dates_in_office_prime(role, role_appointment.person, political_membership),
        extra_details_no_indent: true
      } %>
    <% end %>
<% end %>

Fix missing Prime Minister on historic PM page

An update to govuk_publishing_components changed the parameter names in
Release 27.0.0. We use the image cards to show rows of previous PMs
here.

The incorrect parameter names caused the image card to not render when
an href was not passed.

By renaming the params, the page renders correctly again.


<%= semantic_form_for(@need) do |f| %>
  <% if @need.errors.any? %>

<%= pluralize(@need.errors.count, "error") %> prohibited this need from being saved:

      <% @need.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

  <%= f.inputs :id => 'overview' do %>
    <%= f.input :title, :label => 'Need *' %>
    <%= f.input :description, :label => 'Context', :hint => "provide some information about the circumstances surrounding this need" %>
    <%= f.input :tag_list, :label => 'Tags', :hint => "separate tags with commas" %>
  <% end %>

  <% if current_user.role == 'superuser' and f.object.persisted? %>
    <%= f.inputs :id => 'metadata', :name => 'Product decision' do %>
      <%= f.input :kind %>
      <%= f.input :status, :collection => Need::STATUSES %>
      <%= f.input :url %>
      <%= f.input :priority %>
      <%= f.input :reason_for_decision %>
    <% end %>
  <% end %>

  <%= f.inputs do %>
    <%= f.input :audiences, :as => :check_boxes %>
  <% end %>

  <%= f.buttons %>
  <%= link_to 'Cancel', need_path(@need) %>
<% end %>

<%= semantic_form_for(@need) do |f| %>
  <% if @need.errors.any? %>

<%= pluralize(@need.errors.count, "error") %> prohibited this need from being saved:

      <% @need.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

  <%= f.inputs :id => 'overview' do %>
    <%= f.input :title, :label => 'Need *' %>
    <%= f.input :description, :label => 'Context', :hint => "provide some information about the circumstances surrounding this need" %>
    <%= f.input :tag_list, :as => :string, :label => 'Tags', :hint => "separate tags with commas" %>
  <% end %>

  <% if current_user.role == 'superuser' and f.object.persisted? %>
    <%= f.inputs :id => 'metadata', :name => 'Product decision' do %>
      <%= f.input :kind %>
      <%= f.input :status, :collection => Need::STATUSES %>
      <%= f.input :url %>
      <%= f.input :priority %>
      <%= f.input :reason_for_decision %>
    <% end %>
  <% end %>

  <%= f.inputs do %>
    <%= f.input :audiences, :as => :check_boxes %>
  <% end %>

  <%= f.buttons %>
<% end %>

Remove cancel link that broke the form

Remove cancel link that broke the form


<% content_for :title, person.title %>

<%= render "govuk_publishing_components/components/title", {
  context: person.current_roles_title,
  title: person.title
} %>

    <%= render "govuk_publishing_components/components/image_card", {
      href: "#",
      image_src: person.image_url,
      image_alt: person.image_alt_text,
      description: "Contents",
      extra_links: [
        {
          text: "Biography",
          href: "#biography"
        }
      ]
    } %>

  <%= render partial: "biography", locals: { person: person } %>

  <%= render partial: "previous_roles", locals: { person: person } %>

<% content_for :title, person.title %>

<%= render "govuk_publishing_components/components/title", {
  context: person.current_roles_title,
  title: person.title
} %>

    <%= render "govuk_publishing_components/components/image_card", {
      href: "#",
      image_src: person.image_url,
      image_alt: person.image_alt_text,
      description: "Contents",
      extra_links: [
        {
          text: "Biography",
          href: "#biography"
        },
        {
          text: "Previous roles",
          href: "#previous-roles"
        },
      ]
    } %>

  <%= render partial: "biography", locals: { person: person } %>

  <%= render partial: "previous_roles", locals: { person: person } %>

Add link to previous roles in sidebar

Add link to previous roles in sidebar


<%
  links_hash = content_item.with_indifferent_access["links"] || {}

  organisations = []
  organisations += links_hash["organisations"] || []
  organisations += links_hash["lead_organisations"] || []
  organisations += links_hash["supporting_organisations"] || []
  organisations += links_hash["worldwide_organisations"] || []

  world_locations = links_hash["world_locations"] || []
%>
<% if organisations.any? %>
  <meta name="govuk:analytics:organisations" content="<<%= organisations.map { |link| link["analytics_identifier"] }.join('><') %>>">
<% end %>
<% if world_locations.any? %>
  <meta name="govuk:analytics:world-locations" content="<<%= world_locations.map { |link| link["analytics_identifier"] }.join('><') %>>">
<% end %>

<%

  links_hash = content_item.to_h[:links] || {}

  organisations = []
  organisations += links_hash[:organisations] || []
  organisations += links_hash[:lead_organisations] || []
  organisations += links_hash[:supporting_organisations] || []
  organisations += links_hash[:worldwide_organisations] || []

  world_locations = links_hash[:world_locations] || []
%>
<% if organisations.any? %>
  <meta name="govuk:analytics:organisations" content="<<%= organisations.map { |link| link[:analytics_identifier] }.join('><') %>>">
<% end %>
<% if world_locations.any? %>
  <meta name="govuk:analytics:world-locations" content="<<%= world_locations.map { |link| link[:analytics_identifier] }.join('><') %>>">
<% end %>

Fix AnalyticsMetadata component in a better way

Follow up to https://github.com/alphagov/static/pull/668/

With real Content Items, rather than fixtures, the object will be
a `GdsApi::Response` object, which doesn't support `with_indifferent_access`
and would break for an app passing that in.

Instead of trying to make the fixtures/content item both response to string
keys, which is an exception to the component style guide, ensure the
content item keys are all symbols, by casting to a hash.

For fixtures, this will be a no-op, for the API response it will switch to
a symbol-key'd hash, the rest of the template can then deal only with
symbol key'd hashes.

IMO this is a cleaner fix, as it also further removes the main bit of
component logic from the specific structure/object of a content item


	<% if current_user %>
		Welcome, <%= current_user.github_username %>

<%= link_to 'Settings', user_settings_path(current_user) %>

<%= link_to 'My Snippets', user_snippets_path(current_user) %>

	<% else %>
	  <%= link_to "Sign in with Github", user_omniauth_authorize_path(:github) %>
	  <%= link_to("Development sign in", dev_sign_in_path, method: 'post') if Rails.env.development? %>
	<% end %>

	<% if current_user %>
		Welcome, <%= current_user.github_username %>

<%= link_to 'Settings', user_settings_path(current_user) %>

<%= link_to 'My Snippets', user_snippets_path(current_user) %>

<%= link_to "Get today's work", user_snippets_path(current_user), method: 'post' %>

	<% else %>
	  <%= link_to "Sign in with Github", user_omniauth_authorize_path(:github) %>
	  <%= link_to("Development sign in", dev_sign_in_path, method: 'post') if Rails.env.development? %>
	<% end %>

Add link to nav to get today's work

Add link to nav to get today's work


<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26481142-4']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19569290-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

Switch to HDO analytics account.

Switch to HDO analytics account.


<div class="filter checkbox-filter js-openable-filter<%=' closed' unless facet_has_any_selected_values?(select_facet.key) %>" tabindex="0">

    <%= select_facet.name %>

      <a class="clear-selected<%=' js-hidden' unless facet_has_any_selected_values?(select_facet.key) %>">clear

    <% select_facet.allowed_values.each do | option | %>
      <input type="checkbox" name="<%=select_facet.key%>[]" value="<%= option['value']%>" id="<%= option['value']%>" <%= input_checked(select_facet.key, option['value']) %> aria-controls="js-search-results-info">
      <label for='<%= option['value']%>'><%= option['label']%>
    <% end %>

<div class="filter checkbox-filter js-openable-filter<%=' closed' unless facet_has_any_selected_values?(select_facet.key) %>" tabindex="0">

    <%= select_facet.name %>

      <a class="clear-selected<%=' js-hidden' unless facet_has_any_selected_values?(select_facet.key) %>">clear

    <% select_facet.allowed_values.each do | option | %>
      <label for='<%= option['value']%>'>
        <input type="checkbox" name="<%=select_facet.key%>[]" value="<%= option['value']%>" id="<%= option['value']%>" <%= input_checked(select_facet.key, option['value']) %> aria-controls="js-search-results-info">
        <%= option['label']%>

    <% end %>

Move inputs to inside labels

Move inputs to inside labels

So that the whole thing is clickable, but the inputs inside the labels.


Hi there!

The purpose of this app is to connect skiers and snowboarders by crowdsourcing mountain conditions. Users are able to leave short notes about various trails, and upvote comments.

For an optimal experience, please use mobile devices to interact with the application.

Your feedback is greatly appreciated! Feel free to send us a note, and stay tuned for future improvements!

Keep posting!

- The Mountain Chat Team

Hi there!

The purpose of this app is to connect skiers and snowboarders by crowdsourcing mountain conditions. Users are able to leave short notes about various trails, and upvote comments.

For an optimal experience, please use mobile devices to interact with the application.

Your feedback is greatly appreciated! Feel free to reach out, and stay tuned for future improvements!

- <%= mail_to "zachschatz@gmail.com", "The Mountain Chat Team", :style => 'text-decoration: underline'%>

Include email in about page

Include email in about page


<%= @qualification.name %>

    Name
    Colour

  <% @subjects.each do |subject| %>

    <%= subject.name  %>
    <%= subject.colour %>

  <% end %>

<%= link_to "Back", qualifications_path %>

<%= link_to "Qualification Viewer", root_path %>

<%= @qualification.name %>

  <% if @subjects.empty? %>

Not applicable

  <% else %>
    <% @subjects.order("name").each do |subject| %>
      <li style="background-color: <%= subject.colour %>;"><%= subject.name  %>

    <% end %>
  <% end %>

<%= link_to "Back", qualifications_path %>

Sort and colour subjects in show view

Sort and colour subjects in show view


<div class="jumbotron jumbotron-about visible-sm visible-md visible-lg"
     style="background-image: url(<%= user.header_image_url %>);">

                    <%= user.first_name %>
                    <%= user.last_name %>

                <% if user.tagline and user.tagline.length > 0 %>

                    <%= user.tagline %>

                <% end %>

<div class="jumbotron jumbotron-about visible-sm visible-md visible-lg"
     style="background-image: url(<%= user.header_image_url %>);">

                    <%= user.first_name %>
                    <%= user.last_name %>

                <% if user.tagline.present? %>

                    <%= user.tagline %>

                <% end %>

Use .present? when checking for tagline

Use .present? when checking for tagline

Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>


<?php

$handle = fopen('<%= fetch(:caretaker_instance_keys_path) %>', 'w');
fwrite($handle, "<?php
\$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance'] = serialize(
    array_replace_recursive(
        unserialize(\$TYPO3_CONF_VARS['EXT']['extConf']['caretaker_instance']),
        array (
            'crypto.' => array(
                'instance.' => array(
                    'publicKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_public_key_path) %>')) . "',
                    'privateKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_private_key_path) %>')) . "'
                )
            )
        )
    )
);
?>");

<?php

$handle = fopen('<%= fetch(:caretaker_instance_keys_path) %>', 'w');
fwrite($handle, "<?php
\$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker_instance'] = serialize(
    array_replace_recursive(
        unserialize(\$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker_instance']),
        array (
            'crypto.' => array(
                'instance.' => array(
                    'publicKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_public_key_path) %>')) . "',
                    'privateKey' => '" . str_replace("\\n", '|', file_get_contents('<%= fetch(:caretaker_private_key_path) %>')) . "'
                )
            )
        )
    )
);
?>");

Adjust typo3 variable for TYPO3 8.7 compatibility


<%= t '.match', tournament: @tournament.name, other: @other.user.name %>

[<%= @tournament.name %> <%= Championship.model_name.human %>](<%= tournament_championship_path(@tournament) %>)

<%= t '.match', tournament: @tournament.name, other: @other.user.name %>

[<%= @tournament.name %> <%= Championship.model_name.human %>](<%= tournament_championship_url(@tournament) %>)

Use urls in emails, not paths

Use urls in emails, not paths


################################################################
## Drop by Chef, recipe mysql, template mysqlchk.erb
################################################################

# default: on
# description: mysqlchk
service mysqlchk
{
# this is a config for xinetd, place it in /etc/xinetd.d/
        disable = no
        flags           = REUSE
        socket_type     = stream
        port            = 9200
        wait            = no
        user            = nobody
	server          = /usr/bin/clustercheck
	server_args 	= root <%=node['mysql']['server_root_password']%>
	log_on_failure  += USERID
	only_from       = <%= @lb.attribute?('cloud') && @lb['cloud']['local_ipv4'] ? @lb['cloud']['local_ipv4'] : @lb['ipaddress']%>
	per_source      = UNLIMITED
}

Add check from the access point only (haproxy or other)


Qualifications

    Name
    Country

  <% @qualifications.each do |qualification| %>

    <%= link_to "#{qualification.name}", qualification_path(qualification) %>
    <%= qualification.country %>

  <% end %>

Create index view for qualifications

Create index view for qualifications


Hi @<%= @user.github %>,

<% if @write_docs.present? %>
## Write Docs

<% @write_docs.sort_by {|d| d.repo.full_name }.each do |doc| %>
**<%= doc.repo.full_name %>** ([source](<%= doc.to_github %>)): [<%= doc.path %>](<%= doc_method_url doc %>)

<% end %>
<% end %>

<% if @read_docs.present? %>

## Read Docs

<% @read_docs.sort_by {|d| d.repo.full_name }.each do |doc| %>
**<%= doc.repo.full_name %>** ([source](<%= doc.to_github %>)): [<%= doc.path %>](<%= doc_method_url doc %>)

<%= doc_method_click_url(doc.id, @user.id) %>
<%= doc_source_click_url(doc.id, @user.id) %>

<pre>
<%= doc.doc_comments.first.try(:comment) %>
</pre>

<% end %>
<% end %>

--

Go forth and make the world a better place

[@schneems](http://twitter.com/schneems)

[Help doctor more docs at docsdoctor.org](<%= root_url%>)

[Delete Account](<%= token_delete_user_url(@user.account_delete_token) %>)

Hi @<%= @user.github %>,

<% if @write_docs.present? %>
## Write Docs

<% @write_docs.sort_by {|d| d.repo.full_name }.each do |doc| %>
**<%= doc.repo.full_name %>** ([source](<%= doc.to_github %>)): [<%= doc.path %>](<%= doc_method_url doc %>)

<% end %>
<% end %>

<% if @read_docs.present? %>

## Read Docs

<% @read_docs.sort_by {|d| d.repo.full_name }.each do |doc| %>
**<%= doc.repo.full_name %>** ([source](<%= doc.to_github %>)): [<%= doc.path %>](<%= doc_method_url doc %>)

<%= doc_method_click_url(doc.id, @user.id) %>
<%= doc_source_click_url(doc.id, @user.id) %>

<pre>
<%= doc.doc_comments.first.try(:comment) %>
</pre>

<% end %>
<% end %>

--

Go forth and make the world a better place

[@schneems](http://twitter.com/schneems)

[Help doctor more docs at codetriage.com](<%= root_url%>)

[Delete Account](<%= token_delete_user_url(@user.account_delete_token) %>)

Remove reference to docsdoctor.org in docs email


  <%= link_to t("gobierto_admin.welcome.index.title"), admin_root_path %> »
  <%= link_to t("gobierto_admin.gobierto_plans.plans.index.title"), admin_plans_plans_path %> »
  <%= link_to @plan.title, admin_plans_plan_categories_path(@plan) %> »
  <%= t(".title") %>

<%= @plan.title %>

<%= render 'gobierto_admin/gobierto_plans/shared/navigation' %>

<%= render 'form' %>

  <%= link_to t("gobierto_admin.welcome.index.title"), admin_root_path %> »
  <%= link_to t("gobierto_admin.gobierto_plans.plans.index.title"), admin_plans_plans_path %> »
  <%= link_to @plan.title, admin_plans_plan_categories_path(@plan) %> »
  <%= t(".title") %>

<%= @plan.title %>

<%= render 'gobierto_admin/gobierto_plans/shared/navigation' %>

<%= link_to "Custom Fields", admin_common_custom_fields_module_resource_instance_level_resource_path("gobierto_plans-plan", @plan.id), target: "_blank" %>

<%= render 'form' %>

Add link to manage custom fields at instance level in plans configuration form


<!DOCTYPE html>

    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>

Hello <%= @user.email %>,

      You've successfully enabled 2 factor authentication for your blockchain.bigearth.io account!

      Kudos. You're a smart one—aren't ya?

Next Steps

        <%= link_to 'Sign in', new_user_session_url %> and <%= link_to 'create your first chain', new_user_chain_url(@user) %>.

Thanks for using blockchain.bigearth.io!

Change header from h1 to h2 in 2fa email.


{{#bananas}}
<div>
<%= image_tag("banana.png") %>
</div>
{{/bananas}}

{{#bananas}}
<div>
<%= image_tag("banana.png", height: 118) %>
</div>
{{/bananas}}

Add image height to the "bananas"

Add image height to the "bananas"

Prevents jumping around of the page.

Signed-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>


<%= render :partial => 'admin/sites/action_nav' %>

<h2 title="stored in <%= @theme.path %>">Edit theme

<% content_for :sidebar do -%>

Actions

<%= link_to "Create or upload a new file", new_admin_theme_file_path(@site, @theme.id) %>

<%= link_to 'Download theme', export_admin_theme_path(@site, @theme.id) %>

<%= render :partial => 'admin/theme_files/files' %>
<% end -%>

<% form_for :theme, @theme, :url => admin_theme_path(@site, @theme.id), :html => {:method => :put} do |f| %>
	<%= render :partial => "form", :locals => {:f => f} %>

	  <%= f.submit 'Save' %> or
	  <%= link_to 'cancel', admin_themes_path %>

<% end %>

<%= render :partial => 'admin/sites/action_nav' %>

<h2 title="stored in <%= @theme.path %>">Edit theme

<% content_for :sidebar do -%>

Actions

<%= link_to "Create or upload a new file", new_admin_theme_file_path(@site, @theme.id) %>

<%= link_to 'Download theme', export_admin_theme_path(@site, @theme.id) %>

Meta

<% form_for :theme, @theme, :url => admin_theme_path(@site, @theme.id), :html => {:method => :put} do |f| %>
	<%= render :partial => "form", :locals => {:f => f} %>

	  <%= f.submit 'Save' %>

<% end %>
<% end -%>

<%= render :partial => 'admin/theme_files/files' %>

Move stuff around so the important content is in the middle area.


<!doctype html>

<html lang="<%= I18n.locale %>">

    <%= render partial: 'spree/shared/head' %>

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">
    <%= render partial: 'spree/shared/header' %>

        <%= spree_breadcrumbs(@taxon) %>

        <%= render partial: 'spree/shared/sidebar' if content_for? :sidebar %>

        <main
          id="content"
          class="mt-4 <%= !content_for?(:sidebar) ? "col-sm-12" : "col-sm-12 col-md-9" %>"
          data-hook>
          <%= flash_messages %>
          <%= yield %>

        <%= yield :templates %>

<!doctype html>

<html lang="<%= I18n.locale %>">

    <%= render partial: 'spree/shared/head' %>

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">
    <%= render partial: 'spree/shared/header' %>

        <%= flash_messages %>
        <%= yield %>

      <%= yield :templates %>

    <%= render partial: 'spree/shared/footer' %>
    <%= render 'spree/shared/translations' %>

Update application layout according to new designs


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

global:
  smtp_smarthost: localhost:25
  smtp_from: prometheus@openstreetmap.org
  smtp_require_tls: false

templates:
  - /etc/prometheus/alertmanager_templates/*.tmpl

route:
  group_by:
    - alertgroup
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 3h
  receiver: admins-email

inhibit_rules:

receivers:
  - name: admins-email
    email_configs:
      - to: admins@openstreetmap.org

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

global:
  smtp_smarthost: localhost:25
  smtp_from: prometheus@openstreetmap.org
  smtp_require_tls: false

templates:
  - /etc/prometheus/alertmanager_templates/*.tmpl

route:
  group_by:
    - alertgroup
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 3h
  receiver: admins-email

inhibit_rules:

receivers:
  - name: admins-email
    email_configs:
      - send_resolved: true
        to: admins@openstreetmap.org

Send notifications of resolved alerts

Send notifications of resolved alerts


export M2_HOME=<%= node['maven']['m2_home'] %>

export MAVEN_OPTS="<%= node['maven']['mavenrc']['opts'] %>"

Remove an extra line in the default file for maven


<script type='text/javascript'>

	window.realtime = {};
	window.realtime.messageQueue = [];
	window.realtime.enabled = false;

</script>

<script src="<%= realtime_server_url %>/socket.io/socket.io.js"></script>

<script type='text/javascript'>

	if (typeof io != 'undefined' && io != null) {
		window.realtime.token = '<%= realtime_token %>';
		window.realtime.userId = '<%= realtime_user_id %>';
		window.realtime.socketIo = io.connect('<%= realtime_server_url %>/?_rtUserId=<%= @realtime_user_id %>&_rtToken=<%= @realtime_token %>');
	}

	if (window.realtime.socketIo) {

		window.realtime.enabled = true;

		window.realtime.socketIo.on('connect', function() {
			// Give a nice round-trip ACK to our realtime server that we connected.
    		window.realtime.socketIo.emit('realtime_user_id_connected', { userId: window.realtime.userId });
  		});

		// Queue up all incoming realtime messages.
  		window.realtime.socketIo.on('realtime_msg', function(message) {
    		window.realtime.messageQueue.push(message);
		});
	}

</script>

<%= if message_handler %>
  <%= render "realtime/realtime_message_handler" %>
<% end %>

<%= if message_console_logger %>
  <%= render "realtime/realtime_message_console_logger" %>
<% end %>

<script type='text/javascript'>

	window.realtime = {};
	window.realtime.messageQueue = [];
	window.realtime.enabled = false;

</script>

<script src="<%= realtime_server_url %>/socket.io/socket.io.js"></script>

<script type='text/javascript'>

	if (typeof io != 'undefined' && io != null) {
		window.realtime.token = '<%= realtime_token %>';
		window.realtime.userId = '<%= realtime_user_id %>';
		window.realtime.socketIo = io.connect('<%= realtime_server_url %>/?_rtUserId=<%= @realtime_user_id %>&_rtToken=<%= @realtime_token %>');
	}

	if (window.realtime.socketIo) {

		window.realtime.enabled = true;

		window.realtime.socketIo.on('connect', function() {
			// Give a nice round-trip ACK to our realtime server that we connected.
    		window.realtime.socketIo.emit('realtime_user_id_connected', { userId: window.realtime.userId });
  		});

		// Queue up all incoming realtime messages.
  		window.realtime.socketIo.on('realtime_msg', function(message) {
    		window.realtime.messageQueue.push(message);
		});
	}

</script>

<% if message_handler %>
  <%= render "realtime/realtime_message_handler" %>
<% end %>

<% if message_console_logger %>
  <%= render "realtime/realtime_message_console_logger" %>
<% end %>

Fix ERB if statement format

Fix ERB if statement format


<% content_for :title do %>
  Coronavirus Business Support
<% end %>

<% content_for :body do %>
  Coronavirus (COVID-19) support is available to businesses.

  You can apply for loans, tax relief and cash grants.

  Employers can apply for staff to get up to 80% pay if they can’t work.

  Self-employed people can receive up to £2,500 per month in grants for at
  least 3 months.

  You can work out what financial support option is available to you.

  For detailed information about different types of business support schemes,
  [check the coronavirus business support page](https://www.gov.uk/coronavirus/business-support).
<% end %>

<% content_for :title do %>
  Find coronavirus financial support for your business
<% end %>

<% content_for :body do %>
  Coronavirus (COVID-19) support is available to businesses.

  You can apply for loans, tax relief and cash grants.

  Employers can apply for staff to get up to 80% pay if they can’t work.

  Self-employed people can receive up to £2,500 per month in grants for at
  least 3 months.

  You can work out what financial support option is available to you.

  For detailed information about different types of business support schemes,
  [check the coronavirus business support page](https://www.gov.uk/coronavirus/business-support).
<% end %>

Update title for coronavirus business support

(Weirdly, changing it on the landing page affects all the other pages.)


    <%= f.button("#{submit_action ||= "Save"}", { class:"btn btn-default btn-primary btn-block update-button" }) %>

<input id="submit-direction" name="submit_direction" type="hidden">

      <a href="<%= "#" %>">← Save and go back

      Save and continue →

Remove the big fat Save button

Remove the big fat Save button

For #154 and #157


# ---------------------------------------------------------------------------------------------
# local.conf.erb
#
# The Apache configuration for this web application
#
# Copyright (c) 2015 Kevin Cureton
# ---------------------------------------------------------------------------------------------

LoadModule ssl_module modules/mod_ssl.so

<Directory /var/www/code>
    Options FollowSymLinks
    Order allow,deny
    Allow from all
    AllowOverride AuthConfig
</Directory>

#<Location />
#    AuthType basic
#    AuthName "API Realm"
#    Require valid-user
#</Location>

<VirtualHost *:80>
    ServerName localhost.localdomain
    Redirect / https://localhost/
</VirtualHost>

<VirtualHost *:443>
    WSGIScriptAlias / /var/www/code/site/main.prod.wsgi
    ServerName localhost.localdomain
    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl/apache.crt
    SSLCertificateKeyFile /etc/httpd/ssl/apache.key
</VirtualHost>

# ---------------------------------------------------------------------------------------------
# local.conf.erb
#
# The Apache configuration for this web application
#
# Copyright (c) 2015 Kevin Cureton
# ---------------------------------------------------------------------------------------------

LoadModule ssl_module modules/mod_ssl.so

<Directory /var/www/code>
    Options FollowSymLinks
    Order allow,deny
    Allow from all
    AllowOverride AuthConfig
</Directory>

#<Location />
#    AuthType basic
#    AuthName "API Realm"
#    Require valid-user
#</Location>

<VirtualHost *:80>
    WSGIScriptAlias / /var/www/code/site/main.prod.wsgi
    WSGIPassAuthorization On
    ServerName 10.0.0.10
#    Redirect / https://localhost/
</VirtualHost>

<VirtualHost *:443>
    WSGIScriptAlias / /var/www/code/site/main.prod.wsgi
    WSGIPassAuthorization On
    ServerName 10.0.0.10
    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl/apache.crt
    SSLCertificateKeyFile /etc/httpd/ssl/apache.key
</VirtualHost>

Add option to pass authorization header into the WSGI application.


<%= content_tag :div, class: "#{block.model_name.singular.dasherize} block" do %>
  <%= render "blocks/#{block.model_name.singular}/show", block: block %>
<% end %>

<%= content_tag :div, class: "#{block.model_name.singular.dasherize} block #{block.try(:css_class)}" do %>
  <%= render "blocks/#{block.model_name.singular}/show", block: block %>
<% end %>

Enable adding additional css classes to block wrapper


    <% @emails.each do |email| %>

Email:
      <%= link_to(email_path(email.id)) do %>
        <%= email.subject %>

        <%= truncate(email.text, length: 100) %>
      <% end %>

    <% end %>

  <%= link_to 'Edit', edit_user_path(@user) %> |
  <%= link_to 'Back', users_path %>

    <% @emails.each do |email| %>

Subject :
      <%= link_to(email_path(email.id)) do %>
        <%= email.subject %>

        <%= truncate(email.text, length: 100) %>
        <% if email.sentiment == "positive" %>

Positive

        <% else %>

Negative

        <% end %>
      <% end %>

    <% end %>

  <%= link_to 'Edit', edit_user_path(@user) %> |
  <%= link_to 'Back', users_path %>

Add sentiment styling with colors for emails index


<%= form_for @event do |f|%>
  <fieldset>
    <%= f.text_field :name, placeholder: "Event Name" %>
    <%= f.date_field :date %>
    <%= f.time_field :time %>
    <%= f.text_field :location, placeholder: "Event Location" %>
    <%= text_area_tag :emails, "", {:placeholder => "Invite guests by entering emails separated by commas!"} %>
    <%= f.submit 'Save', class: 'button' %>
  </fieldset>
<% end %>

<%= form_for @event do |f|%>
  <fieldset>
    <%= f.text_field :name, placeholder: "Event Name" %>
    <%= f.date_field :date, id: 'date' %>
    <%= f.time_field :time, id: 'time' %>
    <%= f.text_field :location, placeholder: "Event Location" %>
    <%= text_area_tag :emails, "", {:placeholder => "Invite guests by entering emails separated by commas!"} %>
    <%= f.submit 'Save', class: 'button' %>
  </fieldset>
<% end %>

Add ids to form fields for feature testing


<%= display_header title: "New project",
  breadcrumbs: [:projects, "New project"] %>

    <%= simple_form_for form, url: projects_path do |f| %>
        <%= f.input :name, input_html: { class: 'form-control' },
                    label: 'Name',
                    hint: 'Name of the new project.' %>

        <%= f.input :taxonomy_branch, input_html: { class: 'form-control' },
                    label: 'Branch of GOV.UK taxonomy',
                    collection: form.taxonomy_branches_for_select %>

        <%= f.input :remote_url, input_html: { class: 'form-control' },
                    label: 'Remote URL',
                    hint: 'Remote URL with the contents of the project.' %>

        <%= f.submit 'New Project', class: "btn btn-lg btn-success" %>
    <% end %>

    <%= render 'shared/help',
      example_spreadsheet: "https://docs.google.com/spreadsheets/d/1R9Qkg4CmvnQ1WDmT6mqZm7_5kIOstRsnhIDmv0Eop40/pub?gid=0" %>

<%= display_header title: "New project",
  breadcrumbs: [:projects, "New project"] %>

    <%= simple_form_for form, url: projects_path do |f| %>
        <%= f.input :name, input_html: { class: 'form-control' },
                    label: 'Name',
                    hint: 'Name of the new project.' %>

        <%= f.input :taxonomy_branch, input_html: { class: 'form-control' },
                    label: 'Branch of GOV.UK taxonomy',
                    collection: form.taxonomy_branches_for_select %>

        <%= f.input :remote_url, input_html: { class: 'form-control' },
                    label: 'Spreadsheet URL',
                    hint: 'Spreadsheet URL with the contents of the project. Required columns: url, title and description.' %>

        <%= f.submit 'New Project', class: "btn btn-lg btn-success" %>
    <% end %>

    <%= render 'shared/help',
      example_spreadsheet: "https://docs.google.com/spreadsheets/d/1R9Qkg4CmvnQ1WDmT6mqZm7_5kIOstRsnhIDmv0Eop40/pub?gid=0" %>

Improve copy of the new project page spreadsheet input


<%= @tag.name %>

Resources with this topic:

  <% @tag.resources.each do |resource| %>

<%= link_to resource.title, resource_path(resource) %>

  <% end %>

<%= button_to "Delete", tag_path(@tag), method: "delete" %>

Add delete button to tag page.

Add delete button to tag page.


<%= link_to booth_assignments_admin_polls_path do %>
   <%= t("shared.back") %>
<% end %>

<%= t("admin.booth_assignments.manage.assignments_list", poll: @poll.name) %>

<% if @booths.empty? %>

    <%= t("admin.booths.index.no_booths") %>

<% else %>

      <%= t("admin.booths.index.name") %>
      <%= t("admin.booth_assignments.status.assign_status") %>
      <%= t("admin.actions.actions") %>

    <% @booths.each do |booth| %>
      <%= render partial: "booth_assignment", locals: { booth: booth } %>
    <% end %>

<% end %>

<%= link_to booth_assignments_admin_polls_path do %>
   <%= t("shared.back") %>
<% end %>

<%= t("admin.booth_assignments.manage.assignments_list", poll: @poll.name) %>

<% if @booths.empty? %>

    <%= t("admin.booths.index.no_booths") %>

<% else %>

      <%= t("admin.booths.index.name") %>
      <%= t("admin.booth_assignments.status.assign_status") %>
      <%= t("admin.actions.actions") %>

    <% @booths.each do |booth| %>
      <tr id="<%= dom_id(booth) %>" class="booth">
        <%= render partial: "booth_assignment", locals: { booth: booth, booth_assignment: booth.assignment_on_poll(@poll) } %>

    <% end %>

<% end %>

Use booth assigment partial correctly

Use booth assigment partial correctly


<% @promotion.build_image if !@promotion.image %>

<%= f.field_container :image do %>
  <%= f.label :image %>

  <%= f.fields_for :image, @promotion.image do |image_form| %>
    <% if !image_form.object.new_record? %>
      <%= image_tag(image_form.object.attachment.url(:mini)) %>
      <%= link_to_remove_fields t("remove"), image_form %>

    <% end %>

    <%= image_form.file_field :attachment %>
  <% end %>
<% end %>

<% @promotion.build_image if !@promotion.image %>

<%# FIXME: disable upload for new records  %>
<%- unless @promotion.new_record? %>
<%= f.field_container :image do %>
  <%= f.label :image %>

  <%= f.fields_for :image, @promotion.image do |image_form| %>
    <% if !image_form.object.new_record? %>
      <%= image_tag(image_form.object.attachment.url(:mini)) %>
      <%= link_to_remove_fields t("remove"), image_form %>

    <% end %>

    <%= image_form.file_field :attachment %>
  <% end %>
<% end %>
<% end %>

Disable upload for new records

Disable upload for new records


development:
  sessions:
    default:
      hosts:
        - localhost:27017
      database: <%= dbname %>-development
  options:
    allow_dynamic_fields: false
    identity_map_enabled: true
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: false
    use_activesupport_time_zone: true
    use_utc: true

test:
  sessions:
    default:
      hosts:
        - localhost:27017
      database: <%= dbname %>-test
  options:
    allow_dynamic_fields: false
    identity_map_enabled: true
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: false
    use_activesupport_time_zone: true
    use_utc: true

production:
  sessions:
    default:
      uri: <%%= ENV['MONGOHQ_URL'] %>
  options:
    allow_dynamic_fields: false
    identity_map_enabled: true
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: true
    use_activesupport_time_zone: true
    use_utc: true

development:
  sessions:
    default:
      hosts:
        - localhost:27017
      database: <%= dbname %>-development
  options:
    allow_dynamic_fields: false
    identity_map_enabled: false
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: false
    use_activesupport_time_zone: true
    use_utc: true

test:
  sessions:
    default:
      hosts:
        - localhost:27017
      database: <%= dbname %>-test
  options:
    allow_dynamic_fields: false
    identity_map_enabled: false
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: false
    use_activesupport_time_zone: true
    use_utc: true

production:
  sessions:
    default:
      uri: <%%= ENV['MONGOHQ_URL'] %>
  options:
    allow_dynamic_fields: false
    identity_map_enabled: false
    include_root_in_json: false
    include_type_for_serialization: true
    preload_models: false
    scope_overwrite_exception: true
    raise_not_found_error: false
    skip_version_check: true
    use_activesupport_time_zone: true
    use_utc: true

Disable identity map by default.

Disable identity map by default.


---
title:  Security
---

The security framework permits authentication of connecting components and authorization of operations for all communicating components of the distributed system.

-   **[Security Features](../../managing/security/security_intro.html)**

    Encryption, SSL secure communication, authentication, and authorization
features help to secure the distributed system.

-   **[Security Detail Considerations](../../managing/security/security_audit_overview.html)**

    This section gathers discrete details in one convenient location to better help you assess and configure the security of your environment.

-   **[Security Implementation Overview](../../managing/security/implementing_security.html)**

    Apache Geode can authenticate peer system members and clients. It can also authorize cache operations on a server from clients.

-   **[Enable Security with Property Definitions](../../managing/security/enable_security`.html)**

-   **[Authentication](../../managing/security/authentication_overview.html)**

    A distributed system using authentication bars malicious peers or clients, and deters inadvertent access to its cache.

-   **[Authorization](../../managing/security/authorization_overview.html)**

    Client operations on a cache server can be restricted or completely blocked based on the roles and permissions assigned to the credentials submitted by the client.

-   **[SSL](../../managing/security/ssl_overview.html)**

    SSL protects your data in transit between applications.

---
title:  Security
---

The security framework permits authentication of connecting components and authorization of operations for all communicating components of the distributed system.

-   **[Security Features](../../managing/security/security_intro.html)**

    Encryption, SSL secure communication, authentication, and authorization
features help to secure the distributed system.

-   **[Security Detail Considerations](../../managing/security/security_audit_overview.html)**

    This section gathers discrete details in one convenient location to better help you assess and configure the security of your environment.

-   **[Security Implementation Overview](../../managing/security/implementing_security.html)**

    Apache Geode can authenticate peer system members and clients. It can also authorize cache operations on a server from clients.

-   **[Enable Security with Property Definitions](../../managing/security/enable_security.html)**

-   **[Authentication](../../managing/security/authentication_overview.html)**

    A distributed system using authentication bars malicious peers or clients, and deters inadvertent access to its cache.

-   **[Authorization](../../managing/security/authorization_overview.html)**

    Client operations on a cache server can be restricted or completely blocked based on the roles and permissions assigned to the credentials submitted by the client.

-   **[SSL](../../managing/security/ssl_overview.html)**

    SSL protects your data in transit between applications.

Fix typo in enable_security.html link.

Fix typo in enable_security.html link.


  <%= program :name %>

  <%= program :description %>

  Commands:
<% for name, command in @commands -%>
<% unless alias? name -%>
    <%= "%-20s %s" % [command.name, command.summary || command.description] %>
<% end -%>
<% end -%>
<% unless @aliases.empty? %>
  Aliases:
<% for alias_name, args in @aliases -%>
    <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
<% end -%>
<% end %>
<% unless @options.empty? -%>
  Global Options:
<% for option in @options -%>
    <%= "%-20s %s" % [option[:switches].join(', '), option[:description]] -%>
<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= title %>:
    <%= body %>
  <% end %>
<% end -%>

  <%= program :name %>

  <%= program :description %>

  Commands:
<% for name, command in @commands.sort -%>
<% unless alias? name -%>
    <%= "%-20s %s" % [command.name, command.summary || command.description] %>
<% end -%>
<% end -%>
<% unless @aliases.empty? %>
  Aliases:
<% for alias_name, args in @aliases.sort -%>
    <%= "%-20s %s %s" % [alias_name, command(alias_name).name, args.join(' ')] %>
<% end -%>
<% end %>
<% unless @options.empty? -%>
  Global Options:
<% for option in @options -%>
    <%= "%-20s %s" % [option[:switches].join(', '), option[:description]] -%>
<% end -%>
<% end -%>
<% if program :help -%>
  <% for title, body in program(:help) %>
  <%= title %>:
    <%= body %>
  <% end %>
<% end -%>

Sort commands and aliases alphabetically.

Signed-off-by: TJ Holowaychuk <546b05909706652891a87f7bfe385ae147f61f91@vision-media.ca>


<li class="loan_status <%= copy.status.to_s %> <%= copy.current_user == current_user ? "my_copy" : "" %>">

#<%= copy.book_reference %>

  <% if copy.available? %>

Available to borrow <%= link_to "Borrow", borrow_book_copy_path(@book, copy), :class => 'btn', :method => "POST" %>

  <% else %>

On loan to <%= copy.current_user == current_user ? "you" : copy.current_user.name %>
      <%= link_to "Return", return_book_copy_path(@book, copy), :class => 'btn', :method => "POST" if copy.current_user == current_user %>
      since <%= copy.current_loan.loan_date.strftime("%b %C, %Y") %>

  <% end %>

<li class="loan_status <%= copy.status.to_s %> <%= copy.current_user == current_user ? "my_copy" : "" %>">

#<%= copy.book_reference %>

  <% if copy.available? %>

Available to borrow <%= link_to "Borrow", borrow_book_copy_path(@book, copy), :class => 'btn', :method => "POST" %>

  <% else %>

On loan to <%= copy.current_user == current_user ? "you" : copy.current_user.name %>
      <%= link_to "Return", return_book_copy_path(@book, copy), :class => 'btn', :method => "POST" if copy.current_user == current_user %>
      since <%= copy.current_loan.loan_date.strftime("%b %d, %Y") %>

  <% end %>

Fix strftime for copy borrow date.

Fix strftime for copy borrow date.


<%= @group.name %>

<% @group.users.each do |user| %>
  <%= link_to user.username, user_path(user) %>
<% end %>

<% @group_artists.each do |artist| %>

<%= artist[0] %> <%= artist[1] %>

<% end %>

<%= @group.name %>

Band Members

    <% @group.users.each do |user| %>
      <%= link_to user.username, user_path(user) %>

    <% end %>

Top 40 Artists for this Group

    <% if @group_artists.length > 0 %>
      <%= render partial: 'artists/rankings_table', locals: {artists: @group_artists} %>
    <% else %>
      Your group hasn't voted on any artists yet. Get started now!
    <% end %>

Add some styling to group pages

Add some styling to group pages


<%= link_to @image.gallery.title, @image.gallery %> » <%= @image.title %>

		Full size: <%= link_to "link", @image.picture.url %>

		<%= image_tag @image.picture.url %>

			<%- [:normal, :small, :thumb].each do |size| %>

					<%= image_tag @image.picture.url(size) %>

						Direct link: <%= link_to "size #{size.to_s}", @image.picture.url(size) %>

			<% end %>

<%= link_to @image.gallery.title, @image.gallery %> » <%= @image.title %>

		Full size: <%= link_to "link", @image.picture.url, :class => "btn btn-mini" %>

		<%= image_tag @image.picture.url %>

			<%- [:normal, :small, :thumb].each do |size| %>

					<%= image_tag @image.picture.url(size) %>

						Direct link: <%= link_to "size #{size.to_s}", @image.picture.url(size), :class => "btn btn-mini" %>

			<% end %>

Add buttons for images' links

Add buttons for images' links


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

<%= link_to truncate(p.title, length: 40), post_path(p) %>

 Posted on <%= p.created_at.strftime("%B %d, %Y") %>

<%= truncate p.content, length: 100 %>

<% end %>

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

<%= link_to truncate(p.title, length: 30), post_path(p) %>

 Posted on <%= p.created_at.strftime("%B %d, %Y") %>

<%= truncate p.content, length: 100 %>

<% end %>

Add truncate method to post title.

Add truncate method to post title.


 Create a new story

<%= form_for @story do |f| %>
  <%= f.label :title %>
  <%= f.text_field :title %>

  <%= f.label :content %>
  <%= f.text_area :content, :class => "redactor"%>

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

 Create a new story

<%= form_for @story do |f| %>
  <%= f.label :title %>
  <%= f.text_field :title %>

  <%= f.label :content %>
  <%= f.text_area :content, :class => "redactor"%>

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

Add 'save' to submit button

Add 'save' to submit button


<div id="<%%= slot_code %>" class="component <%= file_name.gsub(/_/ig, '-') %> <%%= 'double' if expand %> <%%= additional_classes %>">
<% unless attributes.empty? %>

  <% for attribute in attributes -%>

<%= attribute.name.titleize %>

<%%= component.<%= attribute.name %>%>

  <% end -%>

<% end -%>

<div id="<%%= slot_code %>" class="component <%= file_name.gsub(/_/, '-') %> <%%= 'double' if expand %> <%%= additional_classes %>">
<% unless attributes.empty? %>

  <% for attribute in attributes -%>

<%= attribute.name.titleize %>

<%%= component.<%= attribute.name %>%>

  <% end -%>

<% end -%>

Fix to component generator introduced by regex bug


<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <%= javascript_include_tag :application %>
  </head>
  <body>
    <%= yield %>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Welcome to Ember.js!</title>
    <%= javascript_include_tag :application %>
  </head>
  <body>
    <%= yield %>
  </body>
</html>

Add `<title>` to page layout for generator


<%
  # TODO: Link user to blog so we can do @resource.blog
  blog = Blog.first
%>

Hello <%= @resource.login %>!

Someone has requested a link to change your password. You can do this
through the link below.

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token, host: blog.base_url) %>

If you didn't request this, please ignore this email.

Your password won't change until you access the link above and create a new one.

Make reset password mail work

Make reset password mail work


<% content_for :context, @edition.title %>
<% content_for :page_title, "Specialist topic tagging" %>
<% content_for :title, "Specialist topic tagging" %>
<% content_for :title_margin_bottom, 6 %>

<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", {
    href: admin_edition_path(@edition)
  } %>
<% end %>

    <%= form_for @edition, url: admin_edition_legacy_associations_path(@edition), as: :edition, method: :put,
        html: { class: edition_form_classes(@edition) } do |form| %>

      <%= render 'specialist_sector_fields', form: form, edition: @edition %>
      <%= render "govuk_publishing_components/components/button", {
        text: "Update specialist topics",
        margin_bottom: 8,
      } %>
    <% end %>

<% content_for :context, @edition.title %>
<% content_for :page_title, "Specialist topic tagging" %>
<% content_for :title, "Specialist topic tagging" %>
<% content_for :title_margin_bottom, 6 %>

    <%= form_for @edition, url: admin_edition_legacy_associations_path(@edition), as: :edition, method: :put,
        html: { class: edition_form_classes(@edition) } do |form| %>

      <%= render 'specialist_sector_fields', form: form, edition: @edition %>

        <%= render "govuk_publishing_components/components/button", {
          text: "Update specialist topics",
        } %>

        <%= link_to("Cancel", @path, class: "govuk-link") %>

    <% end %>

Replace legacy associations back button with cancel button

In our like for like approach we're using cancel buttons instead of back buttons in the new design system pages.


<% if spree_current_user %>

<%= Spree.t(:logged_in_as) %>: <%= spree_current_user.email %>

<%= link_to Spree.t(:account), spree.edit_user_path(spree_current_user) %>

<%= link_to Spree.t(:logout), spree.logout_path %>

    <% if spree.respond_to? :root_path %>

         <%= link_to Spree.t(:back_to_store), spree.root_path, :target => '_blank' %>

    <% end %>

<% end %>

<% if spree_current_user %>

<%= Spree.t(:logged_in_as) %>: <%= spree_current_user.email %>

<%= link_to Spree.t(:account), spree.edit_user_path(spree_current_user) %>

<%= link_to Spree.t(:logout), spree.admin_logout_path %>

    <% if spree.respond_to? :root_path %>

         <%= link_to Spree.t(:back_to_store), spree.root_path, :target => '_blank' %>

    <% end %>

<% end %>

Change admin logout path to use the admin namespaced logout path


Lista de projetos

    Título

    Template

    Textos

  <% if @projects %>
    <% @projects.each do |project| %>

        <%= link_to project.book.title, admin_project_path(project) %>, (<%= book.organizer.name.presence || book.organizer.email %>, org.)
        <%= link_to 'Editar', edit_admin_project_path(project) %>
        <%= project.book.template %>
        <%= admin_book_status(project.book) %>
        <%= raw project.book.texts.size %>

    <% end %>
  <% end %>

Lista de projetos

    Título

    Template

    Textos

  <% if @projects %>
    <% @projects.each do |project| %>

        <%= link_to project.book.title, admin_project_path(project) %>, (<%= project.book.organizer.name.presence || project.book.organizer.email %>, org.)
        <%= link_to 'Editar', edit_admin_project_path(project) %>
        <%= project.book.template %>
        <%= admin_book_status(project.book) %>
        <%= raw project.book.texts.size %>

    <% end %>
  <% end %>

Edit organizer credit in project lists

Edit organizer credit in project lists


    <% organizations.each do |organization| %>

          <%= organization.category_text %>
          <%= link_to organization.name, organization %> ( <%= link_to "review", organization.url, :target => "_blank" %> )
          ( <%= link_to "edit", edit_organization_path(organization) %> )
          ( <%= link_to "destroy", organization_path(organization), :method => :delete, :confirm => "Are you sure?" %> )

          <%= content_tag :div, :class => "stars inline", "data-score" => organization.reviews.average(:rating), "data-readonly" => true do end %>
          <%= pluralize organization.reviews.count, "Review" %>

          <%= render "relationships/organization_users/favorite_form", :organization => organization %>

    <% end %>

    <% organizations.each do |organization| %>

          <%= organization.category_text %>
          <%= link_to organization.name, organization %>
          ( <%= link_to "edit", edit_organization_path(organization) %> )
          ( <%= link_to "destroy", organization_path(organization), :method => :delete, :confirm => "Are you sure?" %> )

          <%= content_tag :div, :class => "stars inline", "data-score" => organization.reviews.average(:rating), "data-readonly" => true do end %>
          <%= pluralize organization.reviews.count, "Review" %>

          <%= render "relationships/organization_users/favorite_form", :organization => organization %>

    <% end %>

Remove link to outside review on the organization table


    <form class='table-filter'>
      <input id="table-filter" type="text" class="form-control normal js-filter-table-input" placeholder="Filter table">
    </form>

Fix layout of table search on tagging spreadsheets


    <%= image_tag identity_provider.logo_path, alt: '' %>

      <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %>

  <% button_class = recommended ? 'button' : 'button-link' %>
  <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %>
      <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name),
                     class: button_class,
                     name: identity_provider.simple_id,
                     id: nil,
                     type: 'submit',
                     value: identity_provider.display_name
      %>
      <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %>
      <%= hidden_field_tag 'recommended-idp', recommended, id: nil %>
      <%= f.hidden_field :entity_id, id: nil %>
      <%= f.hidden_field :simple_id, id: nil %>
  <% end %>

    <%= image_tag identity_provider.logo_path, alt: '' %>

      <%= link_to(t('hub.choose_a_certified_company.about_idp', name: identity_provider.display_name), choose_a_certified_company_about_path(identity_provider.simple_id)) %>

  <% button_class = recommended ? 'button' : 'button-link' %>
  <%= form_for(identity_provider, url: choose_a_certified_company_submit_path, html: {class: 'idp-option', id: nil}) do |f| %>
      <%= f.button t('hub.choose_a_certified_company.choose_idp', name: identity_provider.display_name),
                     class: button_class,
                     role: 'link',
                     name: identity_provider.simple_id,
                     id: nil,
                     type: 'submit',
                     value: identity_provider.display_name
      %>
      <%= hidden_field_tag 'selected-idp', identity_provider.entity_id, id: nil %>
      <%= hidden_field_tag 'recommended-idp', recommended, id: nil %>
      <%= f.hidden_field :entity_id, id: nil %>
      <%= f.hidden_field :simple_id, id: nil %>
  <% end %>

bau: Add role=link to buttons styled as links

Solo: da39a3ee5e6b4b0d3255bfef95601890afd80709@richardtowers


The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (<a href="<%= help_page_url %>#full_address">more details).

At the bottom of this page, write a reply to the authority explaining this to them.

Add example template to indicate that this needs to be customized/translated.


Tools

Someone thought these were useful, at some point. I take no responsibility for whether they actually are or not.

Invalidated Feedback

User Data

Blacklist

    <% if current_user.try(:is_admin) %>

Posts with Admin Reports

<%= link_to "Ignored Users", admin_ignored_users_path %>

API Keys

    <% end %>

Tools

Someone thought these were useful, at some point. I take no responsibility for whether they actually are or not.

Invalidated Feedback

Feedback via API

User Data

Blacklist

    <% if current_user.try(:is_admin) %>

Posts with Admin Reports

<%= link_to "Ignored Users", admin_ignored_users_path %>

API Keys

    <% end %>

Add API feedback to index

Add API feedback to index


<% if current_user.liked? likeable %>
  <%= form_tag unlike_path(likeable_type: likeable.class.to_s, likeable_id: likeable.id), method: :post, remote: true do %>
    <% button_tag class: 'btn btn-block liked' do %>
      <%= fa_icon 'thumbs-up' %> unlike
    <% end %>
  <% end %>
<% else %>
  <%= form_tag like_path(likeable_type: likeable.class.to_s, likeable_id: likeable.id), remote: true do %>
    <% button_tag class: 'btn btn-block', style: 'cursor: pointer' do %>
      <%= fa_icon 'thumbs-up' %> like
    <% end %>
  <% end %>
<% end %>

<% if current_user.liked? likeable %>
  <%= form_tag unlike_path(likeable_type: likeable.class.to_s, likeable_id: likeable.id), method: :post, remote: true do %>
    <% button_tag class: 'btn btn-block liked' do %>
      <%= fa_icon 'thumbs-down' %> unlike
    <% end %>
  <% end %>
<% else %>
  <%= form_tag like_path(likeable_type: likeable.class.to_s, likeable_id: likeable.id), remote: true do %>
    <% button_tag class: 'btn btn-block', style: 'cursor: pointer' do %>
      <%= fa_icon 'thumbs-up' %> like
    <% end %>
  <% end %>
<% end %>

Set thumbs down to unlike

fix: Set thumbs down to unlike


    <meta charset="utf-8" />
    <title></title>
    <link href="style_form.css" rel="stylesheet" />
    <link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,700' rel='stylesheet' type='text/css'>

Welcome to Octomaps,
the GitHub Repository Mapper!

    <div id = "query"

Please enter the name of a GitHub repository and the repository

        owner to generate a map of the locations of its contributors.

      <form action="/" method="post">
        Repository Owner: <input type="text" name="repo">

        Repository Name: <input type="text" name="owner">

        <input type="submit" value="Submit" id="submit">
      </form>

    <meta charset="utf-8" />
    <title></title>
    <link href="style_form.css" rel="stylesheet" />
    <link href='http://fonts.googleapis.com/css?family=Quattrocento+Sans:400,700' rel='stylesheet' type='text/css'>

Welcome to Octomaps,
the GitHub Repository Mapper!

    <div id = "query"

Please enter the name of a GitHub repository and the repository

        owner to generate a map of the locations of its contributors.

      <form action="/" method="post">
        Repository Owner: <input type="text" name="owner">

        Repository Name: <input type="text" name="repo">

        <input type="submit" value="Submit" id="submit">
      </form>

Fix ordering of search box names so they correspond correctly to owner or repo name


<!DOCTYPE html>

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

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

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

        <% end %>

        <%= yield %>

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

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

<!DOCTYPE html>

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

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

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

        <% end %>

        <%= yield %>

      © <%= Date.today.year %> The Team Formerly Known as Alphagov.

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

Remove reference to Ket Lai

Remove reference to Ket Lai


<!DOCTYPE html>

  <meta charset="utf-8" />
  <title><%= create_page_title %> Big Earth Blockchain Explorer</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= favicon_link_tag %>
  <%= csrf_meta_tags %>

<body data-exchange_rate='<%= @exchange_rate %>'>
  <%= render 'shared/nav_bar' %>
  <%= yield %>
  <%= render 'shared/google_analytics' %>

          <%= render 'shared/footer' %>

<!DOCTYPE html>

  <meta charset="utf-8" />
  <title><%= create_page_title %> Big Earth Blockchain Explorer</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= favicon_link_tag %>
  <%= csrf_meta_tags %>

<body data-exchange_rate='<%= @exchange_rate %>'>
  <%= render 'shared/nav_bar' %>
  <%= yield %>
  <%= render 'shared/google_analytics' %>

          <%= render 'shared/footer' %>

  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>

Move blocking javascript below the rest of the DOM.


<!DOCTYPE html>
<html>
<head>
  <title>SpacialDB</title>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render 'layouts/header' %>
  <div class="container">
    <%= render 'layouts/messages' %>
    <%= yield %>
    <%= render 'layouts/footer' %>
  </div>

  <%= render 'layouts/ga' %>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>SpacialDB</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render 'layouts/header' %>
  <div class="container">
    <%= render 'layouts/messages' %>
    <%= yield %>
    <%= render 'layouts/footer' %>
  </div>

  <%= render 'layouts/ga' %>
</body>
</html>

Add meta tag viewport for better visibility in mobile


<!DOCTYPE html>

    <title>FARMA-ALG</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" %>
    <%= stylesheet_link_tag "http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" %>

    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

      <%= render "shared/header" %>

      <% if user_signed_in? %>
        <%= render "shared/sidebar" %>
      <% end %>

        <%= render "shared/flash_messages", object: flash %>

<%= breadcrumbs style: :bootstrap %>

            <%= yield(:header) %>
             <%= yield(:description) %>

          <%= yield %>

      <%= render "shared/footer" %>

    <%= render 'shared/show_modal' %>

Remove old reference to show_modal partial


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title><%= content_for?(:title) ? yield(:title) : "foundation-rails" %></title>

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

  <body>

    <div class="body">
      <%= yield %>
    </div>

  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title><%= content_for?(:title) ? yield(:title) : "foundation-rails" %></title>

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

  <body>
    <header>
    </header>

    <main>
      <%= yield %>
    </main>

    <footer>
    </footer>
  </body>
</html>

Add Main Header, Main Tag & Footer Layout


<!DOCTYPE html>

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

  <%= yield :head %>

  <%= render :partial => 'shared/header', :locals => {:definition => @definition} %>

      <%= yield %>

Add HTML5Shiv for IE8 compatibility

Add HTML5Shiv for IE8 compatibility


<!doctype html>

    <title>
      <% if @channel %><%= @channel.title %> | <% end %>
      Red Cursor
    </title>
    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
    <%= users_js %>
    <% if mobile? %>
      <meta name="viewport" content="initial-scale = 1.0, user-scalable = no">
    <% end %>

  <body<%= ' class="mobile"'.html_safe if mobile? %> data-socket-server="ws://localhost:8000" data-api-key="<%= current_user.api_key %>">

          Red Cursor

        <%= render :partial => "shared/toolbar" %>

    <% if !flash[:notice].blank? %>

<%= flash[:notice] %>

    <% end %>

        <%= yield %>

<!doctype html>

    <title>
      <% if @channel %><%= @channel.title %> | <% end %>
      Red Cursor
    </title>
    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
    <%= users_js %>
    <% if mobile? %>
      <meta name="viewport" content="initial-scale = 1.0, user-scalable = no">
    <% end %>

  <body<%= ' class="mobile"'.html_safe if mobile? %> data-socket-server="ws://<%= request.host %>:8000" data-api-key="<%= current_user.api_key %>">

          Red Cursor

        <%= render :partial => "shared/toolbar" %>

    <% if !flash[:notice].blank? %>

<%= flash[:notice] %>

    <% end %>

        <%= yield %>

Set proper websocket server url

Set proper websocket server url


<!DOCTYPE html>

    <title><%= yield :title %> - GOV.UK</title>
    <%= stylesheet_link_tag 'application' %>
    <%= stylesheet_link_tag 'print', :media => :print %>
    <%= yield :head %>
    <%= render partial: 'govuk_component/analytics_meta_tags', locals: { content_item: @content_item } %>
    <% if @meta_section %>
      <meta name="govuk:section" content="<%= @meta_section %>">
    <% end %>

    <div id="wrapper" class="answer <%= yield :wrapper_class %>">
      <%= render partial: 'govuk_component/breadcrumbs', locals: @navigation_helpers.breadcrumbs %>

        <%= yield %>

          <%= render partial: 'govuk_component/related_items', locals: @navigation_helpers.related_items %>

Remove redundant tag for removing breadcrumb

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

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


  <%= link_to home_path do %>

      <% if I18n.exists?("general.project_name", locale) %>
        <%= t "general.project_name" %>
      <% end %>
      <% if I18n.exists?("general.project_subtitle", locale) %>
        <%= t "general.project_subtitle" %>
      <% end %>

  <% end %>

Update title / subtitle markup

Update title / subtitle markup

Switch main title's selector to a class, as this markup change will
require reviewing before merging with existing sites anyway

Switch subtitle wrapping element to small and add site-subtitle class
- Expect site-subtitle should be more unique to only style this element


# Upstart: /etc/init/sensu-<%= @name || @service %>.conf
# Managed by OpsChef

description "sensu <%= @name || @service %>"

start on (local-filesystems and net-device-up IFACE=eth0)
stop on [!12345]

respawn
<% gems_path = "/usr/bin" %>
<% unless File.readable?("#{gems_path}/sensu-#{@service}") %>
  <% Gem.path.each do |path| %>
    <% if File.readable?("#{path}/bin/sensu-#{@service}") %>
      <% gems_path = path + "/bin" %>
    <% end %>
  <% end %>
<% end %>

pre-start script
test -x <%= gems_path %>/sensu-<%= @service %> || { stop; exit 0; }
end script

exec sudo -u <%= node.sensu.user %> sh -c "<%= gems_path %>/sensu-<%= @service %><% if @options %> <%= @options %><% end %>"

# Upstart: /etc/init/sensu-<%= @name || @service %>.conf
# Managed by OpsChef

description "sensu <%= @name || @service %>"

start on (local-filesystems and net-device-up IFACE=eth0)
stop on [!12345]

respawn

pre-start script
test -x <%= GemBinPath.path(@service) %>/sensu-<%= @service %> || { stop; exit 0; }
end script

exec sudo -u <%= node.sensu.user %> sh -c "<%= GemBinPath.path(@service) %>/sensu-<%= @service %><% if @options %> <%= @options %><% end %>"

Refactor template based logic into a library


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

  <%= sanitize product_description(@product).truncate(450) %>

  <%= sanitize product_description(@product) %>

<% if product_description(@product).length > 450 %>

    <%= icon(name: 'arrow-right',
             classes: 'spree-icon-arrow spree-icon-arrow-down',
             width: 20,
             height: 20) %>

<% end %>

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

  <% if Spree::Config[:show_raw_product_description] %>
    <%= raw product_description(@product).truncate(450) %>
  <% else %>
    <%= sanitize product_description(@product).truncate(450) %>
  <% end %>

  <% if Spree::Config[:show_raw_product_description] %>
    <%= raw product_description(@product) %>
  <% else %>
    <%= sanitize product_description(@product) %>
  <% end %>

<% if product_description(@product).length > 450 %>

    <%= icon(name: 'arrow-right',
             classes: 'spree-icon-arrow spree-icon-arrow-down',
             width: 20,
             height: 20) %>

<% end %>

Make config :show raw product_description usable in new storefront.


<%= render partial: "users/tabs" %>

<%= form_tag("/users", method: :get) do %>

          Name
          Email
          Phone
          Address
          Organization Name
          Organization Role

        <% @users.each do |user| %>
          <tr class="user <%= cycle "odd-row", "even-row" %>" data-href="<%= edit_user_path(user) %>">
            <%= user.name %>
            <%= user.email %>
            <%= user.phone_number %>
            <%= user.address %>

              <% user.organizations.each do |organization| %>

<%= organization.name %>

              <% end %>

              <% user.organizations.each do |organization| %>

<%= user.role_at(organization) %>

              <% end %>

        <% end %>

<% end %>

<%= render partial: "users/tabs" %>

<%= form_tag("/users", method: :get) do %>

          Name
          Email
          Phone
          Address
          Organization Name
          Organization Role

        <% @users.each do |user| %>
          <tr class="user <%= cycle "odd-row", "even-row" %>" data-href="<%= edit_user_path(user) %>">
            <td rowspan="<%= [1, user.organizations.size].max %>"><%= user.name %>
            <td rowspan="<%= [1, user.organizations.size].max %>"><%= user.email %>
            <td rowspan="<%= [1, user.organizations.size].max %>"><%= user.phone_number %>
            <td rowspan="<%= [1, user.organizations.size].max %>"><%= user.address %>
            <% if user.organizations.empty? %>

            <% else %>
              <%= user.organizations.first.name %>
              <%= user.role_at(user.organizations.first) %>
            <% end %>

          <% user.organizations.to_a.drop(1).each do |organization| %>
            <tr class="user <%= current_cycle %>" data-href="<%= edit_user_path(user) %>">
              <%= organization.name %>
              <%= user.role_at(organization) %>

          <% end %>
        <% end %>

<% end %>

Use separate rows for additional organizations Unfortunately data-table doesn't work with this, so maybe this isn't ideal


---
- job:
    name: deploy-emergency-banner
    display-name: Deploy the emergency banner
    project-type: freestyle
    description: "Deploy the emergency banner on GOV.UK."
    builders:
      # The argument to `-c` is in this case `frontend` but the value is used by both `static` and `frontend` applications
      - shell: ssh deploy@$(govuk_node_list -c frontend --single-node) "cd /var/apps/static && govuk_setenv static bundle exec rake emergency_banner:deploy['"$CAMPAIGN_CLASS"','"$HEADING"','"$SHORT_DESCRIPTION"','"$LINK"']"
    wrappers:
      - ansicolor:
          colormap: xterm
    parameters:
      - choice:
          name: CAMPAIGN_CLASS
          description: Choose the colour of banner to deploy
          choices:
            - black
            - green
            - red
      - string:
          name: HEADING
          description: The title of the banner
      - string:
          name: SHORT_DESCRIPTION
          description: The text that appears under the title
      - string:
          name: LINK
          description: The more information link

---
- job:
    name: deploy-emergency-banner
    display-name: Deploy the emergency banner
    project-type: freestyle
    description: "Deploy the emergency banner on GOV.UK."
    builders:
      # The argument to `-c` is in this case `frontend` but the value is used by both `static` and `frontend` applications
      - shell: ssh deploy@$(govuk_node_list -c frontend --single-node) "cd /var/apps/static && govuk_setenv static bundle exec rake emergency_banner:deploy[\"$CAMPAIGN_CLASS\",\"$HEADING\",\"$SHORT_DESCRIPTION\",\"$LINK\"]"
    wrappers:
      - ansicolor:
          colormap: xterm
    parameters:
      - choice:
          name: CAMPAIGN_CLASS
          description: Choose the colour of banner to deploy
          choices:
            - black
            - green
            - red
      - string:
          name: HEADING
          description: The title of the banner
      - string:
          name: SHORT_DESCRIPTION
          description: The text that appears under the title
      - string:
          name: LINK
          description: The more information link

Fix quoting issues for deploy emergency banner task

Apostrophes in the content should be properly handled.


  <%if logged_in? %>
    <%if !user.favorite_enterprises.include?(profile) %>

<%= button(:love, _('Add as favorite'), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :title => _('Add enterprise as favorite')) %>

    <% end %>
  <% end %>
  <% if profile.enable_contact? %>

<%= button(:'menu-mail', _('Send an e-mail'), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button'} ) %>

  <% end %>

<%= report_abuse(profile, :button) %>

  <%if logged_in? %>
    <%if !user.favorite_enterprises.include?(profile) %>

<%= button(:love, _('Add as favorite'), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :title => _('Add enterprise as favorite'), :option => 'success') %>

    <% end %>
  <% end %>
  <% if profile.enable_contact? %>

<%= button(:'menu-mail', _('Send an e-mail'), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button'} ) %>

  <% end %>

<%= report_abuse(profile, :button) %>

Change favorite button to 'success' style


imq.instanceconfig.version=300
<%
configs = {}
  configs.merge!(@resource.config)

  bridges = []
  services = []

  configs["imq.portmapper.port"] = @resource.port

  if @resource.admin_port
    services << "admin"
    configs["imq.admin.tcp.port"] = @resource.admin_port
  end

  if @resource.jms_port
    services << "jms"
    configs["imq.jms.tcp.port"] = @resource.jms_port
  end

  if @resource.stomp_port
    bridges << "stomp"
    configs["imq.bridge.stomp.tcp.enabled"] = "true"
    configs["imq.bridge.stomp.tcp.port"] = @resource.stomp_port
  end

  if services.size > 0
    configs["imq.service.activelist"] = services.join(',')
  end

  configs["imq.bridge.admin.user"] = @resource.admin_user
  user = @resource.users[@resource.admin_user]
  raise "Missing user details for admin user '#{@resource.admin_user}'" unless user
  configs["imq.bridge.admin.password"] = user[:password]
  configs["imq.imqcmd.password"] = user[:password]

  if bridges.size > 0
    configs["imq.bridge.enabled"] = "true"
    configs["imq.bridge.activelist"] = bridges.join(',')
  end
%>
<%= configs.sort.collect { |k, v| "#{k}=#{v}\n" }.join("") %>

imq.instanceconfig.version=300
<%
configs = {}
  configs["imq.log.timezone"] = node["tz"] || "GMT"

  configs.merge!(@resource.config)

  bridges = []
  services = []

  configs["imq.portmapper.port"] = @resource.port

  if @resource.admin_port
    services << "admin"
    configs["imq.admin.tcp.port"] = @resource.admin_port
  end

  if @resource.jms_port
    services << "jms"
    configs["imq.jms.tcp.port"] = @resource.jms_port
  end

  if @resource.stomp_port
    bridges << "stomp"
    configs["imq.bridge.stomp.tcp.enabled"] = "true"
    configs["imq.bridge.stomp.tcp.port"] = @resource.stomp_port
  end

  if services.size > 0
    configs["imq.service.activelist"] = services.join(',')
  end

  configs["imq.bridge.admin.user"] = @resource.admin_user
  user = @resource.users[@resource.admin_user]
  raise "Missing user details for admin user '#{@resource.admin_user}'" unless user
  configs["imq.bridge.admin.password"] = user[:password]
  configs["imq.imqcmd.password"] = user[:password]

  if bridges.size > 0
    configs["imq.bridge.enabled"] = "true"
    configs["imq.bridge.activelist"] = bridges.join(',')
  end
%>
<%= configs.sort.collect { |k, v| "#{k}=#{v}\n" }.join("") %>

Make sure the imq log timzone is configured as per nodes timezone


  <%= form_tag smart_answer_path_for_responses(@flow_state.completed_questions, edition: nil), method: "get" do %>
  <%= hidden_field_tag :edition, @edition if @edition.present? %>
  <%= hidden_field_tag 'response', '' %>
  <%
    if @flow_state.error?
      error_message = t('formats.simple_smart_answer.please_answer')
    end
  %>
  <%
    description = render "govuk_publishing_components/components/govspeak", {
      content: sanitize(question.body),
    }
  %>

  <%= render "govuk_publishing_components/components/radio", {
    description: description,
    error_message: error_message,
    heading_caption: @publication.title,
    heading_size: "l",
    heading: "#{@flow_state.current_question_number}. #{question.title}",
    is_page_heading: true,
    name: "response",
    items: question.options.map do |option|
      {
        text: option.label,
        value: option.slug,
        checked: option.slug == params[:previous_response],
      }
    end
  } %>

  <%= render partial: "draft_fields" %>

  <%= render "govuk_publishing_components/components/button", {
    text: t("formats.simple_smart_answer.next_step"),
    margin_bottom: true,
  } %>
<% end %>

  <%= form_tag smart_answer_path_for_responses(@flow_state.completed_questions, edition: nil), method: "get" do %>
  <%= hidden_field_tag :edition, @edition if @edition.present? %>
  <%= hidden_field_tag 'response', '' %>
  <%
    if @flow_state.error?
      error_message = t('formats.simple_smart_answer.please_answer')
    end
  %>
  <% description = render "govuk_publishing_components/components/govspeak", {
    content: sanitize(question.body),
  } if question.body %>

  <%= render "govuk_publishing_components/components/radio", {
    description: description,
    error_message: error_message,
    heading_caption: @publication.title,
    heading_size: "l",
    heading: "#{@flow_state.current_question_number}. #{question.title}",
    is_page_heading: true,
    name: "response",
    items: question.options.map do |option|
      {
        text: option.label,
        value: option.slug,
        checked: option.slug == params[:previous_response],
      }
    end
  } %>

  <%= render partial: "draft_fields" %>

  <%= render "govuk_publishing_components/components/button", {
    text: t("formats.simple_smart_answer.next_step"),
    margin_bottom: true,
  } %>
<% end %>

Format question description with Govspeak

This will make things look better when markup is used in a question's
description.


Recent Articles

			<% blog.articles[0...data.blog.recent_articles].each do |article| %>

				<%= link_to article.title, article %>
				<%= article.date.strftime('%b %e') %>

			<% end %>

Tags

			<% blog.tags.each do |tag, articles| %>

				<%= link_to tag, tag_path(tag) %> (<%= articles.size %>)

			<% end %>

By Year

			<% blog.articles.group_by {|a| a.date.year }.each do |year, articles| %>

				<%= link_to year, blog_year_path(year) %> (<%= articles.size %>)

			<% end %>

Recent Articles

			<% blog.articles[0...5].each do |article| %>

				<%= link_to article.title, article %>
				<%= article.date.strftime('%b %e') %>

			<% end %>

Tags

			<% blog.tags.each do |tag, articles| %>

				<%= link_to tag, tag_path(tag) %> (<%= articles.size %>)

			<% end %>

By Year

			<% blog.articles.group_by {|a| a.date.year }.each do |year, articles| %>

				<%= link_to year, blog_year_path(year) %> (<%= articles.size %>)

			<% end %>

Fix error in Blog meta partial

Fix error in Blog meta partial


<%= environment %> CF: Number of routes in the router's routing table is too low

Question: avg(last_10m):min:datadog.nozzle.gorouter.total_routes{deployment:<%= metron_agent_deployment %>} < <%= params.fetch('expected_routes') %>

## Description:
 The number of routes in the router's routing table is dangerously low.  It appears that too few applications are known. <%= cloudops_pagerduty %>.

## Escalation Path:
  Router Team.

## Possible Causes:
## Potential Solutions:

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

Question: avg(last_10m):min:datadog.nozzle.gorouter.total_routes{deployment:<%= metron_agent_deployment %>,!job:router_iso_z1,!job:router_iso_z2} < 100

Exclude router_iso_z1/z2 from 'routing table is too low' alerts

* It's used only internally, which doesn't have customer routes on it.

[#145319551] routers for isolation segments should be sharded

Signed-off-by: Kai Xiang <987005552a526059a0c9b4b70d166beabef8374e@pivotal.io>


<% page_title "Unpublish: #{@edition.title}"  %>

Unpublish <%= @edition.type.titleize %>

      <%= form_tag unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do %>
        <%= fields_for :unpublishing do |unpublish| %>
          <%= unpublish.hidden_field :document_type %>
          <%= unpublish.hidden_field :slug %>
          <%= unpublish.label :unpublishing_reason_id, "Reason for unpublishing" %>
          <%= unpublish.select :unpublishing_reason_id, options_from_collection_for_select(UnpublishingReason.all, :id, :name) %>
          <%= unpublish.text_area :explanation, label_text: 'Further explanation', rows: 5  %>
          <%= unpublish.text_field :alternative_url, label_text: 'Alternative URL' %>
          <%= unpublish.check_box :redirect, label_text: 'Redirect to URL automatically?' %>
          <%= submit_tag 'Unpublish', class: "btn btn-danger" %>
           or <%= link_to 'cancel', [:admin, @edition] %>
        <% end %>
      <% end %>

<% page_title "Unpublish: #{@edition.title}"  %>

Unpublish <%= @edition.type.titleize %>

      <%= form_tag unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do %>
        <%= fields_for :unpublishing do |unpublish| %>
          <%= unpublish.hidden_field :document_type %>
          <%= unpublish.hidden_field :slug %>
          <%= unpublish.label :unpublishing_reason_id, "Reason for unpublishing" %>
          <%= unpublish.select :unpublishing_reason_id, options_from_collection_for_select(UnpublishingReason.all, :id, :name) %>
          <%= unpublish.text_area :explanation, label_text: 'Further explanation', rows: 5  %>

Note: This explanation is shown on the public page of this <%= @edition.type.titleize.downcase %> when it is unpublished.

          <%= unpublish.text_field :alternative_url, label_text: 'Alternative URL' %>
          <%= unpublish.check_box :redirect, label_text: 'Redirect to URL automatically?' %>
          <%= submit_tag 'Unpublish', class: "btn btn-danger" %>
           or <%= link_to 'cancel', [:admin, @edition] %>
        <% end %>
      <% end %>

Add a note reminding users that the reason for unpublishing is public


#!/bin/bash

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

# Send output to the log
exec > /var/log/tile/render-lowzoom.log 2>&1
<% node[:tile][:styles].each_key do |style| -%>

# Update tiles from z0 to z12 for style "<%= @style %>"
render_list \
  --all --force \
  --tile-dir=/srv/tile.openstreetmap.org/tiles \
  --socket=/var/run/renderd/renderd.sock \
  --num-threads=<%= ( node[:cpu][:total] - 2 ) / 2 %> \
  --map="<%= style %>" \
  --max-load=70 \
  --min-zoom=0 --max-zoom=12
<% end -%>

exit 0

#!/bin/bash

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

# Send output to the log
exec > /var/log/tile/render-lowzoom.log 2>&1

# Get current time
timestamp=$(date +%s)
<% node[:tile][:styles].each_key do |style| -%>

# Define function to update tiles from z0 to z12 for style "<%= style %>"
function update_<%= style %>
{
  render_old \
    --timestamp=${timestamp} \
    --tile-dir=/srv/tile.openstreetmap.org/tiles \
    --socket=/var/run/renderd/renderd.sock \
    --num-threads=<%= ( node[:cpu][:total] - 2 ) / 2 %> \
    --map="<%= style %>" \
    --max-load=70 \
    --min-zoom=0 --max-zoom=12
}

# Loop running the update command until it suceeds
until update_<%= style %>
do
  sleep 30
done
<% end -%>

exit 0

Make monthly rerendering of low zoom tiles more robust