<%= 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 %>

<%= 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  %>

<%= link_to raw('or return to list of needs without making changes →'), needs_path(:in_state => @need.status) %>

<% end %>

Add link back to list of needs

Add link back to list of needs


<% if current_user && current_user.admin? %>

  <%= render 'flash_message' %>

All clients

      Name
      Email

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

    <%= link_to "#{user.name.capitalize}", user %>
    <%= user.email %>
    <%= link_to 'Edit', edit_user_path(user) %>
    <%= link_to 'Delete', user, method: :delete,
                                     data: { confirm: 'Are you sure?'} %>

<% end %>

<% end %>

<% if current_user && current_user.admin? %>

  <%= render 'flash_message' %>

All clients

      Name
      Email

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

    <%= link_to "#{user.name.capitalize}", user %>
    <%= user.email %>
    <%= link_to edit_user_path(user) do %>

        <% end %>

    <%= link_to user, method: :delete,
                          data: { confirm: 'Are you sure?'} do %>

        <% end %>

<% end %>

<% end %>

Change edit and delete text to images in user index


Sign up

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

<%= f.label :email %>

  <%= f.email_field :email, autofocus: true %>

<%= f.label :password %>

    <%= f.password_field :password, autocomplete: "off" %>

<%= f.label :password_confirmation %>

    <%= f.password_field :password_confirmation, autocomplete: "off" %>

<%= f.submit "Sign up" %>

<% end %>

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

Sign up

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

                    <%= f.label :email %>
                    <%= f.email_field :email, autofocus: true, class: 'form-control' %>

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

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

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

Update registration views to use Twitter Bootstrap.


Edit Account Settings

      <%= form_for(resource, as: resource_name, url: user_registration_path(resource_name), html: { method: :put }) do |f| %>
        <%= devise_error_messages! %>

        <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>

Currently waiting confirmation for: <%= resource.unconfirmed_email %>

        <% end %>

Change my password

<%= f.label :password %>
                <%= f.password_field :password, autocomplete: "off" %>

<%= f.label :password_confirmation %>
                <%= f.password_field :password_confirmation, autocomplete: "off" %>

<%= f.label :current_password %> (we need your current password to confirm your changes)
                <%= f.password_field :current_password, autocomplete: "off" %>

              <%= f.submit "Update", class: 'button success radius small' %>

      <% end %>

Edit Account Settings

      <%= form_for(resource, as: resource_name, url: user_registration_path(resource_name), html: { method: :put }) do |f| %>
        <%= devise_error_messages! %>

        <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>

Currently waiting confirmation for: <%= resource.unconfirmed_email %>

        <% end %>

Change My Password

<%= f.label :new_password %>
                <%= f.password_field :new_password, autocomplete: "off", placeholder: "What's your new password?" %>

<%= f.label :new_password_confirmation %>
                <%= f.password_field :new_password_confirmation, autocomplete: "off", placeholder: "Re-type your new password just to make sure it's 100% correct." %>

<%= f.label :current_password %>
                <%= f.password_field :current_password, autocomplete: "off", placeholder: "We need your current password to confirm your changes." %>

            <%= f.submit "Update", class: 'button success radius small' %>
      <% end %>

Add placeholders and change labels

Add placeholders and change labels


### File managed with puppet ###
## Served by:        '<%= scope.lookupvar('::servername') %>'
## Module:           '<%= scope.to_hash['module_name'] %>'
<%
  module_paths = Puppet::Node::Environment.current[:modulepath].split(':').map{|i| File.expand_path(i) }.join('|')
%>## Template source:  'MODULES<%= template_source.gsub(Regexp.new("^#{module_paths}"),"") %>'

Add puppet header template file.

Add puppet header template file.


if [[ $? = 0 ]]; then
  NAGIOS_CODE=0
  NAGIOS_MESSAGE=\"OK\"
else
  NAGIOS_CODE=2
  NAGIOS_MESSAGE=\"CRITICAL\"
fi

printf \"<%= @fqdn -%>\t<%= @service_description -%>\t\${NAGIOS_CODE}\t\${NAGIOS_MESSAGE}\\n\" | /usr/sbin/send_nsca -H alert.cluster >/dev/null

if [[ $? = 0 ]]; then
  NAGIOS_CODE=0
  NAGIOS_MESSAGE=\"OK\"
else
  NAGIOS_CODE=2
  NAGIOS_MESSAGE=\"CRITICAL\"
fi

printf "<%= @fqdn -%>\t<%= @service_description -%>\t${NAGIOS_CODE}\t${NAGIOS_MESSAGE}\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null

Fix quoting in backup::assets::job Icinga check

We were escaping this too many times, so the check was never being properly
completed, and thus even though backups completed, the check didn't change
state.

Refactored the check to reduce the amount of escaping.


Advertisement Statistics

      #
      Image URL
      Width
      Height
      Ad Type
      Status
      Hit Count

    <% @ads.each do |ad| %>

        <%= link_to(ad.id, ad) %>
        <%= link_to(ad.image_url, ad.image_url) %>
        <%= ad.width %>
        <%= ad.height %>
        <%= ad.ad_type %>
        <%= ad.status %>
        <%= ad.hit_count %>
        <%= link_to('Edit', edit_advertisement_path(ad)) %>

    <% end %>

<%= will_paginate(@ads) %>

Advertisement Statistics

      #
      Image URL
      Width
      Height
      Ad Type
      Status
      Hit Count

    <% @ads.each do |ad| %>

        <%= link_to(ad.id, ad) %>
        <%= link_to(ad.image_url, ad.image_url) %>
        <%= ad.width %>
        <%= ad.height %>
        <%= ad.ad_type %>
        <%= ad.status %>
        <%= ad.hit_count %>
        <%= link_to('Edit', edit_advertisement_path(ad)) %>

    <% end %>

<%= link_to('Add', new_advertisement_path) %>
<%= will_paginate(@ads) %>

Add link to add new ads (nonfunctional)

Add link to add new ads (nonfunctional)


        <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Reject Order

        <%# If muted text changed update order_denied.html.erb and order_denied.text.erb %>

Edit Rejection Email

            <%= @order.user.name %>,

            Order #<%= @order.id %> has been denied.

            <textarea name="email[reason]" class="form-control">We are unable to process your order at this time.</textarea>

            For more information please feel free to email The Grateful Garment Project at lisa@gratefulgarment.org.

        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
        <button type="submit" name="order[status]" value="reject" class="btn btn-danger">Reject & Send</button>

Create reject modal for rejection email

Create reject modal for rejection email


<li class='clearfix record <%= cycle("on", "on-hover") %>'>

    <%=h news_item.title %>

    <%= link_to refinery_icon_tag('application_go.png'), news_item_url(news_item),
                :title => t('.view_live'),
                :target => "_blank" %>
    <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_news_item_path(news_item),
                :title => t('.edit') %>
    <%= link_to refinery_icon_tag('delete.png'), admin_news_item_path(news_item),
                :class => "cancel confirm-delete",
                :title => t('.delete'),
                :'data-method' => :delete,
                :'data-confirm' => t('shared.admin.delete.message', :title => news_item.title) %>

<li class='clearfix record <%= cycle("on", "on-hover") %>'>

    <%=h news_item.title %>

    <%= link_to refinery_icon_tag('application_go.png'), news_item_url(news_item),
                :title => t('.view_live'),
                :target => "_blank" %>
    <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_news_item_path(news_item),
                :title => t('.edit') %>
    <%= link_to refinery_icon_tag('delete.png'), admin_news_item_path(news_item),
                :class => "cancel confirm-delete",
                :title => t('.delete'),
                :method => :delete,
                :confirm => t('shared.admin.delete.message', :title => news_item.title) %>

Use :confirm and :method link_to methods.


<% flash.each do |key, value| %>
  <div class="alert alert-<%= key %>">
    ×

          <%= value %>

<% end %>

            <% flash.each do |key, value| %>
            <div class="alert alert-<%= bootstrap_class_for key %> alert-dismissible" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    ×
                </button>
                <%= value %>

            <% end %>

Add better flash message template

Add better flash message template


<%= GovukPublishingComponents::AppHelpers::TableHelper.helper(self, "Children", { caption_classes: "govuk-heading-m" }) do |table| %>

  <%= table.head do %>
    <%= table.header "Title" %>
    <%= table.header "Status" %>
    <%= table.header "Actions" if gds_editor? %>
  <% end %>

  <%= table.body do %>
    <% page.sorted_children.each do |child_page| %>
      <%= table.row do %>
        <%= table.cell render "govuk_publishing_components/components/document_list", {
          remove_top_border: true,
          items: [
            {
              link: {
                text: child_page.title,
                path: child_page
              },
              metadata: {
                preview_link: link_to(child_page.base_path, Plek.new.website_root + child_page.base_path, target: "_blank", class: "govuk-link")
              },
              edit:  {
                href: edit_polymorphic_path(page),
                link_text: "Edit page"
              }
            }
          ]
        } %>

        <%= table.cell govuk_status(child_page) %>
        <%= table.cell link_to('Edit', edit_polymorphic_path(child_page), class: "govuk-link") if gds_editor? %>
      <% end %>
    <% end %>
  <% end %>

<% end %>

<%= render "govuk_publishing_components/components/heading", {
  text: "Children",
  margin_bottom: 3,
} %>

<% if page.sorted_children.any? %>

  <%= GovukPublishingComponents::AppHelpers::TableHelper.helper(self, "Children", { caption_classes: "govuk-visually-hidden" }) do |table| %>

    <%= table.head do %>
      <%= table.header "Title" %>
      <%= table.header "Status" %>
      <%= table.header "Actions" if gds_editor? %>
    <% end %>

    <%= table.body do %>
      <% page.sorted_children.each do |child_page| %>
        <%= table.row do %>
          <%= table.cell render "govuk_publishing_components/components/document_list", {
            remove_top_border: true,
            items: [
              {
                link: {
                  text: child_page.title,
                  path: child_page
                },
                metadata: {
                  preview_link: link_to(child_page.base_path, Plek.new.website_root + child_page.base_path, target: "_blank", class: "govuk-link")
                },
                edit:  {
                  href: edit_polymorphic_path(page),
                  link_text: "Edit page"
                }
              }
            ]
          } %>

          <%= table.cell govuk_status(child_page) %>
          <%= table.cell link_to('Edit', edit_polymorphic_path(child_page), class: "govuk-link") if gds_editor? %>
        <% end %>
      <% end %>
    <% end %>

  <% end %>

<% else %>

No children has been added for this page

<% end %>

Add empty state message for child list

Add empty state message for child list

Previously any empty table was show which was not very nice visually, now it shows a message.


<% content_for :title do %>Thank you!
<% end %>

Donations

  Thank you very much for your donation to OpenSplitTime. Your generous gift will help us continue to provide better
  tools to the non-profit endurance event community.

  <%= link_to "Return to the home page", root_path %>.

<% content_for :title do %>Thank you!
<% end %>

Thank you!

  Thank you very much for your donation to OpenSplitTime. Your generous gift will help us continue to provide better
  tools to the non-profit endurance event community.

  <%= link_to "Return to the home page", root_path %>.

Improve donations thank you page.

Improve donations thank you page.


