#!/bin/sh

# Run this script to set up a review app's database and worker dyno

set -e

if [ -z "$1" ]; then
  printf "You must provide a review app (same as the pull request) id.\n"
  exit 64
fi

PARENT_APP_NAME=<%= app_name.dasherize %>-staging
APP_NAME=<%= app_name.dasherize %>-staging-pr-$1
URL=`heroku pg:backups public-url -a $PARENT_APP_NAME`

heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
heroku run rake db:migrate --exit-code --app $APP_NAME
heroku ps:scale worker=1 --app $APP_NAME
heroku restart --app $APP_NAME

#!/bin/sh

# Run this script to set up a review app's database and worker dyno

set -e

if [ -z "$1" ]; then
  printf "You must provide a review app (same as the pull request) id.\n"
  exit 64
fi

PARENT_APP_NAME=<%= app_name.dasherize %>-staging
APP_NAME=<%= app_name.dasherize %>-staging-pr-$1
URL=`heroku pg:backups public-url --app $PARENT_APP_NAME`

heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
heroku run rake db:migrate --exit-code --app $APP_NAME
heroku ps:scale worker=1 --app $APP_NAME
heroku restart --app $APP_NAME

Expand `-a` flag in `bin/setup_review_app`

`-a` is expanded to `--app` in the other occurrences in the file, so let
us expand it for consistency.


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

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

Allow configuring the port if specificed.

Closes #21


New Comment

<%= form_for [@article, @article.comments.build], html: {class: "create-comment"} do |f| %>

    <%= f.text_field :title %>
    <%= f.text_area :text %>

  <%= f.submit "Create a Comment" %>
<% end %>

New Comment

<%= form_for [@article, @article.comments.build], html: {class: "create-comment"} do |f| %>

    <%= f.label 'Text:' %>
    <%= f.text_area :text %>

  <%= f.submit "Create a Comment" %>
<% end %>

Update comment form partial from late night delirium typos to things that make sense


<% if @round.winning_address1 %>

Got it!

Thanks, your winnings will be sent shortly. The world is now a slightly better place thanks to you.

<% else %>

Get Your Prize

You're the lucky winner! In order to ship your winnings, we need to know your address:

  <form method="POST" action="">
    Your name
    <input type="text" name="name" value="<%= @round.winner.name %>" />

    Address Line 1
    <input type="text" name="address1" value="<%= @round.winning_address1 %>" />

    Address Line 2
    <input type="text" name="address2" value="<%= @round.winning_address2 %>" />

      <input type="submit" class="btn btn-success btn-large" value="Ship It!">

  </form>
<% end %>

<% if @round.winning_address1 %>

Got it!

Thanks, your winnings will be sent shortly. The world is now a slightly better place thanks to you.

<% else %>

Get Your Prize

You're the lucky winner! In order to ship your winnings, we need to know your address:

  <%= form_tag("/update_address/", :method => "post") do %>
    <%= hidden_field_tag(:token, cookies['donated_'+@round.url]) %>
    <%= hidden_field_tag(:url, @round.url) %>
    Your name
    <input type="text" name="name" value="<%= @round.winner.name %>" />

    Address Line 1
    <input type="text" name="address1" value="<%= @round.winning_address1 %>" />

    Address Line 2
    <input type="text" name="address2" value="<%= @round.winning_address2 %>" />

      <input type="submit" class="btn btn-success btn-large" value="Ship It!">

  <% end %>
<% end %>

Convert shipping form to rails form helper, add token and url hidden fields


set_error_handler( function( $errno, $errstr, $errfile, $errline, $errcontext ) {
	$err = "Error: $errstr";
	if ( $errfile ) {
		$err .= " in $errfile";
		if ( $errline ) {
			$err .= ", line $errline";
		}
	}
	$err .= ".\n";
	die( $err );
}, E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE );

set_error_handler( function( $errno, $errstr, $errfile, $errline, $errcontext ) {
	throw new ErrorException( $errstr, $errno, E_ERROR, $errfile, $errline );
}, E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE );

Make warnings_as_errors role throw exceptions

The warnings_as_errors role turned errors into die() calls,
which is an exceedingly bad idea: it circumvents try-catch blocks and
turns relatively harmless errors into unclean aborts which trigger
a torrent of unrelated errors (such as uncommit translation warnings).
Just throw an ErrorException instead.

Change-Id: Id6698f5b4c931aba367dffef2921c5fcdbf3ed58


<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style>
      /* Email styles need to be inline */
    </style>
  </head>

  <body>
    <%= yield %>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>

  <body>
    <%= yield %>
  </body>
</html>

Remove dev message about styles being inline


<% if resource.errors.any? -%>
  $("#modal-for-nav-item").html("<%= escape_javascript render( "modal_nav_item") %>");
<% else %>
  $("#modal-for-nav-item").modal('hide');

  var $parent = $("#nav-item-<%= resource.parent.id %>");
  var $children = $parent.find (".children");
  if (! $children.length) $children = $parent.append ("<ol class='children'>").slideDown ();
  $children.append ("<%= escape_javascript render("nav_item", nav_item: resource, level: resource.parent.level + 1) %>")
  $("#nav-item-<%= resource.id %>").slideDown ().effect("highlight", {}, 3000);
<% end %>

<% if resource.errors.any? -%>

  $ ("#modal-for-nav-item").html ("<%= escape_javascript render ("modal_nav_item") %>");

<% else %>

  $ ("#modal-for-nav-item").modal ('hide');

  var rendered = "<%= escape_javascript render ("nav_item", nav_item: resource, level: resource.level) %>";

  var $parent = $ ("#nav-item-<%= resource.parent.id %>");
  var $children = $parent.component (".children");

  if (! $children.length) $children = $parent.append ("<ol class='children'>").slideDown ();

  $children.append (rendered);

  $ ("#nav-item-<%= resource.id %>").slideDown ().effect ("highlight", {}, 3000);

<% end %>

Fix for site-tree node creation.

Fix for site-tree node creation.


      <li<%= raw(' class="active"') if federal? %>>
        <%= link_to federal_path do %>
          <%= @jurisdiction['name'] %> Federal
        <% end %>

      <li<%= raw(' class="active"') if state? %>>
        <%= link_to state_path do %>
          <%= @jurisdiction['name'] %> State
        <% end %>

      <li<%= raw(' class="active"') if local? %>>
        <%= link_to local_path do %>
          City
        <% end %>

<%= tab 'Questions', questions_path %>

<%= tab 'Bills', bills_path %>

      <%# @todo extract to helper -%>

<%= tab 'People', params[:type] ? people_path(type: params[:type]) : people_path %>

      <% if @jurisdiction.subjects? %>

<%= tab 'Issues', subjects_path %>

      <% end %>
      <%#
<%= tab 'Money', '#'
 @todo %>

<%= tab 'Overview', jurisdiction_path %>

      <li<%= raw(' class="active"') if federal? %>>
        <%= link_to federal_path do %>
          <%= @jurisdiction['name'] %> Federal
        <% end %>

      <li<%= raw(' class="active"') if state? %>>
        <%= link_to state_path do %>
          <%= @jurisdiction['name'] %> State
        <% end %>

      <li<%= raw(' class="active"') if local? %>>
        <%= link_to local_path do %>
          City
        <% end %>

<%= tab 'Questions', @type ? questions_path(type: @type) : questions_path %>

      <% unless federal? %>

<%= tab 'Bills', bills_path %>

      <% end %>
      <%# @todo extract to helper -%>

<%= tab 'People', @type ? people_path(type: @type) : people_path %>

      <% if @jurisdiction.subjects? %>

<%= tab 'Issues', subjects_path %>

      <% end %>
      <%#
<%= tab 'Money', '#'
 @todo %>

<%= tab 'Overview', jurisdiction_path %>

Drop bill tab when federal, handle limiting to fed questions


<%= partial 'partials/doc-header' %>

  <%= partial 'partials/doc-menu'%>

Locaweb Style

Documentação

Saiba todas as features que te ajudarão a produzir sistemas mais rapidamente.

<%= partial 'partials/doc-menu-top' %>

    <%= partial 'partials/doc-menu-changelog'%>

      <%= yield %>

<%= partial 'partials/_doc-footer' %>

<%= partial 'partials/doc-header' %>

  <%= partial 'partials/doc-menu'%>

Locaweb Style

Documentação

Saiba todas as features que te ajudarão a produzir sistemas mais rapidamente.

<%= partial 'partials/doc-menu-top' %>

    <%= partial 'partials/doc-menu-changelog'%>

      <%= partial 'partials/doc-intro-content' %>
      <%= yield %>

<%= partial 'partials/_doc-footer' %>

Add title at changelog single page

Add title at changelog single page


---
base_path: "/news-and-communications"
content_id: 622e9691-4b4f-4e9c-bce1-098b0c4f5ee2
document_type: finder
locale: en
publishing_app: rummager
rendering_app: finder-frontend
schema_name: finder
title: News and communications
description: Find news and communications from government
details:
  document_noun: result
  filter:
    content_purpose_supergroup:
    - news_and_communications
  format_name: News or communications
  show_summaries: true
  sort:
  - name: Most viewed
    key: "-popularity"
  - name: Relevance
    key: "-relevance"
  - name: Updated (newest)
    key: "-public_timestamp"
    default: true
  - name: Updated (oldest)
    key: public_timestamp
  facets:
  - key: related_to_brexit
    filter_key: all_part_of_taxonomy_tree
    filter_value: d6c2de5d-ef90-45d1-82d4-5f2438369eea
    name: Show only Brexit results
    short_name: Brexit
    type: checkbox
    display_as_result_metadata: false
    filterable: true
    preposition: about
  - key: "_unused"
    filter_key: all_part_of_taxonomy_tree
    keys:
    - level_one_taxon
    - level_two_taxon
    name: topic
    short_name: topic
    type: taxon
    display_as_result_metadata: false
    filterable: true
    preposition: about
  - key: people
    name: Person
    preposition: from
    type: text
    display_as_result_metadata: false
    filterable: true
  - key: organisations
    name: Organisation
    short_name: From
    preposition: from
    type: text
    display_as_result_metadata: true
    filterable: true
  - key: world_locations
    name: World location
    preposition: in
    type: text
    display_as_result_metadata: true
    filterable: true
  - key: public_timestamp
    short_name: Updated
    name: Updated
    type: date
    display_as_result_metadata: true
    filterable: true
  default_documents_per_page: 20
routes:
- path: "/news-and-communications"
  type: exact
- path: "/news-and-communications.atom"
  type: exact
- path: "/news-and-communications.json"
  type: exact

Add the news and comms finder

Add the news and comms finder

