<% render_content_for :title do %>
  Check your State Pension age
<% end %>

<% render_content_for :meta_description do %>
  Work out your State Pension age and Pension Credit qualifying age
<% end %>

<% render_content_for :body do %>
Your State Pension age is the earliest age you can start receiving your State Pension. It may be different to the age you can get a [workplace or personal pension](/early-retirement-pension/personal-and-workplace-pensions).

Your State Pension age is worked out based on your gender and date of birth.

^[The State Pension age is under review](/government/news/proposed-new-timetable-for-state-pension-age-increases) and may change in the future.^

Use this tool to check:

- when you'll reach State Pension age
- your Pension Credit qualifying age
- when you'll be eligible for free bus travel

<% end %>

<% render_content_for :post_body do %>
You can [keep working after you reach State Pension age](/working-retirement-pension-age). ‘Default retirement age’ (a forced retirement age of 65) no longer exists.

[Check your State Pension](/check-state-pension) to calculate how much money you’ll get.
<% end %>

<% render_content_for :title do %>
  Check your State Pension age
<% end %>

<% render_content_for :meta_description do %>
  Work out your State Pension age and Pension Credit qualifying age
<% end %>

<% render_content_for :body do %>
Your State Pension age is the earliest age you can start receiving your State Pension. It may be different to the age you can get a [workplace or personal pension](/early-retirement-pension/personal-and-workplace-pensions).

Your State Pension age is worked out based on your gender and date of birth.

^[The State Pension age is under review](/government/news/proposed-new-timetable-for-state-pension-age-increases) and may change in the future.^

Use this tool to check:

- when you'll reach State Pension age
- your Pension Credit qualifying age
- when you'll be eligible for free bus travel

<% end %>

<% render_content_for :post_body do %>
You can [keep working after you reach State Pension age](/working-retirement-pension-age). ‘Default retirement age’ (a forced retirement age of 65) no longer exists.

[Check your State Pension forecast](/check-state-pension) to find out how much money you’ll get.
<% end %>

Update name of state pension calculator

Update name of state pension calculator

Change text linking to the state pension calculator so it reflects the new name of the service (state pension forecast).
From: https://trello.com/c/6rUg7G9U/2967-check-your-state-pension-forecast-rename-links-to-service-content-change-request


<%= simple_form_for [forem, :admin, @category] do |f| %>
  <%= f.input :name %>
  <%= f.submit %>
<% end %>

<%= simple_form_for [forem, :admin, @category] do |f| %>
  <%= f.input :name %>
  <%= f.submit :class => "btn btn-primary" %>
<% end %>

Add btn-primary classes to categories form button


  <%- require 'shellwords' -%>
  Import "<%= @_module_import %>"

  <%- @config.each do |configuration| -%>

  <Module "<%= @module %>">
  <%- configuration.sort.each do |key,value| -%>
  <%- if value.is_a?(Array) -%>
  <%- value.sort.each do |v| -%>
    <%= key %> <% if !!v == v %><%= v %><% else %>"<%= Shellwords.split(v).join('" "') %>"<% end %>
  <%- end -%>
  <%- elsif value.is_a?(Hash) -%>
  <%- value.sort.each do |k,v| -%>
    <%= key %> <%= k %> <% if !!v == v %><%= v %><% else %>"<%= Shellwords.split(v).join('" "') %>"<% end %>
  <%- end -%>
  <%- else -%>
    <%= key %> <% if !!value == value %><%= value %><% else %>"<%= Shellwords.split(value).join('" "') %>"<% end %>
  <%- end -%>
  <%- end -%>
  </Module>
  <%- end -%>

  <%- require 'shellwords' -%>
  Import "<%= @_module_import %>"

  <%- @config.each do |configuration| -%>

  <Module "<%= @module %>">
  <%- configuration.sort.each do |key,value| -%>
  <%- if value.is_a?(Array) -%>
  <%- value.each do |v| -%>
    <%= key %> <% if !!v == v %><%= v %><% else %>"<%= Shellwords.split(v).join('" "') %>"<% end %>
  <%- end -%>
  <%- elsif value.is_a?(Hash) -%>
  <%- value.sort.each do |k,v| -%>
    <%= key %> <%= k %> <% if !!v == v %><%= v %><% else %>"<%= Shellwords.split(v).join('" "') %>"<% end %>
  <%- end -%>
  <%- else -%>
    <%= key %> <% if !!value == value %><%= value %><% else %>"<%= Shellwords.split(value).join('" "') %>"<% end %>
  <%- end -%>
  <%- end -%>
  </Module>
  <%- end -%>

Remove array sorting in python module template


<%= link_to action_path, :class => "btn btn-primary btn-lg btn-quick-link"  do %>
	<span class="<%= action_icon %> fa-fw fa-2x">
<%= action_title %>
<% end %>

<%= link_to action_path, :class => "btn btn-default btn-lg btn-quick-link"  do %>
	<span class="<%= action_icon %> fa-fw fa-2x">
<%= action_title %>
<% end %>

Change quicklink to use default button styles


<%= specialist_sector_fields do |sectors| %>
  <fieldset class="edition-specialist-sector-fields">
    <legend>
      ALPHA: Specialist sectors (this is an evolving feature,
      read more in our blog post)
    </legend>
    <%= form.label :primary_specialist_sector_tag %>
    <%= form.select :primary_specialist_sector_tag,
                    specialist_sector_options_for_select(sectors),
                    {},
                    { class: 'chzn-select',
                      data: { placeholder: 'Choose specialist sectors…' } } %>

    <%= form.label :secondary_specialist_sector_tags, 'Additional specialist sectors' %>
    <%= form.select :secondary_specialist_sector_tags,
                    specialist_sector_options_for_select(sectors),
                    {},
                    { multiple: true,
                      class: 'chzn-select',
                      data: { placeholder: 'Choose specialist sectors…' } } %>
  </fieldset>
<% end %>

<%= specialist_sector_fields do |sectors| %>
  <fieldset class="edition-specialist-sector-fields">
    <legend>
      ALPHA: Specialist sectors (this is an evolving feature,
      read more in our blog post)
    </legend>
    <%= form.label :primary_specialist_sector_tag %>
    <%= form.select :primary_specialist_sector_tag,
                    specialist_sector_options_for_select(sectors),
                    { include_blank: true },
                    { class: 'chzn-select',
                      data: { placeholder: 'Choose specialist sectors…' } } %>

    <%= form.label :secondary_specialist_sector_tags, 'Additional specialist sectors' %>
    <%= form.select :secondary_specialist_sector_tags,
                    specialist_sector_options_for_select(sectors),
                    {},
                    { multiple: true,
                      class: 'chzn-select',
                      data: { placeholder: 'Choose specialist sectors…' } } %>
  </fieldset>
<% end %>

Allow no selection of a primary specialist sector.


[main]
preferred_serialization_format = yaml
pluginsync = true
lastrunfile = $statedir/last_run_summary.yaml { mode = 644 }
<%- if govuk_platform == 'development' -%>
modulepath = /var/govuk/puppet/modules
manifestdir = /var/govuk/puppet/manifests
<%- end -%>

[master]
reports = store
storeconfigs = true
storeconfigs_backend = puppetdb
<%- if govuk_platform != 'development' -%>
modulepath = /usr/share/puppet/production/current/modules
manifestdir = /usr/share/puppet/production/current/manifests
<%- end -%>

[agent]
report = false
configtimeout = 600

[main]
preferred_serialization_format = yaml
pluginsync = true
lastrunfile = $statedir/last_run_summary.yaml { mode = 644 }
<%- if govuk_platform == 'development' -%>
modulepath = /var/govuk/puppet/modules:/var/govuk/puppet/vendor/modules
manifestdir = /var/govuk/puppet/manifests
<%- end -%>

[master]
reports = store
storeconfigs = true
storeconfigs_backend = puppetdb
<%- if govuk_platform != 'development' -%>
modulepath = /usr/share/puppet/production/current/modules:/usr/share/puppet/production/current/vendor/modules
manifestdir = /usr/share/puppet/production/current/manifests
<%- end -%>

[agent]
report = false
configtimeout = 600

Add vendor/modules to Puppet module path


<%= @teacher.name %> Students

<% if @teacher.students.length == nil %>

Welcome, <%= @teacher.name %>!  You currently have no students.

Click <%= link_to 'here', students_path %>to start adding students.

<% else %>

    <% counter = 1 %>

      Student Name
      Grade Level
      GPA
      Discipliary Strikes

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

        <%= counter %>
        <%= render 'student_list' %>

      <% counter =+ 1 %>
    <% end %>

<% end %>

<%= @teacher.name %> Students

<% if @teacher.students.length == 0 %>

Welcome, <%= @teacher.name %>!  You currently have no students.

Click <%= link_to 'here', students_path %>to start adding students.

<% else %>

    <% counter = 1 %>

      Student Name
      Grade Level
      GPA
      Discipliary Strikes

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

        <%= counter %>
        <%= render 'student_list' %>

      <% counter =+ 1 %>
    <% end %>

<% end %>

Add teacher profile student list

Add teacher profile student list


<%= form_for(@event) do |f| %>
  <% if @event.errors.any? %>

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

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

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :project_id, 'Project' %>

    <%= f.select :project_id, Project.all.collect {|p| [ "#{p.client.name}: #{p.title}", p.id ] }.sort, { :include_blank => false } %>

    <%= f.label :start %>

    <%= f.datetime_select :start %>

  <% if !@event.new_record? %>

    <%= f.label :end %>

    <%= f.datetime_select :end %>

  <% end %>

    <%= f.label :comment %>

    <%= f.text_field :comment %>

    <%= f.submit %>

<% end %>

<%= form_for(@event) do |f| %>
  <% if @event.errors.any? %>

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

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

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :project_id, 'Project' %>

    <%= f.select :project_id, Project.all.collect {|p| [ "#{p.client.name}: #{p.title}", p.id ] }.sort, { :include_blank => false } %>

    <%= f.label :start %>

    <%= f.datetime_select :start, :include_seconds => true %>

  <% if !@event.new_record? %>

    <%= f.label :end %>

    <%= f.datetime_select :end, :include_seconds => true %>

  <% end %>

    <%= f.label :comment %>

    <%= f.text_field :comment %>

    <%= f.submit %>

<% end %>

Add seconds to the form fields.

Add seconds to the form fields.


<%= react_component 'app.MemberShow', {id: params[:id]} %>

<%= react_component 'app.MemberShow', {member: @member, languages: @languages} %>

      <%= react_component 'app.Search', {action: '/members'} %>

Move search component to view

Move search component to view


<%= form_for @quote, remote: true, html: { id: "quote-#{@quote.id}" } do |f| %>

  <%= f.text_area :raw_quote, rows: 10, cols: 70 %>

  <%= f.label :description, 'Optional description:' %>
  <%= f.text_area :description, rows: 2, cols: 70 %>

  <%= f.submit 'Save' %>
  <%= button_to_function 'Cancel', "$('#quote-#{@quote.id}').replaceWith('#{j render @quote}');" %>

<% end %>

<%= form_for @quote, remote: true, html: { id: "quote-#{@quote.id}" } do |f| %>

  <%= f.text_area :raw_quote, rows: 10, cols: 70 %>

  <%= f.label :description, 'Optional description:' %>
  <%= f.text_area :description, rows: 2, cols: 70 %>

  <%= f.submit 'Save' %>
  <% if @quote.id %>
  <%= button_to_function 'Cancel', "$('#quote-#{@quote.id}').replaceWith('#{j render @quote}');" %>
  <% else %>
  <%= button_to_function 'Cancel', "$('#quote-#{@quote.id}').remove();" %>
  <% end %>

<% end %>

Fix cancel button for new unsaved forms

Fix cancel button for new unsaved forms


<%= render 'shared/page_title', title: 'Log in to BuffetCar' %>