<!DOCTYPE html>

  <title>Godmin</title>
  <%= stylesheet_link_tag    "godmin/application", "admin/custom", media: "all" %>
  <%= javascript_include_tag "godmin/application", "admin/custom" %>
  <%= csrf_meta_tags %>

        <%= link_to 'Godmin', godmin.root_path, class: 'navbar-brand' %>

        <%= render partial: 'shared/nav' %>

    <% if flash[:alert] %>

        <%= flash[:alert] %>

    <% end %>
    <% if flash[:notice] %>

        <%= flash[:notice] %>

    <% end %>

    <%= yield %>

      Powered by Godmin <%= Godmin::VERSION %> |
      Mounted as <%= Godmin.mounted_as %>

<!DOCTYPE html>

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

        <%= link_to 'Godmin', godmin.root_path, class: 'navbar-brand' %>

        <%= render partial: 'shared/nav' %>

    <% if flash[:alert] %>

        <%= flash[:alert] %>

    <% end %>
    <% if flash[:notice] %>

        <%= flash[:notice] %>

    <% end %>

    <%= yield %>

      Powered by Godmin <%= Godmin::VERSION %> |
      Mounted as <%= Godmin.mounted_as %>

Put custom manifest files in root files called godmin :bomb:


Results

<%@tracks.each do |track|%>

<%= track.title %>

<%= track.artist_name %>

      <div class="poppingover" title="BPM: <%= track.audio_features.tempo.to_f.round %>

          <%= track.danceability_str %> " >

Details

      <% @spotify_id = track.track_spotify_id %>
      <iframe src="https://embed.spotify.com/?uri=spotify:track:<%= @spotify_id %>" width="300" height="380" frameborder="0" allowtransparency="true">

<%= track.lyrics %>

<%end%>

<%= link_to "See More", "/see_more", remote: true %>

Results

<%@tracks.each do |track|%>

<%= track.title %>

<%= track.artist_name %>

      <h6 title="BPM: <%= track.audio_features.tempo.to_f.round %>

          <%= track.danceability_str %> ">Details

      <% @spotify_id = track.track_spotify_id %>
      <iframe src="https://embed.spotify.com/?uri=spotify:track:<%= @spotify_id %>" width="300" height="380" frameborder="0" allowtransparency="true">

<%= track.lyrics %>

<%end%>

<%= link_to "See More", "/see_more", remote: true %>

Refactor details popover to only trigger over the word details


Plugins sidebar group

Pages:
# Overview
	- what are plugins
	- how do they work
	- common use cases

# Using plugins
	- adding a plugin to your pipeline (as a step/in other steps)
	- configuration
	- more complex code example with a description of how the build would run
	- sources (github, git, local)

# Developing plugins
	- writing a plugin
	- testing your new plugin (how to use the tester and cli)
	- tools

# Security
	- using 3rd party code
	- recommended practices

# Directory
	- what is it
	- how to get your plugin there
	- criteria for plugins in the directory

Add outline for new section

Add outline for new section


Milestones are effective from the time the previous milestone ends.

<%= form_for [@course, @lesson_plan_milestone], :html => { :class => 'form-horizontal' } do |f| %>

      <%= f.label :title, :class => 'control-label' %>

        <%= f.text_field :title, :class => 'text_field span7' %>

    <% #Change to HTML input box later. %>

      <%= f.label :description, :class => 'control-label' %>

        <%= f.text_field :description, :class => 'text_field span7' %>

      <%= f.label :end_at, :class => 'control-label' %>

        <%= f.text_field :end_at, :class => 'text_field span7' %>

      <%= f.submit nil, :class => 'btn btn-primary', data: {disable_with: "Submitting..."} %>
      <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
                  course_lesson_plan_path(@course), :class => 'btn' %>

<% end %>

Milestones start at the time the previous milestone (if any) ends.

<%= form_for [@course, @lesson_plan_milestone], :html => { :class => 'form-horizontal' } do |f| %>

      <%= f.label :title, :class => 'control-label' %>

        <%= f.text_field :title, :class => 'text_field span7', :placeholder => "e.g. Week 1" %>

      <%= f.label :description, :class => 'control-label' %>

        <%= f.text_area :description, :class => 'text_field span7 html-editor',
                        :placeholder => "What will happen by this milestone? What should students learn or achieve?" %>

      <%= f.label :end_at, :class => 'control-label' %>

        <%= f.text_field :end_at, :class => 'text_field' %>

      <%= f.submit "Submit", :class => 'btn btn-primary', data: {disable_with: "Submitting..."} %>
      <%= link_to t('.cancel', :default => t("helpers.links.cancel")),
                  course_lesson_plan_path(@course), :class => 'btn' %>

<% end %>

Use HTML editor for Milestones, change text on Submit button.


<% extend SolrPlugin::SearchHelper %>
<% set_facets_variables %>

<%= search_page_title( @titles[@asset], @category ) %>

<% if !@empty_query %>

    <%= render :partial => 'facets' %>

    <%= render :partial => 'results' %>

<% else %>
  <%= render :partial => 'results' %>
<% end %>

<% if @asset == :products %>
  <% javascript_tag do %>
    jQuery('.search-product-price-details').altBeautify();
  <% end %>
<% end %>

<% extend SolrPlugin::SearchHelper %>
<% set_facets_variables %>

<%= search_page_title( @titles[@asset], @category ) %>

  <%= render :partial => 'facets' if !@empty_query %>

  <%= render :partial => 'results' %>

<% if @asset == :products %>
  <% javascript_tag do %>
    jQuery('.search-product-price-details').altBeautify();
  <% end %>
<% end %>

Use same column structure for all pages

Use same column structure for all pages


---
layout: default
title: Community
---

Friends of The Setup

Some awesome people have taken the time to make localised Setup-style sites, picking the brains of the people around them, or those within a particular field of interest. Others have written up personal interviews with themselves. All are awesome.

Localised or inspired by

<% @site.inspired_links.each do |link| %>

<a href="<%= link.url %>" title="View <%= link.name %>."><%= link.name %> (<%= link.summary %>)

<% end %>

Personal

<% @site.personal_links.each do |link| %>

<a href="<%= link.url %>" title="View the self-interview by <%= link.name %>."><%= link.name %>

<% end %>

---
layout: default
title: Community
---

Friends of The Setup

Some awesome people have taken the time to make localised Setup-style sites, picking the brains of the people around them, or those within a particular field of interest. Others have written up personal interviews with themselves. All are awesome.

Localised or inspired by

<% @site.inspired_links.each do |link| %>

  <a href="<%= link.url %>" title="View <%= link.name %>."><%= link.name %>

  <%= link.summary %>

<% end %>

Personal

<% @site.personal_links.each do |link| %>

<a href="<%= link.url %>" title="View the self-interview by <%= link.name %>."><%= link.name %>

<% end %>

Put the summary on a new line.

Put the summary on a new line.


<% contents.each_with_index do |child_category, i| %>

    <%= heading_tag child_category.title,
                    level: 2,
                    id:    child_category.id,
                    class: 'category-detail__heading' %>

<%= child_category.description %>

    <% if child_category.contents.present? %>

        <%= render 'content_items', contents: child_category.contents %>

    <% end %>

<% end %>

<% contents.each_with_index do |child_category, i| %>

    <%= heading_tag child_category.title,
                    level: 2,
                    id:    child_category.id,
                    class: 'category-detail__heading' %>

<%= child_category.description %>

    <% if child_category.contents.present? %>

        <%= render 'content_items', contents: child_category.contents %>

View all ..

    <% end %>

<% end %>

Add view all paragraph to child categories


<!doctype html>

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

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

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

          <%= breadcrumbs(@taxon) %>
        <%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>
        <div id="content" class="columns omega <%= !content_for(:sidebar) ? "sixteen alpha" : "twelve" %>" data-hook>
          <%= flash_messages %>
          <%= yield %>

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

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

<!doctype html>

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

  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

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

          <%= breadcrumbs(@taxon) %>
        <%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>
        <div id="content" class="columns omega <%= !content_for?(:sidebar) ? "sixteen alpha" : "twelve" %>" data-hook>
          <%= flash_messages %>
          <%= yield %>

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

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

Add missing "?" from sidebar content check.


  <% if can? :manage, Performance %>

Verwalten

    <%= nav_link_to "Benutzer", jmd_users_path if can? :manage, User %>
    <%= nav_link_to "Wettbewerbe", jmd_competitions_path if can? :manage, Competition %>
    <%= nav_link_to "Aktuelle Vorspiele", list_current_jmd_performances_path %>

  <% elsif can? :list_current, Performance %>

Einsehen

    <%= nav_link_to "Aktuelle Vorspiele", list_current_jmd_performances_path %>

  <% end %>

  <% if can? :manage, Performance %>

Verwalten

    <%= nav_link_to icon_tag("user") + " Benutzer", jmd_users_path if can? :manage, User %>
    <%= nav_link_to icon_tag("globe") + " Wettbewerbe", jmd_competitions_path if can? :manage, Competition %>
    <%= nav_link_to icon_tag("time") + " Aktuelle Vorspiele", list_current_jmd_performances_path %>

  <% elsif can? :list_current, Performance %>

Einsehen

    <%= nav_link_to icon_tag("time") + " Aktuelle Vorspiele", list_current_jmd_performances_path %>

  <% end %>

Add icons to inside sidebar navigation

Add icons to inside sidebar navigation


# Installing Buildkite Agent on Debian

The Buildkite Agent can be installed on on Debian versions 7.x and 8.x using our signed apt repository.

<%= toc %>

## Installation

<%= render_agent_setup :debian %>

## SSH Key Configuration

<%= render_markdown 'agent/ssh_key_with_buildkite_agent_user' %>

See the [Agent SSH Keys](/docs/agent/ssh-keys) documentation for more details.

## File Locations

<%= render_markdown 'agent/apt_locations' %>

## Configuration

<%= render_markdown 'agent/apt_configuration' %>

## Running multiple agents

You can run as many parallel agents on the one machine as you wish by copying the service configuration file.

```shell
# For Debian 8.x (systemd)
sudo cp /lib/systemd/system/buildkite-agent.service /lib/systemd/system/buildkite-agent-2.service
sudo systemctl start buildkite-agent-2
sudo tail -f /var/log/syslog | grep buildkite-agent-2

# For Debian 7.x (using upstart)
sudo cp /etc/init/buildkite-agent.conf /etc/init/buildkite-agent-2.conf
sudo service buildkite-agent-2 start
sudo tail -f /var/log/upstart/buildkite-agent-2.log
```

## Upgrading

<%= render_markdown 'agent/apt_upgrading' %>

# Installing Buildkite Agent on Debian

The Buildkite Agent can be installed on on Debian versions 7.x and 8.x using our signed apt repository.

<%= toc %>

## Installation

<%= render_agent_setup :debian %>

## SSH Key Configuration

<%= render_markdown 'agent/ssh_key_with_buildkite_agent_user' %>

See the [Agent SSH Keys](/docs/agent/ssh-keys) documentation for more details.

## File Locations

<%= render_markdown 'agent/apt_locations' %>

## Configuration

<%= render_markdown 'agent/apt_configuration' %>

## Running multiple agents

You can run as many parallel agents on the one machine as you wish by duplicating the systemd/upstart service configuration file, for example:

```shell
# For Debian 8.x (systemd)
sudo cp /lib/systemd/system/buildkite-agent.service /lib/systemd/system/buildkite-agent-2.service
sudo systemctl start buildkite-agent-2
sudo tail -f /var/log/syslog | grep buildkite-agent-2

# For Debian 7.x (using upstart)
sudo cp /etc/init/buildkite-agent.conf /etc/init/buildkite-agent-2.conf
sudo service buildkite-agent-2 start
sudo tail -f /var/log/upstart/buildkite-agent-2.log
```