This allows the [news and comms finder](https://finder-frontend.herokuapp.com/news-and-communications)
to be published and therefore visible on GOV.UK.

To actually publish this, you need to run:
`bundle exec rake publishing_api:publish_document_finder DOCUMENT_FINDER_CONFIG=finders/news_and_communications.yml`

This needs https://github.com/alphagov/finder-frontend/pull/837 and
https://github.com/alphagov/govuk-content-schemas/pull/857 to be merged
before this will work.


<%=
	@page.css << "/css/page_index.css"

	erb :common_header
%>

	Participate or
	View only

<%= erb :common_footer %>

<%=
	@page.css << "/css/page_index.css"

	erb :common_header
%>

	Play or
	View

<%= erb :common_footer %>

views: Change message to "play or view" on index page.


<%= plant.nickname %>

<%= plant.common_name %>

      <%= plant.light %>

      <%= plant.water_freq %>

      <%= link_to plant do %>

<%= plant.nickname %>

      <% end %>

<%= plant.common_name %>

      <%= plant.light %>

      <%= plant.water_freq %>

Create link from /plants to plant details page


        <%= link_to_profile recent_document.depositor("no depositor value") %>
        <%= link_to [main_app, recent_document] do %>
          <%= render_thumbnail_tag recent_document, { width: 45 }, false %>
        <% end %>

          Title<%= link_to truncate(recent_document.to_s, length: 28, separator: ' '), [main_app, recent_document] %>

          Keywords<%= link_to_facet_list(recent_document.keyword, 'keyword', 'no keywords specified').html_safe %>

        <%= link_to_profile recent_document.depositor("no depositor value") %>
        <%= link_to [main_app, recent_document] do %>
          <%= render_thumbnail_tag recent_document, { width: 45 }, suppress_link: true %>
        <% end %>

          Title<%= link_to truncate(recent_document.to_s, length: 28, separator: ' '), [main_app, recent_document] %>

          Keywords<%= link_to_facet_list(recent_document.keyword, 'keyword', 'no keywords specified').html_safe %>

Use the correct invocation of render_thumbnail_tag

Fixes #1820


Whoops! It looks like you're out of cash. Bad luck, friend, but
    there's no need to stop playing!

    We'll give you 200 more dollars so you can have a chance to win back
    your rent money. Good luck!

  <%= button_to "Ok!", '/play', id: 'btnReset', method: 'get' %>

Add navbar to the reset funds page.

Add navbar to the reset funds page.


Explore work you could do

To help your work search, explore different work opportunities and job roles.

Enter different kinds of work, skills and interests to find out:

words to use when searching online

skills and qualifications required

tasks and hours

<%= form_tag(controller: "start", action: "keywords")%>
  <div class="form-group <% if @error %>error<%end%>">

      Work, skills and interests
      <% if @error %>
        <%= @error %></spsan>
      <% end %>

    <% (1..3).each do |index| %>

        <%= text_field_tag "keyword_#{index}", nil, class: 'form-control' %>

    <% end %>

    <button type="submit" class="button button-start">Next</button>

<% end -%>

Explore work you could do

To help your work search, explore different work opportunities and job roles.

Enter different kinds of work, skills and interests to find out:

words to use when searching online

skills and qualifications required

tasks and hours

<%= form_tag(controller: "start", action: "keywords")%>
  <div class="form-group <% if @error %>error<%end%>">

      Work, skills and interests
      <% if @error %>
        <%= @error %></spsan>
      <% end %>

    <% (1..3).each do |index| %>

        <%= text_field_tag "keyword_#{index}", nil, class: 'form-control' %>

    <% end %>

    <button type="submit" class="button button-start">Next</button>

</form>

Correct syntax on start page

Correct syntax on start page


global
        stats socket /var/opt/opscode/haproxy/haproxy.sock mode 600

frontend postgresql
         bind <%= @listen %>:<%= @local_postgresql_port %>
         mode tcp
         default_backend chef_backend_postgresql

frontend elasticsearch
         bind <%= @listen %>:<%= @local_elasticsearch_port %>
         mode tcp
         default_backend chef_backend_elasticsearch

backend chef_backend_postgresql
        mode tcp
        option httpchk GET /leader HTTP/1.1\r\nHost:localhost:<%= @leaderl_healthcheck_port %>\r\n\r\n
        <% @chef_backend_members.each do |name, ip| -%>
        server <%= name %> <%= ip %>:<%= @remote_postgresql_port %> check port <%= @leaderl_healthcheck_port %> rise 1 fall 1
        <% end -%>

backend chef_backend_elasticsearch
        mode tcp
        option httpchk GET /leader HTTP/1.1\r\nHost:localhost:<%= @leaderl_healthcheck_port %>\r\n\r\n
        <% @chef_backend_members.each do |name, ip| -%>
        server <%= name %> <%= ip %>:<%= @remote_elasticsearch_port %> check port <%= @leaderl_healthcheck_port %> rise 1 fall 1
        <% end -%>

global
        stats socket /var/opt/opscode/haproxy/haproxy.sock mode 600

frontend postgresql
         bind <%= @listen %>:<%= @local_postgresql_port %>
         mode tcp
         default_backend chef_backend_postgresql

frontend elasticsearch
         bind <%= @listen %>:<%= @local_elasticsearch_port %>
         mode tcp
         default_backend chef_backend_elasticsearch

backend chef_backend_postgresql
        mode tcp
        option httpchk GET /leader HTTP/1.1\r\nHost:localhost:<%= @leaderl_healthcheck_port %>\r\n\r\n
        default-server inter 2s rise 1 fall 1
        <% @chef_backend_members.each do |name, ip| -%>
        server <%= name %> <%= ip %>:<%= @remote_postgresql_port %> check port <%= @leaderl_healthcheck_port %>
        <% end -%>

backend chef_backend_elasticsearch
        mode tcp
        option httpchk GET /leader HTTP/1.1\r\nHost:localhost:<%= @leaderl_healthcheck_port %>\r\n\r\n
        default-server inter 2s rise 1 fall 1
        <% @chef_backend_members.each do |name, ip| -%>
        server <%= name %> <%= ip %>:<%= @remote_elasticsearch_port %> check port <%= @leaderl_healthcheck_port %>
        <% end -%>

[haproxy] Use default-server to simplify configuration


<%= @order.full_name %>,

Thank you for placing an order at <%= @website.name %>

Your order number is: <%= @order.order_number %>

The status of your order is: <%= @order.status_description %>

<% if @order.preferred_delivery_date -%>
<%= @order.preferred_delivery_date_prompt %>: <%= @order.preferred_delivery_date.strftime(@order.preferred_delivery_date_format) %>
<% end -%>

You have ordered:
<% @order.order_lines.each do |l| %>
[<%= l.product_sku %>] <%= l.product_name %><%= ' (' + l.feature_descriptions + ')' unless l.feature_descriptions.empty? %> x <%= l.quantity %> (<%= formatted_gbp_price(l.line_total_net) %>)
<% end %>
<%= @order.shipping_method %>: <%= formatted_gbp_price(@order.shipping_amount) %>

<% unless @website.vat_number.empty? -%>
VAT: <%= formatted_gbp_price(@order.tax_total) %>
<% end -%>

Order total: <%= formatted_gbp_price(@order.total) %>

To be delivered to:
<%= format_address(@order.delivery_address, false) %>

<%= @order.full_name %>,

Thank you for placing an order at <%= @website.name %>

Your order number is: <%= @order.order_number %>

The status of your order is: <%= @order.status_description %>

<% if @order.preferred_delivery_date -%>
<%= @order.preferred_delivery_date_prompt %>: <%= @order.preferred_delivery_date.strftime(@order.preferred_delivery_date_format) %>
<% end -%>

You have ordered:
<% @order.order_lines.each do |l| %>
[<%= l.product_sku %>] <%= l.product_name %><%= ' (' + l.feature_descriptions + ')' unless l.feature_descriptions.blank? %> x <%= l.quantity %> (<%= formatted_gbp_price(l.line_total_net) %>)
<% end %>
<%= @order.shipping_method %>: <%= formatted_gbp_price(@order.shipping_amount) %>

<% unless @website.vat_number.empty? -%>
VAT: <%= formatted_gbp_price(@order.tax_total) %>
<% end -%>

Order total: <%= formatted_gbp_price(@order.total) %>

To be delivered to:
<%= format_address(@order.delivery_address, false) %>

Use blank? for safe use on nil

Use blank? for safe use on nil


<%= form_tag subscriptions_path, id: "sign-up-form" do %>

    <input type="email"
           class="form-control input-lg"
           id="email"
           name="email"
           placeholder="Email address">

    <input type="password"
           class="form-control input-lg"
           id="password"
           name="password"
           placeholder="Password">

  <input type="hidden" id="stripe_card_id" name="stripe_card_id">

    <button
      type="button"
      id="sign-up-button"
      class="btn btn-default btn-lg"
    >Sign up</button>

<% end %>

<%= render "subscriptions/stripe_javascript" %>

<%= form_tag subscriptions_path, id: "sign-up-form" do %>

    <input type="email"
           class="form-control input-lg"
           id="email"
           name="email"
           placeholder="Email address">

    <input type="password"
           class="form-control input-lg"
           id="password"
           name="password"
           placeholder="Password">

  <input type="hidden" id="stripe_card_id" name="stripe_card_id">

    <button
      type="submit"
      id="sign-up-button"
      class="btn btn-default btn-lg"
    >Sign up</button>

<% end %>

<%= render "subscriptions/stripe_javascript" %>

Make 'sign up' button a submit button

Make 'sign up' button a submit button

This makes it so that the return key submits the form.


<form action="<%= @end_point %>" method='POST' id='amazon_form'>
<% @amazon_params.each do |k,v| %>
	<input type='hidden' name='<%= k.to_s %>' value='<%= v.to_s %>' />
<% end %>
</form>

<script type="text/javascript">
$(document).ready(function() {
	$('#amazon_form').submit();
});
</script>

<form action="<%= @end_point %>" method='POST' id='amazon_form'>
<% @amazon_params.each do |k,v| %>
	<input type='hidden' name='<%= k.to_s %>' value='<%= v.to_s %>' />
<% end %>
</form>
Redirecting...

<script type="text/javascript">
$(document).ready(function() {
	$('#amazon_form').submit();
});
</script>

Make amazon form submission page say Redirecting


<%= form_for @crop do |f| %>
	<%= f.label :name, 'Crop Name' %>
	<%= f.text_field :name %>

	<%= f.label :binomial_name, 'Binomial Name' %>
	<%= f.text_field :binomial_name %>

	<%= f.label :description, 'Description' %>
	<%= f.text_area :description %>

	<%= f.label :sun_requirements, 'Sun Requirements' %>
	<%= f.text_field :sun_requirements %>

	<%= f.label :sowing_method, 'Sowing Method' %>
	<%= f.text_field :sowing_method %>

	<%= f.label :spread, 'Spread' %>
	<%= f.text_field :spread %>

	<%= f.label :days_to_maturity, 'Days to Maturity' %>
	<%= f.text_field :days_to_maturity %>

	<%= f.label :row_spacing, 'Row Spacing' %>
	<%= f.text_field :row_spacing %>

	<%= f.label :height, 'Height' %>
	<%= f.text_field :height %>

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

Add a new crop!

      <%= form_for @crop do |f| %>
      <%= f.label :name, 'Crop Name' %>
      <%= f.text_field :name %>

      <%= f.label :binomial_name, 'Binomial Name' %>
      <%= f.text_field :binomial_name %>

      <%= f.label :description, 'Description' %>
      <%= f.text_area :description %>

      <%= f.label :sun_requirements, 'Sun Requirements' %>
      <%= f.text_field :sun_requirements %>

      <%= f.label :sowing_method, 'Sowing Method' %>
      <%= f.text_field :sowing_method %>

      <%= f.label :spread, 'Spread' %>
      <%= f.text_field :spread %>

      <%= f.label :days_to_maturity, 'Days to Maturity' %>
      <%= f.text_field :days_to_maturity %>

      <%= f.label :row_spacing, 'Row Spacing' %>
      <%= f.text_field :row_spacing %>

      <%= f.label :height, 'Height' %>
      <%= f.text_field :height %>

      <%= f.submit 'Save Crop!', :class => 'button', :disable_with => 'Saving...' %>
    <% end %>

Create styled view for Crop create page

[style][view] Create styled view for Crop create page


description     "Run dockerd"

stop on runlevel [!2345]
start on runlevel [3]

# if you want it to automatically restart if it crashes, leave the next line in
respawn

script
    <% if node['docker']['http_proxy'] %>
    export HTTP_PROXY=<%= node['docker']['http_proxy'] %>
    export HTTPS_PROXY=<%= node['docker']['http_proxy'] %>
    <% end %>
    test -f /etc/default/locale && . /etc/default/locale || true
    LANG=$LANG LC_ALL=$LANG <%= node['docker']['install_dir'] %>/docker -d<% if node['docker']['bind_uri'] %> -H="<%= node['docker']['bind_uri'] %>"<% end %><% if node['docker']['options'] %> <%= node['docker']['options'] %><% end %>
end script

description     "Run dockerd"

stop on runlevel [!2345]
start on runlevel [3]

# if you want it to automatically restart if it crashes, leave the next line in
respawn

script
    <% if node['docker']['http_proxy'] %>
    export HTTP_PROXY=<%= node['docker']['http_proxy'] %>
    <% end %>
    test -f /etc/default/locale && . /etc/default/locale || true
    LANG=$LANG LC_ALL=$LANG <%= node['docker']['install_dir'] %>/docker -d<% if node['docker']['bind_uri'] %> -H="<%= node['docker']['bind_uri'] %>"<% end %><% if node['docker']['options'] %> <%= node['docker']['options'] %><% end %>
end script

Remove extraneous https_proxy line, it was unnecessary


# This initializer is used by Rake and Capistrano to help generating the
# localconfig.php file, it stores basically the encrypted install password,
# the encryption_key and the SMTP credentials if SMTP is enabled

module ContaoTemplate
  class Application < Rails::Application
    # The install password is used by /contao/install.php page
    config.contao.install_password = '<%= config.install_password %>'

    # The encryption key is used by extensions
    config.contao.encryption_key = '<%= config.encryption_key %>'

    # The admin email
    config.contao.admin_email = '<%= config.admin_email %>'

    # The time zone
    config.contao.time_zone = '<%= config.time_zone %>'

    # SMTP Configuration
    # Configure contao to use an SMTP server

    # Enable SMTP ?
    config.contao.smtp.enabled = <%= config.smtp_enabled %>
    <%- if config.smtp_enabled %>
    # SMTP Host
    config.contao.smtp.host = '<%= config.smtp_host %>'

    # SMTP User
    config.contao.smtp.user = '<%= config.smtp_user %>'

    # SMTP Pass
    config.contao.smtp.pass = '<%= config.smtp_pass %>'

    # SMTP SSL
    config.contao.smtp.ssl = <%= config.smtp_ssl %>

    # SMTP Port
    config.contao.smtp.port = <%= config.smtp_port %>
    <%- end %>
  end
end

# This initializer is used by Rake and Capistrano to help generating the
# localconfig.php file, it stores basically the encrypted install password,
# the encryption_key and the SMTP credentials if SMTP is enabled

module ContaoTemplate
  class Application < Rails::Application
    if config.respond_to? :contao

      # The install password is used by /contao/install.php page
      config.contao.install_password = '<%= config.install_password %>'

      # The encryption key is used by extensions
      config.contao.encryption_key = '<%= config.encryption_key %>'

      # The admin email
      config.contao.admin_email = '<%= config.admin_email %>'

      # The time zone
      config.contao.time_zone = '<%= config.time_zone %>'

      # SMTP Configuration
      # Configure contao to use an SMTP server

      # Enable SMTP ?
      config.contao.smtp.enabled = <%= config.smtp_enabled %>
      <%- if config.smtp_enabled %>
      # SMTP Host
      config.contao.smtp.host = '<%= config.smtp_host %>'

      # SMTP User
      config.contao.smtp.user = '<%= config.smtp_user %>'

      # SMTP Pass
      config.contao.smtp.pass = '<%= config.smtp_pass %>'

      # SMTP SSL
      config.contao.smtp.ssl = <%= config.smtp_ssl %>

      # SMTP Port
      config.contao.smtp.port = <%= config.smtp_port %>
      <%- end %>

    end
  end
end

Configure contao only if the configuration key exists


<% ref_name = topic.name.tr('#?@/.;', '').downcase.split(' ').join('-') %>

      <a data-toggle="collapse" data-parent="#accordion" href="#<%= ref_name %>">
        <%= topic.name %>

  <div id="<%= ref_name %>" class="panel-collapse collapse<%= ' in' if topic_counter.eql?(0) %>">

      <%= topic.content.html_safe %>

<% ref_name = topic.name.tr('#?@/.;,', '').downcase.split(' ').join('-') %>

      <a data-toggle="collapse" data-parent="#accordion" href="#<%= ref_name %>">
        <%= topic.name %>

  <div id="<%= ref_name %>" class="panel-collapse collapse<%= ' in' if topic_counter.eql?(0) %>">

      <%= topic.content.html_safe %>

Fix bug that was breaking Publicity Help accordion


<% if !@myplet %>
  <%= myp_text_field(f, :title, "myplaceonline.notepads.title", obj.title, autofocus) %>
<% end %>
<%=
  render partial: 'myplaceonline/rte', locals: {
    f: f,
    markdown_data: obj.notepad_data,
    hidden_field_name: @myplet.nil? ? :notepad_data : nil,
    non_hidden_url: "/notepads/" + obj.id.to_s
  }
%>
<%= myp_check_box(f, :is_archived, "myplaceonline.general.archived") %>

<% if !@myplet %>
  <%= myp_text_field(f, :title, "myplaceonline.notepads.title", obj.title, autofocus) %>
<% end %>
<%=
  render partial: 'myplaceonline/rte', locals: {
    f: f,
    markdown_data: obj.notepad_data,
    hidden_field_name: @myplet.nil? ? :notepad_data : nil,
    non_hidden_url: "/notepads/" + obj.id.to_s
  }
%>
<% if !@myplet %>
  <%= myp_check_box(f, :is_archived, "myplaceonline.general.archived") %>
<% end %>

Hide archived box for notepads on homepage


#!/bin/bash
# This file is managed by puppet. Local modifications will be overwritten.

puppet agent --show_diff --verbose

#!/bin/bash
# This file is managed by puppet. Local modifications will be overwritten.

puppet agent --test

Revert "swh-puppet-apply: don't use --detailed-exitcodes to differenciate between success and failure"

This reverts commit 11fb1e33ed180384db1c892458589dd1b05d13c7.

Turns out --test also implies... not running as a daemon somehow?


Add your estimate or comment

<% form_for([@prediction,@prediction_response]) do |f| %>
  <% if @prediction.open? %>
  <%= f.confidence_field(:confidence, :label => 'What\'s your estimate of this happening?') %>
    <% unless @prediction.count_wagers_by(current_user).zero? %>

      You can put another wager on this prediction, you may want to do this if
      you have revised an estimate or have had a change of opinion.
      Older wagers are still kept as they are a record of how you felt at the time.

    <% end %>
  <% end %>
  <%= f.text_area :comment, :label => 'Anything to add?', :preview => true %>
  <%= f.submit 'Record my prediction' %>
<% end %>

Make the 'Add your estimate or comment' heading bold to make it even more obvious that this is the right place to record your opinion


Thank you!

Your donation for <%= number_to_currency(@amount) %> will help us support and promote great journalism like <%= link_to 'these featured projects', featured_index_url %>. You should receive a receipt at the email address you provided. If you don’t, please <%= link_to 'get in touch', contact_url %>.

Would you mind helping us get the word out with a tweet?

      Tweet

<% content_for :javascript_footer_inline do %>
  // ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);
<% end %>

Add stub for GA-tracking donation amount


<% provide(:title, "Add playlist") %>

Add playlist

<% provide(:submit_button, "Add playlist") %>
<%= render "form", playlist: @playlist %>
<%= render "videos" %>

Remove unused element in playlist adding view


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

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

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

  <% if ENV['USE_SSL'] %>
  listen 443 ssl;

  <% if ENV['SSL_CERT_PATH'] != '' && ENV['SSL_KEY_PATH'] != '' %>
  ssl_certificate <%= ENV['SSL_CERT_PATH'] %>;
  ssl_certificate_key <%= ENV['SSL_KEY_PATH'] %>;
  <% end %>

  <% end %>

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

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

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

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

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

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

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

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

  <% if ENV['USE_SSL'] != '' %>
  listen 443 ssl;

  <% if ENV['SSL_CERT_PATH'] != '' && ENV['SSL_KEY_PATH'] != '' %>
  ssl_certificate <%= ENV['SSL_CERT_PATH'] %>;
  ssl_certificate_key <%= ENV['SSL_KEY_PATH'] %>;
  <% end %>

  <% end %>

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

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

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

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

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

  error_page 404 /404.html
  location = /404.html {
    root <%= engine.root %>/public;
  }
}