<%= form_for :session, html: { class: 'form-horizontal', role: 'form' }, url: login_path do |f| %>

    <%= f.label :email, 'Email Address', class: 'col-sm-2 col-sm-offset-3 control-label' %>

      <%= f.email_field :email, class: 'form-control', placeholder: 'Enter your email address' %>

    <%= f.label :password, class: 'col-sm-2 col-sm-offset-3 control-label' %>

      <%= f.password_field :password, class: 'form-control', placeholder: 'Enter your password' %>

      <%= f.submit 'Log in', class: 'btn btn-primary btn-custom btn-lg' %>

<% end %>

      [ <%= link_to 'Need an Account? Register here', signup_path, class: 'custom-link' %> ]

Add link to signup from login page.

Add link to signup from login page.


  <% for @host in @balancers.keys.sort %>server  <%= @host %> <%= @balancers[@host] %>:<%= balancer_port %> <%
    items = balancermember_options
    items = [items] unless balancermember_options.instance_of? Array
    items.each do |item| %> <% if @define_cookies == true %> cookie <%= @host %> <% end %> <%= item %> <% if @define_backend == true %> backup <% end %> <% end %>
  <% end -%>

  <% for @host in @balancers.keys.sort %>server  <%= @host %> <%= @balancers[@host] %>:<%= balancer_port %> <%
    items = balancermember_options
    items = [items] unless balancermember_options.instance_of? Array
    items.each do |item| %> <% if @define_cookies == true %> cookie <%= @host %> <% end %> <%= item %> <% if @define_backend == true and @balancers.keys.first != @host %> backup <% end %> <% end %>
  <% end -%>

Exclude first balancer from backup

Exclude first balancer from backup


<% title "Catalog" %>

<% if @eq_models_by_category.empty? %>
  <%= render partial: 'no_equipment' %>
<% else %>

        <%# for kaminari pagination %>
        <%= paginate @page_eq_models_by_category,
              params: {controller: 'catalog', action: 'index' } %>
        <%= form_tag update_user_per_cat_page_path,
              id: 'items_per_form', class: "form-inline pull-right",
              remote: true, method: 'put' do %>
          <%= label_tag "Items per page:" %>
          <%= select_tag :items_per_page,
                options_for_select(@per_page_opts, session[:items_per_page]),
                :class => 'col-md-3 autosubmitme' %>
        <% end %>

    <%= render partial: 'catalog_listing', locals: { eq_models_by_category: @eq_models_by_category, available_string: @available_string, availability_hash: @availability_hash } %>

  <%= paginate @page_eq_models_by_category %>
<% end %>

<% title 'Catalog' %>

  <% if @eq_models_by_category.empty? %>
    <%= render partial: 'no_equipment' %>
  <% else %>

        <%# for kaminari pagination %>
        <%= paginate @page_eq_models_by_category,
              params: { controller: 'catalog', action: 'index' } %>
        <%= form_tag update_user_per_cat_page_path,
              id: 'items_per_form', class: 'form-inline pull-right',
              remote: true, method: 'put' do %>
          <%= label_tag 'Items per page:' %>
          <%= select_tag :items_per_page,
                options_for_select(@per_page_opts, session[:items_per_page]),
                class: 'autosubmitme form-control' %>
        <% end %>

      <%= render partial: 'catalog_listing', locals: { eq_models_by_category: @eq_models_by_category, available_string: @available_string, availability_hash: @availability_hash } %>

    <%= paginate @page_eq_models_by_category %>
  <% end %>

Fix items_per_page form on catalog

Fix items_per_page form on catalog [ci skip]


    <% calendar.first(7).each do |day,event| %>
      <%= show_day_of_week(day, abbreviated) %>
    <% end %>

  <% calendar.in_groups_of(7).each do |week| %>

      <% week.each do |date, has_events, this_month| %>
        <td class='calendar-day <%= this_month || "calendar-day-out" %> <%= date == Date.today && "selected" %>'>

            <%= has_events ?
              link_to_remote(
                date.day,
                :url => {:action => 'events_by_day', :year => date.year, :month => date.month, :day => date.day, :category_id => @category_id},
                :update => 'events-of-the-day',
                :loading => '$("events-of-the-day").addClassName("loading")',
                :complete => '$("events-of-the-day").removeClassName("loading")'
              ) :
              date.day
            %>

      <% end %>

  <% end %>

    <% calendar.first(7).each do |day,event| %>
      <%= show_day_of_week(day, abbreviated) %>
    <% end %>

  <% calendar.in_groups_of(7).each do |week| %>

      <% week.each do |date, has_events, this_month| %>
        <td class='calendar-day <%= this_month || "calendar-day-out" %> <%= date == Date.today && "selected" %>'>

            <%= has_events ?
              link_to_remote(
                date.day,
                :url => {:action => 'events_by_day', :year => date.year, :month => date.month, :day => date.day, :category_id => @category_id},
                :update => 'events-of-the-day',
                :loading => "$('events-of-the-day').addClassName('loading')",
                :complete => "$('events-of-the-day').removeClassName('loading')"
              ) :
              date.day
            %>

      <% end %>

  <% end %>

Fix agenda links for days that has events


<!DOCTYPE html>
<html>
<head>
  <title>Scribe Admin</title>
  <%= stylesheet_link_tag    "admin/all", media: "all" %>
  <%= javascript_include_tag "admin/all" %>
  <%= csrf_meta_tags %>
</head>
<body>

<% if current_user && current_user.can_view_admin? %>
  <%= render 'admin/partials/head.html.erb' %>
<% end %>

<div id="admin-content">
  <%= yield %>
</div>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Scribe Admin</title>
  <%= stylesheet_link_tag    "admin/all", media: "all" %>
  <%= javascript_include_tag "admin/all" %>
  <%= csrf_meta_tags %>
</head>
<body>

  <%= render 'admin/partials/head.html.erb' %>

<div id="admin-content">
  <%= yield %>
</div>

</body>
</html>

Remove auth check in admin header too

Remove auth check in admin header too


Create a New Question!

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

	<%= f.label :description %>
	<%= f.text_area :description, size: "40x5" %>
	<%= f.submit %>
<% end %>

Add form to create new question

Add form to create new question


html {
  height: 100%;
}

a {
  color: #808080;
}

body {
  height: 100%;
  background-repeat: repeat;
  background-image: url(<%= asset_path 'spree/frontend/bg.png' %>);
}

.container {
  height: 100%;
  box-sizing: border-box;
  border-top: 6px solid #bbb;
  background-color: #fff;

  -moz-box-shadow:    0px 0px 10px 10px #ccc;
  -webkit-box-shadow: 0px 0px 10px 10px #ccc;
  box-shadow:         0px 0px 10px 10px #ccc;
}

ul#main-nav-bar {
  font-family: georgia;
  padding-top: 6px;
  border-style: dashed;
  border-top: 1px;
}

footer#footer {
  border-top: 6px solid #bbb;
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #eee;
  height: 100px;
  position: absolute;
  bottom: 0;
}

footer h2 {
  font-size: 1.3em;
}

footer div#contents {
  margin-left: 50px;
}

html {
  height: 100%;
}

a {
  color: #808080;
}

body {
  height: 100%;
  background-repeat: repeat;
  background-image: url(<%= asset_path 'spree/frontend/bg.png' %>);
}

.container {
  height: 100%;
  box-sizing: border-box;
  border-top: 6px solid #bbb;
  background-color: #fff;

  -moz-box-shadow:    0px 0px 10px 10px #ccc;
  -webkit-box-shadow: 0px 0px 10px 10px #ccc;
  box-shadow:         0px 0px 10px 10px #ccc;
}

ul#main-nav-bar {
  font-family: georgia;
  padding-top: 6px;
  border-top: 1px dashed #808080;
  border-bottom: 1px dashed #808080;
}

footer#footer {
  border-top: 6px solid #bbb;
  margin: 0;
  padding: 0;
  width: 100%;
  background-color: #eee;
  height: 100px;
  position: absolute;
  bottom: 0;
}

footer h2 {
  font-size: 1.3em;
}

footer div#contents {
  margin-left: 50px;
}

Add dashed border to nav.

Add dashed border to nav.


Admin

Articles

<%= render "shared/tables/articles_table" %>

Products

<%= render "shared/tables/products_table" %>

Photos

<%= render "shared/tables/photos_table" %>

<% if @is_root %>

Users

  <%= render "shared/tables/users_table" %>
<% else %>

User

  <%= render "shared/buttons/edit_delete", link: @logged_in_as %>
<% end %>

<%= link_to "Log out", :session, method: :delete, data: { confirm: "Really log out?" } %>

Remove logout button in Admin page

Remove logout button in Admin page

This button is removed because there is already a logout link in the navbar.


New Article

<%= form_for :article, url: articles_path do |f| %>

    <%= f.label :title %>

    <%= f.text_field :title %>

    <%= f.label :text %>

    <%= f.text_area :text %>

    <%= f.submit %>

<% end %>

<%= link_to 'Back', articles_path %>

Add link to go back to index page.

Add link to go back to index page.


    Trade id
    Created at
    Instrument
    Side
    Units
    Actions

  <% @orders.each do |order| %>

      <%= order.trade_id %>
      <%= order.created_at %>
      <%= order.instrument %>
      <%= order.type %>
      <%= order.side %>
      <%= order.units %>
      <%= link_to "Show", order_path(order) %> | <%= link_to 'Destroy', order_path(order), method: :delete, data: {confirm: "Are you sure?"} %>

  <% end %>

<%= link_to "New Order", new_order_path %>

    Trade id
    Created at
    Instrument
    Side
    Units
    Actions

  <% @orders.each do |order| %>

      <%= order.trade_id %>
      <%= order.created_at %>
      <%= order.instrument %>
      <%= order.side %>
      <%= order.units %>
      <%= link_to "Show", order_path(order) %> | <%= link_to 'Destroy', order_path(order), method: :delete, data: {confirm: "Are you sure?"} %>

  <% end %>

<%= link_to "New Order", new_order_path %>

Remove type from index table

Remove type from index table


    <%= link_to 'Back to Pages', management_site_site_pages_path(@site.slug), class: 'c-button -outline -dark-text' %>

      <%= f.button (@page.enabled ? 'Unpublish' : 'Publish'), value: Management::PageStepsController::PUBLISH, type: 'submit', class: 'c-button js-submit' %>
      <%= link_to 'Go to live page', @page.url, target: '_blank', class: 'c-button' if @page.enabled  %>

Add go to page button on site edit

Add go to page button on site edit


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

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

Stop uwsgi service if nailgun app can not be loaded

'need-app' option makes uwsgi exit if no app can be loaded

Change-Id: Ie54987d4d04b3a8dc533fb5589b65a00a879924a
Closes-bug: 1555003


Hello from Turbolinks! This demo app will help you get acquainted with the framework.

Open a new view controller by following a regular link.

See the loading indicator and test Turbolinks’ preview cache with this slow-loading page.

Trigger an HTTP 404 to see how Turbolinks handles error responses.

Visit a protected area to see how to handle an unauthorized session using a separate web view.

Load a native view controller to see how to intercept the URL and handle it natively.

Follow an external link to open it in Safari.

Post a message from JavaScript to see how it can be handled natively.

Remove duplicate closing <a> tags

Remove duplicate closing <a> tags


<%= t("brexit_checker_mailer.change_notification.#{@notification.type}") %>

<% if @action.title_url.present? %>
[<%= @action.title %>](<%= notification_email_link(@action.title_url, @notification) %>)
<% else %>
<%= @action.title %>
<% end %>

<% if @action.consequence.present? %><%= @action.consequence %><% end %>

<% if @action.exception.present? %><%= @action.exception %><% end %>

<% if @action.guidance_url.present? %>
<%= @action.guidance_prompt || t("brexit_checker_mailer.change_notification.guidance_prompt") %>
[<%= @action.guidance_link_text %>](<%= notification_email_link(@action.guidance_url, @notification)  %>)
<% end %>

Updated
<%= Date.parse(@notification.date).strftime("%-d %B %Y") %>

<% if @notification.note.present? %>
Changes made
<%= @notification.note %>
<% end %>

<%= t("brexit_checker_mailer.change_notification.#{@notification.type}") %>