## Upgrading

<%= render_markdown 'agent/apt_upgrading' %>

Clarify running multiple Debian agents

Clarify running multiple Debian agents


#!/bin/bash

if [ -f tmp/pids/unicorn.pid ]; then
  unicorn_pid_file=tmp/pids/unicorn.pid
  # Someone restarted the master; wait for the new master to exit.
  PID=`cat $unicorn_pid_file`

  while kill -0 $PID; do
    sleep 2
    PID=`cat $unicorn_pid_file`
  done

  # If we get here, the master has exited, either because someone restarted
  # it again (in which case there's already a new master running), or
  # it died for real (in which case we'll need to start a new process).
  # The sleep above is a tradeoff between polling load and mimizing the
  # restart delay when the master dies for real (which should hopefully be
  # rare).
  rm $unicorn_pid_file
else
  # Run the unicorn master process (this won't return until it exits).
  bundle exec unicorn -E $RAILS_ENV -c config/unicorn.rb
fi

#!/bin/bash

unicorn_pid_file=tmp/pids/unicorn.pid

if [ -f $unicorn_pid_file ]; then
  # Someone restarted the master; wait for the new master to exit.

  function graceful_shutdown {
    echo "Initializing graceful shutdown"
    kill -QUIT `cat $unicorn_pid_file`

    # Git unicorn some time to stop
    sleep 1
  }

  # Trap upstart stop (TERM) and send QUIT to unicorn
  trap graceful_shutdown TERM

  while [ -f $unicorn_pid_file ] && kill -0 `cat $unicorn_pid_file`; do
    sleep 2
  done

  # If we get here, the master has exited, either because someone restarted
  # it again (in which case there's already a new master running), or
  # it died for real (in which case we'll need to start a new process).
  # The sleep above is a tradeoff between polling load and mimizing the
  # restart delay when the master dies for real (which should hopefully be
  # rare).
  rm -f $unicorn_pid_file
else
  # Run the unicorn master process (this won't return until it exits).
  exec bundle exec unicorn -E $RAILS_ENV -c config/unicorn.rb
fi

Make signaled unicorn stops on upstart stop


<% provide(:title, @feedback.id) %>

Feedback

    <% @feedback.answers.each do |answer| %>

<%= answer.question.sort %>. <%= answer.question.question %>

        <%= answer.response %>
    <% end %>

Format feedback show page to display the answers more elegantly.


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

<link rel="icon" type="image/png" href="images/favicon.png" />
<link rel="apple-touch-icon" href="images/apple-touch-icon.png" />

<%= stylesheet_link_tag "site" %>
<%# <%= javascript_include_tag  "all", async: true %>

<title>Nathan & Katelin Day<%= ' - ' + current_article.title unless current_article.nil? %></title>
<%= feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed" %>

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

<link rel="icon" type="image/png" href="images/favicon.png" />
<link rel="apple-touch-icon" href="images/apple-touch-icon.png" />

<%= stylesheet_link_tag "site" %>
<%# <%= javascript_include_tag  "all", async: true %>

<title><%= current_page.data.title + ' - ' unless current_page.data.title.nil? %>Nathan & Katelin Day</title>
<%= feed_tag :atom, "#{blog.options.prefix.to_s}/feed.xml", title: "Atom Feed" %>

Change the way the site title is displayed


<% node['nginx']['realip']['addresses'].each do |address| %>
set_real_ip_from <%= address %>;
<% end %>
real_ip_header <%= node['nginx']['realip']['header'] %>;
<% if node['nginx']['version'] >= '1.2.1' -%>
real_ip_recursive <%= node['nginx']['realip']['real_ip_recursive'] %>;
<% end -%>

<% node['nginx']['realip']['addresses'].each do |address| -%>
set_real_ip_from <%= address %>;
<% end -%>
real_ip_header <%= node['nginx']['realip']['header'] %>;
<% if node['nginx']['version'].to_f >= '1.2' -%>
real_ip_recursive <%= node['nginx']['realip']['real_ip_recursive'] %>;
<% end -%>

Fix a version check in the realip recipe

This technically catches 1.2.0 as well, but this works "better" than the old check

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>


    <% if publication.updated_at %>

Last updated: <%= publication.updated_at.to_formatted_s(:short_ordinal) %>

    <% end %>
    <% if [:programme, :guide].include? publication.type.to_sym %>

<%= link_to "Print this guide", publication_path(publication.slug, :part => 'print'), rel: "nofollow" %>

    <% end %>

<% if api_links.any? %>
<% content_for :extra_headers do %>
  <% api_links.each do |type, href| %>
<link rel="alternate" type="<%= type %>" href="<%= href %>">
  <% end %>
<% end %>
<% end %>

    <% if publication.updated_at %>

Last updated: <%= publication.updated_at.to_formatted_s(:short_ordinal) %>

    <% end %>
    <% if [:programme, :guide].include? publication.type.to_sym %>

<%= link_to "Printer friendly page", publication_path(publication.slug, :part => 'print'), rel: "nofollow" %>

    <% end %>

<% if api_links.any? %>
<% content_for :extra_headers do %>
  <% api_links.each do |type, href| %>
<link rel="alternate" type="<%= type %>" href="<%= href %>">
  <% end %>
<% end %>
<% end %>

Update test for guide print view link.

Update test for guide print view link.

This should help with the expectation artound it automatically printing.


<%= render 'result_table', { submissions: submissions_accepted, table_title: "accepted" } %>
<%= render 'result_table', { submissions: submissions_waitlist, table_title: "waitlist" } %>

Download:

<%= link_to_if !submissions_accepted.empty?, "Accepted", csv_download_accepted_path %>

<%= link_to_if !submissions_waitlist.empty?, "Waitlist", csv_download_waitlist_path %>

Send invitation emails:

<%= link_to "Send", send_invitation_emails_path, method: :post %>

<%= render 'result_table', { submissions: submissions_accepted, table_title: "accepted" } %>
<%= render 'result_table', { submissions: submissions_waitlist, table_title: "waitlist" } %>

Download:

<%= link_to_if !submissions_accepted.empty?, "Accepted", csv_download_accepted_path %>

<%= link_to_if !submissions_waitlist.empty?, "Waitlist", csv_download_waitlist_path %>

Send invitation emails:

<%= link_to "Send", send_invitation_emails_path, method: :post, data: { confirm: "Are you sure?" } %>

[132] Add confirmation screen before sending invitations


  <%= form_for [object.event, object], remote: true do |f| %>
    <%= f.text_field :name, class: 'form-control' %>
    <%= f.number_field :capacity, class: 'form-control', placeholder: 100 %>
    <%= f.text_field :price, class: 'form-control', placeholder: "0.00" %>
    <%= form_check_box f, :public %>

<%= f.check_box :has_comment %>

<%= f.check_box :hidden %>

    <%= f.button button_name, class: 'btn btn-sm btn-primary' %>
    <%= javascript_tag do %>
      var id = "#edit_<%=dom_id(f.object) %>";
      var inputs = $(id).parent().find('input');
      $(id).parent().find('button').on('click', function() {
        $(id).append(inputs.clone());
        $(id).append('<input type="hidden" name="_method" value="put">');
        $(id).submit();
      });
    <% end %>
  <% end %>

  <%= form_for [object.event, object], remote: true do |f| %>
    <%= f.text_field :name, class: 'form-control' %>
    <%= f.number_field :capacity, class: 'form-control', placeholder: 0 %>
    <%= f.text_field :price, class: 'form-control', placeholder: "0.00" %>
    <%= form_check_box f, :public %>

<%= f.check_box :has_comment %>

<%= f.check_box :hidden %>

    <%= f.button button_name, class: 'btn btn-sm btn-primary' %>
    <%= javascript_tag do %>
      var id = "#edit_<%=dom_id(f.object) %>";
      var inputs = $(id).parent().find('input');
      $(id).parent().find('button').on('click', function() {
        $(id).append(inputs.clone());
        $(id).append('<input type="hidden" name="_method" value="put">');
        $(id).submit();
      });
    <% end %>
  <% end %>

Change capacity placeholder from 100 to 0

As some people got confused that y default only 100 tickets are allowed.


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

public final class <%= repository.jpa.unit_descriptor_name %>
{
  public static final String NAME = "<%= repository.jpa.unit_name %>";
  public static final String RESOURCE_NAME = "<%= repository.jpa.data_source %>";

<% repository.data_modules.each do |data_module| %>
  public static Class[] get<%= data_module.name %>Models()
  {
    return new Class[]
    {
<%= data_module.entities.select {|entity| entity.jpa? }.collect {|entity| "      #{entity.jpa.qualified_name}.class" }.join(",\n") %>
    };
  }
<% end %>

  private <%= repository.jpa.unit_descriptor_name %>()
  {
  }
}

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

public final class <%= repository.jpa.unit_descriptor_name %>
{
  public static final String NAME = "<%= repository.jpa.unit_name %>";
  public static final String RESOURCE_NAME = "<%= repository.jpa.data_source %>";

  private <%= repository.jpa.unit_descriptor_name %>()
  {
  }
}

Remove generate catalog of entity classes that no longer used


<div class="emergency-banner emergency-banner--<%= campaign_class %>" role="banner" data-nosnippet>

<%= heading %>

        <% if short_description %>

<%= short_description %>

        <% end %>
        <% if link %>
          <a href="<%= link %>" class="emergency-banner__link govuk-link"><%= link_text %>
        <% end %>

Remove govuk-body from summary text

Remove govuk-body from summary text


<% disabled = false if local_assigns[:disabled].nil? %>

<%= form_for(content, remote: true, html: {role: :form, 'data-model': content.class.model_name}) do |form|%>

      <%= content.name %>’s privacy setting:

        private
        <%= form.check_box :privacy, { onchange: '$(this).submit();' }, 'public', 'private' %>

        public

<%end%>

Remove "disabled" argument to privacy toggle


  <% categories.each do |name, category| %>
    <tr class="category <%= "incomplete" unless category.complete? %>">

        <a class="text" href="/?filters[key]=^<%= category.name %>"><%= category.name %>

  <% end %>

  <% categories.each do |name, category| %>
    <tr class="category <%= "incomplete" unless category.complete? %>">

        <a class="text" href="/?filters[key]=<%= Rack::Utils.escape("^#{category.name}") %>"><%= category.name %>

  <% end %>

Fix category links: escape "^" character


<%= form_for @application_detail, :html => {:class => "form-horizontal"} do |f| %>
  <% if @application_detail.errors.any? %>

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

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

<%= msg %>

      <% end %>

  <% end %>

    <%= @application_detail.description.html_safe %>

    <%= f.label :the_text, :class => "control-label" %>

    <%= f.text_area :the_text, :rows => 3 %>

    <button class="btn" type="submit">Save changes</button>

<% end %>

<%= form_for @application_detail, :html => {:class => "form-horizontal"} do |f| %>
  <% if @application_detail.errors.any? %>

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

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

<%= msg %>

      <% end %>

  <% end %>

    <%= @application_detail.description.html_safe %>

    <%= f.label :the_text, class: 'control-label col-md-3' %>

      <%= f.text_area :the_text, rows: 3, class: 'form-control' %>

    <button class="btn btn-primary" type="submit">Save changes</button>