Add a 404 page handler

Add a 404 page handler


Games

    <% until @found_games.empty? %>

        <% 3.times do  %>
          <%= render "game", game: @found_games.shift %>
        <% end %>

    <% end %>

Games

    <% until @found_games.empty? %>

        <% 3.times do  %>
          <% if @found_games.first %>
            <%= render "game", game: @found_games.shift %>
            <% end %>
        <% end %>

    <% end %>

Fix search bug for games

Fix search bug for games


<%= current_user.name %>

  <% current_user.skills.each do |skill| %>

<%= skill.title %> - <%= skill.time_remaining %> - <%= link_to 'Refresh', refresh_path(skill) %> -
    Current streak: <%= skill.current_streak %>

  <% end %>

<%= form_for @new_skill do |f| %>
  <%= f.text_field :title %>
  <%= f.submit "add" %>
<% end %>

<%= current_user.name %>

  <% current_user.skills.each do |skill| %>
    <%= skill.title + " - " + "Current streak: " + skill.current_streak.to_s + " - " +
    "Time remaining " %>
    <%= content_tag(:span, :"data-countdown" => skill.expiration_date) {} %>
    <%= link_to('Refresh', refresh_path(skill)) %>

  <% end %>

<%= form_for @new_skill do |f| %>
  <%= f.text_field :title %>
  <%= f.submit "add" %>
<% end %>

Add data attribute to span for jquery countdown


Tweet&#0178

Start game

Or, select a topic!

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

              <a href="/topics/<%=topic.topic%>">

                  <%=topic.topic%>

        <% end %>

Tweet&#0178

Start game

Or, select a topic!

      <% @topics.each do |topic| %>
        <a href="/topics/<%=topic.id%>" class="collection-item">
          <%=topic.topic%>

      <% end %>

Change topics list to materialize collection style


      Queue Name
      Job Load
      Worker Count
      Jobs Processed per second

    workerholic:queue:main
    485,981
    12
    1442

    workerholic:queue:api
    75,912,999
    13
    1233

    Total:
    76,984,123
    25
    2675

      Queue Name
      Job Load

  <% @queues.each_with_index do |queue, i| %>

      <td class='queue_name<%= i %>'><%= queue[0] %>
      <td class='queue_count<%= i %>'><%= queue[1] %>

  <% end %>

    Total:
    <%= @total %>

Remove mock data, replace with dynamic data


    <form action="<%= @prefix %>/search" method="get" accept-charset="utf-8" class="search-header search-header-2" role="search">
      <fieldset>
        <legend class="visuallyhidden">Search gov.uk</legend>
        Sorry, we can’t find any results for
        <input type="search" name="q" value="<%= h @query %>" id="search-main" /> <input type="submit" value="Search" class="button">
      </fieldset>
    </form>

This might happen from time to time, since this is an incomplete trial (‘beta’) site. You can help us improve GOV.UK by telling us what you were doing.

Please try another search in the search box at the top of the page.

Remember, Directgov and Businesslink remain the official sites for government services and information.

    <form action="/search" method="get" accept-charset="utf-8" class="search-header search-header-2" role="search">
      <fieldset>
        <legend class="visuallyhidden">Search gov.uk</legend>
        Sorry, we can’t find any results for
        <input type="search" name="q" value="<%= h @query %>" id="search-main" /> <input type="submit" value="Search" class="button">
      </fieldset>
    </form>

This might happen from time to time, since this is an incomplete trial (‘beta’) site. You can help us improve GOV.UK by telling us what you were doing.

Please try another search in the search box at the top of the page.

Remember, Directgov and Businesslink remain the official sites for government services and information.

Remove prefix from search form

Remove prefix from search form


<% set_meta_tags(canonical: root_url,
                 alternate: alternate_home_map,
                 description: t('.description').strip) %>

<%= render 'shared/trust_banner' %>

<%= render 'shared/directory',
           items: t('.featured') %>

<%= render 'shared/home_promoted', items: t('.promoted') %>

<%= render 'shared/home_contact',
           title: t('.contact.title'),
           introduction: t('.contact.introduction_html'),
           details: t('.contact.details_html') %>

<% set_meta_tags(canonical: root_url,
                 alternate: alternate_home_map,
                 description: t('.description').strip) %>

<%= render 'shared/trust_banner' %>

<%= render 'shared/directory',
           items: t('.featured') %>

<%= render 'shared/promo', items: t('.promoted') %>

<%= render 'shared/home_contact',
           title: t('.contact.title'),
           introduction: t('.contact.introduction_html'),
           details: t('.contact.details_html') %>

Add promos to the homepage

Add promos to the homepage


<%
  error_messages = local_assigns[:error_messages] || []
  hint = local_assigns[:hint]
  labelled_by = "#{field}-a"
%>

<div class="form-group <%= 'error' unless error_messages.empty? %>">
  <label class="form-label" for="<%= field %>">
    <%= label %>
    <%= content_tag :span, hint, class: 'form-hint' unless hint.blank? %>
  </label>
  <%= simple_format error_messages.join("\n"), { class: 'error-message' }, wrapper_tag: 'span' %>
  <%= content_tag :span, '£', id: labelled_by %>
  <%= text_field_tag field, number_to_currency(value, unit: ''), 'aria-labelledby' => labelled_by,
                     class: %w(form-control calculator__field) << "t-calculator-#{field}" %>