<% if @action.title_url.present? %>
[<%= @action.title %>](<%= notification_email_link(@action.title_url, @notification) %>)
<% else %>
<%= @action.title %>
<% end %>

<% if @action.consequence.present? %><%= @action.consequence %><% end %>

<% if @action.exception.present? %><%= @action.exception %><% end %>

<% if @action.guidance_url.present? %>
<%= @action.guidance_prompt || t("brexit_checker_mailer.change_notification.guidance_prompt") %>:
[<%= @action.guidance_link_text %>](<%= notification_email_link(@action.guidance_url, @notification)  %>)
<% end %>

Updated:
<%= Date.parse(@notification.date).strftime("%-d %B %Y") %>

<% if @notification.note.present? %>
Changes made:
<%= @notification.note %>
<% end %>

Add colons to better indicate structure of content

This is consistent with the other emails we send [1].

[1]: https://github.com/alphagov/email-alert-api/blob/f55bf44281b282054ff5065f60a93b1819e88e27/config/locales/en.yml#L19


Hi <%= @owner %>

Thanks for requesting your project, <%= @name %>: <%= @url %>, be reviewed for <%= @type %>.

Someone on our team will review your project and be in touch with you in the next few weeks about the next steps.

Best,
The Zooniverse Team

Hi <%= @owner %>

Thanks for requesting your project, <%= @name %>: <%= @url %>, be reviewed for <%= @type %>.

Someone on our team will review your project and be in touch with you in the next few weeks about the next steps. To learn more about the project review process, timeline, and best practices, please visit <%= link_to "this link", "https://docs.google.com/document/d/1SJmOdGmpzYGyKpSnFt_tEe_BZIc2Bzmc3kKlWw-gX68/edit?usp=sharing"> %>.

Best,
The Zooniverse Team

Add doc link in second template

Add doc link in second template


<%= form_for @comment do |f| %>
  <%= f.text_field :title %>
  <%= f.text_area :content, size: "60x12" %>
  <%= f.submit "Create" %>
<% end %>

Add view new comment not complete

Add view new comment not complete


<!DOCTYPE html>
<html>
<head>
  <title>Whiteboard</title>
  <%= stylesheet_link_tag    "deck", :media => "all" %>
  <%= javascript_include_tag "deck" %>
  <%= csrf_meta_tags %>
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'whiteboard-icon-144x144.png' %>">
  <link rel="shortcut icon" href="<%= asset_path 'whiteboard-icon-144x144.png' %>" />
  <meta charset="utf-8">
  <meta name="viewport" content="width=1024, user-scalable=no">
</head>
<body class="deck-container">
  <%=  yield %>
  <script>
    $(function() {
      $.deck('.slide');
    });
  </script>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Whiteboard</title>
  <%= stylesheet_link_tag    "deck", :media => "all" %>
  <%= javascript_include_tag "deck" %>
  <%= csrf_meta_tags %>
  <link rel="apple-touch-icon-precomposed" href="<%= asset_path 'whiteboard-icon.png' %>">
  <meta charset="utf-8">
  <meta name="viewport" content="width=1024, user-scalable=no">
</head>
<body class="deck-container">
  <%=  yield %>
  <script>
    $(function() {
      $.deck('.slide');
    });
  </script>
</body>
</html>

Fix presentation layout to use new favicon