<% end %>

Update the application details form for Bootstrap 3


Edit Account

  <%= simple_form_for(resource, :as   => resource_name,
                                :url  => registration_path(resource_name),
                                :html => { :method => :put, :class => 'form-horizontal' }) do |f| %>
    <%= f.error_notification %>

    <%= f.input :password,              :required => false, :hint         => 'Leave blank to not change', :autocomplete => 'off' %>
    <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %>
    <%= f.input :current_password,      :required => true,  :hint         => 'To confirm changes' %>

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

Cancel my account

Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %>.

  <%= link_to 'Back', :back %>

Edit Account

  <%= simple_form_for(resource, :as   => resource_name,
                                :url  => registration_path(resource_name),
                                :html => { :method => :put, :class => 'form-horizontal' }) do |f| %>
    <%= f.error_notification %>

    <%= f.input :password,              :required => false, :hint         => 'Leave blank to not change', :autocomplete => 'off' %>
    <%= f.input :password_confirmation, :required => false, :autocomplete => 'off' %>
    <%= f.input :current_password,      :required => true,  :hint         => 'To confirm changes' %>

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

PayPal

  <%- if current_user.verified? -%>

PayPal Account on File

  <%- else -%>

<%= link_to "Verify and Link", specify_paypal_info_for_user_path(resource), :remote => true %> PayPal account

  <%- end -%>

Cancel my account

Unhappy? <%= link_to 'Cancel my account', registration_path(resource_name), :data => { :confirm => 'Are you sure?' }, :method => :delete %>

  <%= link_to 'Back', :back %>

Update Devise Edit Registration View for PayPal

Add the verification link for the Devise registration edit view.


// Add stylesheets required for your deck.
// Add deck extensions from deck.js/extensions.
// Add deck styles and transitions from deck.js/themes.
//= require normalize-css
//= require highlightjs/styles/default
//= require css-spinners/css/spinner/spinner
//= require deck.js/core/deck.core
//= require deck.js/themes/transition/fade
//= require deck.js/themes/style/web-2.0

@import "css-modal/modal"

.notes
  @extend %modal
  @extend %modal-theme

<% if site.config['social'] %>
// Fix Twitter button positioning.
iframe.twitter-share-button
  display: inline-block
  margin: 0

// Hide social buttons until deck is loaded.
aside.social-buttons
  visibility: hidden

  // Hide Google +1 button (it shows even if parent is hidden).
  div.g-plus-container
    display: inline-block
    iframe
      visibility: hidden !important

  // Like button is misaligned because it sets vertical-align: bottom
  div.fb-like.fb_iframe_widget > span
    vertical-align: initial !important
<% end %>

// Add stylesheets required for your deck.
// Add deck extensions from deck.js/extensions.
// Add deck styles and transitions from deck.js/themes.
//= require normalize-css
//= require highlightjs/styles/default
//= require css-spinners/css/spinner/spinner
//= require deck.js/core/deck.core
//= require deck.js/themes/transition/fade
//= require deck.js/themes/style/web-2.0

@import "css-modal/modal"

.notes
  @extend %modal
  @extend %modal-theme

// CSS Modal sets overflow-y: scroll
html
  overflow-y: hidden

<% if site.config['social'] %>
// Fix Twitter button positioning.
iframe.twitter-share-button
  display: inline-block
  margin: 0

// Hide social buttons until deck is loaded.
aside.social-buttons
  visibility: hidden

  // Hide Google +1 button (it shows even if parent is hidden).
  div.g-plus-container
    display: inline-block
    iframe
      visibility: hidden !important

  // Like button is misaligned because it sets vertical-align: bottom
  div.fb-like.fb_iframe_widget > span
    vertical-align: initial !important
<% end %>

Hide scrollbars since CSS Modal sets overflow-y: scroll.


Define write areas and button color

Define write areas and button color


<%# Display form for a new request to be a herbarium curator %>
<%
  @title = :show_herbarium_curator_request.t

  tabs = [
    link_with_query(
      :cancel_and_show.t(type: :herbarium), herbarium_path(@herbarium)
    ),
    link_with_query(:herbarium_index.t, herbaria_nonpersonals_path)
  ]
  @tabsets = { right: draw_tab_set(tabs) }
%>

  <%= :show_herbarium_curator_help.tp %>

  <%= form_with(url: herbaria_curator_requests_path, method: :post) do |f| %>
    <%= f.hidden_field :back, value: @back %>
    <%= f.hidden_field :q, value: get_query_param %>
    <%= f.hidden_field :id, value: @herbarium.id %>

      <%= f.label(:name, :HERBARIUM.t) %>: <%= @herbarium.name.t %>

      <%= f.label(:notes, "#{:NOTES.t}:") %>
      <%= f.text_area(:notes,
                      rows: 10,
                      class: "form-control", data: { autofocus: true }) %>

    <%= f.submit(:SEND.l, class: "btn center-block push-down") %>
  <% end %>

<%# Display form for a new request to be a herbarium curator %>
<%
  @title = :show_herbarium_curator_request.t

  tabs = [
    link_with_query(
      :cancel_and_show.t(type: :herbarium), herbarium_path(@herbarium)
    ),
    link_with_query(:herbarium_index.t, herbaria_nonpersonals_path)
  ]
  @tabsets = { right: draw_tab_set(tabs) }
%>

  <%= :show_herbarium_curator_help.tp %>

  <%= form_with(
        url: add_query_param(
               herbaria_curator_requests_path(id: @herbarium, back: @back)
        )
      ) do |f| %>

      <%= f.label(:name, :HERBARIUM.t) %>: <%= @herbarium.name.t %>

      <%= f.label(:notes, "#{:NOTES.t}:") %>
      <%= f.text_area(:notes, rows: 10, class: "form-control",
                      data: { autofocus: true }) %>

    <%= f.submit(:SEND.l, class: "btn center-block push-down") %>

  <% end %>

Remove CuratorRequests explicit hidden fields

Let Rails take care of this by providing information in the url


// Disable animations during tests to increase stability
<% reveal_animation = Rails.env.test? ? 'none' : 'fadeAndPop' %>

$(document).foundation({
    reveal: {
        animation: '<%= reveal_animation %>',
        animation_speed: 200,
        close_on_background_click: false,
        close_on_esc: true,
        dismiss_modal_class: "reveal-modal-close"
    }
});

// Honour any html autofocus attributes on inputs inside a modal dialog
$(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
  var modal = $(this);
  modal.find('[autofocus]').focus();
  $('form[data-validate]').enableClientSideValidations();
  // If a modal is launched again, ensure the submit button is re-enabled.
  $.rails.enableFormElement($('input[data-disable-with]'));
});

// If there was an error submitting a modal form, be sure to re-enable the submit button
$(document).on('ajaxError', function(event, xhr, status, error) {
  $.rails.enableFormElement($('input[data-disable-with]'));
});

// Disable animations during tests to increase stability
<% reveal_animation = Rails.env.test? ? 'none' : 'fadeAndPop' %>

$(document).foundation({
    reveal: {
        animation: '<%= reveal_animation %>',
        animation_speed: 200,
        close_on_background_click: false,
        close_on_esc: true,
        dismiss_modal_class: "reveal-modal-close"
    }
});

// Honour any html autofocus attributes on inputs inside a modal dialog
$(document).on('opened.fndtn.reveal', '[data-reveal]', function () {
  var modal = $(this);
  modal.find('[autofocus]').focus();
  $('form[data-client-side-validations]').enableClientSideValidations();
  // If a modal is launched again, ensure the submit button is re-enabled.
  $.rails.enableFormElement($('input[data-disable-with]'));
});

// If there was an error submitting a modal form, be sure to re-enable the submit button
$(document).on('ajaxError', function(event, xhr, status, error) {
  $.rails.enableFormElement($('input[data-disable-with]'));
});

Fix broken client side validationon allergy form

A change in rails clientsidevalidations gem menas we now have to use this selector:
$(“form[data-client-side-validations]”)
when enabling validations when on a modal dialog


# Force dhclient to ingnore 'routers' option on all interfaces.
mkdir -p /etc/dhcp
echo "supersede routers 0;" > /etc/dhcp/dhclient.conf
if (grep -q "^\s*DHCLIENTARGS" /etc/sysconfig/network); then
    sed -i 's#^\s*DHCLIENTARGS.*#DHCLIENTARGS="-cf /etc/dhcp/dhclient.conf"#' /etc/sysconfig/network
else
    echo 'DHCLIENTARGS="-cf /etc/dhcp/dhclient.conf"' >> /etc/sysconfig/network
fi
rm -f /etc/dhcp/dhclient-eth*.conf

# Force dhclient to ingnore 'routers' option on all interfaces.
mkdir -p /etc/dhcp
echo "supersede routers 0;" > /etc/dhcp/dhclient.conf
if (grep -q "^\s*DHCLIENTARGS" /etc/sysconfig/network); then
    sed -i 's#^\s*DHCLIENTARGS.*#DHCLIENTARGS="-cf /etc/dhcp/dhclient.conf"#' /etc/sysconfig/network
else
    echo 'DHCLIENTARGS="-cf /etc/dhcp/dhclient.conf"' >> /etc/sysconfig/network
fi
# Anaconda leave behind dhclient settings for particular interfaces which conflicts
# with our global settings we create in /etc/dhcp/dhclient.conf.
# To delete these artefacts it's easy way to handle this.
rm -f /etc/dhcp/dhclient-eth*.conf

Add comment about Anaconda dhclient artifacts.


Contacts for <%= @person.name %>

<%- column_div :type => :primary do -%>

<% unless @contacts.empty? -%>
  <%= will_paginate(@contacts) %>
  <%= raster image_links(@contacts, :captions => @contacts.map(&:name),
                                    :destroy => (current_person? @person), #destroy if in own profile
			            :send_message => true,
                                    :image => :thumbnail) %>
  <%= will_paginate(@contacts) %>
<% else %>

No contacts (yet)

<% end -%>

<%- end -%>

<%- column_div :type => :secondary do -%>
  <%= render :partial => 'shared/minifeed' %>
<%- end -%>

Contacts for <%= @person.name %>

<%- column_div :type => :primary do -%>

<% unless @contacts.empty? -%>
  <%= will_paginate(@contacts) %>
  <%= raster image_links(@contacts, :captions => @contacts.map(&:name),
                                    :destroy => (current_person? @person), #destroy if in own profile
			            :send_message => (current_person? (@person)),
                                    :image => :thumbnail) %>
  <%= will_paginate(@contacts) %>
<% else %>

No contacts (yet)

<% end -%>

<%- end -%>

<%- column_div :type => :secondary do -%>
  <%= render :partial => 'shared/minifeed' %>
<%- end -%>

Send messages from your contacts view

Send messages from your contacts view


<%
#--
#   Copyright (C) 2012 Gitorious AS
#   Copyright (C) 2009 Fabio Akita <fabio.akita@gmail.com>
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero General Public License for more details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#++
%>

Hello <%=h @user.login %>,

Your account has been activated. You can now add your public SSH key here <%= Gitorious.url(user_edit_ssh_keys_path(@user)) -%>.
You can also update your profile details here <%= Gitorious.url(edit_user_path(@user)) -%>.

Thank you

<%= Gitorious.url("/") %>

<%
#--
#   Copyright (C) 2012 Gitorious AS
#   Copyright (C) 2009 Fabio Akita <fabio.akita@gmail.com>
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero General Public License for more details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#++
%>