</div>

<%
  error_messages = local_assigns[:error_messages] || []
  hint = local_assigns[:hint]
  labelled_by_symbol = "#{field}-symbol"
  labelled_by_label = "#{field}-label"
%>

<div class="form-group <%= 'error' unless error_messages.empty? %>">
  <label class="form-label" for="<%= field %>" id="<%= labelled_by_label %>">
    <%= label %>
    <%= content_tag :span, hint, class: 'form-hint' unless hint.blank? %>
  </label>
  <%= simple_format error_messages.join("\n"), { class: 'error-message' }, wrapper_tag: 'span' %>
  <%= content_tag :span, '£', id: labelled_by_symbol %>
  <%= text_field_tag field, number_to_currency(value, unit: ''), 'aria-labelledby' => "#{labelled_by_label} #{labelled_by_symbol}",
                     class: %w(form-control calculator__field) << "t-calculator-#{field}" %>
</div>

Improve screen reader labelling for currency fields

Ensure screen readers will read out both the label and currency symbol for these fields.


<%= link_to revision.title, revision.full_url %>

  <time datetime="<%= revision.published_at %>">
    <%= revision.published_at.to_date.to_formatted_s(:long_ordinal) %>
  </time>
    |  <%= revision.user.name %>  |  <a href="<%= revision.full_url + "#disqus_thread" %>">

Add class to revision header

Add class to revision header


<%= render 'row' %>

<div ng-controller="sortCtrl" ng-app="smart_management"
  data-singular-model-name = "<%= singular_model_name %>"
  data-plural-model-name = "<%= plural_model_name %>"
  data-editable-columns="<%= editable_columns_names.join(',') %>"
  data-visible-columns="<%= visible_columns_names.join(',') %>">

  <%= render 'form' %>
  <%= render 'smart_management/table' %>

  Add a new

<%= render 'row' %>

<div ng-controller="sortCtrl" ng-app="smart_management"
  data-singular-model-name = "<%= singular_model_name %>"
  data-plural-model-name = "<%= plural_model_name %>"
  data-editable-columns="<%= editable_columns_names.join(',') %>"
  data-visible-columns="<%= visible_columns_names.join(',') %>">

  <%= render 'form' %>
  <%= render 'table' %>

  Add a new

Allow to show a custom table

Allow to show a custom table


<%= @log.entry_name %>

    <%= link_to "Edit",    edit_log_path(@log) %> |
    <%= link_to "Destroy", log_path(@log),     method: :delete %>

Countries

  <% @log.countries.each do |country| %>

<%= country.name %>

  <% end %>

Custom Locations

  <% @log.custom_locations.each do |custom_location| %>

<%= custom_location.name %>

  <% end %>

<%= @log.entry_name %>

    <%= link_to "Edit",    edit_log_path(@log) %> |
    <%= link_to "Destroy", log_path(@log),     method: :delete %> |
    <%= link_to "All Logs", logs_path %>

Countries

  <% @log.countries.each do |country| %>

<%= country.name %>

  <% end %>

Custom Locations

  <% @log.custom_locations.each do |custom_location| %>

<%= custom_location.name %>

  <% end %>

Add link to index on show

Add link to index on show


# This file is managed by puppet.
# https://github.com/openstack/openstack-ci-puppet

[gerrit]
	basePath = git
	canonicalWebUrl = <%= canonicalweburl %>
[database]
	type = MYSQL
	hostname = localhost
	database = reviewdb
	username = gerrit2
	poolLimit = 20
[auth]
	type = OPENID_SSO
	openIdSsoUrl = <%= openidssourl %>
	cookieSecure = true
	contributorAgreements = true
[sendemail]
	smtpServer = localhost
[container]
	user = gerrit2
	javaHome = /usr/lib/jvm/java-6-openjdk/jre
[sshd]
	listenAddress = *:29418
	threads = 12
[httpd]
	listenUrl = proxy-https://*:8081/
	acceptorThreads = 8
[cache]
	directory = cache
[cache "web_sessions"]
	maxAge = 1d
[user]
	email = <%= email %>
<% commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
        match = "<%= commentlink['match'] %>"
        link = "<%= commentlink['link'] %>"
<% end -%>

# This file is managed by puppet.
# https://github.com/openstack/openstack-ci-puppet

[gerrit]
	basePath = git
	canonicalWebUrl = <%= canonicalweburl %>
[database]
	type = MYSQL
	hostname = localhost
	database = reviewdb
	username = gerrit2
	poolLimit = 32
[auth]
	type = OPENID_SSO
	openIdSsoUrl = <%= openidssourl %>
	cookieSecure = true
	contributorAgreements = true
[sendemail]
	smtpServer = localhost
[container]
	user = gerrit2
	javaHome = /usr/lib/jvm/java-6-openjdk/jre
[sshd]
	listenAddress = *:29418
	threads = 24
[httpd]
	listenUrl = proxy-https://*:8081/
	acceptorThreads = 8
[cache]
	directory = cache
[cache "web_sessions"]
	maxAge = 1d
[user]
	email = <%= email %>
<% commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
        match = "<%= commentlink['match'] %>"
        link = "<%= commentlink['link'] %>"
<% end -%>

Increase sshd threads for gerrit.

Increase sshd threads for gerrit.

Based on the advice in this thread:
http://groups.google.com/group/repo-discuss/browse_thread/thread/b91491c185295a71

Size the sshd threads (which are also used to handle https git requests)
better.  Based on current trends, we peak at about 50% cpu usage
and 25% memory usage.  Double the number of threads here to try to
allow us to get closer to 100% cpu.

(Corresponding increase in db connections.)

Change-Id: Icde18233de01466b241ab28d38d2e98735108193


Usuários Registrados

      Nome
      Email
      CPF
      Matricula

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

    <%= user.name%>
    <%= user.email%>
    <%= user.cpf %>
    <%= user.registration %>
    <%= link_to image_tag("icon_edit.png") , user_edit_path(user.id), confirm: "Tem certeza?" %>
    <%= link_to image_tag("icon_trash.png") , user_destroy_path(user.id), data: {confirm: "Esta ação não poderá mais ser desfeita. Tem certeza que deseja continuar?"}%>

<% end %>

Usuários Registrados

<%  %>
<%=  %>
<% if @users.count == 0 %>

Não há nenhum usuário registrado no momento.

<% else %>

      Nome
      Email
      CPF
      Matricula

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

      <%= user.name%>
      <%= user.email%>
      <%= user.cpf %>
      <%= user.registration %>
      <%= link_to image_tag("icon_edit.png") , user_edit_path(user.id), confirm: "Tem certeza?" %>
      <%= link_to image_tag("icon_trash.png") , destroy_users_path(user.id), data: {confirm: "Esta ação não poderá mais ser desfeita. Tem certeza que deseja continuar?"}%>

    <% end %>

<% end %>

Add if isn't registrate users in the view index of users


Critical Path CSS Rails Test App

<%= CriticalPathCss.fetch(request.path) %>

Add page h1 tag to more clearly identify test page


<%= @question.title %>
<% @question.answers.each do |answer| %>
  <%= anser.title %>|<%= answer.content %>
<% end %>

<%= @question.title %>
<% @question.answers.each do |answer| %>
  <%= answer.content %>
<% end %>

Fix error in show page

Fix error in show page


Employees#index

Find me in app/views/employees/index.html.erb

Employees

<%= link_to 'Add new employee', new_employee_path %>

	 		Name
	 		Contacts
	 		Avaliable for job
	 		Money rate
	 		Skills

		<% @employees.each do |employee| %>

				<%= employee.name %>
				<%= employee.contact %>

					<% if employee.search == true %>
							Avaliable
						<% else %>
							Busy
					<% end %>

				<%= employee.salary %>

<% end %>

Update index view for employees

Update index view for employees


Rails + Angular 1.5, by Evan Ng / GitHub Repo

Rails + Angular 1.5, by Evan Ng with help from VolunteerMatch.org | GitHub Repo

Include VolunteerMatch for their help

Include VolunteerMatch for their help


Enunciado:

    <%= markdown(@question.description) %>

<%= form_tag '#' do %>
  <%= text_area_tag :answer, nil, class: "form-control", rows: 15, placeholder: "Digite sua resposta" %>
  <%= submit_tag 'Responder', class: "btn btn-info btn-flat" %>
<% end %>

Add view to answer a question

Add view to answer a question


[user]
	name = <%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>
	email = <%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>
[alias]
	co = checkout
  lg = "log -5"
[color]
	diff = auto
	status = auto
	branch = auto
[push]
  default = tracking
[branch]
  autosetuprebase = always
[branch "master"]
  rebase = true
[branch "develop"]
  rebase = true
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = mate -w
	autocrlf = input
[apply]
	whitespace = nowarn
[format]
	pretty = %C(yellow)%h%Creset %s %C(red)(%cr)%Creset
[github]
	user = <%= print("GitHub Username: "); STDOUT.flush; STDIN.gets.chomp %>

[user]
	name = <%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>
	email = <%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>
[alias]
	co = checkout
  lg = "log -5"
[color]
	diff = auto
	status = auto
	branch = auto
[push]
  default = tracking
[branch]
  autosetuprebase = always
[branch "master"]
  rebase = true
[branch "develop"]
  rebase = true
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = vim
	autocrlf = input
[apply]
	whitespace = nowarn
[format]
	pretty = %C(yellow)%h%Creset %s %C(red)(%cr)%Creset
[github]
	user = <%= print("GitHub Username: "); STDOUT.flush; STDIN.gets.chomp %>

Use vim for git editor

Use vim for git editor


# This file is managed by puppet.  Do not edit
#
[DEFAULT]
#cert_file = /etc/swift/cert.crt
#key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
# ratelimit?
pipeline = healthcheck cache <%= auth_type %> proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = <%= allow_account_management %>
account_autocreate = <%= account_autocreate %>

<% if auth_type == 'swauth' %>
[filter:swauth]
use = egg:swauth#swauth
# this line is not in the install docs?
default_swift_cluster = local#<%= swauth_endpoint %>
super_admin_key = <%= swauth_super_admin_key %>
<% elsif auth_type == 'tempauth' %>
[filter:tempauth]
use = egg:swift#tempauth
user_admin_admin = admin .admin .reseller_admin
user_test_tester = testing .admin
user_test2_tester2 = testing2 .admin
user_test_tester3 = testing3
<% end %>

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache
# multi-proxy config not supported
memcache_servers = <%= proxy_local_net_ip %>:<%= proxy_port %>

# This file is managed by puppet.  Do not edit
#
[DEFAULT]
#cert_file = /etc/swift/cert.crt
#key_file = /etc/swift/cert.key
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
# ratelimit?
pipeline = healthcheck cache <%= auth_type %> proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = <%= allow_account_management %>
account_autocreate = <%= account_autocreate %>

<% if auth_type == 'swauth' -%>
[filter:swauth]
use = egg:swauth#swauth
# this line is not in the install docs?
default_swift_cluster = local#<%= swauth_endpoint %>
super_admin_key = <%= swauth_super_admin_key %>
<% elsif auth_type == 'tempauth' -%>
[filter:tempauth]
use = egg:swift#tempauth
user_admin_admin = admin .admin .reseller_admin
user_test_tester = testing .admin
user_test2_tester2 = testing2 .admin
user_test_tester3 = testing3
<% end -%>

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache
# multi-proxy config not supported
memcache_servers = <%= proxy_local_net_ip %>:<%= proxy_port %>

Remove extra newlines from swift proxy erb


      <%= image_tag "logo.png" %>

    MENU

Participa

Lanza un reto

Retadores

Participantes

Acerca de

Fix a missing image path

Fix a missing image path


<%- form_for("#{resource_class.to_s.downcase}",
      resource,
      :url => resource.new_record? ? collection_url : resource_url(resource),
      :html => { :method => (resource.new_record? ? "post" : "put") }) do |f| %>
  <% if resource.errors.any? %>

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

      <% resource.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>
  <% resource.attributes.each do |a| %>

      <%= a[0] %>
      <%= f.text_field a[0].to_sym %>

  <% end %>

    <%= f.submit %>

<% end %>