[#59499100, #59499212]


  <% current_user %>
  <% if  !current_user.orders.blank? %>
    <% current_user.orders.each do |order| %>

<%= order.item_id %>

    <% end %>
  <% end %>

Clean up, remove old comments

Clean up, remove old comments


    Subscriptions ({{ feeds_count }})

        {{ feed.title }}

Add link to view feed settings

Add link to view feed settings


Welcome <%= @email %>!

You can confirm your account email through the link below:

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

<% unless @resource.approved? %>

    Please note, your account still has to be approved by the site
    administrators, you won't be able to log in until then.

<% end %>

Welcome to ReMIT <%= @email %>!

You can confirm your account email through the link below:

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

What is ReMIT?

  The Research Management and Impact Tool (ReMIT) is an open access research
  management system for all studies conducted by Médecins Sans Frontières
  Operational Centre Amsterdam (MSF-OCA).

Why am I receiving this email?

  You are receiving this email because you either registered to use ReMIT or
  because you are the PI for a study conducted by MSF-OCA and that study is
  now visible.

<% unless @resource.approved? %>

    Please note, your account still has to be approved by the site
    administrators, you won't be able to log in until then.

<% end %>

Any questions?

Please reply to this email if you have any questions.

Update copy on confirmation mail for new signups


<% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= username %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>

<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= password %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>

RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"

RMQ_BROKER_PASSWORD="<%= p('rabbitmq-server.administrators.broker.password') %>"

<% if_p('rabbitmq-server.administrators.management.username') do |username| %>
RMQ_OPERATOR_USERNAME="<%= Shellwords.escape(username) %>"
RMQ_OPERATOR_USERNAME="${RMQ_OPERATOR_USERNAME:?must be set}"
<% end %>

<% if_p('rabbitmq-server.administrators.management.password') do |password| %>
RMQ_OPERATOR_PASSWORD="<%= Shellwords.escape(password) %>"
RMQ_OPERATOR_PASSWORD="${RMQ_OPERATOR_PASSWORD:?must be set}"
<% end %>

RMQ_BROKER_USERNAME="<%= p('rabbitmq-server.administrators.broker.username') %>"
RMQ_BROKER_USERNAME="${RMQ_BROKER_USERNAME:?must be set}"

RMQ_BROKER_PASSWORD="<%= Shellwords.escape(p('rabbitmq-server.administrators.broker.password')) %>"

Use Shellescape to prevent special characters/bash injection

[#139274045]


Editing Answer

<%= form_for [@question, @answer] do |f| %>

		<%= f.label :body %>
		<%= f.text_area :body, cols: 30, rows: 15 %>

	<%= f.submit %>

<% end %>

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

Add edit functionality to answers

Add edit functionality to answers


        <%= link_to image_tag('bd-logo.svg', alt: 'bus detective logo', class: 'user-nav__logo'), root_url %>

<%= link_to 'Displays', display %>

<%= link_to 'Run the App', 'http://app.busdetective.com' %>

        <%= link_to image_tag('bd-logo.svg', alt: 'bus detective logo', class: 'user-nav__logo'), root_url %>

<%= link_to 'Displays', page_path('display') %>

<%= link_to 'Run the App', 'http://app.busdetective.com' %>

Use Ruby better in the navigation

Use Ruby better in the navigation


#!/bin/bash

set -eu

function send_ncsa {
    # handle the case of not getting as far as running the seeder
    if [ -z $CODE ]; then
        CODE=3
        OUTPUT="UNKNOWN: seeder-wrapper-script exited before seeder returned an exit code"
    fi
    if [ -z $OUTPUT ]; then
        CODE=3
        OUTPUT="UNKNOWN: seeder-wrapper exited before setting OUTPUT - this should never happen"
    fi
    printf "<%= @fqdn %>\t<%= @seed_service_desc %>\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null
    exit $?
}
trap send_ncsa EXIT

export GOVUK_CRAWLER_AMQP_PASS='<%= @amqp_pass %>'

OUTPUT=`<%= @seeder_script_path %> <%= @seeder_script_args %>`
CODE=$?
if [ "$OUTPUT" == "" ]; then
  OUTPUT="Seeder script exited with no output"
fi
# Force everything that isn't OK to be a WARNING
if [ $CODE -gt 0 ]; then
  CODE=1
fi

#!/bin/bash

set -eu

function send_ncsa {
    # unusual ${var+x} construct explained: http://stackoverflow.com/a/13864829
    if [ -z ${CODE+x} ]; then
        CODE=3
        OUTPUT="UNKNOWN: seeder-wrapper-script exited before seeder returned an exit code"
    fi
    # unusual ${var+x} construct explained: http://stackoverflow.com/a/13864829
    if [ -z ${OUTPUT+x} ]; then
        CODE=3
        OUTPUT="UNKNOWN: seeder-wrapper exited before setting OUTPUT - this should never happen"
    fi
    printf "<%= @fqdn %>\t<%= @seed_service_desc %>\t$CODE\t$OUTPUT\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null
    exit $?
}
trap send_ncsa EXIT

export GOVUK_CRAWLER_AMQP_PASS='<%= @amqp_pass %>'

OUTPUT=`<%= @seeder_script_path %> <%= @seeder_script_args %>`
CODE=$?
if [ "$OUTPUT" == "" ]; then
  OUTPUT="Seeder script exited with no output"
fi
# Force everything that isn't OK to be a WARNING
if [ $CODE -gt 0 ]; then
  CODE=1
fi

Test whether a variable is set when using set -u

You can't just do `[ -z $VAR ]` when bash is running with the -u
(nounset) option, because `$VAR` is unset and will cause an error, even
though it's an error we want to handle.

Instead, we use the `[ -x ${VAR+x} ]` construct where `${VAR+x}` is a
parameter expansion which evaluates to null if var is unset and
substitutes the string "x" otherwise.


<div id="page-tab-<%= page_tab.id || 'new' %>" class='page-tab'>

    <% if page_tab.page_id %>
      <%= page_tab.name %>
      <%= button_to_function_without_text 'edit', t('fb_app_plugin.views.myprofile.catalog.see_page'), "jQuery('#edit_tab_'+page_tab.id.to_s).toggle"  %>
      <%# button nil, t('fb_app_plugin.views.myprofile.catalog.see_page'), "https://facebook.com/#{page_tab.page_id}/app_#{FbAppPlugin.page_tab_app_credentials[:id]}", target: '_blank'  %>
      <%# button nil, t('fb_app_plugin.views.myprofile.catalog.see_page'), "https://facebook.com/#{page_tab.page_id}", target: '_blank'  %>
    <% else %>
      <%= t('fb_app_plugin.views.myprofile.catalogs.new') %>
    <% end %>

  <%= render 'fb_app_plugin_page_tab/configure_form', page_tab: page_tab, signed_request: nil %>

<div id="page-tab-<%= page_tab.id || 'new' %>" class='page-tab'>

    <% if page_tab.page_id %>
      <%= page_tab.name %>
      <%= button_to_function_without_text 'edit', t('fb_app_plugin.views.myprofile.catalog.see_page'), "jQuery('#edit_tab_"+page_tab.id.to_s+"').toggle()"  %>
      <%# button nil, t('fb_app_plugin.views.myprofile.catalog.see_page'), "https://facebook.com/#{page_tab.page_id}/app_#{FbAppPlugin.page_tab_app_credentials[:id]}", target: '_blank'  %>
      <%# button nil, t('fb_app_plugin.views.myprofile.catalog.see_page'), "https://facebook.com/#{page_tab.page_id}", target: '_blank'  %>
    <% else %>
      <%= t('fb_app_plugin.views.myprofile.catalogs.new') %>
    <% end %>

  <%= render 'fb_app_plugin_page_tab/configure_form', page_tab: page_tab, signed_request: nil %>

Add button to edit form 2

Add button to edit form 2


<%= render 'load' %>
<%= render 'configure_button' %>

  <% if profile and user.present? and (user.is_admin?(environment) or user.is_admin?(profile)) %>

      <%= button :add, _('Add product or service'), controller: :manage_products, action: :new, profile: profile.identifier %>

  <% end %>

  <%= content_for :product_page do %>
    <%= render 'catalog/results', show_supplier: @scope == 'all' %>
  <% end %>
  <%= render 'catalog/search' %>
  <%= render 'catalog/javascripts', external: false %>

<%= javascript_tag do %>
  catalog.base_url_path = <%= url_for(controller: :fb_app_plugin_page_tab, action: :index, page_id: params[:page_id], signed_request: params[:signed_request]).to_json %> + '&'
<% end %>

<%= render 'load' %>
<%= render 'configure_button' %>

Vitrine da Economia Solidária

O Seminário resulta de atividades promovidas durante do processo de formação que vem desenvolvido na região Nordeste desde 2009, onde os coletivos estaduais buscam construir sua autonomia, principalmente no que se refere a sistematização de experiências.

  <% if profile and user.present? and (user.is_admin?(environment) or user.is_admin?(profile)) %>

      <%= button :add, _('Add product or service'), controller: :manage_products, action: :new, profile: profile.identifier %>

  <% end %>

  <%= content_for :product_page do %>
    <%= render 'catalog/results', show_supplier: @scope == 'all' %>
  <% end %>
  <%= render 'catalog/search' %>
  <%= render 'catalog/javascripts', external: false %>

<%= javascript_tag do %>
  catalog.base_url_path = <%= url_for(controller: :fb_app_plugin_page_tab, action: :index, page_id: params[:page_id], signed_request: params[:signed_request]).to_json %> + '&'
<% end %>

Test possible title and subtitle

Test possible title and subtitle


<% content_for :title, "#{@search_term} - Search - GOV.UK" %>
<% content_for :body_classes, "search" %>
<% content_for :extra_headers do %>
  <meta name="description"
      content="Search for '#{@search_term}' on GOV.UK." />
  <link rel="alternate" type="application/json" href="/api/search.json?q=<%= @search_term %>">
<% end %>

  <form action="/search" method="get" accept-charset="utf-8" role="search" class="js-live-search-form">

      <%= render 'search_field' %>

<%= @results.result_count %> found

      <%= render_mustache('results_block', @results.to_hash) %>

  </form>

No more results for “<%= @search_term %>”. Try a different search?

<% content_for :title, "#{@search_term} - Search - GOV.UK" %>
<% content_for :body_classes, "search" %>
<% content_for :extra_headers do %>
  <meta name="description"
      content="Search for '<%= @search_term %>' on GOV.UK." />
  <link rel="alternate" type="application/json" href="/api/search.json?q=<%= @search_term %>">
<% end %>

  <form action="/search" method="get" accept-charset="utf-8" role="search" class="js-live-search-form">

      <%= render 'search_field' %>

<%= @results.result_count %> found

      <%= render_mustache('results_block', @results.to_hash) %>

  </form>

No more results for “<%= @search_term %>”. Try a different search?

Fix meta description for search pages

Fix meta description for search pages

This was done in https://github.com/alphagov/frontend/pull/1011.


  Now help spread the word:
  <a href="<%= twitter_share_url(@actionPage) -%>" class="twitter twitter-button" rel="noreferrer">

Share on Twitter

  <a href="<%= facebook_share_url(@actionPage) -%>" class="facebook facebook-button">

Share on Facebook

  <a href="<%= google_share_url(@actionPage) -%>" class="google google-button">

Share on Google+

  Have you donated to EFF lately?
  <% if !current_user %>

  Sign up for an EFF Action account and save your information for next time.
  <% end %>

  Now help spread the word:
  <a href='<%= twitter_share_url(@actionPage) -%>' class='twitter twitter-button'>

Share on Twitter

  <a href="<%= facebook_share_url(@actionPage) -%>" class="facebook facebook-button">

Share on Facebook

  <a href="<%= google_share_url(@actionPage) -%>" class="google google-button">

Share on Google+

  Have you donated to EFF lately?
  <% if !current_user %>

  Sign up for an EFF Action account and save your information for next time.
  <% end %>

Revert "Don't pass referrer header to twitter when sharing"

This reverts commit f3d2faf04a40cc231be920ec033d2644d6a35e39.

This link gets picked up by js anyway. We're going to handle it by making the
embed link shorter.


[unix_http_server]
file=/srv/stonepath-example/supervisor.sock

[supervisord]
logfile=/srv/stonepath-example/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=error
pidfile=/srv/stonepath-example/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor_stonepath-example.sock

<%
app_names = []
engine.each_process do |name, process|
  1.upto(engine.formation[name]) do |num|
    port = engine.port_for(process, num)
    full_name = "#{app}-#{name}-#{num}"
    environment = engine.env.merge("PORT" => port.to_s).map do |key, value|
      "#{key}=#{shell_quote(value)}"
    end
    app_names << full_name
%>
[program:<%= full_name %>]
command=<%= process.command %>
autostart=true
autorestart=true
stopsignal=QUIT
log=<%= log %>
directory=<%= engine.root %>
environment=<%= environment.join(',') %><%
  end
end
%>

[group:<%= app %>]
programs=<%= app_names.join(',') %>

[unix_http_server]
file=/srv/fourth-year-project-system/supervisor.sock

[supervisord]
logfile=/srv/fourth-year-project-system/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=error
pidfile=/srv/fourth-year-project-system/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor_fourth-year-project-system.sock

<%
app_names = []
engine.each_process do |name, process|
  1.upto(engine.formation[name]) do |num|
    port = engine.port_for(process, num)
    full_name = "#{app}-#{name}-#{num}"
    environment = engine.env.merge("PORT" => port.to_s).map do |key, value|
      "#{key}=#{shell_quote(value)}"
    end
    app_names << full_name
%>
[program:<%= full_name %>]
command=<%= process.command %>
autostart=true
autorestart=true
stopsignal=QUIT
log=<%= log %>
directory=<%= engine.root %>
environment=<%= environment.join(',') %><%
  end
end
%>

[group:<%= app %>]
programs=<%= app_names.join(',') %>

Use the correct application name

supervisor_templates: Use the correct application name


<% if current_user.nil? %>
  <%= link_to 'Sign In', new_user_path %> to Comment
<% elsif @recipe.user.first_name == current_user.first_name %>
  <%= form_for [@recipe, @new_review], remote: true do |f| %>
    <% if signed_in? %>
      <%= f.text_area :comment, rows: '3', placeholder: "Comment here..." %>
      <%= f.hidden_field :user_id, value: current_user.id %>
    <%= f.submit 'Leave Comment'%>
    <% end %>
  <% end %>
<% end %>

<% if current_user.nil? %>
  <%= link_to 'Create Account', new_user_path %> or <%= link_to 'Log In',login_path %> to Comment
<% elsif @recipe.user.first_name == current_user.first_name %>
  <%= form_for [@recipe, @new_review], remote: true do |f| %>
    <% if signed_in? %>
      <%= f.text_area :comment, rows: '3', placeholder: "Comment here..." %>
      <%= f.hidden_field :user_id, value: current_user.id %>
    <%= f.submit 'Leave Comment'%>
    <% end %>
  <% end %>
<% end %>

Create account or log in link to comment, if anony user on show recipe page


Tests

Tests are elements or features that you can change or turn off.

<% if @tests.any? %>

Active Tests

  <% @tests.each do |test| %>

<a href="<%= url("tests/#{test.id}") %>"><%= test.name %>

  <% end %>

<% else %>

    No tests! Something may be wrong or you may just need to define some metrics.

<% end %>

Tests

Tests are elements or features that you can change or turn off.

<% if @tests.any? %>

Active Tests

  <% @tests.each do |test| %>

<a href="<%= url("tests/#{test.id}") %>"><%= test.name %>

  <% end %>

<% else %>

    No tests! Something may be wrong or you may just need to define some tests.

<% end %>

Fix copy pasta in text.

Fix copy pasta in text.


  <%= form_for :variant_search, url: form_path, method: :get do |f| %>

          <%= label_tag nil, Spree::StockLocation.model_name.human %>
          <%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank: true, class: 'select2 fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location) } %>

      <div class="<%= if content_for?(:sidebar) then 'col-6' else 'col-9' end %>">

          <%= label_tag :add_variant_id, Spree::Variant.model_name.human %>
          <%= text_field_tag :variant_search_term, params[:variant_search_term], class: "fullwidth", placeholder: Spree.t(:variant_search_placeholder) %>

        <%= button Spree.t(:filter_results) %>

  <% end %>

  <%= form_for :variant_search, url: form_path, method: :get do |f| %>

          <%= label_tag nil, Spree::StockLocation.model_name.human %>
          <%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank: true, class: 'custom-select fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location) } %>

      <div class="<%= if content_for?(:sidebar) then 'col-6' else 'col-9' end %>">

          <%= label_tag :add_variant_id, Spree::Variant.model_name.human %>
          <%= text_field_tag :variant_search_term, params[:variant_search_term], class: "fullwidth", placeholder: Spree.t(:variant_search_placeholder) %>

        <%= button Spree.t(:filter_results) %>

  <% end %>

Use custom-select for variant search

Use custom-select for variant search


<!DOCTYPE html>

    <title>Chef browser</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/css/bootstrap-responsive.css" rel="stylesheet" media="screen">
    <link href="/css/bootstrap.css" rel="stylesheet" media="screen">

          Chef browser

Nodes

Data bags

      <%== yield %>

Delete unused piece of code.

Delete unused piece of code.


  <%= link_to reimagine_root_url(path: "/software"),
        class: "main-link",
        data: { role: "discover" } do %>
    Projects
  <% end %>

  <%= link_to reimagine_root_url(path: "/hackathons"),
        class: "main-link",
        data: { role: "discover" } do %>
    Hackathons
  <% end %>

  <%= link_to reimagine_root_url(path: "/teams"),
        class: "main-link",
        data: { role: "teams" } do %>
    Teams alpha
  <% end %>

  <%= link_to reimagine_root_url(path: "/software"),
        class: "main-link",
        data: { role: "discover" } do %>
    Projects
  <% end %>

  <%= link_to reimagine_root_url(path: "/hackathons"),
        class: "main-link",
        data: { role: "discover" } do %>
    Hackathons
  <% end %>

  <%= link_to reimagine_root_url(path: "/teams"),
        class: "main-link",
        data: { role: "teams" } do %>
    Teams nyc
  <% end %>

Change Teams tab from alpha to nyc.

Change Teams tab from alpha to nyc.


<form method='GET' action='<%= url %>' class='search_form'>
  <%= text_field :search, nil, :id => 'search', :type => 'search', :name => 'search', :value => params[:search], :title => t('search_input_notice', :scope => 'refinery.admin.search') %>
  <%= hidden_field :visual_editor, nil, :name => 'visual_editor', :id => nil, :value => true  if params[:visual_editor].presence %>
  <%= hidden_field :dialog, nil, :name => 'dialog', :id => nil, :value => true if from_dialog? %>
  <%= hidden_field :callback, nil, :name => 'callback', :id => nil, :value => @callback if @callback.presence %>
  <%= submit_tag t('button_text', :scope => 'refinery.admin.search'), :name => nil %>
</form>

<form method='GET' action='<%= url %>' class='search_form'>
  <%= text_field :search, nil, :id => 'search', :type => 'search',
    :name => 'search',
    :value => params[:search],
    :title =>       t('search_input_help', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe,
    :placeholder => t('search_input_notice', :scope => 'refinery.admin.search', :query => h(params[:search])).html_safe
    %>
  <%= hidden_field :visual_editor, nil, :name => 'visual_editor', :id => nil, :value => true  if params[:visual_editor].presence %>
  <%= hidden_field :dialog, nil, :name => 'dialog', :id => nil, :value => true if from_dialog? %>
  <%= hidden_field :callback, nil, :name => 'callback', :id => nil, :value => @callback if @callback.presence %>
  <%= submit_tag t('button_text', :scope => 'refinery.admin.search'), :name => nil %>
</form>

Add a placeholder to the Search field

Add a placeholder to the Search field

1. Add placeholder
2. Make placeholder and title html_safe so that html entities can be
used.
3. New i18n string search_input_help used as tootip. Uses wording from
old search_input_notice


<%= form.text_field :hoc_paper_number, label_text: 'House of Commons paper number' %>
<%= form.label :parliamentary_session %>
<%= form.select :parliamentary_session, Attachment.parliamentary_sessions %>

<%= form.text_field :hoc_paper_number, label_text: 'House of Commons paper number' %>
<%= form.label :parliamentary_session %>
<%= form.select :parliamentary_session, Attachment.parliamentary_sessions, include_blank: true %>

Allow parliamentary session to be unset

Allow parliamentary session to be unset


<% content = final_legal_document_page.content.to_s %>
<% content.gsub!(/[^ ]\#{(\d+)}/m) { |m| @data_request.render_variable_latex(final_legal_document_page, $1) } %>
<% content.gsub!(/\#{(\d+)}/m) { |m| @data_request.render_variable_inline_latex(final_legal_document_page, $1) } %>
<% content = latex_safe(content) %>
<% content.gsub!(/\*\*(.*?)\*\*/, "\\textbf{\\1}") %>
<% content.gsub!(/==(.*?)==/, "\\hl{\\1}") %>
<% content.gsub!(/XX(YES)XX/, "\\cmark") %>
<% content.gsub!(/XX(NO)XX/, "\\xmark") %>
<% content.gsub!(/\"([a-zA-Z\s\.]*?)\"/, "``\\1''") %>
<% content.gsub!(/\*(.*?)\*/, "\\textit{\\1}") %>
<%= content %> \\

<% content = final_legal_document_page.content.to_s %>
<% content.gsub!(/[^ ]\#{(\d+)}/m) { |m| @data_request.render_variable_latex(final_legal_document_page, $1) } %>
<% content.gsub!(/\#{(\d+)}/m) { |m| @data_request.render_variable_inline_latex(final_legal_document_page, $1) } %>
<% content = latex_safe(content) %>
<% content.gsub!(/\*\*(.*?)\*\*/, "\\textbf{\\1}") %>
<% content.gsub!(/==(.*?)==/, "\\hl{\\1}") %>
<% content.gsub!(/XX(YES)XX/, "\\cmark") %>
<% content.gsub!(/XX(NO)XX/, "\\xmark") %>
<% content.gsub!(/\"([a-zA-Z\s\.-]*?)\"/, "``\\1''") %>
<% content.gsub!(/\*(.*?)\*/, "\\textit{\\1}") %>
<%= content %> \\

Correct quotes for words including dashes


---
driver:
  name: vagrant

provisioner:
  name: chef_zero

platforms:
  - name: ubuntu-12.04
  - name: centos-6.4

suites:
  - name: default
    run_list:
      - recipe[<%= cookbook_name %>::default]
    attributes:

---
driver:
  name: vagrant

provisioner:
  name: chef_zero

platforms:
  - name: ubuntu-12.04
  - name: centos-6.5

suites:
  - name: default
    run_list:
      - recipe[<%= cookbook_name %>::default]
    attributes:

Update code_generator template to latest centos

RE: https://github.com/opscode/chef-dk/issues/177


<%= render 'requests/new_request_form', request: Request.new %>
<%= button_to 'Group Activity', river_path, method: 'get' %>
<%= button_to 'Active Requests', active_path, method: 'get' %>
<%= button_to 'Your History', history_path, method: 'get' %>
<%= button_to 'Moved? Update Your Neighborhood', groups_assign_path, method: 'get' %>

<%= render 'requests/new_request_form', request: Request.new %>

<%= button_to 'Community', river_path, method: 'get', class: 'small button river-btn' %>

<%= button_to 'Active', active_path, method: 'get', class: 'small button river-btn' %>

<%= button_to 'History', history_path, method: 'get', class: 'small button river-btn' %>

Format form and button group

Format form and button group


<% @asset_pipeline_prefixes.each do |prefix| %>
  location ^~ /<%= prefix %>/ {
    # Set expires headers for assets
    # Assets with a digest (32+ char hex string in filename) get max expires
    # Non-digest assets get 30 mins
    expires 30m;
    add_header Cache-Control public;
    gzip_static on;

    location ~ "-[0-9a-f]{32,}\." {
      expires max;
      add_header Cache-Control "public, immutable";
    }
  }
<% end %>

<%= @nginx_extra_config %>

<% @asset_pipeline_prefixes.each do |prefix| %>
  location ^~ /<%= prefix %>/ {
    # Set expires headers for assets
    # Assets with a digest (32+ char hex string in filename) get max expires
    # Non-digest assets get 30 mins
    expires 30m;
    add_header Cache-Control public;
    gzip_static on;

    location ~ "-[0-9a-f]{32,}\." {
      expires max;
      add_header Cache-Control "public, immutable";

      # Set CORS allow origin for fonts only
      location ~* \.(eot|otf|ttf|woff|woff2)$ {
        add_header Access-Control-Allow-Origin "*";
        add_header Access-Control-Allow-Methods "GET, OPTIONS";
        add_header Access-Control-Allow-Headers "origin, authorization";
      }
    }

  }
<% end %>

<%= @nginx_extra_config %>

Set cross origin headers on font files only

Previously, when embedding assets using the
assets.publishing.service.gov.uk, domain we were setting every single
asset with CORS headers to allow them to be used anywhere. In RFC 115
[1] these were identified as only needed for fonts. I believe they are
actually only needed at all for fonts so that developers can run static
as part of their development environment so there's a reasonable chance
this rule could be removed if we're able to retire static.

As we're only serving fonts from the asset pipeline I have not
duplicated this rule to be for assets that aren't fingerprinted. I don't
expect anyone would need it and (if my Nginx understanding is correct) will
require duplication.

I'm not convinced we need to be setting some of these cache headers too
as I imagine Rails is already serving these in most cases.

[1] https://github.com/alphagov/govuk-rfcs/blob/45e09c088bfde6c1d4dfb68f9bc1c635f63c9a39/rfc-115-enabling-http2-on-govuk.md#must


---
- job:
    name: run-rake-task
    display-name: Run rake task
    project-type: freestyle
    description: "Run a rake task on an application."
    concurrent: true
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: ssh deploy@$(govuk_node_list -c $MACHINE_CLASS --single-node) "cd /var/apps/$TARGET_APPLICATION && govuk_setenv $TARGET_APPLICATION bundle exec rake $RAKE_TASK"
    wrappers:
      - ansicolor:
          colormap: xterm
      - timestamps
    parameters:
      - choice:
          name: TARGET_APPLICATION
          description: Choose the application to run the rake task in
          choices: <%= ['-- Choose an app'] + @applications.keys %>
      - choice:
          name: MACHINE_CLASS
          description: Choose the machine class this app is running on
          choices:
            - api
            - backend
            - bouncer
            - calculators_frontend
            - content_store
            - draft_cache
            - draft_content_store
            - draft_frontend
            - email_alert_api
            - frontend
            - router_backend
            - publishing_api
            - search
            - whitehall_backend
            - whitehall_frontend
      - string:
          name: RAKE_TASK
          description: Name of rake task to run (try `-T` to print the tasks)

---
- job:
    name: run-rake-task
    display-name: Run rake task
    project-type: freestyle
    description: "Run a rake task on an application."
    concurrent: true
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: ssh deploy@$(govuk_node_list -c $MACHINE_CLASS --single-node) "cd /var/apps/$TARGET_APPLICATION && govuk_setenv $TARGET_APPLICATION bundle exec rake $RAKE_TASK"
    wrappers:
      - ansicolor:
          colormap: xterm
      - timestamps
    parameters:
      - choice:
          name: TARGET_APPLICATION
          description: Choose the application to run the rake task in
          choices: <%= ['-- Choose an app'] + @applications.keys %>
      - choice:
          name: MACHINE_CLASS
          description: Choose the machine class this app is running on
          choices:
            - account
            - api
            - backend
            - bouncer
            - calculators_frontend
            - content_store
            - draft_cache
            - draft_content_store
            - draft_frontend
            - email_alert_api
            - frontend
            - router_backend
            - publishing_api
            - search
            - whitehall_backend
            - whitehall_frontend
      - string:
          name: RAKE_TASK
          description: Name of rake task to run (try `-T` to print the tasks)

Add `account` to `MACHINE_CLASS` list for run-rake-task


Clojure

Installation:

    Homebrew for Mac OS X

Update your homebrew to latest: brew update

Install Clojure: brew install clojure

    Other

Download the latest table release jar file Clojure-1.5.1

Running tests:

If installed with homebrew:

$ clj bob_test.clj

If jar file downloaded, assuming clojure-1.5.1.jar

$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj

Clojure

Installation:

    Homebrew for Mac OS X

Update your homebrew to latest: brew update

Install Leiningen: brew install leiningen

Install lein-exec: edit ~/.lein/profiles.clj and add {:user {:plugins [[lein-exec "0.3.1"]]}}

    Other

Download the latest table release jar file Clojure-1.5.1

Running tests:

If you installed lein-exec:

$ lein exec bob_test.clj

If jar file downloaded, assuming clojure-1.5.1.jar

$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj

Add lein-exec instructions for Clojure on OSX


<% if @presenter.present? && @presenter.flow.name === 'next-steps-for-your-business' %>
  <% feedback_message = capture do %>
    We’re still building this part of GOV.UK –
    <%= link_to "give us your feedback (opens in a new tab)",
      "/done/next-steps-for-your-business",
      class: "govuk-link",
      target: "_blank",
      rel: "noopener noreferrer",
      data: {
        module: "gem-track-click",
        "track-action": "/done/next-steps-for-your-business",
        "track-category": "Internal Links Clicked",
        "track-label": "give us your feedback"
      }
    %>
    to help us improve it.
  <% end %>

  <%= render "govuk_publishing_components/components/phase_banner", {
    message: feedback_message
  } %>
<% end %>

<% if @presenter.present? && @presenter.flow.name === 'next-steps-for-your-business' %>
  <% feedback_message = capture do %>
    Help improve GOV.UK –
    <%= link_to "Sign up to take part in user research (opens in a new tab)",
      "https://signup.take-part-in-research.service.gov.uk/home?utm_campaign=Next_steps_ltd_co&utm_source=govukother&utm_medium=gov.uk&t=GDS&id=303",
      class: "govuk-link",
      target: "_blank",
      rel: "noopener noreferrer",
      data: {
        module: "gem-track-click",
        "track-action": "https://signup.take-part-in-research.service.gov.uk/home?utm_campaign=Next_steps_ltd_co&utm_source=govukother&utm_medium=gov.uk&t=GDS&id=303",
        "track-category": "Internal Links Clicked",
        "track-label": "Sign up to take part in user research"
      }
    %>
  <% end %>

  <%= render "govuk_publishing_components/components/phase_banner", {
    message: feedback_message
  } %>
<% end %>

Replace feedback link with UR link

Replace feedback link with UR link

Replace the feedback link and copy used in the phase banner to allow users to sign-up for user research


<% form_for :order, order, :url => {:action => :confirm, :id => order} do |f| %>
  <% if order.cycle.delivery_methods.count > 0 %>

<%= t('orders_cycle_plugin.views.order._delivery.delivery_method') %>

      <%= order.supplier_delivery.name %>

<%= order.supplier_delivery.description %>

    <% if order.open? and order.cycle.delivery_methods.count > 1 %>
      <%= labelled_field f, :supplier_delivery_id, t('orders_cycle_plugin.views.order._delivery.choose_another'),
        f.select(:supplier_delivery_id, order.cycle.delivery_methods.collect{ |d| [d.name, d.id] }, {},
                 :onchange => "jQuery('#delivery-box').load('#{url_for(:action => :render_delivery, :id => order.id)}', jQuery(this).parents('form').serialize());"),
        :class => 'subtitle' %>
    <% end %>
  <% end %>

    <% if order.open? %>
      <%= f.submit t('orders_cycle_plugin.views.order._delivery.confirm_order'), :confirm => t('orders_cycle_plugin.views.order._delivery.confirming_this_order') %>
      <%= link_to t('orders_cycle_plugin.views.order._delivery.cancel_order'), {:action => :cancel, :id => order.id} %>
    <% end %>

<% end %>

<% form_for :order, order, :url => {:action => :confirm, :id => order} do |f| %>
  <% if order.cycle.delivery_methods.count > 0 %>

<%= t('orders_cycle_plugin.views.order._delivery.delivery_method') %>

      <% if order.supplier_delivery %>
        <%= order.supplier_delivery.name %>

<%= order.supplier_delivery.description %>

      <% end %>

    <% if order.open? and order.cycle.delivery_methods.count > 1 %>
      <%= labelled_field f, :supplier_delivery_id, t('orders_cycle_plugin.views.order._delivery.choose_another'),
        f.select(:supplier_delivery_id, order.cycle.delivery_methods.collect{ |d| [d.name, d.id] }, {},
                 :onchange => "jQuery('#delivery-box').load('#{url_for(:action => :render_delivery, :id => order.id)}', jQuery(this).parents('form').serialize());"),
        :class => 'subtitle' %>
    <% end %>
  <% end %>

    <% if order.open? %>
      <%= f.submit t('orders_cycle_plugin.views.order._delivery.confirm_order'), :confirm => t('orders_cycle_plugin.views.order._delivery.confirming_this_order') %>
      <%= link_to t('orders_cycle_plugin.views.order._delivery.cancel_order'), {:action => :cancel, :id => order.id} %>
    <% end %>

<% end %>

Check if supplier delivery is selected

Check if supplier delivery is selected


<% @title = 'Censor Rules' %>

<%= @title %>

<%= render :partial => 'show',
           :locals => { :censor_rules => @censor_rules } %>

<% @title = 'Global Censor Rules' %>

<%= @title %>

      This page lists Censor Rules that apply to everything – Requests,
      Users and Public Bodies.

      Request, User and Public Body specific censor rules may also exist and can
      be seen, edited and created on the admin pages for those Requests, Users
      and Public Bodies.

<%= render :partial => 'show',
           :locals => { :censor_rules => @censor_rules } %>

About Censor Rules

Censor Rules are rules to redact information from incoming and outgoing
         messages.

Redacting means removing or hiding part of a message so it cannot be
         read: you are effectively removing part of a document from your site.
         Typically you do this to conceal sensitive (usually, that means
         personal) information on the public site.

These can be powerful, so must be used with caution.

Censor Rules can be associated with the following:

Info Requests: Applies to everything on a single request

Users: Applies to all requests made by the associated user

Public Bodies: Applies to all requests made to the associated body

Global: Applies to everything on the site

Read more about <%= link_to 'Censor Rules on alaveteli.org',
        'http://alaveteli.org/docs/running/redaction/', :target => '_blank' %>.

Add in-app censor rule help

Add in-app censor rule help


    <%= t('activemodel.attributes.metric_result.metric') %>
    <%= t('activemodel.attributes.metric_result.value') %>
    <%= t('activemodel.attributes.metric_result.weight') %>
    <%= t('activemodel.attributes.metric_result.threshold') %>

    <% cache("#{@root_module_result.id}_results") do %>
      <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %>
    <% end %>

Fix missing table row in Metric Results view


<% @active_tab = 'Getting Started' %>
<%= render partial: 'pages/shared/discover_tabs', active_tab: @active_tab %>
<iframe id="teacher_resources_iframe" src="https://community.quill.org/teacher-resources/" scrolling='no' />

Add back old teacher resources page

Add back old teacher resources page


<%= @rails_env %>:
  adapter: <%= @database['adapter'] %>
  host: <%= @host %>
  database: <%= @database['database'] %>
  username: <%= @database['username'] %>
  password: <%= @database['password'] %>
  encoding: <%= @database.has_key?('encoding') ? @database['encoding'] : 'utf8' %>
  reconnect: true

<%- @databases.each do |env, db| %>
<%= (env =~ /_default/ ? "production" : env) %>:
  adapter: <%= db['adapter'] %>
  host: <%= @host %>
  database: <%= db['database'] %>
  username: <%= db['username'] %>
  password: <%= db['password'] %>
  encoding: <%= db.has_key?('encoding') ? db['encoding'] : 'utf8' %>
  reconnect: true
<%- end %>

Revert changes to a template that is used only by the legacy recipe.

This is a partial revert of 2ebd9c61d5fef505711382f00d90a177aa46176a


#!/usr/bin/env bash
. /etc/rc.d/init.d/functions

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"

cleanup() {
  rm -f $PUMA_DIR/$APPNAME*.{pid,state,sock}
}

# Kill process
if [ -e  $PIDFILE ]; then
  echo -n "Shutting down $APPNAME.."
  kill $(cat $PIDFILE) && cleanup && success || failure
else
  echo "$APPNAME is not running"
fi

#!/usr/bin/env bash
. /etc/rc.d/init.d/functions

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"

cleanup() {
  rm -f $PUMA_DIR/$APPNAME*.{pid,state,sock}
  rm -f $PIDFILE
}

# Kill process
if [ -e  $PIDFILE ]; then
  echo -n "Shutting down $APPNAME.."
  kill $(cat $PIDFILE) && cleanup && success || failure
else
  echo "$APPNAME is not running"
fi

Clean up the pidfile since init.d isn't doing that anymore


  <%= label_tag nil, t(:environment) %>

    <%= collection_select(:authentication_method, :environment, Spree::Configuration.configurations.keys, :to_s, :titleize, {}) %>

<%= auth_form.field_container :provider do %>
  <%= auth_form.label :provider, t(:social_provider) %>
  <%= auth_form.select :provider, SpreeSocial::OAUTH_PROVIDERS, { :include_blank => true } %>
<% end %>

<%= auth_form.field_container :api_key do %>
  <%= auth_form.label :api_key, t(:social_api_key) %>

  <%= auth_form.text_field :api_key %>
<% end %>

<%= auth_form.field_container :api_secret do %>
  <%= auth_form.label :api_secret, t(:social_api_secret) %>

  <%= auth_form.text_field :api_secret %>
<% end %>

<%= auth_form.field_container :active do %>
  <%= auth_form.label :active, t(:active) %>

  <%= auth_form.radio_button :active, :true %><%= t(:yes) %>
  <%= auth_form.radio_button :active, :false %><%= t(:no) %>
<% end %>

  <%= label_tag nil, t(:environment) %>

    <%= collection_select(:authentication_method, :environment, Rails.configuration.database_configuration.keys, :to_s, :titleize, {}) %>

<%= auth_form.field_container :provider do %>
  <%= auth_form.label :provider, t(:social_provider) %>
  <%= auth_form.select :provider, SpreeSocial::OAUTH_PROVIDERS, { :include_blank => true } %>
<% end %>

<%= auth_form.field_container :api_key do %>
  <%= auth_form.label :api_key, t(:social_api_key) %>

  <%= auth_form.text_field :api_key %>
<% end %>

<%= auth_form.field_container :api_secret do %>
  <%= auth_form.label :api_secret, t(:social_api_secret) %>

  <%= auth_form.text_field :api_secret %>
<% end %>

<%= auth_form.field_container :active do %>
  <%= auth_form.label :active, t(:active) %>

  <%= auth_form.radio_button :active, :true %><%= t(:yes) %>
  <%= auth_form.radio_button :active, :false %><%= t(:no) %>
<% end %>

Use the Rails.configuration for fetching the available env values.


Welcome to Harbor You're all set to go!

Congratulations on creating your first Harbor application! Now you should be ready to dive in, and here are some resources to get you started:

What Am I?

I'm just a default view to help you get started. I live in views/home/index.html.erb, and am being rendered by controllers/home.rb. And, of course, you're being routed here by lib/<$= app_name =$>.rb.

That's pretty much the default setup for Harbor applications, but if you poke around you'll see you can set me up however you like.

Welcome to Harbor You're all set to go!

Congratulations on creating your first Harbor application! Now you should be ready to dive in, and here are some resources to get you started:

What Am I?

I'm just a default view to help you get started. I live in views/home/index.html.erb, and am being rendered by controllers/home.rb. And, of course, you're being routed here by lib/<@= app_name @>.rb.

That's pretty much the default setup for Harbor applications, but if you poke around you'll see you can set me up however you like.

Fix default index page not rendering app_name


<%# Borrowed from http://rubyrss.org %>

<a href="<%= rss.channel.link %>"><%= rss.channel.title %>

<%= rss.channel.description %>

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

<%= item.title %>

<% end %>

    <title>Pummel - Auto tumble your pinboard.in links!</title>

<a href="<%= rss.channel.link %>"><%= rss.channel.title %>

<%= rss.channel.description %>

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

<% begin
    oemb = OEmbed::Providers.get(item.link)
    case oemb.field('type')
    when 'photo' %>
        <img src='<%= oemb.field("url") %>' width='<%= oemb.field("width") %>' height='<%= oemb.field("height") %>' />
<%  when 'video' %>
        <%= oemb.field('html') %>
<%  when 'link'  %>
        <a href="<%= item.link %>"><%= item.title %>
<%  when 'rich'  %>
        <%= oemb.field('html') %>
<%  else %>
        <a href="<%= item.link %>"><%= item.title %>
<% end # case statement for the type
rescue OEmbed::NotFound %>
    <a href="<%= item.link %>"><%= item.title %>
<% rescue OEmbed::Error => e%>

Error: <%= e.to_s %>!
<a href="<%= item.link %>"><%= item.title %>
<% end %>

<% end %>

Use Ruby-OEmbed to do the tumbling

Use Ruby-OEmbed to do the tumbling

Messing around with it now shows the API is far from perfect, and I have a few
ideas on how to make it better...


<% content_for :title, "Photoplop" %>

	  <%= image_tag("Photoplop_Logo.png", size: "350x150", alt: "photoplop logo") %>

Snap It. Plop It. Share It.

Build photo albums with your <%= group %>.

		<% if flash[:alert] %>

 <%=flash[:alert] %>

		<% end %>
		<%= form_for :user do |f| %>

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

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

		  <%= f.submit "Log In" %>
		<% end %>

		<%= link_to "Create Account", new_user_path, :class => "button" %>

		<%= link_to raw(" Login with Instagram"), '/auth/instagram', :class => "button" %>
		<%= link_to raw(" Login with Twitter"), '/auth/twitter', :class => "button" %>

Fix centering of login form

Fix centering of login form


Lower Northeast › #2 › Edit

    <%= render 'form' %>

Lower Northeast › <%= @poll.title %> › Edit

    <%= render 'form' %>

Include nickname in Edit Poll breadcrumb


<%= render layout: 'base_page', locals: {
  title: @publication.title,
  publication: @publication,
  edition: @edition,
} do %>

        <%= raw @publication.introduction %>

        <%= render partial: 'location_form', locals: { format: 'service' } %>

  <% if @postcode.present? and !@publication.places.nil? %>
    <% if @publication.places.any? %>

Results <%= preposition ||= "near" %> <%= @postcode %>:

          <%= render partial: option_partial ||= "option", locals: { places: @publication.places } %>

    <% else %>

Sorry, no results were found near you.

    <% end %>
  <% else %>

Further information

        <%= raw @publication.need_to_know %>
        <%= raw @publication.more_information %>

  <% end %>
<% end %>

<%= render partial: 'ga_postcode_error_tracking', locals: { alert_type: 'place' } %>

<%= render layout: 'base_page', locals: {
  title: @publication.title,
  publication: @publication,
  edition: @edition,
} do %>

        <%= raw @publication.introduction %>

        <%= render partial: 'location_form', locals: { format: 'service' } %>

  <% if @postcode.present? and !@publication.places.nil? %>
    <% if @publication.places.any? %>
      <section class="places"
               data-module="auto-track-event"
               data-track-category="placeSearch"
               data-track-action="postcodeResultShown"
               data-track-label="<%= @publication.places.first["name"] %>">

Results <%= preposition ||= "near" %> <%= @postcode %>:

          <%= render partial: option_partial ||= "option", locals: { places: @publication.places } %>

    <% else %>

Sorry, no results were found near you.

    <% end %>
  <% else %>

Further information

        <%= raw @publication.need_to_know %>
        <%= raw @publication.more_information %>

  <% end %>
<% end %>

<%= render partial: 'ga_postcode_error_tracking', locals: { alert_type: 'place' } %>

Add GA tracking for results shown with data module

We implement GA tracking with data modules as described in govuk_frontend_toolkit (https://github.com/alphagov/govuk_frontend_toolkit/blob/master/docs/javascript.md#modules). We use the `auto-track-event` module defined in govuk_frontend_toolkit (https://github.com/alphagov/govuk_frontend_toolkit/blob/master/javascripts/govuk/modules/auto-track-event.js).

We also add the name of the first places results as a label for GA tracking. This allows for specific tracking of shown results in the DfE campaign to promote the "Report child abuse" page. For non-report-child-abuse cases this is not necessarily useful, but it is deemed as the best compromise to allow tracking for this specific campaign and may be extended in future (by sending all results) for other formats if useful.


<%-
    require 'yaml'

    def escape_quotes(s)
      substr = s
      substr = s[1..-1] if s[0].eql?('"')
      substr.gsub!(/"/){ '\"' }
      "\"#{substr}\""
    end

    def sort_yaml(obj, nest=0)
      yaml_string = ""
      if obj.instance_of?(Array)
        obj.each do |element|
          if element.instance_of?(Hash)
            one = element.keys.sort!
            yaml_string << "\n- job:"
            one.each do |o|
              if nest > 0
                space = " "*(nest+4)
              else
                space = " "*(nest+2)
              end
              yaml_string << "\n" + space + "- #{o}:"
              yaml_string << sort_yaml(element["#{o}"], nest+3)
            end
          else
            yaml_string << "\n"  + (" "*(nest+5)) + "- \"#{element.to_s}\""
          end
        end
      elsif obj.instance_of?(Hash)
        one = obj.keys.sort!
        yaml_string << "\n- job:"
        one.each do |o|
          yaml_string << "\n" + (" "*(nest+4)) + "#{o}:"
          yaml_string << sort_yaml(obj["#{o}"], nest+1)
        end
      else
        yaml_string << " " + escape_quotes(obj.to_s.gsub(/[\n]/, '\\n'))
      end
      return yaml_string
    end

    if !@config.nil? and !@config.empty?
-%>---<%= sort_yaml(@config, 0) %>
<%- end -%>

<%-
    require 'yaml'

    def escape_quotes(s)
      substr = s
      substr = s[1..-1] if s[0].eql?('"')
      substr.gsub!(/"/){ '\"' }
      "\"#{substr}\""
    end

    def sort_yaml(obj, nest=0)
      yaml_string = ""
      if obj.instance_of?(Array)
        obj.each do |element|
          if element.instance_of?(Hash)
            one = element.keys.sort!

            one.each do |o|
              if nest > 0
                space = " "*(nest+4)
              else
                space = " "*(nest+2)
              end
              yaml_string << "\n" + space + "- #{o}:"
              yaml_string << sort_yaml(element["#{o}"], nest+3)
            end
          else
            yaml_string << "\n"  + (" "*(nest+5)) + "- \"#{element.to_s}\""
          end
        end
      elsif obj.instance_of?(Hash)
        one = obj.keys.sort!

        one.each do |o|
          yaml_string << "\n" + (" "*(nest+4)) + "#{o}:"
          yaml_string << sort_yaml(obj["#{o}"], nest+1)
        end
      else
        yaml_string << " " + escape_quotes(obj.to_s.gsub(/[\n]/, '\\n'))
      end
      return yaml_string
    end

    if !@config.nil? and !@config.empty?
-%>---<%= sort_yaml(@config, 0) %>
<%- end -%>

Undo e3401da - it produces spurious job: output


<%= l(:diff_email_body) %>

<%= l(:label_project) %>: <%= h(@project.name) %>

<%= l(:field_assigned_to) %>: <%= h(@author_s) %>

<%= l(:label_revision) %>: <%= link_to @changeset.revision, @changeset_url %>

<% if !@is_attached %>
    <%= textilizable(@changeset, :comments, :only_path => false) %>
<% end %>

<%= simple_format_without_paragraph(@changed_files) %>

<%= l(:diff_email_body) %>

<%= l(:label_project) %>: <%= h(@project.name) %>

<%= l(:field_assigned_to) %>: <%= h(@author_s) %>

<%= l(:label_revision) %>: <%= link_to @changeset.revision, @changeset_url %>

<%= simple_format_without_paragraph(@changed_files) %>

<% if !@is_attached %>
  <%= textilizable(@changeset, :comments, :only_path => false) %>
<% end %>

Put diff at bottom in mail

Put diff at bottom in mail


$ORIGIN <%= @name -%>.
$TTL <%= @ttl -%>

@   SOA   <%= @nameservers[0] -%>.  hostmaster.<%= @name -%>. (
          serialnumber ; Serial Number
          <%= @refresh -%>   ; Refresh
          <%= @retry -%>    ; Retry
          <%= @expire -%>  ; Expire
          <%= @negresp -%>     ; Neg response TTL
          )
<% @nameservers.each do |n| -%>
      NS   <%=  n %>.
<% end %>
<% @merged_zone.each do |key,value| -%>
<% require 'resolv' -%>
<% if value =~ Resolv::IPv4::Regex -%>
<%= key.gsub("\.#{@name}", '') -%>    IN    A   <%= value %>
<% elsif (key =~ /SUBDOM\d+?_/) -%>
<% keySUB = key.split('_')[1] -%>
<%= keySUB.gsub("\.#{@name}", '') -%> IN NS <%= value %>
<% else -%>
<%= key.gsub("\.#{@name}", '') -%>    IN    CNAME   <%= value %>
<% end -%>
<% end -%>

$ORIGIN <%= @name -%>.
$TTL <%= @ttl -%>

@   SOA   <%= @nameservers[0] -%>.  hostmaster.<%= @name -%>. (
          serialnumber ; Serial Number
          <%= @refresh -%>   ; Refresh
          <%= @retry -%>    ; Retry
          <%= @expire -%>  ; Expire
          <%= @negresp -%>     ; Neg response TTL
          )
<% @nameservers.each do |n| -%>
      NS   <%=  n %>.
<% end %>
<% @merged_zone.each do |key,value| -%>
<% require 'resolv' -%>
<% if value =~ Resolv::IPv4::Regex -%>
<%= key.gsub("\.#{@name}", '') -%>    IN    A   <%= value %>
<% elsif (key =~ /SUBDOM\d+?_/) -%>
<% keySUB = key.split('_')[1] -%>
<%= keySUB.gsub("\.#{@name}", '') -%> IN NS <%= value %>
<% elsif (key =~ /TXT\d+?_/) -%>
<% keySUB = key.split('_')[1] -%>
<%= keySUB.gsub("\.#{@name}", '') -%> TXT <%= value %>
<% else -%>
<%= key.gsub("\.#{@name}", '') -%>    IN    CNAME   <%= value %>
<% end -%>
<% end -%>

Add support for txt record

Add support for txt record


<%= render "shared/nav" %>

<% @events&.each_slice(3) do |events| %>

    <% events.each do |event| %>

          <img src="<%= event.image_url %>">
          <%= event.name %>

<%= event.description %>

          <% if event.event_instances.count == 0 %>
            Coming soon
          <% elsif event.event_instances.count == 1 %>
            <a href="/events/<%= event.event_instances.last.id %>/register">Register
          <% else %>
            <a href="/events/<%= event.id %>">See all
          <% end %>

    <% end %>

<% end %>

<%= render "shared/nav" %>

<% @events&.each_slice(3) do |events| %>

    <% events.each do |event| %>

          <img src="<%= event.image_url.blank? ? 'https://res.cloudinary.com/dkbwcwx1s/image/upload/v1528827293/placeholder.png' : event.image_url %>">
          <%= event.name %>

<%= event.description %>

          <% if event.event_instances.count == 0 %>
            Coming soon
          <% elsif event.event_instances.count == 1 %>
            <a href="/events/<%= event.event_instances.last.id %>/register">Register
          <% else %>
            <a href="/events/<%= event.id %>">See all
          <% end %>

    <% end %>

<% end %>

Set default image for events without image URL


Reports by hour

  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Action
  </button>

Action

Another action

Something else here

Separated link

<%= line_chart Post.where("created_at >= :date", :date => 1.week.ago).group_by_hour(:created_at).count %>

Reports by hour

<%= line_chart Post.where("created_at >= :date", :date => 1.week.ago).group_by_hour(:created_at).count %>

Reports by site

<%= pie_chart Post.all.group(:site).count.map{ |k,v| {(k.nil? ? "Unknown" : CGI.unescape(k.site_name))=>v} }.reduce(:merge).select{|k,v| k != "Unknown"}.sort_by {|k,v| v}.reverse %>

Add global site pie chart

Add global site pie chart


<%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %>
  <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %>
<% end %>

  Title

<% taxons.each do |taxon| %>

    <%= taxon['title'] %>
    <%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %>
    <%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %>

<% end %>

<%= display_header title: 'Taxons', breadcrumbs: ['Taxons'] do %>
  <%= link_to 'Add a taxon', new_taxon_path, class: 'btn btn-lg btn-default' %>
<% end %>

  Title
  Content ID

<% taxons.each do |taxon| %>

    <%= taxon['title'] %>
    <%= taxon['content_id'] %>
    <%= link_to 'View tagged content', taxon_path(taxon['content_id']), class: 'view-tagged-content' %>
    <%= link_to 'Edit taxon', edit_taxon_path(taxon['content_id']) %>

<% end %>

Add content ID to taxon index page

Add content ID to taxon index page

Makes this view a useful reference table.


Listing topics

      Title
      Description

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

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

    <% end %>

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

Listing topics

      Title

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

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

    <% end %>

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

Remove description, link to title

Remove description, link to title


  <% #byebug; :wtf %>
  <% 3.times do |i| %>
    <% if f.object.next_slot_to_fill == i.to_s %>
      <%=
        single_field(
          f, :"option_#{i}", :select,
          slot_options_reflecting_existing_selections(f.object),
          { include_blank: true },
          class: 'SlotPicker-input'
        )
      %>
    <% else %>
      <% if f.object.valid_options.map(&:to_s).include?(f.object.send("option_#{i}")) %>
        <%= hidden_field_tag("slots_step[option_#{i}]", f.object.send("option_#{i}")) %>
      <% end %>
    <% end %>
  <% end %>

  <%= hidden_field_tag('slots_step[currently_filling]', f.object.next_slot_to_fill) %>
  <%= hidden_field_tag('slots_step[review_slot]', f.object.review_slot) %>
  <%= hidden_field_tag('slots_step[skip_remaining_slots]', f.object.skip_remaining_slots?) %>

  <% #byebug; :wtf %>
  <% 3.times do |i| %>
    <% if f.object.next_slot_to_fill == i.to_s %>
      <%=
        single_field(
          f, :"option_#{i}", :select,
          slot_options_reflecting_existing_selections(f.object),
          { include_blank: t("remove_slot", scope: 'booking_requests.slots_step') },
          class: 'SlotPicker-input'
        )
      %>
    <% else %>
      <% if f.object.valid_options.map(&:to_s).include?(f.object.send("option_#{i}")) %>
        <%= hidden_field_tag("slots_step[option_#{i}]", f.object.send("option_#{i}")) %>
      <% end %>
    <% end %>
  <% end %>

  <%= hidden_field_tag('slots_step[currently_filling]', f.object.next_slot_to_fill) %>
  <%= hidden_field_tag('slots_step[review_slot]', f.object.review_slot) %>
  <%= hidden_field_tag('slots_step[skip_remaining_slots]', f.object.skip_remaining_slots?) %>

Add non-js remove slot option label

Add non-js remove slot option label


<!DOCTYPE html>

  <title>RailsGirlsSubmissions</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Lato:400,300,700&subset=latin,latin-ext' %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<%= notice %>

  <%= render 'layouts/header' %>

        <%= yield %>

Move settings out of an additional table


server {
  listen <%= node['nginx']['port'] || '80' %>;
  server_name <%= @domain_names.join(' ') %>;
  root <%= node['rails']['applications_root'] %>/<%= @name %>/current/public;

  passenger_enabled on;

}

<% if @enable_ssl %>

server {
  listen 443 ssl;

  ssl_certificate <%= node['rails']['applications_root'] %>/<%= @name %>/shared/config/certificate.crt;
  ssl_certificate_key <%= node['rails']['applications_root'] %>/<%= @name %>/shared/config/certificate.key;

  passenger_enabled on;

  server_name <%= @domain_names.join(' ') %>;

  root <%= node['rails']['applications_root'] %>/<%= @name %>/current/public

}

<% end %>

server {
  listen <%= node['nginx']['port'] || '80' %>;
  server_name <%= @domain_names.join(' ') %>;
  root <%= node['rails']['applications_root'] %>/<%= @name %>/current/public;

  passenger_enabled on;

}

<% if @enable_ssl %>

server {
  listen 443 ssl;

  ssl_certificate <%= node['rails']['applications_root'] %>/<%= @name %>/shared/config/certificate.crt;
  ssl_certificate_key <%= node['rails']['applications_root'] %>/<%= @name %>/shared/config/certificate.key;

  passenger_enabled on;

  server_name <%= @domain_names.join(' ') %>;

  root <%= node['rails']['applications_root'] %>/<%= @name %>/current/public;

}

<% end %>

Fix SSL support with Phusion Passenger by adding a ;


Update Puppet template with the 1.7.5 App Engine SDK


# Managed by Chef! :heart_eyes_cat:
# See the sshd_config(5) manpage for details

Port 22

ListenAddress 0.0.0.0
ListenAddress ::

Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key

UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 768

SyslogFacility AUTH
LogLevel DEBUG2

LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes

# Effectively disables SSH timeouts
ClientAliveInterval 30
ClientAliveCountMax 99999

MaxStartups 100

# vim:filetype=sshconfig
# Managed by Chef! :heart_eyes_cat:
# See the sshd_config(5) manpage for details

Port 22

ListenAddress 0.0.0.0
ListenAddress ::

Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key

UsePrivilegeSeparation yes

KeyRegenerationInterval 3600
ServerKeyBits 768

SyslogFacility AUTH
LogLevel DEBUG2

LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes

IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no

PermitEmptyPasswords no

ChallengeResponseAuthentication no

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes

# Effectively disables SSH timeouts
ClientAliveInterval 30
ClientAliveCountMax 99999

MaxStartups 100

Allow X11 forwarding from outside localhost

Closes #868


<% if artefact %>

Related topics

            <% if artefact["related_items"].any? %>
              <% artefact["related_items"].each do |item| %>
                <% if item["artefact"] %>
                <li class="<%= h item["artefact"]["kind"] %>">
                  <a href="/<%= h item["artefact"]["slug"] %>"><%= h item["artefact"]["name"] %>

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

            <% if artefact["section"] and artefact["section"] != "" %>
              <% section, subsection = artefact["section"].split(':', 2) %>

<a href="/browse/<%= h section.parameterize %>"
                >More from the <%= h section %> section

            <% end %>

Information from

Directgov

BusinessLink

<% end %>

<% if artefact %>

Other people found these pages useful:

            <% if artefact["related_items"].any? %>
              <% artefact["related_items"].each do |item| %>
                <% if item["artefact"] %>
                <li class="<%= h item["artefact"]["kind"] %>">
                  <a href="/<%= h item["artefact"]["slug"] %>"><%= h item["artefact"]["name"] %>

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

            <% if artefact["section"] and artefact["section"] != "" %>
              <% section, subsection = artefact["section"].split(':', 2) %>

<a href="/browse/<%= h section.parameterize %>"
                >More from the <%= h section %> section

            <% end %>

Information from

Directgov

BusinessLink

<% end %>

Change the label on the related box. It's not right but it's a start


---
- job:
    name: Failure_Passive_Check
    display-name: Failure_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a FAILED
      status. As such this should only be used as a triggered build for a FAILED (or unstable)       condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress)
          printf "$IPADDRESS\t$NSCA_CHECK_DESCRIPTION\t$NSCA_CODE\t$NSCA_OUTPUT\n" | /usr/sbin/send_nsca -H <%= @alert_hostname %> >/dev/null
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: NSCA_CHECK_DESCRIPTION
            description: 'Descriptive name of job triggering this alert'
        - string:
            name: NSCA_OUTPUT
            description: 'Description for the condition of the failure'
        - choice:
            name: NSCA_CODE
            description: 'Type of alert to trigger. 1=warning, 2=critical, 3=unknown.'
            # Choices are listed out of order so that 2 (critical) is the default
            choices:
                - '2'
                - '1'
                - '3'

---
- job:
    name: Failure_Passive_Check
    display-name: Failure_Passive_Check
    project-type: freestyle
    description: "This job should be used to send a passive check to Icinga with a FAILED
      status. As such this should only be used as a triggered build for a FAILED (or unstable)       condition."
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          IPADDRESS=$(facter ipaddress_eth0)
          printf "$IPADDRESS\t$NSCA_CHECK_DESCRIPTION\t$NSCA_CODE\t$NSCA_OUTPUT\n" | /usr/sbin/send_nsca -H <%= @alert_hostname %> >/dev/null
    wrappers:
        - ansicolor:
            colormap: xterm
    parameters:
        - string:
            name: NSCA_CHECK_DESCRIPTION
            description: 'Descriptive name of job triggering this alert'
        - string:
            name: NSCA_OUTPUT
            description: 'Description for the condition of the failure'
        - choice:
            name: NSCA_CODE
            description: 'Type of alert to trigger. 1=warning, 2=critical, 3=unknown.'
            # Choices are listed out of order so that 2 (critical) is the default
            choices:
                - '2'
                - '1'
                - '3'

Change the failure passive check Jenkins job to use ipaddress_eth0

To match the success passive check job, as there can be problems with
the ipaddress fact when using Docker on the machine.


Fix for inaccurate shipment confirmation email.

Use Shipment#manifest instead of Shipment#line_items in shipment confirmation email for better representation of what was shipped

[Fixes #1867]


ActiveAdmin.register <%= class_name %> do
# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
#
# permit_params :list, :of, :attributes, :on, :model
#
# or
#
# permit_params do
#   permitted = [:permitted, :attributes]
#   permitted << :other if params[:action] == 'create' && current_user.admin?
#   permitted
# end
<% if options.include_boilerplate? %>
# Limit actions available to your users by adding them to the 'except' array
# actions :all, except: []

# Add or remove filters (you can use any ActiveRecord scope) to toggle their
# visibility in the sidebar
<%= @boilerplate.filters %>

# Add or remove columns to toggle their visiblity in the index action
# index do
#   selectable_column
#   id_column
<%= @boilerplate.columns %>
#   actions
# end

# Add or remove rows to toggle their visiblity in the show action
# show do |<%= class_name.downcase %>|
<%= @boilerplate.rows %>
# end

# Add or remove fields to toggle their visibility in the form
# form do |f|
#   f.inputs do
<%= @boilerplate.form_inputs %>
#   end
#   f.actions
# end
<% end %>
end

Fix indent of permitted parameters boilerplate code


<%
  form = local_assigns[:form]
  errors = form&.errors
%>

Estimate how much your pot could grow

<%= render 'calculators/error_summary', messages: errors&.messages if form&.invalid? %>

<form action="/leave-pot-untouched/estimate#form" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: form&.pot,
             label: 'Amount in your pot',
             error_messages: errors&.get(:pot) %>

  <%= render 'calculators/form_input_currency',
             field: :contribution,
             value: form&.contribution,
             label: 'How much can you pay in each month?',
             error_messages: errors&.get(:contribution) %>

  <%= render 'calculators/form_input_submit' %>
</form>

<% if form %>

<% end %>

<%
  form = local_assigns[:form]
  errors = form&.errors
%>

Estimate how much your pot could grow

<%= render 'calculators/error_summary', messages: errors&.messages if form&.invalid? %>

<form action="/leave-pot-untouched/estimate#form" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: form&.pot,
             label: 'How much is in your pot?',
             error_messages: errors&.get(:pot) %>

  <%= render 'calculators/form_input_currency',
             field: :contribution,
             value: form&.contribution,
             label: 'How much can you pay in each month?',
             error_messages: errors&.get(:contribution) %>

  <%= render 'calculators/form_input_submit' %>
</form>

<% if form %>

<% end %>

Use question style for leave pot untouched form labels


#!/usr/bin/env bash

function help {
  echo "usage: $NAME [shell_name]"
  echo "shell_name: name of your shell, default to \$SHELL"
  error
}

function error () {
  msg=$1
  if [[ msg ]]; then
    echo $msg
  fi
  exit 1
}

if [ $# -eq 0 ]; then
  shellname=$SHELL
elif [ $# -eq 1 ]; then
  if [ `which $1` &> /dev/null ]; then
    shellname=$1
  else
    error "couldn't find '$1' shell"
  fi
else
  help
fi

configrc="$HOME/.`basename $shellname`rc"
if [ ! `grep "<%= @install_path %>" $configrc` &> /dev/null ]; then
  echo "source <%= @install_path %>/profile" >> $configrc
fi

#!/usr/bin/env bash

function help {
  echo "usage: $NAME [shell_name]"
  echo "shell_name: name of your shell, default to \$SHELL"
  error
}

function error () {
  msg=$1
  if [[ msg ]]; then
    echo $msg
  fi
  exit 1
}

if [ $# -eq 0 ]; then
  shellname=$SHELL
elif [ $# -eq 1 ]; then
  if [ `which $1` &> /dev/null ]; then
    shellname=$1
  else
    error "couldn't find '$1' shell"
  fi
else
  help
fi

configrc="$HOME/.`basename $shellname`rc"
sed /google_appengine_\d\.\d\.\d\\/profile/d $configrc > $configrc
echo "source <%= @install_path %>/profile" >> $configrc

Fix Correctly update gae path

Fix Correctly update gae path


      <% if admin? %>
        <%= link_to "Switch to live view", begin request.request_uri.to_s.match(/\/admin(.*)\/edit/)[1] rescue "/" end %>
      <% else %>
        <%= link_to "Switch to editor view", (request.request_uri.to_s == "/") ? admin_root_url : "/admin" + request.request_uri.to_s + "/edit" %>
      <% end %>

      <%= RefinerySetting[:site_name] %>
      <%= link_to image_tag("#{"http://refinerycms.com/images/" unless local_request?}refinery/logo-tiny.png",
                    :alt => "Refinery (tm) Content Manager"), "http://refinerycms.com",
                    :target => "_blank" %>

<%= stylesheet_link_tag('refinery/site_bar') %>

      <%
        if admin?
          (r = ::ActionController::TestRequest.new(request.env)).path = (request.request_uri.to_s.match(/\/admin(.*)\/edit/)[1] rescue root_url)
          public_route = ((c = ActionController::Routing::Routes.recognize(r)).present? and c != ApplicationController) ? r.path : root_url rescue root_url
        else
          if @page.present? and !@page.home?
            editor_route = edit_admin_page_url(@page)
          else
            editor_route = (request.request_uri.to_s == '/') ? admin_root_url : "/admin#{request.request_uri}/edit"
          end
        end
      -%>
      <%=
        link_to_if(admin?, "Switch to live view", public_route) do
          link_to "Switch to editor view", editor_route
        end
      -%>

      <%= RefinerySetting[:site_name] %>
      <%= link_to image_tag("#{"http://refinerycms.com/images/" unless local_request?}refinery/logo-tiny.png",
                  :alt => "Refinery (tm) Content Manager"), "http://refinerycms.com",
                  :target => "_blank" %>

<%= stylesheet_link_tag('refinery/site_bar') %>

Support jumping straight to the correct page in the refinery backend/frontend using the site bar.


/* DO NOT EDIT: File is auto-generated */
package <%= enumeration.data_module.imit.entity_package %>;

<%= description_javadoc_for(enumeration, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public enum <%= enumeration.imit.name %>
  implements java.io.Serializable
{
  <%= enumeration.values.keys.collect {|k| "#{k}" } .join(",\n    ")%>
}

/* DO NOT EDIT: File is auto-generated */
package <%= enumeration.data_module.imit.data_type_package %>;

<%= description_javadoc_for(enumeration, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public enum <%= enumeration.imit.name %>
  implements java.io.Serializable
{
  <%= enumeration.values.keys.collect {|k| "#{k}" } .join(",\n  ")%>
}

Remove double indent for values after the first