Hello <%=h @user.login %>,

Your account has been activated. You can now add your public SSH key here <%= Gitorious.url(new_user_key_path(@user)) -%>.
You can also update your profile details here <%= Gitorious.url(edit_user_path(@user)) -%>.

Thank you

<%= Gitorious.url("/") %>

Use direct path to add key page in the sign up confirmation email


  <div class='organization-logo pull-right'
       style='background-image: url(<%= organization.logo.rectangular.url %>)'>

<%= link_to organization.name, organization.member %>  <span class="label <%= organization.member.product_name %>"><%= organization.member.product_name.capitalize %>

    <% if organization.cached_tagline.present? %>

<%= organization.cached_tagline %>

    <% end %>

     <%= link_to organization.url, organization.url, :property => "url"%>

<%= organization_description(organization) %>

      <%= link_to "#{editable?(organization) ? "Edit" : "More"} information", organization.member, :class=>'btn pull-right' %>

  <div class='organization-logo pull-right'
       style='background-image: url(<%= organization.logo.rectangular.url %>)'>

<%= link_to organization.name, organization.member %>  <span class="label <%= organization.member.product_name %>"><%= organization.member.product_name.capitalize %>

    <% if organization.cached_tagline.present? %>

<%= organization.cached_tagline %>

    <% end %>

     <%= link_to organization.url, organization.url, :property => "url"%>

<%= organization_description(organization) %>

      <%= link_to "#{editable?(organization) ? "Edit" : "More"} information", organization.member, :class=>'btn pull-right', :title => "#{editable?(organization) ? "Edit" : "More"} information on #{organization.name}" %>

Add descriptive title to more information link

Fixes #118


; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "localhost"
username = "piwik"
password = "<%= @passwords['database'] %>"
dbname = "piwik"
tables_prefix = "piwik_"
charset = "utf8"

[General]
force_ssl = 1
force_ssl_login = 1
login_allowlist_apply_to_reporting_api_requests = "0"
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
trusted_hosts[] = "piwik.openstreetmap.org"
salt = "<%= @passwords['salt'] %>"

[Tracker]
ignore_visits_cookie_name = "piwik_ignore"

[Plugins]
<% @plugins.each do |plugin| -%>
Plugins[] = "<%= plugin %>"
<% end -%>

[PluginsInstalled]
<% Dir.new("#{@directory}/plugins").reject { |f| f =~ /\./ }.sort.each do |plugin| -%>
PluginsInstalled[] = "<%= plugin %>"
<% end -%>

[Plugins_Tracker]
Plugins_Tracker[] = "Provider"
Plugins_Tracker[] = "Goals"
Plugins_Tracker[] = "UserCountry"
Plugins_Tracker[] = "DevicesDetection"
Plugins_Tracker[] = "UsersManager"
Plugins_Tracker[] = "SitesManager"
Plugins_Tracker[] = "PrivacyManager"

; <?php exit; ?> DO NOT REMOVE THIS LINE
; file automatically generated or modified by Matomo; you can manually override the default values in global.ini.php by redefining them in this file.
[database]
host = "localhost"
username = "piwik"
password = "<%= @passwords['database'] %>"
dbname = "piwik"
tables_prefix = "piwik_"
charset = "utf8mb4"

[General]
force_ssl = 1
force_ssl_login = 1
login_allowlist_apply_to_reporting_api_requests = "0"
proxy_client_headers[] = "HTTP_X_FORWARDED_FOR"
trusted_hosts[] = "piwik.openstreetmap.org"
salt = "<%= @passwords['salt'] %>"

[Tracker]
ignore_visits_cookie_name = "piwik_ignore"

[Plugins]
<% @plugins.each do |plugin| -%>
Plugins[] = "<%= plugin %>"
<% end -%>

[PluginsInstalled]
<% Dir.new("#{@directory}/plugins").reject { |f| f =~ /\./ }.sort.each do |plugin| -%>
PluginsInstalled[] = "<%= plugin %>"
<% end -%>

[Plugins_Tracker]
Plugins_Tracker[] = "Provider"
Plugins_Tracker[] = "Goals"
Plugins_Tracker[] = "UserCountry"
Plugins_Tracker[] = "DevicesDetection"
Plugins_Tracker[] = "UsersManager"
Plugins_Tracker[] = "SitesManager"
Plugins_Tracker[] = "PrivacyManager"

Switch piwik database to utf8mb4

Switch piwik database to utf8mb4


#!/bin/sh -e

# redirect stderr to stdout
exec 2>&1

# set HOME
export HOME=/users/gonano

# clear PATH so we can explicitly build it
PATH=""

# source any environment variables that were dropped by engines
# including, perhaps, a custom PATH
if [ -d <%= env_dir %> ]; then
        for env in $(/bin/ls <%= env_dir %>); do
                export "$env=$(/bin/cat <%= env_dir %>/$env)"
        done
fi

# if the engine manipulated the PATH, let's append to it instead of reset
if [[ -n $PATH ]]; then
        MYPATH=${PATH}:
fi

# set the defaults
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# prefix defaults with the gonano pkgsrc bootstrap
PATH=/opt/gonano/sbin:/opt/gonano/bin:${PATH}

# prefix all with base bootstrap
PATH=/data/sbin:/data/bin:${PATH}

# prefix with custom path
export PATH=${MYPATH}${PATH}

# change to /code directory
cd <%= code_dir %>

# command to run <%= key %>
exec chpst -u gonano <%= command %>

#!/bin/sh -e

# redirect stderr to stdout
exec 2>&1

# set HOME
export HOME=/home/gonano

# clear PATH so we can explicitly build it
PATH=""

# source any environment variables that were dropped by engines
# including, perhaps, a custom PATH
if [ -d <%= env_dir %> ]; then
        for env in $(/bin/ls <%= env_dir %>); do
                export "$env=$(/bin/cat <%= env_dir %>/$env)"
        done
fi

# if the engine manipulated the PATH, let's append to it instead of reset
if [[ -n $PATH ]]; then
        MYPATH=${PATH}:
fi

# set the defaults
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# prefix defaults with the gonano pkgsrc bootstrap
PATH=/opt/gonano/sbin:/opt/gonano/bin:${PATH}

# prefix all with base bootstrap
PATH=/data/sbin:/data/bin:${PATH}

# prefix with custom path
export PATH=${MYPATH}${PATH}

# change to /code directory
cd <%= code_dir %>

# command to run <%= key %>
exec chpst -u gonano <%= command %>

Set HOME to the correct path

Set HOME to the correct path


 Open Group

 Welcome to <%= @open_group.name %> group

 Open Group Name: <%= @open_group.name %>

 Open Group Description: <%= @open_group.description %>

 Open Group Admin's Username: <%= @group_admin %>

 --------------------------------

<% if not @has_joined %>

  <form method="POST" action="/join_open_group/<%= @open_group.name %>">

    <button type="submit">Join <%= @open_group.name %> group</button>

  </form>

<% else %>

  <form method="POST" action="/leave_open_group/<%= @open_group.name %>">

    <button type="submit">Join <%= @open_group.name %> group</button>

  </form>

<% end %>

 --------------------------------

 Open Group

 Welcome to <%= @open_group.name %> group

 Open Group Name: <%= @open_group.name %>

 Open Group Description: <%= @open_group.description %>

 Open Group Admin's Username: <%= @group_admin %>

 --------------------------------

<% if not @has_joined %>

  <form method="POST" action="/join_open_group/<%= @open_group.name %>">

    <button type="submit">Join <%= @open_group.name %> group</button>

  </form>

<% else %>

  <form method="POST" action="/leave_open_group/<%= @open_group.name %>">

    <button type="submit">Leave <%= @open_group.name %> group</button>

  </form>

<% end %>

 --------------------------------

Add leave open group button.

Add leave open group button.


<% roles_count ||= 1 %>

      Send us your CV

      Matt is our people person. If <%= (roles_count > 1)? "one of these roles" : "this role" %> sounds of interest to you, he would love to hear from you.

      Send your CV through to Matt at:
      iwantajob@unboxed.co

      From there, he'll be in touch.

      Good luck!

    <%= image_tag '/jobs/images/ubxd-gardener.jpg', alt: 'Our gardener', class: "image-tile__image", srcset: retina_srcset('/jobs/images/ubxd-gardener.jpg') %>

<% roles_count ||= 1 %>

      Send us your CV

      Matt is our people person. If <%= (roles_count > 1)? "one of these roles" : "this role" %> sounds of interest to you, he would love to hear from you.

      Send your CV through to Matt at:
      iwantajob@unboxed.co

      From there, he'll be in touch. Good luck!

    See our Glassdoor reviews

    <%= image_tag '/jobs/images/ubxd-gardener.jpg', alt: 'Our gardener', class: "image-tile__image", srcset: retina_srcset('/jobs/images/ubxd-gardener.jpg') %>

Add glassdoor review link to jobs pages

Add glassdoor review link to jobs pages


<%= breadcrumbs %>

Payee Information

  <%= simple_form_for(@grant, url: wizard_path,  method: :put, html: { data: { live_guarded: true } }) do |f| %>

    <%= f.simple_fields_for :payees, @grant.payees do |pf| %>
      <%= pf.input :name, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :attention %>
      <%= pf.input :street_address, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :unit_number %>
      <%= pf.input :city, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :state, required: true, collection: AddressHelper::US_STATES, input_html: { data: { guard: "required" } } %>
      <%= pf.input :zip, required: true, input_html: { data: { guard: "int" } } %>
      <%= pf.input :phone, required: true, input_html: { data: { guard: "phoneUS" } } %>
      <%= pf.input :email %>
    <% end %>
  <% end %>

<%= breadcrumbs %>

Payee Information

  <%= simple_form_for(@grant, url: wizard_path,  method: :put, html: { data: { live_guarded: true } }) do |f| %>

    <%= f.simple_fields_for :payees, @grant.payees do |pf| %>
      <%= pf.input :name, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :attention %>
      <%= pf.input :street_address, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :unit_number %>
      <%= pf.input :city, required: true, input_html: { data: { guard: "required" } } %>
      <%= pf.input :state, required: true, collection: AddressHelper::US_STATES, input_html: { data: { guard: "required" } } %>
      <%= pf.input :zip, required: true, input_html: { data: { guard: "int" }, maxlength: 5 } %>
      <%= pf.input :phone, required: true, input_html: { data: { guard: "phoneUS" } } %>
      <%= pf.input :email %>
    <% end %>
    <%= f.submit 'Save and Continue', class: 'btn btn-primary' %>
  <% end %>

Add length limit to zip on payee form

Add length limit to zip on payee form


  <% if resource.safe_to_preview? %>

This edition can be previewed at <%= link_to preview_edition_path(resource), preview_edition_path(resource) %>.

  <% else %>

This edition is not yet ready to be previewed.

  <% end %>

Fact check responses should (when appropriate) be sent to <%= mail_to resource.fact_check_email_address %>

    <%= semantic_form_for(:note, :url=> admin_notes_path) do |f| %>
      <%= f.inputs do %>
        <%= hidden_field_tag :edition_id, resource.id %>
        <%= f.input :comment, :label => 'Note', :as => :text, :input_html => { :class=> 'span6', :rows => 6, :cols => 120 } %>