<%- form_for("#{resource_instance_name.to_s.downcase}",
      resource,
      :url => resource.new_record? ? collection_url : resource_url(resource),
      :html => { :method => (resource.new_record? ? "post" : "put") }) do |f| %>
  <% if resource.errors.any? %>

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

      <% resource.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>
  <% resource.attributes.each do |a| %>

      <%= a[0] %>
      <%= f.text_field a[0].to_sym %>

  <% end %>

    <%= f.submit %>

<% end %>

Switch to using resource_instance_name as form field


    렉클
    <button class="navbar-toggler navbar-toggler-right" type='button' data-toggle='collapse' data-target='#authentication_menu' aria-controls="authentication_menu" aria-expanded="false" aria-label="Toggle navigation">

    </button>

          로그인

Set login path to /

Set login path to /


  <% crumbs.each_with_index do |c, i| %>
  <% title = (i == 0) ? t('.top') : c[0] %>
  <% if c.size == 1 %>

<%= title %>

  <% else %>

    <%= link_to(title, c[1], {remote: true}) %>
    /

  <% end %>
  <% end %>

  <% crumbs.each_with_index do |c, i| %>
  <% title = (i == 0) ? t('.top') : c[0] %>
  <% if c.size == 1 %>

<%= raw title %>

  <% else %>

    <%= link_to(title, c[1], {remote: true}) %>
    /

  <% end %>
  <% end %>

:wrench: Fix to show font-awesome font in bread crumb


<!DOCTYPE html>
<html>
<head>
  <title>HivePulse</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <script src="https://maps.googleapis.com/maps/api/js?v=3&key=<%= ENV["GOOGLE_MAPS_API_KEY"] %>&sensor=false">
type="text/javascript">
</script>
  <%= csrf_meta_tags %>
  <%= analytics_init if Rails.env.production? %>
</head>
<!-- <body role="document" class="<%= controller_name %> <%= action_name %> background-dark" > -->
<!--   <main role="main" class="container"> -->
<body >
       <%= yield %>
<!--   </main> -->
<!--   <%= render 'layouts/footer' %> -->
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>HivePulse</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
  <%= analytics_init if Rails.env.production? %>
</head>
<!-- <body role="document" class="<%= controller_name %> <%= action_name %> background-dark" > -->
<!--   <main role="main" class="container"> -->
<body >
       <%= yield %>
<!--   </main> -->
<!--   <%= render 'layouts/footer' %> -->
</body>
</html>

Remove extra gmaps api script tag

Remove extra gmaps api script tag


	<%= tabstrip_li "Survey", @questionnaire, :controller => 'questionnaires', :except => ['publish'] %>
	<% if logged_in? and logged_in_person.permitted?(@questionnaire, "edit") -%>
	   <%= tabstrip_li "Publish", questionnaire_path(@questionnaire) + '/publish',
                        :controller => 'questionnaires', :only => ['publish'] %>
	<% end -%>
	<% if logged_in? and logged_in_person.permitted?(@questionnaire, "view_responses") -%>
	   <%= tabstrip_li "Responses", responses_path(@questionnaire), :controller => 'responses' %>
	<% end -%>
	<%= tabstrip_li "Answer", { :controller => "answer", :action => "index", :id => @questionnaire.id },
                    :class => "external", :disabled => (not @questionnaire.is_open) %>

	<%= tabstrip_li "Survey", @questionnaire, :controller => 'questionnaires', :except => ['publish'] %>
	<% if logged_in? and logged_in_person.permitted?(@questionnaire, "edit") -%>
	   <%= tabstrip_li "Publish", questionnaire_path(@questionnaire) + '/publish',
                        :controller => 'questionnaires', :only => ['publish'] %>
	<% end -%>
	<% if logged_in? and logged_in_person.permitted?(@questionnaire, "view_answers") -%>
	   <%= tabstrip_li "Responses", responses_path(@questionnaire), :controller => 'responses' %>
	<% end -%>
	<%= tabstrip_li "Answer", { :controller => "answer", :action => "index", :id => @questionnaire.id },
                    :class => "external", :disabled => (not @questionnaire.is_open) %>

Fix typo in permission name

Fix typo in permission name


This is where all of the available items will be visible.  If you'd like to create a new item, <%= link_to "click here", new_item_path %>.

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

<%= link_to item.name, item_path(item) %>

  <img src="<%= item.image %>" height="100" width="100">
<% end %>

Add commented out code for clickable images. That code allows for clickable images but having issue resizing, so leaving as comment to come back later


El Fotomandón

        <%= image_tag(@photo.file.url(:full), class: 'photo annotatable', id: 'photo') %>

        <%= render 'shared/photo_footer', photo: @photo %>

        <%= render 'shared/show_admin_links', item: @photo %>

        <%= render 'shared/social_buttons' %>

        <%= render '/shared/ad_banner' %>

      <%= render 'shared/related_posts', related_posts: @photo.related_posts[0..1], wrapper: true, width: 'span6' %>

    <%= render 'shared/show_related_entities', entities: @photo.related_entities, photo_navigation: true %>

<%= render 'shared/annotorious', photo: @photo %>

El Fotomandón

        <%= image_tag(@photo.file.url(:full), class: 'photo annotatable', id: 'photo') %>

        <%= render 'shared/photo_footer', photo: @photo %>

        <%= render 'shared/show_admin_links', item: @photo %>

        <%= render 'shared/social_buttons' %>

        <%= render '/shared/ad_banner' %>

    <%= render 'shared/show_related_entities', entities: @photo.related_entities, photo_navigation: true %>

<%= render 'shared/annotorious', photo: @photo %>

Disable related posts for photos, layout wrong, will fix


Projects Near You

  <%= form_tag users_results_path, :method => :get do %>

    <%= text_field_tag :search, params[:search] %>

  <%= submit_tag "Search Near", :name => nil %>

<% end %>

Projects Near You

  <%= form_tag projects_results_path, :method => :get do %>

    <%= text_field_tag :search, params[:search] %>

  <%= submit_tag "Search Near", :name => nil %>

<% end %>

Change path in search form

Change path in search form


Shift Dash

Check out your shifts!

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

    <% shifts.each do |shift|%>

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

    <%end%>

<% end %>

Shift Dash

Check out your shifts!

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

  <% shifts.each do |shift|%>

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

  <%end%>

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

<% end %>

Change Shift Details to Details

Change Shift Details to Details


 Blogs

    <% @Blogs.reverse.each do |blog| %>

        <a href = "/blogs/<%= blog.id %>" >

            <%= blog.title%>

            <%= blog.date %>

    <% end %>

Add content div to promotions

Add content div to promotions


# Test Generated by Dashi
#
# To use:
#  1. In the test directory create a Gemfile:
#      source "https://www.rubygems.org"
#      gem "selenium-webdriver"
#      gem "net-http-persistent"
#
#  2.  run `bundle update` in that directory
#  3.  set the 'SAUCE_USERNAME' & 'SAUCE_ACCESS_KEY' environment variables
#  4.  run `bundle exec ruby repro.rb`

require "selenium/webdriver"
require 'selenium/webdriver/remote/http/persistent'

def un
  ENV["SAUCE_USERNAME"]
end

def ak
  ENV["SAUCE_ACCESS_KEY"]
end

def auth
  "#{un}:#{ak}"
end

def server
  "ondemand.saucelabs.com"
end

def port
  80
end

def endpoint
  "#{server}:#{port}/wd/hub"
end

def auth_endpoint
  "http://#{auth}@#{endpoint}"
end

def caps
 caps = <%= desired_capabilities.to_h %>

 return caps
end

http_client = ::Selenium::WebDriver::Remote::Http::Persistent.new
http_client.timeout = 300 # Browser launch can take a while

driver = Selenium::WebDriver.for :remote, :url => auth_endpoint, :desired_capabilities => caps, :http_client => http_client

<%= commands_for_execution %>

# Test Generated by Dashi
#
# To use:
#  1. In the test directory create a Gemfile:
#      source "https://www.rubygems.org"
#      gem "selenium-webdriver"
#      gem "net-http-persistent"
#
#  2.  run `bundle update` in that directory
#  3.  set the 'SAUCE_USERNAME' & 'SAUCE_ACCESS_KEY' environment variables
#  4.  run `bundle exec ruby repro.rb`

require "selenium/webdriver"
require 'selenium/webdriver/remote/http/persistent'

def un
  ENV["SAUCE_USERNAME"]
end

def ak
  ENV["SAUCE_ACCESS_KEY"]
end

def auth
  "#{un}:#{ak}"
end

def server
  "ondemand.saucelabs.com"
end

def port
  80
end

def endpoint
  "#{server}:#{port}/wd/hub"
end

def auth_endpoint
  "http://#{auth}@#{endpoint}"
end

def caps
 caps = <%= desired_capabilities.to_h %>

 caps['name'] = "A Test Made with Dashi"
 return caps
end

http_client = ::Selenium::WebDriver::Remote::Http::Persistent.new
http_client.timeout = 300 # Browser launch can take a while

driver = Selenium::WebDriver.for :remote, :url => auth_endpoint, :desired_capabilities => caps, :http_client => http_client

<%= commands_for_execution %>

Set the test name to indicate it's generated


require "json"

Ohai.plugin(:Lldp) do
  provides "lldp"

  collect_data(:default) do
    lldp Mash.new

    json = JSON.parse(%x(/sbin/lldpctl -f json))

    json["lldp"].each do |key, value|
      lldp[key] = value
    end

    lldp
  end
end

require "json"

Ohai.plugin(:Lldp) do
  provides "lldp"

  collect_data(:default) do
    lldp Mash.new

    json = JSON.parse(%x(/sbin/lldpctl -f json))

    json["lldp"]["interface"].each do |interface|
      interface.each do |name, details|
        lldp[name] = details
      end
    end

    lldp
  end
end

Improve layout of LLDP data

Improve layout of LLDP data


// see https://www.mediawiki.org/wiki/Extension:Flow
$wgFlowAjaxTimeout = 90; // Seconds

$wgFlowEventLogging = true;
$wgFlowServerCompileTemplates = true; // always recompile in dev mode
$wgFlowContentFormat = 'html'; // Parsoid dependency
$wgFlowOccupyPages = array (
	'Talk:Flow QA', // used by Flow extension's browser tests
	'Talk:Sandbox',
);
$wgFlowOccupyNamespaces = array( NS_USER_TALK );
$wgFlowParsoidURL = 'http://localhost:<%= scope['mediawiki::parsoid::port'] %>';
$wgFlowParsoidPrefix = 'localhost';
$wgFlowParsoidTimeout = 100;

$wgGroupPermissions['autoconfirmed']['flow-edit-post'] = true;
$wgGroupPermissions['sysop']['flow-create-board'] = true;
$wgGroupPermissions['sysop']['flow-suppress'] = true;

$wgDebugLogGroups['Flow'] = '/vagrant/logs/mediawiki-Flow.log';

// see https://www.mediawiki.org/wiki/Extension:Flow
$wgFlowAjaxTimeout = 90; // Seconds

$wgFlowEventLogging = true;
$wgFlowServerCompileTemplates = true; // always recompile in dev mode
$wgFlowContentFormat = 'html'; // Parsoid dependency

$wgExtraNamespaces[190] = 'Flow_test';
$wgExtraNamespaces[191] = 'Flow_test_talk';
$wgNamespacesWithSubpages[190] = true;
$wgNamespacesWithSubpages[191] = true;

$wgFlowOccupyPages = array (
	'Talk:Flow QA', // used by Flow extension's browser tests
	'Talk:Sandbox',
);
$wgFlowOccupyNamespaces = array( NS_USER_TALK, 191 );

$wgFlowParsoidURL = 'http://localhost:<%= scope['mediawiki::parsoid::port'] %>';
$wgFlowParsoidPrefix = 'localhost';
$wgFlowParsoidTimeout = 100;

$wgGroupPermissions['autoconfirmed']['flow-edit-post'] = true;
$wgGroupPermissions['sysop']['flow-create-board'] = true;
$wgGroupPermissions['sysop']['flow-suppress'] = true;

$wgDebugLogGroups['Flow'] = '/vagrant/logs/mediawiki-Flow.log';

Add Flow_test NS to Flow role

Add Flow_test NS to Flow role

* Same NS exist on ca.beta and en.beta
* Used by browser tests

Change-Id: I426cb4ad957045f13f5bbf55c709bcde5383c4d7


Search by Tag

<%= form_tag("/search", method: "get") do %>
  <%= label_tag(:q, "Search by Tag:") %>
  <%= text_field_tag(:q) %>
  <%= submit_tag("Search") %>