Don’t forget to save your note when you have finished!

        <button class="btn btn-success" name="commit"> Add Note</button>
      <% end %>
    <% end %>

    <%= render collection: @resource.history, partial: '/admin/shared/edition_history', as: 'edition' %>

Add link to preview and fact check email address at top of History tab

Feedback from the Subhi has suggested this will help significantly with the fact check process.


<%= "Hi #{@user.name}" %>

              Please fill
              <%= link_to "Your hours report", edit_user_timesheet_url(@user, @timesheet) %>

              <%= "The last day you can fill your hours is #{@report.end_date.strftime('%B %d, %Y')}" %>

<%= "Hi #{@user.name}" %>

              Please fill
              <%= link_to "Your hours report", edit_user_timesheet_url(@user, @timesheet) %>

              <%= "The last day you can fill your hours is #{@report.end_date.in_time_zone('Jerusalem').strftime('%B %d, %Y')}" %>

Use correct timezone in reminder mail.

Use correct timezone in reminder mail.


  <% person.current_roles.each do |role| %>

    <%= render "govuk_publishing_components/components/heading", {
        text: person.current_roles_title,
        id: person.current_roles_title.parameterize,
        margin_bottom: 2,
    } %>
    <%= render "govuk_publishing_components/components/govspeak", {
    } do %>
      <%= role["details"]["body"].html_safe %>
    <% end  %>

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

<a href=<%= role["base_path"] %>>More about this role

    <% end %>

    <% parent_organisations = role["links"]["ordered_parent_organisations"].map { |parent| link_to(parent["title"], parent["base_path"]) }%>
    <%= parent_organisations.to_sentence.html_safe %>

  <% end %>

Fix indentation in HTML template file

Fix indentation in HTML template file


#!/bin/bash

export PATH=<%= install_dir %>/bin:<%= install_dir %>/embedded/bin:$PATH

# default to RAILS_ENV=production
if [[ -z $RAILS_ENV ]]; then
  export RAILS_ENV=production
fi

gitlab_user=$(ls -lLd <%= install_dir %>/embedded/service/gitlab-rails/log | awk '{ print $3 }')

cd <%= install_dir %>/embedded/service/gitlab-rails
exec <%= install_dir %>/embedded/bin/chpst -u $gitlab_user -U $gitlab_user <%= install_dir %>/embedded/bin/bundle exec <%= command %>

#!/bin/bash

export PATH=<%= install_dir %>/bin:<%= install_dir %>/embedded/bin:$PATH

# default to RAILS_ENV=production
if [[ -z $RAILS_ENV ]]; then
  export RAILS_ENV=production
fi

gitlab_user=$(ls -lLd <%= install_dir %>/embedded/service/gitlab-rails/log | awk '{ print $3 }')

export HOME=$(eval echo ~${gitlab_user})

cd <%= install_dir %>/embedded/service/gitlab-rails
exec <%= install_dir %>/embedded/bin/chpst -u $gitlab_user -U $gitlab_user <%= install_dir %>/embedded/bin/bundle exec <%= command %>

Set HOME for the GitLab user in wrapper script

Whenever we `bundle exec` a command as the GitLab user, set the HOME
environment variable accordingly. This is the moral equivalent of the
`-H` in `sudo -u git -H bundle exec ...`.


################################################
#
#              Generated by Chef
#
################################################

root ssd {
    alg straw
    hash 0  # rjenkins1
}

root hdd {
    alg straw
    hash 0  # rjenkins1
}

rule ssd {
    ruleset <%=@node["bcpc"]["ceph"]["ssd"]["ruleset"]%>
    type replicated
    min_size 1
    max_size 10
    step take ssd
    step chooseleaf firstn 0 type rack
    step emit
}

rule hdd {
    ruleset <%=@node["bcpc"]["ceph"]["hdd"]["ruleset"]%>
    type replicated
    min_size 1
    max_size 10
    step take hdd
    step chooseleaf firstn 0 type rack
    step emit
}

################################################
#
#              Generated by Chef
#
################################################

root ssd {
    alg straw
    hash 0  # rjenkins1
}

root hdd {
    alg straw
    hash 0  # rjenkins1
}

rule ssd {
    ruleset <%=@node["bcpc"]["ceph"]["ssd"]["ruleset"]%>
    type replicated
    min_size 1
    max_size 10
    step take ssd
    step chooseleaf firstn 0 type host
    step emit
}

rule hdd {
    ruleset <%=@node["bcpc"]["ceph"]["hdd"]["ruleset"]%>
    type replicated
    min_size 1
    max_size 10
    step take hdd
    step chooseleaf firstn 0 type host
    step emit
}

Revert "default to store a replica per rack instead of host"

This reverts commit 724b3d778df1354eabed8ea12fb8c26587a5b9af.


<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  Spree.translations = <%==
    I18n.t("spree").merge({
    :date_picker    => Spree.t(:js_format,
                              scope: 'date_picker',
                              default: 'yy/mm/dd'),
    :abbr_day_names           => I18n.t(:abbr_day_names, scope: :date),
    :destroy                  => Spree.t(:destroy, scope: :actions),
    :edit                     => Spree.t(:edit,    scope: :actions),
    :save                     => Spree.t(:save,    scope: :actions),
    :cancel                   => Spree.t(:cancel,  scope: :actions),
    :first_day                => Spree.t(:first_day,
                                         scope: 'date_picker',
                                         default: 0).to_i,
    :item_stock_placeholder   => Spree.t(:choose_location),
    :month_names              => I18n.t(:month_names, scope: :date).reject(&:blank?),
    :currency_separator       => I18n.t('number.currency.format.separator'),
    :currency_delimiter       => I18n.t('number.currency.format.delimiter'),
    :activerecord             => I18n.t('activerecord')
  }).to_json
%>
</script>
<script data-hook='admin-custom-translations'>
</script>

<% if I18n.locale != :en %>
  <%= javascript_include_tag "select2_locale_#{I18n.locale}" %>
<% end %>

<script>
  if (Spree === undefined) {
    var Spree = {}
  }
  Spree.translations = <%==
    I18n.t("spree").merge({
      date_picker:    Spree.t(:js_format,
                               scope: 'date_picker',
                               default: 'yy/mm/dd'),
      abbr_day_names:         I18n.t(:abbr_day_names, scope: :date),
      destroy:                Spree.t(:destroy, scope: :actions),
      edit:                   Spree.t(:edit,    scope: :actions),
      save:                   Spree.t(:save,    scope: :actions),
      cancel:                 Spree.t(:cancel,  scope: :actions),
      first_day:              Spree.t(:first_day,
                                       scope: 'date_picker',
                                       default: 0).to_i,
      item_stock_placeholder: Spree.t(:choose_location),
      month_names:            I18n.t(:month_names, scope: :date).reject(&:blank?),
      currency_separator:     I18n.t('number.currency.format.separator'),
      currency_delimiter:     I18n.t('number.currency.format.delimiter'),
      activerecord:           I18n.t('activerecord')
  }).to_json
%>
</script>
<script data-hook='admin-custom-translations'>
</script>

<% if I18n.locale != :en %>
  <%= javascript_include_tag "select2_locale_#{I18n.locale}" %>
<% end %>

Convert to 1.9 hash syntax

Convert to 1.9 hash syntax


#
# This file is managed by Puppet. Local edits will be lost.
#

server {
  listen      80;
  server_name <%= @server_name %>;
  root        <%= @files_root %>;
  autoindex   off;
  charset     utf-8;

  access_log  /opt/nginx/logs/<%= @server_name %>.access.log combined;
  error_log   /opt/nginx/logs/<%= @server_name %>.error.log;

  <% if @ssl %>
    <%= scope.function_template(['hdo/nginx-ssl-conf.erb']) %>
  <% end %>

  location / {
    <% if @cors %>
      <%= scope.function_template(['hdo/nginx-cors.conf']) %>
    <% end %>
  }

  location ~ /pdf/(alternative-statsbudsjett|partiprogram) {
    autoindex on;
  }

  location /pdf/retriever/utbrytere {
    autoindex on;
  }

  location /prototyper/enighet {
    return 301 https://enighet.holderdeord.no/;
  }
}

#
# This file is managed by Puppet. Local edits will be lost.
#

server {
  listen      80;
  server_name <%= @server_name %>;
  root        <%= @files_root %>;
  autoindex   off;

  charset       utf-8;
  charset_types text/html text/xml text/plain text/vnd.wap.wml application/javascript application/rss+xml application/json;

  access_log  /opt/nginx/logs/<%= @server_name %>.access.log combined;
  error_log   /opt/nginx/logs/<%= @server_name %>.error.log;

  <% if @ssl %>
    <%= scope.function_template(['hdo/nginx-ssl-conf.erb']) %>
  <% end %>

  location / {
    <% if @cors %>
      <%= scope.function_template(['hdo/nginx-cors.conf']) %>
    <% end %>
  }

  location ~ /pdf/(alternative-statsbudsjett|partiprogram) {
    autoindex on;
  }

  location /pdf/retriever/utbrytere {
    autoindex on;
  }

  location /prototyper/enighet {
    return 301 https://enighet.holderdeord.no/;
  }
}

Add charset_types to files vhost

Add charset_types to files vhost


<%= update_page_tag { |page| page.replace_html active_scaffold_messages_id, :partial => 'messages' } %>

    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{params[:associations] ? params[:associations] : params[:controller]}-view" %> view">
      <a href="" class="inline-adapter-close" title="<%= as_(:close) %>"><%= as_(:close) %>
      <%= payload -%>

<%= update_page_tag { |page| page.replace_html active_scaffold_messages_id, :partial => 'messages' } %>
<%# nested_id, allows us to remove a nested scaffold programmatically %>
<tr class="inline-adapter" id="<%= element_row_id :action => :nested %>">

    <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{params[:associations] ? params[:associations] : params[:controller]}-view" %> view">
      <a href="" class="inline-adapter-close" title="<%= as_(:close) %>"><%= as_(:close) %>
      <%= payload -%>

Copy from edwinmoss Add id to inline_adapter


<%
  world_locations ||= organisation.world_locations
  link_to_organisation ||= false
  object_for_translation ||= organisation
%>

        <% if link_to_organisation %>
          <%= link_to content_tag(:span, organisation_logo_name(organisation)), organisation, class: logo_classes(class_name: 'single-identity', size: 'large', stacked: true) %>
        <% else %>
          <%= content_tag :span, content_tag(:span, organisation_logo_name(organisation)), class: logo_classes(class_name: 'single-identity', size: 'large', stacked: true) %>
        <% end %>

    <%= render partial: 'shared/available_languages', locals: {object: object_for_translation } %>

        <% if world_locations.any? %>

<%= t('worldwide_organisation.location') %>:

<%= world_locations.map {|l| link_to(l.title, l) }.to_sentence.html_safe %>

        <% end %>

<%= t('worldwide_organisation.part_of') %>:

<%= organisation.sponsoring_organisations.map {|o| link_to(o.name, o, class: "sponsoring-organisation") }.to_sentence.html_safe %>

<%
  world_locations ||= organisation.world_locations
  link_to_organisation ||= false
  object_for_translation ||= organisation
%>

        <% if link_to_organisation %>
          <%= link_to content_tag(:span, organisation_logo_name(organisation)), organisation, class: logo_classes(class_name: 'single-identity', size: 'large', stacked: true) %>
        <% else %>
          <%= content_tag :span, content_tag(:span, organisation_logo_name(organisation)), class: logo_classes(class_name: 'single-identity', size: 'large', stacked: true) %>
        <% end %>

    <%= render partial: 'shared/available_languages', locals: {object: object_for_translation } %>

        <% if world_locations.any? %>