<% end %>

Resources

    <% if @q %>
      <% @tags.each do |tag| %>

        <% if tag.name == @q.downcase %>

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

<%= link_to resource.title, resource.url %>

            <% end %>

        <% end %>

      <% end %>

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

<%= link_to resource.title, resource.url %>

      <% end %>
    <% end %>

Search by Tag

<%= form_tag("/search", method: "get") do %>
  <%= label_tag(:q, "Search by Tag:") %>
  <%= text_field_tag(:q) %>
  <%= submit_tag("Search") %>
<% end %>

Resources

    <% if @q %>

<%=@q.downcase%>

      <% @tags.each do |tag| %>
        <% if tag.name == @q.downcase %>
            <% tag.resources.each do |resource| %>

<%= link_to resource.title, resource.url %>

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

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

<%= link_to resource.title, resource.url %>

      <% end %>
    <% end %>

Add search term as heading for list, cleaned up code spacing


    <% review.rating.times do %>

    <% end %>
    <% (5-review.rating).times do %>

    <% end %>

    <%= review.grade %>

Published <%= time_ago_in_words(review.created_at) %> ago
    <% if user_signed_in? && (current_user == review.user || current_user.try(:admin?) ) %>
    | <%= link_to "Edit", edit_course_review_path(@course, review), method: :get, remote: true %>
    | <%= button_to 'Delete', [review.course, review], method: :delete,
        data: { confirm: 'Are you sure you want to delete your review?' }, class: 'deleteBtn'%>
      <% end %>

<%= review.info %>

<%= simple_format(review.review_text) %>

  <div id="review_form_<%= review.id %>">

    <% review.rating.times do %>

    <% end %>
    <% (5-review.rating).times do %>

    <% end %>

    <%= review.grade %>

Published <%= time_ago_in_words(review.created_at) %> ago
    <% if user_signed_in? && (current_user == review.user || current_user.try(:admin?) ) %>
    | <%= link_to "Edit", edit_course_review_path(@course, review), method: :get, remote: true %>
    | <%= button_to 'Delete', [review.course, review], method: :delete,
        data: { confirm: 'Are you sure you want to delete your review?' }, class: 'deleteBtn'%>
      <% end %>

<%= review.info %>

<%= review.review_text %>

  <div id="review_form_<%= review.id %>">

Revert "review: fix line breaks not showing"

This reverts commit 3d2b9b8a0332a8a372dce14bd64d499c66a4fcf5.


<%if @inquiry%>
$("#inquiry_<%=params[:id]%>").replaceWith("<%= j(render(partial: 'inquiry/inquiries/item', locals: {inquiry: @inquiry, remote_links: false})) %>");
$("#inquiry_<%=params[:id]%>").update();
<%else%>
$("#inquiry_<%=params[:id]%>").remove();
<%end%>
// close modal window
Dashboard.hideModal();
// reload remote inquries
PollingService.update('inquiries');

Update inqury item inline after update

Update inqury item inline after update


       <% link_to '/betweenscreens' do %>
         <%= image_tag 'Between_Screens_Logo_Cube_Up.svg', alt: 'Logo cube' %>
       <% end %>

<%= link_to 'fork!', 'https://github.com/vis-kid/betweenscreens' %>

<%= link_to 'about', '/pages/about.html' %>

<%= link_to 'design', '/design.html' %>

<%= link_to 'code', '/code.html' %>

       <% link_to '/' do %>
         <%= image_tag 'Between_Screens_Logo_Cube_Up.svg', alt: 'Logo cube' %>
       <% end %>

<%= link_to 'fork!', 'https://github.com/vis-kid/betweenscreens' %>

<%= link_to 'about', '/pages/about.html' %>

<%= link_to 'design', '/design.html' %>

<%= link_to 'code', '/code.html' %>

Update Logo link in navbar

Update Logo link in navbar


Unauthorized patron

Sorry, you are not authorized to view this page. If you believe you've received this message by mistake please contact your University department and the NYU Libraries Access Services Department.

Fix broken link on access denied form

Fix broken link on access denied form


Hello <%= @user.email %>!

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

<%= edit_password_url(@user, :reset_password_token => @token) %>

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

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

The link will be valid for 6 hours and will only work once.

Remove duplicate greeting in email template


# Generated by Chef for <%= node['fqdn'] %>
# Do NOT modify this file by hand.
#
<%# IPtables declares items in the following pattern:
*tablename, e.g. *filter or *mangle
default chains
custom chains
rules to go into the chain
COMMIT
next table and so on
 %>
<% unless @iptables.nil? || @iptables.empty? -%>
<% @iptables.each do |table, data| -%>
*<%= table %>
<%# Put the chains in the file, format of :Name%>
<% unless data['chains'].nil? || data['chains'].empty? -%>
<% data['chains'].each do |chain, value| -%>
:<%= chain %> <%= value %>
<% end -%>
<% end -%>
<%# once all chains are down we put the rules doen%>
<% unless data['rules'].nil? || data['rules'].empty? -%>
<% data['rules'].each do |rule| -%>
<%= rule %>
<% end -%>
<% end -%>
COMMIT
<% end -%>
<% end -%>

# Generated by Chef
# Do NOT modify this file by hand.
#
<%# IPtables declares items in the following pattern:
*tablename, e.g. *filter or *mangle
default chains
custom chains
rules to go into the chain
COMMIT
next table and so on
 %>
<% unless @iptables.nil? || @iptables.empty? -%>
<% @iptables.each do |table, data| -%>
*<%= table %>
<%# Put the chains in the file, format of :Name%>
<% unless data['chains'].nil? || data['chains'].empty? -%>
<% data['chains'].each do |chain, value| -%>
:<%= chain %> <%= value %>
<% end -%>
<% end -%>
<%# once all chains are down we put the rules doen%>
<% unless data['rules'].nil? || data['rules'].empty? -%>
<% data['rules'].each do |rule| -%>
<%= rule %>
<% end -%>
<% end -%>
COMMIT
<% end -%>
<% end -%>

Remove the FQDN from the config file

Remove the FQDN from the config file


<!DOCTYPE html>

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

<%= link_to "Profile",  '/teachers/'+session[:teacher_id].to_s %>

<%= link_to "Students",  show_path %>

<%= link_to "Teachers",  '/teachers' %>

            <% if current_user %>

<%= link_to "Log out", '/logout' %>

            <% else %>

<%= link_to "Log in", '/login' %>

            <% end %>

<%= yield %>

<!DOCTYPE html>

  <title>MikeRowe</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
  <link href="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20153.83.min.css" rel="stylesheet" type="text/css" />

<%= link_to "Profile",  '/teachers/'+session[:teacher_id].to_s %>

<%= link_to "Students",  '/students/' %>

<%= link_to "Teachers",  '/teachers' %>

            <% if current_user %>

<%= link_to "Log out", '/logout' %>

            <% else %>

<%= link_to "Log in", '/login' %>

            <% end %>

<%= yield %>

Change path for students page in layout file


---
# Template for Articles (Blog Posts)
---

<% render 'default' do %>

<%= item[:title] %>

Posted on <%= item[:author_date] %> by <%= item[:author] %>

      <%= yield %>

    Back to Blog

Please enable JavaScript to view the comments powered by Disqus.

<% end %>

---
# Template for Articles (Blog Posts)
---

<% render 'default' do %>

<%= item[:title] %>

      Posted on <%= pretty_time(item[:created_at]) %>
      by <%= item[:author]%>

      <%= yield %>

    Back to Blog

Please enable JavaScript to view the comments powered by Disqus.

<% end %>

Use span tags to seperate entry-date and entry-author while still keeping them on the same line


#
# <%= @configuration.inspect %>
#
<% if @configuration -%>
--module=home-base-warning

<% if @configuration['modules'].has_key?('server') -%>
--module=server
<% @configuration['modules'].fetch('server',[]).each do |k,v| -%>
<%= k %>=<%= v %>
<% end -%>
<% end -%>

<% if @configuration['modules'].has_key?('logging') -%>
--module=logging
<% end -%>

<% if @configuration['modules'].has_key?('deploy') -%>
--module=deploy
<% @configuration['modules'].fetch('deploy', []).each do |k,v| -%>
<%= k %>=<%= v %>
<% end -%>
<% end -%>

<% if @configuration['modules'].has_key?('websocket') -%>
--module=websocket
<% end -%>

<% if @configuration['modules'].has_key?('ext') -%>
--module=ext
<% end -%>

<% if @configuration['modules'].has_key?('resources') -%>
--module=resources
<% end -%>

<% if @configuration['modules'].has_key?('jsp') -%>
--module=jsp
jsp-impl=apache
<% end -%>

<% if @configuration['modules'].has_key?('jstl') -%>
--module=jstl
<% end -%>

<% if @configuration['modules'].has_key?('http') -%>
--module=http
<% @configuration['modules'].fetch('http', []).each do |k,v| -%>
<%= k %>=<%= v %>
<% end -%>
<% end -%>

<% end -%>

<% if @configuration -%>
--module=home-base-warning

<% if @configuration['modules'].has_key?('server') -%>
--module=server
<% @configuration['modules'].fetch('server', {}).each { |k,v| <%= k %>=<%= v %> } -%>
<% end -%>

<% if @configuration['modules'].has_key?('logging') -%>
--module=logging
<% end -%>

<% if @configuration['modules'].has_key?('deploy') -%>
--module=deploy
<% @configuration['modules'].fetch('deploy', {}).each { |k,v| <%= k %>=<%= v %> } -%>
<% end -%>

<% if @configuration['modules'].has_key?('websocket') -%>
--module=websocket
<% end -%>

<% if @configuration['modules'].has_key?('ext') -%>
--module=ext
<% end -%>

<% if @configuration['modules'].has_key?('resources') -%>
--module=resources
<% end -%>

<% if @configuration['modules'].has_key?('jsp') -%>
--module=jsp
jsp-impl=apache
<% end -%>

<% if @configuration['modules'].has_key?('jstl') -%>
--module=jstl
<% end -%>

<% if @configuration['modules'].has_key?('http') -%>
--module=http
<% @configuration['modules'].fetch('http', {}).each { |k,v| <%= k %>=<%= v %> } -%>
<% end -%>

<% end -%>

Change array to hash in the default values


LoadPlugin openvpn

<Plugin openvpn>
       StatusFile <%= statusfile %>
       ImprovedNamingSchema <%= improvednamingschema %>
       CollectCompression <%= collectcompression %>
       CollectIndividualUsers <%= collectindividualusers %>
       CollectUserCount <%= collectusercount %>
</Plugin>

LoadPlugin openvpn

<Plugin openvpn>
       StatusFile "<%= statusfile %>"
       ImprovedNamingSchema <%= improvednamingschema %>
       CollectCompression <%= collectcompression %>
       CollectIndividualUsers <%= collectindividualusers %>
       CollectUserCount <%= collectusercount %>
</Plugin>

Add missing quotes to openvpn plugin

Add missing quotes to openvpn plugin


# runtime
RunAsDaemon 1
<%  if (v=scope.lookupvar('tor::daemon::data_dir')) != '/var/lib/tor' -%>
DataDirectory <%= v %>
<% end -%>

# log
<% if (rules=scope.lookupvar('tor::daemon::log_rules')).empty? -%>
Log notice syslog
<%  else -%>
<%   rules.each do |log_rule| -%>
Log <%= log_rule %>
<%    end -%>
<%  end -%>
<%- if @safe_logging != 1 then -%>
SafeLogging <%= @safe_logging %>
<%-   end -%>

<%  if (v=scope.lookupvar('tor::daemon::automap_hosts_on_resolve')) != '0' -%>
AutomapHostsOnResolve <%= v %>
<%  end -%>
<%  if (v=scope.lookupvar('tor::daemon::use_bridges')) != '0' -%>
UseBridges <%= v %>
<%- end -%>

# runtime
RunAsDaemon 1
<%  if (v=scope.lookupvar('tor::daemon::data_dir')) != '/var/lib/tor' -%>
DataDirectory <%= v %>
<% end -%>

# log
<% if (rules=scope.lookupvar('tor::daemon::log_rules')).empty? -%>
Log notice syslog
<%  else -%>
<%   rules.each do |log_rule| -%>
Log <%= log_rule %>
<%    end -%>
<%  end -%>
<%- if (v=scope.lookupvar('tor::daemon::safe_logging')) != '1' then -%>
SafeLogging <%= v %>
<%-   end -%>

<%  if (v=scope.lookupvar('tor::daemon::automap_hosts_on_resolve')) != '0' -%>
AutomapHostsOnResolve <%= v %>
<%  end -%>
<%  if (v=scope.lookupvar('tor::daemon::use_bridges')) != '0' -%>
UseBridges <%= v %>
<%- end -%>

Update template to really honor tor::daemon's safe_logging parameter.

Without this change, using tor::daemon with the default safe_logging
parameter results in a "SafeLogging 1" line being added to torrc,
which is obviously not the intent of this piece of code.

Also, this change makes parameters lookup consistent with how it's done
everywhere else in this ERB template.


Results

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

<%= track.title %>

<%= track.artist_name %>

Valence: <%= track.audio_features.valence %>

Energy: <%= track.audio_features.energy %>

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

<%= track.lyrics %>

<%end%>

See More Results

Add see more results link to show page

Add see more results link to show page


  <%= user.full_name %>

  <%= link_to user.email, user %>

  <%= l(user.confirmed_at, format: :full_with_time) %>

  <%= form_for(user) do |f| %>
      <%= f.select(:role, User.roles.keys.map {|role| [role.titleize,role]}) %>
      <%= f.submit 'Change Role', :class => 'button-xs' %>
  <% end %>

  <%= link_to("Delete user", user_path(user), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'button-xs') unless user == current_user %>

  <%= user.full_name %>

  <%= link_to user.email, user %>

  <%= l(user.confirmed_at, format: :full_with_time) if user.confirmed_at %>

  <%= form_for(user) do |f| %>
      <%= f.select(:role, User.roles.keys.map {|role| [role.titleize,role]}) %>
      <%= f.submit 'Change Role', :class => 'button-xs' %>
  <% end %>

  <%= link_to("Delete user", user_path(user), :data => { :confirm => "Are you sure?" }, :method => :delete, :class => 'button-xs') unless user == current_user %>

Handle nil value for confirmed_at in user index.


<%= hidden_field_tag "return_to", params[:return_to] if params[:return_to] %>

<label for="edition_assigned_to_id">Assigned to</label>
<%= f.collection_select :assigned_to_id, User.order_by([[:name, :asc]]).all, :id, :name, :prompt => "Select someone" %>

<%= f.input :title,
      :input_html => { :class => "span7", :autofocus => true, :disabled => @resource.published? } %>

<%= f.input :alternative_title,
      :label => 'Alternative title',
      :hint => 'Use this where longer title is needed for SEO purposes',
      :input_html => { :class => "span7", :autofocus => true, :disabled => @resource.published? } %>

<%= f.input :overview,
      :as => :text,
      :label => 'Meta tag description',
      :hint => 'Some search engines will display this if they can’t find what they need in the main text',
      :input_html => { :class => "span7", :rows => 3, :disabled => @resource.published? } %>

<fieldset class='form-horizontal'>
  <%= hidden_field_tag "return_to", params[:return_to] if params[:return_to] %>

    Assigned to

      <%= f.collection_select :assigned_to_id, User.order_by([[:name, :asc]]).all, :id, :name, :prompt => "Select someone" %>

  <%= f.input :title,
        :input_html => { :class => "span7", :autofocus => true, :disabled => @resource.published? } %>

  <%= f.input :alternative_title,
        :label => 'Alternative title',
        :hint => 'Use this where longer title is needed for SEO purposes',
        :input_html => { :class => "span7", :autofocus => true, :disabled => @resource.published? } %>

  <%= f.input :overview,
        :as => :text,
        :label => 'Meta tag description',
        :hint => 'Some search engines will display this if they can’t find what they need in the main text',
        :input_html => { :class => "span7", :rows => 3, :disabled => @resource.published? } %>

</fieldset>

Use form-horizontal in the title-etc partial

Because nicer


<!DOCTYPE html>

  <%= render 'layouts/head' %>

<body class="<%= Rails.env.development? ? 'development' : '' %>">
<%= render 'layouts/header' %>

        <% {notice: :info, alert: :danger, danger: :danger, success: :success, info: :info, warning: :warning}.each do |mt, cc| %>
          <% if flash[mt].present? %>
            <div class="notice is-<%= cc.to_s %>">
              <%= flash[mt] %>

          <% end %>
        <% end %>

        <% if @first_visit_notice %>
          <% notice = SiteSetting['FirstVisitGuidance'] %>
          <% if notice.present? %>

              <button type="button" class="button is-close-button" data-dismiss=".notice.js-first-visit-notice" aria-label="Close" id="fvn-dismiss">
                ×
              </button>
              <%= raw(sanitize(notice, scrubber: scrubber)) %>

          <% end %>
        <% end %>

        <%= yield %>

<%= render 'layouts/footer' %>

<%= render 'layouts/matomo' %>

<!DOCTYPE html>

  <%= render 'layouts/head' %>

<body class="<%= Rails.env.development? ? 'development' : '' %>">
<%= render 'layouts/header' %>

        <% {notice: :info, alert: :danger, danger: :danger, success: :success, info: :info, warning: :warning}.each do |mt, cc| %>
          <% if flash[mt].present? %>
            <div class="notice is-<%= cc.to_s %>">
              <%= flash[mt] %>

          <% end %>
        <% end %>

        <% if @first_visit_notice %>
          <% notice = SiteSetting['FirstVisitGuidance'] %>
          <% if notice.present? %>

              <button type="button" class="button is-close-button" data-dismiss="#fvn" aria-label="Close" id="fvn-dismiss">
                ×
              </button>
              <%= raw(sanitize(notice, scrubber: scrubber)) %>

          <% end %>
        <% end %>

        <%= yield %>

<%= render 'layouts/footer' %>

<%= render 'layouts/matomo' %>

Copy over CSS id change

Copy over CSS id change


Some

Footer

Things

To

Play

With

Simulating

Large

Footer

Layout

Here

Are

Other

List

Items

Add a footer with three lists to play around with styling


Let's send a text!

    <form method="post" action="<%= notifications_path %>" role="form">

        Number:
        <input class="form-control" type="text" id="number" name="number" placeholder="1234567890">

        Message:
        <textarea class="form-control" id="message" name="message" cols="40" rows="4"></textarea>

      <input class="btn btn-default" type="submit">
    </form>

Add container class around input form

Add container class around input form


#!/bin/bash

set -e

export BRANCH=${BRANCH:-<%= @dns_branch %>}
export TMPDIR=${TMPDIR:-<%= @dns_tmpdir %>}
export REPO=${REPO:-<%= @dns_repo %>}
export TARGETPATH=${TARGETPATH:-<%= @target_path %>}

(
  flock -n 9 || exit 1
  echo "Clean up..."
  rm -rf "${TMPDIR}"

  echo "Cloning..."
  git clone "${REPO}" "${TMPDIR}"
  cd "${TMPDIR}"
  git checkout "${BRANCH}"

  REVISION=`git log -1 HEAD | fgrep commit | awk '{print $NF}'`
  PREV_REVISION=`cat /tmp/ns-revision.txt 2>/dev/null || echo -n none`
  echo -n "${REVISION}" > /tmp/ns-revision.txt

  echo "Revision: \$Id: ${REVISION} \$"
  echo "Previous revision: ${PREV_REVISION}"

  if [[ "${REVISION}" == "${PREV_REVISION}" ]]; then
    echo "No updates found."
    exit 0
  fi

  echo "Linking..."
  rm -rf "${TARGETPATH}/zones"

  mv "${TMPDIR}/zones" "${TARGETPATH}/"

  echo "Reloading DNS configuration..."
  rndc reload
) 9>/var/lock/ns-update.lock

#!/bin/bash

set -e

export BRANCH=${BRANCH:-<%= @dns_branch %>}
export TMPDIR=${TMPDIR:-<%= @dns_tmpdir %>}
export REPO=${REPO:-<%= @dns_repo %>}
export TARGETPATH=${TARGETPATH:-<%= @target_path %>}

(
  flock -n 9 || exit 1
  echo "Clean up..."
  rm -rf "${TMPDIR}"

  echo "Cloning..."
  git clone "${REPO}" "${TMPDIR}"
  cd "${TMPDIR}"
  git checkout "${BRANCH}"

  REVISION=`git log -1 HEAD | fgrep commit | awk '{print $NF}'`
  PREV_REVISION=`cat /tmp/ns-revision.txt 2>/dev/null || echo -n none`
  echo -n "${REVISION}" > /tmp/ns-revision.txt

  echo "Revision: \$Id: ${REVISION} \$"
  echo "Previous revision: ${PREV_REVISION}"

  if [[ "${REVISION}" == "${PREV_REVISION}" ]]; then
    echo "No updates found."
    exit 0
  fi

  echo "Linking..."
  rm -rf "${TARGETPATH}/zones"

  mv "${TMPDIR}/zones" "${TARGETPATH}/"

  echo "Reloading DNS configuration..."
  /usr/sbin/rndc reload
) 9>/var/lock/ns-update.lock

Fix for rndc launch: use full path

Fix for rndc launch: use full path

Change-Id: Ie2d483711a43267ff97cb7463ed96795280e1986
Signed-off-by: Igor Shishkin <754e6e0fd0f692545d04d1591d9a3de62bb04f84@mirantis.com>


<%= simple_form_for @user,
                    url: { controller: 'users', action: 'quick_create' },
                    html: { class: 'form-vertical' }, remote: true,
                    wrapper: :vertical_form do |f| %>
  <%= f.error_notification %>

  <%= f.input :username, as: :hidden %>
  <%= f.input :first_name, readonly: true %>
  <%= f.input :last_name, readonly: true %>
  <%= f.input :phone, hint: 'Format like (555) 555-5555' %>
  <%= f.input :email %>
  <%= f.input :affiliation %>

  <%= f.button :submit, cancel: root_path %>
<% end %>

<%= simple_form_for @user,
                    url: { controller: 'users', action: 'quick_create' },
                    html: { class: 'form-vertical' }, remote: true,
                    wrapper: :vertical_form do |f| %>
  <%= f.error_notification %>

  <%= f.input :username, as: :hidden %>
  <%= f.input :first_name, readonly: true %>
  <%= f.input :last_name, readonly: true %>
  <%= f.input :phone, hint: 'Format like (555) 555-5555' %>
  <%= f.input :email %>
  <%= f.input :affiliation %>

      <%= f.button :submit %>
      <button class="btn btn-default" data-dismiss="modal" type="button">Cancel</button>

<% end %>

Fix cancel button on quick new user modal

Resolves #1376


Draft new policy

<%= render partial: "form", locals: {disabled: false, edition: @edition} %>

Draft new <%= @edition.document_type %>

<%= render partial: "form", locals: {disabled: false, edition: @edition} %>

Document type should be correctly displayed in title.


      <%= t("related_content.title") %> (<%= relationable.relationed_contents.count %>)

    <% if current_user %>
      <button type="button" data-toggle="related_content" class="add-related-content" id="add-related-content">
        <%= t("related_content.add") %>
      </button>
    <% end %>

  <% if current_user %>
    <%= render "relationable/form", relationable: relationable %>
  <% end %>

  <% if @related_contents.present? %>
    <%= render "relationable/related_list", relationable: relationable %>
  <% end %>

      <%= t("related_content.title") %> (<%= relationable.relationed_contents.count %>)

    <% if current_user %>
      <button type="button" data-toggle="related_content" class="add-related-content">
        <%= t("related_content.add") %>
      </button>
    <% end %>

  <% if current_user %>
    <%= render "relationable/form", relationable: relationable %>
  <% end %>

  <% if @related_contents.present? %>
    <%= render "relationable/related_list", relationable: relationable %>
  <% end %>

Remove unused related content button ID attribute


System Activity Logs

<%= render "log_filters" %>

      User
      Category
      Message
      Date

    <% @logs.each do |log| %>

        <%= log.user.present? ? log.user.fullname : "Unknown User" %>
        <%= log.category %>
        <%= log.message %>
        <%= log.created_at %>

    <% end %>

System Activity Logs

<%= render "log_filters" %>

      User
      Category
      Message
      Date

    <% @logs.each do |log| %>

        <%= log.user&.fullname || "Unknown User" %>
        <%= log.category %>
        <%= log.message %>
        <%= log.created_at %>

    <% end %>