<%= t('worldwide_organisation.location') %>:

<%= world_locations.map {|l| link_to(l.name, l) }.to_sentence.html_safe %>

        <% end %>

<%= t('worldwide_organisation.part_of') %>:

<%= organisation.sponsoring_organisations.map {|o| link_to(o.name, o, class: "sponsoring-organisation") }.to_sentence.html_safe %>

Use location name not the title on world org pages

This reverts commit 6ef77f031e28287db8fc13aa0bc585454b045252.


bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>

if [ ! -f /usr/bin/chef-client ]; then
  aptitude update
  aptitude install -y ruby ruby1.9.1-dev build-essential wget rubygems
fi

gem update --no-rdoc --no-ri
gem install ohai --no-rdoc --no-ri --verbose
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>

mkdir -p /etc/chef

(
cat <<'EOP'
<%= validation_key %>
EOP
) > /tmp/validation.pem
awk NF /tmp/validation.pem > /etc/chef/validation.pem
rm /tmp/validation.pem
chmod 0600 /etc/chef/validation.pem

<% if @chef_config[:encrypted_data_bag_secret] -%>
(
cat <<'EOP'
<%= encrypted_data_bag_secret %>
EOP
) > /tmp/encrypted_data_bag_secret
awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret
rm /tmp/encrypted_data_bag_secret
chmod 0600 /etc/chef/encrypted_data_bag_secret
<% end -%>

<%# Generate Ohai Hints -%>
<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%>
mkdir -p /etc/chef/ohai/hints

<% @chef_config[:knife][:hints].each do |name, hash| -%>
(
cat <<'EOP'
<%= hash.to_json %>
EOP
) > /etc/chef/ohai/hints/<%= name %>.json
<% end -%>
<% end -%>

(
cat <<'EOP'
<%= config_content %>
EOP
) > /etc/chef/client.rb

(
cat <<'EOP'
<%= first_boot.to_json %>
EOP
) > /etc/chef/first-boot.json

<%= start_chef %>'

CHEF-3672: Add Ruby 1.9 based Ubuntu 12.10 Gems bootstrap


#
# PRODUCTION
#
production:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_production
  pool: 10
  username: <%= node['gitlab']['postgresql']['sql_user'] %>
  password: <%= node['gitlab']['postgresql']['sql_password'] %>
  host: <%= node['gitlab']['postgresql']['listen_address'] %>
  port: <%= node['gitlab']['postgresql']['port'] %>
# socket: /tmp/postgresql.sock

#
# Development specific
#
development:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_development
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

#
# Staging specific
#
staging:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_staging
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_test
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

#
# PRODUCTION
#
production:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_production
  pool: 10
  username: <%= node['gitlab']['postgresql']['sql_user'] %>
  password: "<%= node['gitlab']['postgresql']['sql_password'] %>"
  host: <%= node['gitlab']['postgresql']['listen_address'] %>
  port: <%= node['gitlab']['postgresql']['port'] %>
# socket: /tmp/postgresql.sock

#
# Development specific
#
development:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_development
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

#
# Staging specific
#
staging:
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_staging
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: &test
  adapter: postgresql
  encoding: unicode
  database: gitlabhq_test
  pool: 5
  username: postgres
  password:
  # socket: /tmp/postgresql.sock

Put quotes around the Postgresql database password


<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>

      <%= f.label :email, Spree.t(:email) %>

      <%= f.email_field :email, :class => 'title', :tabindex => 1 %>

      <%= f.label :password, Spree.t(:password) %>

      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>

    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>

<%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %>

<% end %>

<%= form_for Spree::User.new, :as => :spree_user, :url => spree.create_new_session_path do |f| %>

      <%= f.label :email, Spree.t(:email) %>

      <%= f.email_field :email, :class => 'title', :tabindex => 1, autofocus: true %>

      <%= f.label :password, Spree.t(:password) %>

      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>

    <%= f.check_box :remember_me, :tabindex => 3 %>
    <%= f.label :remember_me, Spree.t(:remember_me) %>

<%= f.submit Spree.t(:login), :class => 'button primary', :tabindex => 4 %>

<% end %>

Add autofocus to login form

Add autofocus to login form

Springing from the discussion in https://github.com/spree/spree/issues/4715, this change allows the HTML5 `autofocus` attribute to put the cursor into the email field when displaying the login screen, which removes one step from the user login process.

Closes #190


<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login" }) do |f| %>

<%= f.label :email %>
  <%= f.email_field :email %>

<%= f.label :password %>
  <%= f.password_field :password %>
  <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
    <%= link_to "Forgot your password?", new_password_path(resource_name) %>

  <% end -%>

  <% if devise_mapping.rememberable? -%>

<%= f.check_box :remember_me %> <%= f.label :remember_me %>

  <% end -%>

<%= f.submit "Sign in" %>

<% end %>

<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login" }) do |f| %>

<%= f.label :email %>
  <%= f.email_field :email %>

<%= f.label :password %>
  <%= f.password_field :password %>
  <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
    <%= link_to "Forgot your password?", new_password_path(resource_name) %>

  <% end -%>

  <% if devise_mapping.rememberable? -%>

<%= f.label :remember_me %> <%= f.check_box :remember_me %>

  <% end -%>

<%= f.submit "Sign in" %>

<% end %>

Fix styling on the login form a bit

Fix styling on the login form a bit


<%if @record && @record.id%><%=@record.id%><%end%>
<% cancel_link = true if cancel_link.nil? %>
<%= render :partial => "base_form", :locals => {:xhr => xhr ||= nil,
                                                :form_action => form_action ||= :update,
                                                :method => method ||= :put,
                                                :cancel_link => cancel_link,
                                                :headline => headline ||= @record.to_label.nil? ? active_scaffold_config.update.label : as_(:update_model, :model => @record.to_label)} %>

Add base id to top right of update form

Add base id to top right of update form


  <%= render partial: 'shared/govspeak-help' %>

Attachments

  <% if document.persisted? %>
    <%= link_to "Add attachment", new_specialist_document_attachment_path(document) %>
  <% else %>

To add an attachment, please save the draft first.

  <% end %>

    <% document.attachments.each do |attachment| %>

        <%= attachment.title %>
        <%= attachment.snippet %>
        <%= link_to "edit", edit_specialist_document_attachment_path(document, attachment) %>

    <% end %>

  <%= render partial: 'shared/govspeak-help' %>

  <% if action_name != 'update' %>

Attachments

    <% if document.persisted? %>
      <%= link_to "Add attachment", new_specialist_document_attachment_path(document) %>
    <% else %>

To add an attachment, please save the draft first.

    <% end %>

      <% document.attachments.each do |attachment| %>

          <%= attachment.title %>
          <%= attachment.snippet %>
          <%= link_to "edit", edit_specialist_document_attachment_path(document, attachment) %>

      <% end %>

  <% end %>

Hide attachments list on update action of document

Bug: go to edit a specialist document which has attachments, submit an
invalid edit, receive 500 error.

This is caused by a similar problem to 4ce549e, but I have resolved it
differently.

Because we aren’t really editing an existing document edition, but
duplicating it and saving that one, the embedded attachments respond to
`#new_record?` with true. This means that url_for(attachment) links to
the plural not the singular route of attachment.

However, for this problem, it is much less important that we display
this correctly on the update action, so instead we simply remove the
ability to edit attachments on an invalid document.

Same concerns as the other commit.


# File managed by puppet
zone "<%=name%>" IN {
  type master;
  file "/etc/bind/pri/<%=name%>.conf";
<% if zone_xfers and not zone_xfers.empty? -%>
  <% if zone_xfers.is_a?(Array) -%>
  allow-transfer { <%= zone_xfers.join('; ') -%>; };
  <% else -%>
  allow-transfer { <%= zone_xfers %>; };
  <% end -%>
<% else -%>
  allow-transfer { none; };
<% end -%>
  allow-query { any; };
  notify yes;
};

# File managed by puppet
zone "<%=name%>" IN {
  type master;
  file "/etc/bind/pri/<%=name%>.conf";
<% if zone_xfers and not zone_xfers.empty? -%>
  <% if zone_xfers.is_a?(Array) -%>
  allow-transfer { <%= zone_xfers.join('; ') -%>; };
  <% else -%>
  allow-transfer { <%= zone_xfers %>; };
  <% end -%>
<% else -%>
  allow-transfer { none; };
<% end -%>
  allow-query { any; };
  notify yes;
  check-names warn;
};

Add check-names warn; in bind zone templates


server {
  listen 80 default_server;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  <%- if scope.lookupvar('::aws_migration') %>
  # Send the Strict-Transport-Security header
  include /etc/nginx/add-sts.conf;
  # Required for L7 ALB
  location = /_healthcheck {
    return 200;
  }
  <%- end %>
  location / {
    return 444;
  }
}

<% unless scope.lookupvar('::aws_migration') %>
server {
  listen              443 default_server ssl;
  ssl_certificate     /etc/nginx/ssl/www.gov.uk.crt;
  ssl_certificate_key /etc/nginx/ssl/www.gov.uk.key;
  include             /etc/nginx/ssl.conf;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  location / {
    return 444;
  }
}
<%- end %>

server {
  listen 80 default_server;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  <%- if scope.lookupvar('::aws_migration') %>
  # Health checks from ALB reuse Fastly __canary__ health check path
  # and bypass authentication on Integration
  location /_healthcheck_www {
    proxy_pass http://varnish/__canary__;
  }
  location /_healthcheck_www-origin {
    proxy_pass http://varnish/__canary__;
  }
  location /_healthcheck_assets-origin {
    return 200;
  }

  # Send the Strict-Transport-Security header
  include /etc/nginx/add-sts.conf;
  # Required for L7 ALB
  location = /_healthcheck {
    return 200;
  }
  <%- end %>
  location / {
    return 444;
  }
}

<% unless scope.lookupvar('::aws_migration') %>
server {
  listen              443 default_server ssl;
  ssl_certificate     /etc/nginx/ssl/www.gov.uk.crt;
  ssl_certificate_key /etc/nginx/ssl/www.gov.uk.key;
  include             /etc/nginx/ssl.conf;

  location /__varnish_check__ {
    # This is the varnish upstream defined in the www.gov.uk vhost
    proxy_pass http://varnish;
  }

  location / {
    return 444;
  }
}
<%- end %>

Add Cache ALB health check path

Add Cache ALB health check path

Define location paths for application health checks from the public ALB.

We want to add the instance to the ALB `www` target group when Nginx, Varnish and
Router are up. We can achieve this with the `__canary__` endpoint. This endpoint
is not cached in Varnish.

`assets` traffic will be available as soon as Nginx is healthy.


<p>
  You'll be redirected to Adyen Hosted Payment Pages. After completing the
  payment form you'll be back to the store.
</p>

<%= link_to "Pay with Adyen", ::Adyen::Form.redirect_url(
        :currency_code => Spree::Config.currency,
        # :merchantReturnData => payment_method.id,
        :ship_before_date => Date.tomorrow,
        :session_validity => 10.minutes.from_now,
        :recurring => false,
        :merchant_reference => "#{@order.number}",
        :merchant_account => payment_method.preferred_merchant_account,
        :skin_code => payment_method.preferred_skin_code,
        :shared_secret => payment_method.preferred_shared_secret,
        :payment_amount => (@order.total.to_f * 100).to_int
      )
%>

<script type="text/javascript">
$(function() {
  var spreePaymentRadio = $("#checkout_form_payment input:radio")

  spreePaymentRadio.change(function() {
    if ($("#checkout_form_payment input:radio:checked").val() == <%= payment_method.id %>) {
      $("#checkout_form_payment .form-buttons").hide();
    } else {
      $("#checkout_form_payment .form-buttons").show();
    }
  });
});
</script>

Hide checkout Save and Continue button for AdyenHPP

Users shouldn't be able to advance checkout using that button because
for AdyenHPP payment must be done outside of the store


<!DOCTYPE html>
<html>
<head>
  <title>Godmin</title>
  <%= stylesheet_link_tag    "godmin/application", media: "all" %>
  <%= javascript_include_tag "godmin/application" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="container">

    <%= render 'godmin/shared/nav_bar' %>

    <%= yield %>

  </div>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Godmin</title>
  <%= stylesheet_link_tag    "godmin/application", media: "all" %>
  <%= javascript_include_tag "godmin/application", "admin/custom" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="container">

    <%= render 'godmin/shared/nav_bar' %>

    <%= yield %>

  </div>
</body>
</html>

Include custom js in layout

Include custom js in layout


<%= link_to "SIGN IN", "/auth/google_oauth2", id: "sign_in" %>

TheFeels

    Negative
    Positive
    <input class="sentiment-spacing" type="range">

<%= link_to "SIGN IN", "/auth/google_oauth2", id: "sign_in" %>

<%= link_to "The Feels", "/auth/google_oauth2", id: "sign_in" %>

Find out what you say to your

partner and how you say it.

Remove slider from view and add wording for landing page


#!/bin/bash

#
# This file is managed by Puppet
#

sudo -u <%= @user %> <%= @dir %>/bin/zotonic $1

#!/bin/bash

#
# This file is managed by Puppet
#

sudo -u <%= scope.lookupvar('zotonic::user') -%> <%= scope.lookupvar('zotonic::dir') -%>/bin/zotonic $1

Fix template lookup for Puppet future parser


<%= @article.title %>

  <time>Posted <%= @article.posted_at %></time>
  tl;dr; <%= @article.blurb.html_safe %>

<%= @article.copy_copy %>

<%= @article.title %>

  <time>Posted <%= @article.posted_at %></time>

<%= @article.copy_copy %>

Remove article blurb from homepage

Remove article blurb from homepage


Welcome Back <%=@user.first_name.capitalize %>

Picture here

Username: <%= @user.username %>

Member Since: <%= @user.created_at %>

Recent Echos

  <% @user.pins.each do |pin| %>
    <%= pin.song %>
    <%= pin.comment %>
    <%=link_to "Edit", pin_path(pin.id) %>
  <% end %>

<%=link_to "Account Settings", edit_user_path%>

Welcome Back <%=@user.first_name.capitalize %>

Picture here

Username: <%= @user.username %>

Member Since: <%= @user.created_at %>

Recent Echos

  <% @user.pins.each do |pin| %>
    <%= pin.song %>
    <%= pin.comment %>
    <%=link_to "Edit", edit_pin_path(pin.id) %>
  <% end %>

<%=link_to "Account Settings", edit_user_path%>

Fix route to edit pin in user profile

Fix route to edit pin in user profile


<tr id='<%= dom_id(asset) %>'>

    <%= image_tag "georgia/content-types/#{asset.extension}.jpg", alt: 'asset.data_content_type' if asset.extension %>

    <%= asset.filename || asset.data.file.filename %>

    <%= asset.data.file.exists? ? number_to_human_size(asset.size) : 'File not found' %>

  	 <%# dimensions %>
  	 <%# featured tag %>

    <%= simple_form_for asset, url: media_path(asset), html: {class: 'form-vertical', data: {'asset-id' => asset.id}}, remote: true do |f| %>
    <%= f.input :tag_list, label: false, input_html: {class: 'input-large js-token-input', data: {load: asset.tags.map{|t| {id: t.id, text: t.name} }}} %>
    <% end %>

    <%= link_to "#{icon_tag('icon-trash')} Delete".html_safe, media_path(asset), method: :delete, data: {confirm: 'Are you sure you want to delete this asset?'}, remote: true, class: 'btn btn-danger' if can? :destroy, Ckeditor::Asset %>

<tr id='<%= dom_id(asset) %>'>

    <%= link_to asset.url do %>
      <%= image_tag "georgia/content-types/#{asset.extension}.jpg", alt: 'asset.data_content_type' if asset.extension %>
    <% end %>

    <%= asset.filename || asset.data.file.filename %>

    <%= asset.data.file.exists? ? number_to_human_size(asset.size) : 'File not found' %>

  	 <%# dimensions %>
  	 <%# featured tag %>

    <%= simple_form_for asset, url: media_path(asset), html: {class: 'form-vertical', data: {'asset-id' => asset.id}}, remote: true do |f| %>
    <%= f.input :tag_list, label: false, input_html: {class: 'input-large js-token-input', data: {load: asset.tags.map{|t| {id: t.id, text: t.name} }}} %>
    <% end %>

    <%= link_to "#{icon_tag('icon-trash')} Delete".html_safe, media_path(asset), method: :delete, data: {confirm: 'Are you sure you want to delete this asset?'}, remote: true, class: 'btn btn-danger' if can? :destroy, Ckeditor::Asset %>

Add link to assets in media library

Add link to assets in media library


<script type='text/javascript'>

function makeDatePickers () {
  $('#trip_pickup_time, #trip_appointment_time, [data-behavior=date-time-picker]').datetimepicker({
        ampm: true,
        stepMinute: 15,
        stepHour: 1,
        hourMin: 8,
        hourMax: 18,
        hourGrid: 2,
        minuteGrid: 15,
        timeFormat: 'hh:mm t',
        dateFormat: 'D yy-mm-dd',
        showOn: "button",
        buttonImage: "<%=  image_path 'calendar-clock.png' %>",
        buttonImageOnly: true,
        constrainInput: false
  });
}

$(function(){
  makeDatePickers();
})

</script>

<script type='text/javascript'>

function makeDatePickers () {
  $('#trip_pickup_time, #trip_appointment_time, [data-behavior=date-time-picker]').datetimepicker({
        ampm: true,
        stepMinute: 15,
        stepHour: 1,
        hourMin: 7,
        hourMax: 18,
        hourGrid: 2,
        minuteGrid: 15,
        timeFormat: 'hh:mm t',
        dateFormat: 'D yy-mm-dd',
        showOn: "button",
        buttonImage: "<%=  image_path 'calendar-clock.png' %>",
        buttonImageOnly: true,
        constrainInput: false
  });
}

$(function(){
  makeDatePickers();
})

</script>

Change start hour to 7a from 8a for datetime widget


ALL THE TWEETS

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

<%= p tweet.body %>

<% end %>

ALL THE TWEETS

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

<%= p tweet.body %>

  User: <%= tweet.user.username %>

<% end %>

Update every tweet to display username

Update every tweet to display username


upstream <%= @server_name %> {
 server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= @name %>;
}

server {
  access_log <%= scope.lookupvar "nginx::config::logdir" %>/<%= @name %>.access.log main;
  listen 80;
  root <%= @repo_dir %>/public;
  server_name <%= @server_name %> *.<%= @server_name %>;

  client_max_body_size 50M;
  error_page 500 502 503 504 /50x.html;

  location = /50x.html {
    root html;
  }

  try_files $uri/index.html $uri @<%= @server_name %>;
  location @<%= @server_name %> {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://<%= @server_name %>;
  }
}

upstream <%= @server_name %> {
 server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= @name %>;
}

server {
  access_log <%= scope.lookupvar "nginx::config::logdir" %>/<%= @name %>.access.log main;
  listen 80;
  root <%= @repo_dir %>/public;
  server_name
    <%= @server_name.gsub(/_/, '-') %>
    *.<%= @server_name.gsub(/_/, '-') %>
    ~^<%= @server_name.gsub(/_/, '-').gsub(/\.dev$/, '') %>\..*\.xip\.io$
    ~^.*\.<%= @server_name.gsub(/_/, '-').gsub(/\.dev$/, '') %>\..*\.xip\.io$;

  client_max_body_size 50M;
  error_page 500 502 503 504 /50x.html;

  location = /50x.html {
    root html;
  }

  try_files $uri/index.html $uri @<%= @server_name %>;
  location @<%= @server_name %> {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://<%= @server_name %>;
  }
}

Add xip.io support to Nginx virtual hosts


<%= form_for current_page do |f| %>

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

	<%= asset_drop(f) %>

	<%= f.submit %>

<% end %>

<%= assets_toolbar %>

<%= form_for current_page do |f| %>

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

	<%= asset_drop(:form => f, :field => :file_id) %>

	<%= f.submit %>

<% end %>

<%= assets_toolbar %>

Resolve form builder error by using hash for helper arg.


define contact {
       contact_name                             <%= @name %>
       alias                                    PagerDuty Pseudo-Contact
       service_notification_period              <%= @notification_period %>
       host_notification_period                 <%= @notification_period %>
       service_notification_options             <%= @service_notification_options %>
       host_notification_options                d,r,u
       service_notification_commands            notify-service-by-pagerduty
       host_notification_commands               notify-host-by-pagerduty
       pager                                    <%= @pagerduty_servicekey %>
}

define command {
       command_name     notify-service-by-pagerduty
       command_line     /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=service
}

define command {
       command_name     notify-host-by-pagerduty
       command_line     /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=host
}

define contact {
        contact_name                         <%= @name %>
        service_notification_period          <%= @notification_period %>
        host_notification_period             <%= @notification_period %>
        service_notification_options         <%= @service_notification_options %>
        host_notification_options            d,r,u
        service_notification_commands        notify-service-by-pagerduty
        host_notification_commands           notify-host-by-pagerduty
        pager                                <%= @pagerduty_servicekey %>
}

define command {
        command_name     notify-service-by-pagerduty
        command_line     /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=service
}

define command {
        command_name     notify-host-by-pagerduty
        command_line     /usr/local/bin/pagerduty_icinga.pl enqueue -f pd_nagios_object=host
}

Make whitespace tidier in `pager_contact` template

The sample Icinga config files in the icinga-core repository
have 8 spaces of indentation rather than 7.


<%= render 'backend/general_form_error', object: @model %>

    <%= t 'b.msg.flexible_content.edit_picture' %>

    <%= image_tag @model.asset.image.url(1700, 1700, quality: 65), alt: '', class: 'img-fluid' %>

    <%= simple_form_for [:backend, @model] do |f| %>
      <%= f.input :url, as: :string %>
      <%= f.input :caption, as: :text %>
      <%= render 'backend/form_actions', cancel_url: content_path %>
    <% end %>

<%= render 'backend/general_form_error', object: @model %>

    <%= t 'b.msg.flexible_content.edit_picture' %>

    <%= image_tag @model.asset.image.url(1700, 1700, quality: 65), alt: '', class: 'img-fluid' %>

    <%= simple_form_for [:backend, @model] do |f| %>
      <%= f.input :url, as: :string %>

      <% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
      <%= f.input :caption, as: content_type %>

      <%= render 'backend/form_actions', cancel_url: content_path %>
    <% end %>

Use an editor when allowed for the picture caption.