Move to more modern try syntax

Move to more modern try syntax


<%= render :layout => 'layouts/frontend_base' do %>

<%= main_navigation_link_to "Departments", organisations_path %>

<%= main_navigation_link_to "Worldwide", world_locations_path(locale: :en) %>

<%= main_navigation_link_to 'How government works', how_government_works_path %>

<%= main_navigation_link_to "Get involved", get_involved_path %>

<a href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">Consultations

Statistics

News and communications

  <main id="content" role="main" class="whitehall-content"<%= " lang=#{I18n.locale.to_s}" unless I18n.locale == :en %>>
    <div id="page" class="<%= content_for?(:page_class) ? yield(:page_class) : '' %>" >
      <%= yield %>
      <%= render_mustache_templates if Rails.env.development? %>

<% end %>

Add aria label to site header navigation

The site header links are a nav element, often appearing on pages which
have other nav elements. When there are multiple navigation landmarks on
a page, they should be labelled in order to help assistive tech users
differentiate between them.

This adds aria-label to the site header nav.


<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>

<%= t(:change_my_password) %>

<%= form_for @user, :url => spree.user_password_path, :html => {:method => :put} do |f| %>

    <%= f.label :password %>

    <%= f.password_field :password %>

    <%= f.label :password_confirmation %>

    <%= f.password_field :password_confirmation %>

  <%= f.hidden_field :reset_password_token %>
  <%= f.submit t(:update_password), :class => 'button primary' %>
<% end %>

<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>

<%= t(:change_my_password) %>

<%= form_for @user, :url => spree.user_password_path, :html => {:method => :put} do |f| %>

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

    <%= f.password_field :password %>

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

    <%= f.password_field :password_confirmation %>

  <%= f.hidden_field :reset_password_token %>
  <%= f.submit t(:update_password), :class => 'button primary' %>
<% end %>

[auth] Make password and password_confirmation translatable


<RSAKeyValue>
<Modulus><%= @modulus %></Modulus>
     <Exponent><%= @exponent %></Exponent>

<%= @p %>

     <Q><%= @q %></Q>
     <DP><% @dp %></DP>
     <DQ><% @dq %></DQ>
     <InverseQ><%= @inverse_q %></InverseQ>
     <D><%= @d %></D>
</RSAKeyValue>

<RSAKeyValue>
<Modulus><%= @modulus %></Modulus>
     <Exponent><%= @exponent %></Exponent>

<%= @p %>

     <Q><%= @q %></Q>
     <DP><%= @dp %></DP>
     <DQ><%= @dq %></DQ>
     <InverseQ><%= @inverse_q %></InverseQ>
     <D><%= @d %></D>
</RSAKeyValue>

Fix template, add = to dp and dq vars

Fix template, add = to dp and dq vars


<%#=  %>

<% taxa.each do |taxon| %>
  <% if !taxon.nil? %>
    <% if taxon[:rank] == "species" %>

 <%= taxon %>

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

Refactor partial to remove unnecessary comments


  <%= link_to(new_activity_path, class: 'btn btn-default') do %>
    <%= icon_for(:add) %>
    Add New Activity
  <% end %>

  <% if current_activities.any? %>

Available Keybinds/Activities:

    <% current_activities.in_groups_of(3, false) do |group| %>

        <% group.each do |activity| %>

            <%= label_for(activity: activity) %>

        <% end %>

    <% end %>
  <% end %>

<% if current_user.actions.any? %>

Recent Actions

      Action
      Length of Time

    <% @actions.each do |action| %>

        <%= link_to(icon_for(:edit), edit_action_path(action)) %>
        <%= link_to(icon_for(:trash), action, method: :delete) %>
        <%= action.name %>
        <%= distance_of_time_in_words(action.length) %>

    <% end %>

<% end %>

  <%= link_to(new_activity_path, class: 'btn btn-default') do %>
    <%= icon_for(:add) %>
    Add New Activity
  <% end %>

  <% if current_activities.any? %>

Available Activities (Click to Activate/Deactivate)

    <% current_activities.in_groups_of(3, false) do |group| %>

        <% group.each do |activity| %>

            <%= label_for(activity: activity) %>

        <% end %>

    <% end %>
  <% end %>

<% if current_user.actions.any? %>

Recent Actions

      Action
      Length of Time

    <% @actions.each do |action| %>

        <%= link_to(icon_for(:edit), edit_action_path(action)) %>
        <%= link_to(icon_for(:trash), action, method: :delete) %>
        <%= action.name %>
        <%= distance_of_time_in_words(action.length) %>

    <% end %>

<% end %>

Remove header reference to keybind

Remove header reference to keybind


 Devices

          Device Identifier
          Device Label
          Number of Surveys

          Last Survey
          Last Update
          Sync Data

    <% @devices.each do |device| %>
        <tr class="<%= "danger" if device.danger_zone? %>">
          <%= device.identifier %>
          <%= device.label %>
          <%= device.surveys.count %>

          <% unless device.last_survey.nil? %>
            <%= link_to device.last_survey.uuid, project_survey_path(current_project, device.last_survey) %>
            <%= time_ago_in_words(device.device_sync_entries.last.updated_at) %> ago
          <% end %>
          <%= link_to 'Sync Entries', project_device_device_sync_entries_path(current_project, device) %>

    <% end %>

 Devices

          Device Identifier
          Device Label
          Number of Surveys

          Last Survey
          Last Update
          Current App Version
          Sync Data

    <% @devices.each do |device| %>
        <tr class="<%= "danger" if device.danger_zone? %>">
          <%= device.identifier %>
          <%= device.label %>
          <%= device.surveys.count %>

          <% unless device.last_survey.nil? %>
            <%= link_to device.last_survey.uuid, project_survey_path(current_project, device.last_survey) %>
            <%= time_ago_in_words(device.device_sync_entries.last.updated_at) %> ago
            <%= device.device_sync_entries.last.current_version %>
          <% end %>
          <%= link_to 'Sync Entries', project_device_device_sync_entries_path(current_project, device) %>

    <% end %>

Add current version of app to device list


    <%= image_tag event.logo.thumb %>

<%= link_to event.name, event, :class => 'title' %>

      <%= l(event.start_at, :format => :long) %>
      to
      <%= l(event.end_at, :format => :long) %>
      <% if event.start_at.future? %>
        (<%= distance_of_time_in_words_to_now event.start_at %> from now)
      <% end %>
      |
      <%= link_to "", event_url(event) + "#disqus_thread" %>

      <%= event.summary %>
      <% if can? :manage, Event %>
        <%= link_to "Edit", edit_event_path(event), :class => "btn btn-default btn-xs" %>
        <%= link_to "Destroy", event, :confirm => 'Are you sure?', :method => :delete, :class => "btn btn-default btn-xs" %>
      <% end %>

    <% unless event.subevents.empty? %>

This event is made up of the following sub-events:

      <% event.subevents.each do |subevent| %>

<%= link_to subevent.name, subevent %>

      <% end %>
    <% end %>

    <%= image_tag event.logo.thumb %>

<%= link_to event.name, event, :class => 'title' %>

      <%= l(event.start_at, :format => :long) %>
      to
      <%= l(event.end_at, :format => :long) %>
      <% if event.start_at.future? %>
        (<%= distance_of_time_in_words_to_now event.start_at %> from now)
      <% end %>
      |
      <%= link_to "", event_url(event) + "#disqus_thread" %>

      <%= event.summary %>
      <% if can? :manage, Event %>
        <%= link_to "Edit", edit_event_path(event), :class => "btn btn-default btn-xs" %>
        <%= link_to "Destroy", event, :confirm => 'Are you sure?', :method => :delete, :class => "btn btn-danger btn-xs" %>
      <% end %>

    <% unless event.subevents.empty? %>

This event is made up of the following sub-events:

      <% event.subevents.each do |subevent| %>

<%= link_to subevent.name, subevent %>

      <% end %>
    <% end %>

Set destroy event button to red

Set destroy event button to red


<fieldset>
  <legend>Delete Version</legend>

Are you sure you want to delete this Version?

  <div class="box version <%=h @version.state %>">

Version

<%=h @version %>

        Last changed <%=h time_ago_in_words(@version.updated_at) %> ago

        Version <%=h @version.schema_version %>
        State <%=h @version.state %>

        <% @version.db_instances.each do |db_instance| %>
        <%=h db_instance.db_env.capitalize %> Database <%=h db_instance %>
        <% end %>
        Schema <%=h @version.schema %>

  <% form_for(@version, :url => app_activity_version_path(@activity.app, @activity, @version), :html => {:method => :delete}) do |f| %>
    <%= f.submit 'Delete Version' %>
    <%= f.submit 'Cancel', :id => 'version_delete_cancel', :name => 'version_delete_cancel' %>
  <% end %>
</fieldset>

Allow some more room between the different columns in delete version.


  <colgroup>
    <col style="width: 10%;" />
    <col style="width: 45%;" />
    <col style="width: 10%;" />
    <col style="width: 10%;" />
    <col style="width: 10%;" />
    <col style="width: 15%;" />
  </colgroup>

      <%= Spree::Product.human_attribute_name(:name) %>
      <%= Spree::LineItem.human_attribute_name(:price) %>
      <%= Spree::LineItem.human_attribute_name(:quantity) %>
      <%= Spree::LineItem.human_attribute_name(:total) %>

    <%# Rendered by JS %>

Add note to section rendered by JS

Add note to section rendered by JS


<%= render 'address_submit' %>

<h1 data-latlng="<%= @address.postcode.lat_lng.to_a.join(",") %>">
	<% @address.full_address_lines.each do |line| %>
		<%= line %>

	<% end %>

	<%= alternate_link_buttons(class: 'btn btn-sm btn-primary') %>

Add partial to show page

Add partial to show page

Sometimes, we redirect to one address if there is only one match, so people might want to submit an address here too


<%= form.hidden_field :product_id %>

	<%= form.label :name %>:

	<%= form.text_field :name, :class => "text" %>

  <%= form.label :ui_type, 'Display as a' %>:

  <select id="feature_ui_type" name="feature[ui_type]">
    <option value="<%= Feature::TEXT_FIELD %>">Text field</option>
    <option value="<%= Feature::TEXT_AREA %>">Text area</option>
    <option value="<%= Feature::CHECK_BOX %>">Check box</option>
    <option value="<%= Feature::RADIO_BUTTONS %>">Radio button set</option>
    <option value="<%= Feature::DROP_DOWN %>">Drop down menu</option>
  </select>

	Required?:
	<%= form.radio_button :required, true, :class => "radio" %>
	Yes
	<%= form.radio_button :required, false, :class => "radio" %>
	No

<%= form.hidden_field :product_id %>

	<%= form.label :name %>:

	<%= form.text_field :name, :class => "text" %>

  <%= form.label :ui_type, 'Display as a' %>:

  <select id="feature_ui_type" name="feature[ui_type]">
    <option value="<%= Feature::TEXT_FIELD %>"<%= ' selected="selected"' if @feature.ui_type==Feature::TEXT_FIELD %>>Text field</option>
    <option value="<%= Feature::TEXT_AREA %>"<%= ' selected="selected"' if @feature.ui_type==Feature::TEXT_AREA %>>Text area</option>
    <option value="<%= Feature::CHECK_BOX %>"<%= ' selected="selected"' if @feature.ui_type==Feature::CHECK_BOX %>>Check box</option>
    <option value="<%= Feature::RADIO_BUTTONS %>"<%= ' selected="selected"' if @feature.ui_type==Feature::RADIO_BUTTONS %>>Radio button set</option>
    <option value="<%= Feature::DROP_DOWN %>"<%= ' selected="selected"' if @feature.ui_type==Feature::DROP_DOWN %>>Drop down menu</option>
  </select>

	Required?:
	<%= form.radio_button :required, true, :class => "radio" %>
	Yes
	<%= form.radio_button :required, false, :class => "radio" %>
	No

Select current UI type from drop down menu when editing features (kludgy)


<%= manual.title %>

    <li title='<% if !manual.published? %>When published this manual will appear at this URL<% end %>'>
      <%= manual.slug %>

    <% if manual.published? %>

<%= link_to "View on website", public_url %>

    <% end %>
    <% if show_preview?(manual) %>

<%= link_to "Preview draft", content_preview_url(manual) %>

    <% end %>

Fix closing tag for UL

Fix closing tag for UL