<%= notice %>

Listing Users

        Admin
        Moderator
        Banned
        Name
        Email
        Title

      <% @users.order(:admin => :desc, :moderator => :desc, :name => :desc).each do |user| %>

          <td <% if user.admin %> class='bg' <% end %>><%= user.admin %>
          <td <% if user.moderator %> class='bg' <% end %>><%= user.moderator %>
          <td <% if user.banned %> class='bg' <% end %>><%= user.banned %>
          <%= link_to user.name, user %>
          <%= user.email %>
          <%= user.title %>

      <%= link_to 'Impersonate', new_session_path(:persistent_id => user.persistent_id) %>

          <%= link_to (t :edit), edit_user_path(user) %>

      <% end %>

<%= notice %>

Listing Users

        Admin
        Moderator
        Banned
        Name
        Email
        Title

      <% @users.order(:admin => :desc, :moderator => :desc, :name => :desc).each do |user| %>

          <td <% if user.admin %> class='bg' <% end %>><%= user.admin %>
          <td <% if user.moderator %> class='bg' <% end %>><%= user.moderator %>
          <td <% if user.banned %> class='bg' <% end %>><%= user.banned %>
          <%= link_to user.name, user %>
          <%= user.email %>
          <%= user.title %>

          <%= link_to (t :edit), edit_user_path(user) %>

      <% end %>

Remove impersonation link from users

Remove impersonation link from users


#!/bin/sh

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

exec > /var/log/planet-update.log 2>&1

echo "Updating planet file..."

/sbin/runuser -u planet -- /usr/local/bin/planet-update-file

echo "Running jobs..."
<% node[:planet][:current][:jobs].each_value do |job| -%>

echo "Running '<%= job[:command] %>' as user '<%= job[:user] %>'..."

/sbin/runuser -u "<%= job[:user] %>" -- "<%= job[:command] %>"
<% end -%>

echo "Done."

#!/bin/sh

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

exec >> /var/log/planet-update.log 2>&1

echo "Updating planet file..."

/sbin/runuser -u planet -- /usr/local/bin/planet-update-file

echo "Running jobs..."
<% node[:planet][:current][:jobs].each_value do |job| -%>

echo "Running '<%= job[:command] %>' as user '<%= job[:user] %>'..."

/sbin/runuser -u "<%= job[:user] %>" -- "<%= job[:command] %>"
<% end -%>

echo "Done."

Append to planet update log instead of overwriting

The planet update log of a run was writing over the previous log instead of appending. The log file is already rotated correctly, so it is not growing without bounds with this change.


Question: max(last_5m):avg:pws.workers.critical.failed.count{host:<%= environment %>uction} > 5

1. Check the PWS console dashboard - http://bit.ly/pws-console-dashboard
1. If the problem is solvable by the playbook - http://bit.ly/pws-workers-failed , that's awesome
1. Otherwise, escalate to Frontend First Responder - https://cfoundry.pagerduty.com/schedules#P69S0Q6

@pagerduty-pws-console  - pws.workers.critical.failed.count over 5
Created by: Tushar & Nolan

PWS Production - pws.workers.critical.failed.count over 5 - @pagerduty

Question: max(last_5m):avg:pws.workers.critical.failed.count{host:<%= environment %>uction} > 5

Increase NoData timeout for critical queue

[#145140491]


<% @hosts.keys.sort.each do |host_name| %>
<%= "#{@hosts[host_name]} #{host_name}" %>
<% end %>

<% @hosts.keys.sort.each do |host_name|
     @hosts[host_name].split(' ').each do |ip| -%>
<%=    "#{ip} #{host_name}" %>
<%   end
   end -%>

Allow many-to-many in hosts dnsmasq.dns.hosts attributes

Allow setting multiple IPs in the hostname => IP hash,
separated by spaces.
dnsmasq will answer queries with multiple A records.

Setting multiple hostnames already works as-is.

ex.: :hosts => { "example.com www.example.com" => "1.2.3.4 1.2.3.5" }


<!DOCTYPE html>

  <link rel="stylesheet" href="/css/normalize.css">

  <link rel="stylesheet" href="/css/application.css">

  <title>Weeker</title>

<% if session[:user_id] %>

Welcome: <%= current_user.email %> |

<form method="post" action="/sessions/<%= current_user.id %>" class="logout">
  <input type="hidden" name="_method" value="DELETE">
  <input type="submit" value="logout" class="delete_button"></form>

  <% else %>

Register |

Login

  <% end %>

Weeker

    <%= yield %>

Fix indenting on user links

Fix indenting on user links


<% content_for :top do %>
  <%= render :partial => "partials/big_banner"%>
<% end %>

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

<%= p.title %>

<%= truncate(p.statement, :length => 100) %>

<%= link_to "View details »".html_safe, petition_path(p), :class => "btn btn-default"%>

  <% end %>

<%if !@page.nil?%>

<%= will_paginate @petitions, renderer: BootstrapPagination::Rails, :previous_label => "«", :next_label => "»"%>

<% end %>

<% content_for :top do %>
  <%= render :partial => "partials/big_banner"%>
<% end %>

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

<%= p.title %>

<%= truncate(p.statement, :length => 100) %>

<%= link_to "View details »".html_safe, petition_path(p), :class => "btn btn-default"%>

  <% end %>

<%= will_paginate @petitions, renderer: BootstrapPagination::Rails, :previous_label => "«", :next_label => "»"%>

Fix a view issue with default pagination


<% if Rails.env == 'production' %>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-52396809-1', 'auto');
  ga('send', 'pageview');
<% end %>

Add Google Analytics script for production


<%= image_tag('banners/learn.png', alt: "The Concord Consortium", width: "124", height: "50", style: "margin:0;padding:0;") %>

<%= image_tag('cc-logo.png', alt: "The Concord Consortium", width: "180", height: "55", style: "margin:0;padding:0;") %>

Update logo used in email header.

Update logo used in email header.


StaticPages#home

Find me in app/views/static_pages/home.html.erb

ShadowKeeper

  This is the homepage for ShadowKeeper
  the highly usefull Game Master tool for Shadowrun GMs.

Add a very-basic home page

Add a very-basic home page


<% provide(:title, "Anmeldung zum #{current_contest_title}") %>

Für den Landeswettbewerb braucht übrigens keine erneute Anmeldung ausgefüllt werden. Alle weitergeleiteten Teilnehmer erhalten rechtzeitig eine E-Mail mit weiteren Informationen.

Hier kannst du dein Vorspiel für "Jugend musiziert" <%= JUMU_YEAR %> anmelden. Bei Fragen oder Problemen erreichst du uns am einfachsten über das <%= link_to "Kontaktformular", contact_path %>.

<%= render 'noscript' %>

<%= simple_form_for(@performance, html: { class: "form-horizontal" }) do |form| %>
  <%= render 'performance_fields', { f: form, show_hints: true } %>

    <%= form.button :submit, "Anmeldung absenden", class: "btn-primary" %>

<% end %>

<% provide(:title, "Anmeldung zum #{current_contest_title}") %>

Hier kannst du dein Vorspiel für "Jugend musiziert" <%= JUMU_YEAR %> anmelden. Es gilt folgender Anmeldeschluss:

Dublin, Oslo, Stockholm: 1. Dezember

Alle anderen Schulen: 15. Dezember

  Bevor es losgeht, noch ein paar Hinweise:

Trage bitte nur jugendliche Begleitpartner ein. Erwachsene Begleiter müssen nicht angemeldet werden!

Überprüfe, dass alle Geburtsdaten und E-Mailadressen stimmen, da wir diese zur Berechnung der Altersgruppe und der Zusendung des Änderungscodes brauchen.

Bitte gib, wenn möglich, eine mobile Telefonnummer an. So erreichen wir dich auch während des Wettbewerbs.

Bei Fragen oder Problemen erreichst du uns am einfachsten über das <%= link_to "Kontaktformular", contact_path %>.

<%= render 'noscript' %>

<%= simple_form_for(@performance, html: { class: "form-horizontal" }) do |form| %>
  <%= render 'performance_fields', { f: form, show_hints: true } %>

    <%= form.button :submit, "Anmeldung absenden", class: "btn-primary" %>

<% end %>

Add instructions and deadlines to 2014 signup form


---
- scm:
    name: govuk-provisioning_start_vapps
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
                - master
            skip-tag: true
            wipe-workspace: false

- job:
    name: start_vapps
    display-name: Start vApps
    description: |
        Starts all vApps in vCloud Director.
        Requires vApps to be owned by the vCloud user that this script runs under,
        otherwise the vApps are not visible to the script.
    project-type: freestyle
    properties:
        - inject:
            properties-content: |
              USERNAME=<%= @vcloud_properties['username'] %>
              VCLOUD_ORG=<%= @vcloud_properties['org'] %>
              VCLOUD_ENV=<%= @vcloud_properties['env'] %>
              VCLOUD_USERNAME=${USERNAME}@${VCLOUD_ORG}
              VCLOUD_HOST=<%= @vcloud_properties['host'] %>
    scm:
        - govuk-provisioning_start_vapps
    wrappers:
        - inject-passwords:
            global: false
            mask-password-params: true
            job-passwords:
                - name: VCLOUD_PASSWORD
                  password: '<%= @vcloud_properties['password'] -%>'
    builders:
        - shell: |
            cd tools/start_stop_vapps/
            ./run.sh ./start_stop_all_vapps.rb start
    triggers:
        - timed: '30 3 * * 1-5'

---
- scm:
    name: govuk-provisioning_start_vapps
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
                - master
            skip-tag: true
            wipe-workspace: false

- job:
    name: start_vapps
    display-name: Start vApps
    description: |
        Starts all vApps in vCloud Director.
        Requires vApps to be owned by the vCloud user that this script runs under,
        otherwise the vApps are not visible to the script.
        This job is always safe to run and is the first thing to do if the
        environment isn't working.
    project-type: freestyle
    properties:
        - inject:
            properties-content: |
              USERNAME=<%= @vcloud_properties['username'] %>
              VCLOUD_ORG=<%= @vcloud_properties['org'] %>
              VCLOUD_ENV=<%= @vcloud_properties['env'] %>
              VCLOUD_USERNAME=${USERNAME}@${VCLOUD_ORG}
              VCLOUD_HOST=<%= @vcloud_properties['host'] %>
    scm:
        - govuk-provisioning_start_vapps
    wrappers:
        - inject-passwords:
            global: false
            mask-password-params: true
            job-passwords:
                - name: VCLOUD_PASSWORD
                  password: '<%= @vcloud_properties['password'] -%>'
    builders:
        - shell: |
            cd tools/start_stop_vapps/
            ./run.sh ./start_stop_all_vapps.rb start
    triggers:
        - timed: '30 3 * * 1-5'

Add note that the start vApps job is safe to run


<%= application_name%>

<%= form_tag search_path, :class => "form-inline clearfix", :id => "search_patron_statuses", :method => :get do %>

    <%= strip_tags(get_formatted_detail('searchbox_header'))%>...
    <input class="search_q q autocomplete_query" autocomplete="off" id="q" name="q" placeholder="<%= strip_tags(get_formatted_detail('searchbox_header'))%>..." type="text">
    <button type="submit" class="btn btn-primary search-btn" id="search">
    Search

    </button>

<% end %>

<%= application_name%>

<%= form_tag search_path, class: 'form-inline clearfix', id: 'search_patron_statuses', method: :get do %>

    <%= strip_tags(get_formatted_detail('searchbox_header'))%>...
    <input class="search_q q autocomplete_query form-control" autocomplete="off" id="q" name="q" placeholder="<%= strip_tags(get_formatted_detail('searchbox_header'))%>..." type="text">
    <input type="submit" class="btn btn-primary search-btn" id="search" value="Search" />

<% end %>

Update search box for Bootstrap 3

Update search box for Bootstrap 3


<% if node.platform? 'windows' %>
define ROOT <%= node['nxlog-ce']['root_dir'] %>

ModuleDir %ROOT%/modules
CacheDir  %ROOT%/data
Pidfile   %ROOT%/data/nxlog.pid
SpoolDir  %ROOT%/data
<% else %>
User      <%= node['nxlog-ce']['user'] %>
Group     <%= node['nxlog-ce']['group'] %>
<% end %>

LogLevel  <%= node['nxlog-ce']['log_level'] %>
LogFile   <%= node['nxlog-ce']['log_file'] %>

<Extension syslog_module>
  Module xm_syslog
</Extension>

Include   <%= node['nxlog-ce']['conf_dir'] %>/nxlog.conf.d/*.conf

<% if node['platform'] == 'windows' %>
define ROOT <%= node['nxlog-ce']['root_dir'] %>

ModuleDir %ROOT%/modules
CacheDir  %ROOT%/data
Pidfile   %ROOT%/data/nxlog.pid
SpoolDir  %ROOT%/data
<% else %>
User      <%= node['nxlog-ce']['user'] %>
Group     <%= node['nxlog-ce']['group'] %>
<% end %>

LogLevel  <%= node['nxlog-ce']['log_level'] %>
LogFile   <%= node['nxlog-ce']['log_file'] %>

<Extension syslog_module>
  Module xm_syslog
</Extension>

Include   <%= node['nxlog-ce']['conf_dir'] %>/nxlog.conf.d/*.conf

Fix foodcritic error WRT incorrect use of 'platform?'


<% content_for :page_title, @edition.title %>
<% content_for :title, "Associated user needs" %>
<% content_for :context, @edition.title %>

    <%= form_tag admin_update_needs_path(content_id: @document.content_id), method: :patch do %>
      <%= render "components/autocomplete", {
          id: "need_ids",
          name: "need_ids[]",
          label: {
            text: "Select associated user needs",
            bold: true,
            required: true,
          },
          heading_size: "l",
          select: {
            options: [""] + taggable_needs_container,
            multiple: true,
            selected: @document.need_ids,
          },
      } %>

        <%= render "govuk_publishing_components/components/button", {
          text: "Save"
        } %>
    <% end %>

<% content_for :page_title, @edition.title %>
<% content_for :title, "Associated user needs" %>
<% content_for :context, @edition.title %>
<% content_for :back_link do %>
  <%= render "govuk_publishing_components/components/back_link", href: admin_edition_path(@edition) %>
<% end %>

    <%= form_tag admin_update_needs_path(content_id: @document.content_id), method: :patch do %>
      <%= render "components/autocomplete", {
          id: "need_ids",
          name: "need_ids[]",
          label: {
            text: "Select associated user needs",
            bold: true,
            required: true,
          },
          heading_size: "l",
          select: {
            options: [""] + taggable_needs_container,
            multiple: true,
            selected: @document.need_ids,
          },
      } %>

        <%= render "govuk_publishing_components/components/button", {
          text: "Save"
        } %>
    <% end %>

Revert "Remove back button from user needs pages"

This reverts commit b71e34fb866a92bbe00fef63bb798569f9c7296a.


notifications.external_requests.uaa.users_email.min

notifications.external_requests.uaa.users_email.max

notifications.external_requests.uaa.client_token.max

notifications.external_requests.uaa.client_token.min

notifications.external_requests.uaa.client_token.count

notifications.external_requests.uaa.client_token.percentile.95

created by spark@pivotal.io

UAA

Add uaa monitor (no varz data, but notifications.external_requests metrics)

[#89222204]

Signed-off-by: Jim Park <7187dadeaa9825054bf26bb1a84055243400af16@pivotal.io>


<%= notice %>

Categories

      Name

    <% @categories.each do |category| %>

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

    <% end %>

<%= link_to 'New Category', new_category_path %>

        Categories

            #
            Category
            Top Packages

            Pkgs Count

          <% @categories.each_with_index do |category, index| %>

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

              <%
                  limit_count = 3

                  package_query = category.packages.includes(:counter)
                  package_query = package_query.order("counters.stargazer desc")
                  package_query = package_query.first(limit_count)

                  padding_vars = [ {} ] * ( limit_count - package_query.count )

                  category_packages = package_query + padding_vars
              %>

              <% category_packages.each_with_index do |package, sub_index| %>

                <%
                    data_class = 'hidden-xs'
                    data_class += ' hidden-sm' if sub_index > 0
                    data_class += ' hidden-md' if sub_index > 1
                %>

                <td class='<%= data_class %>'>

                  <% package_name = package.try(:name) %>

                  <% if package_name.present? %>
                    <%= link_to truncate( package_name, length: 20), package_path(package) %>
                  <% else %>
                    -
                  <% end %>

              <% end %>

              <%= category.packages.count %>

          <% end %>

    <%= render 'layouts/fork_footer' %>

Refactor category index page to use a table


Repo Name

Repo Full Name

Description

Language:

Stars:

Forks:

Open Issues

  <form method="post" action="/star" data-remote="true">
    <button type="submit" value="Like" id="star" class="waves-effect blue darken-2 btn-large thin btn btn-2">This</button>
    <input type="hidden" name="authenticity_token" value="">
  </form>

Repo Name

Repo Full Name

Description

Language:

Stars:

Forks:

Open Issues

  <form method="post" action="/hide" data-remote="true">
    <button type="submit" value="Hide" id="hide" class="waves-effect blue darken-2 btn-large thin btn btn-2">Hide</button>
    <input type="hidden" name="authenticity_token" value="">
  </form>

  <form method="post" action="/star" data-remote="true">
    <button type="submit" value="Like" id="star" class="waves-effect blue darken-2 btn-large thin btn btn-2">Like</button>
    <input type="hidden" name="authenticity_token" value="">
  </form>

Add styling to like and hide buttons

Add styling to like and hide buttons


<%= render partial: "recipes/recipe_options" if user_signed_in? %>

  <% recipes.each do |recipe| %>

      <%= link_to recipe.name, recipe %>
      <%= image_tag(recipe.photo_path, size: "190x100", alt: "#{recipe.name} photo", title: 'recipe photo' ) %>

<%= render partial: "recipes/review_stars", locals: {stars: recipe.average_stars, url: recipe_recipe_reviews_path(recipe)} %>

<%= link_to pluralize(recipe.number_of_reviews, 'review'), recipe_recipe_reviews_path(recipe) %>

  <% end %>

<%= render partial: "recipes/recipe_options" if user_signed_in? %>

  <% recipes.each do |recipe| %>

      <%= link_to recipe.name, recipe %>
      <%= image_tag(recipe.photo_path, size: "190x100", alt: "#{recipe.name} photo", title: 'recipe photo' ) %>

<%= render partial: "recipes/review_stars", locals: {stars: recipe.average_stars, url: recipe_recipe_reviews_path(recipe)} %>

<%= link_to pluralize(recipe.number_of_reviews, 'review'), recipe_recipe_reviews_path(recipe) %>
          <%= render partial: "recipes/favorite", locals: {recipe: recipe} %>

  <% end %>

Put Favorite checkbox back on index page.


<%= notice %>

<%= @seniority.name %>

This you need to become a <%= @seniority.name %>.

  <% @seniority.requirements.each do |requirement| %>
    <% acquirement = current_hacker.acquirements.find_by(skill: requirement.skill) %>
    <li class="<%= assign_class requirement, acquirement %>">

<%= requirement.skill.name %>

Required level: <%= requirement.level %>

      <% if acquirement %>

Your level: <%= acquirement.level %>

      <% end %>

  <% end %>

<%= link_to 'Back', seniorities_path %>

<%= notice %>

<%= @seniority.name %>

This is what you need to become a <%= @seniority.name %>.

  <% @seniority.requirements.each do |requirement| %>
    <% acquirement = current_hacker.acquirements.find_by(skill: requirement.skill) %>
    <li class="<%= assign_class requirement, acquirement %>">

<%= requirement.skill.name %>

Required level: <%= requirement.level %>

      <% if acquirement %>

Your level: <%= acquirement.level %>

      <% end %>

  <% end %>

<%= link_to 'Back', seniorities_path %>

Change subtitle in Show Seniority view

Change subtitle in Show Seniority view


@import 'mixins';

#upgrades {
  .package {
    padding:1px 3px; @include border-radius(3px);
    &:hover { background-color:#aaa; }
    &.package_needing_reboot { color:#d11; }
    &.package_important { color:#00b; }
    &.package_normal { color:#555; font-size:90%; }
  }
  .validate {
    margin:3px 0; padding:1px 5px; text-shadow:0 1px 1px #777;
    color:#fff; background-color:#78cc01; @include gradient(#78cc01,#78cc01);
    &:hover { background-color:#70c600; @include gradient(#70c600, #70c600); }
  }
  .upgraded { color:#6a0; font-size:90%; font-style:italic; }
  tr.grey td { background-color:#f4f4f4; }
}

@import 'mixins';

#upgrades {
  .package {
    padding:1px 3px; @include border-radius(3px);
    &:hover { background-color:#aaa; }
    &.package_needing_reboot { color:#d11; }
    &.package_important { color:#00b; }
    &.package_normal { color:#555; font-size:90%; }
  }
  .validate {
    margin:3px 0; padding:1px 4px; text-shadow:0 1px 1px #777; font-size:90%;
    color:#fff; background-color:#78cc01; @include gradient(#78cc01,#78cc01);
    &:hover { background-color:#70c600; @include gradient(#70c600, #70c600); }
  }
  .upgraded { color:#6a0; font-size:90%; font-style:italic; }
  tr.grey td { background-color:#f4f4f4; }
}

Reduce buttons size in upgrades/index

Reduce buttons size in upgrades/index


<% @title = t('.title') %>

    <%= raw @qrcode_svg %>

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

      <%= t('.account', account: "#{issuer}:#{current_user.email}") %>

      <%= t('.key', key: @seed.chars.each_slice(4).map(&:join).join(' ')) %>

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

<%= form_tag multifactor_auth_path, method: :post do %>

    <%= label_tag :otp, 'OTP code', class: 'form__label' %>

<%= t '.otp_prompt' %>

    <%= text_field_tag :otp, '', class: 'form__input', autocomplete: :off %>

  <%= submit_tag t('.enable'), class: 'form__submit' %>
<% end %>

<% @title = t('.title') %>

    <%= raw @qrcode_svg %>

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

      <%= t('.account', account: "#{issuer}:#{current_user.email}") %>

      <%= t('.key', key: @seed.chars.each_slice(4).map(&:join).join(' ')) %>

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

<%= form_tag multifactor_auth_path, method: :post do %>

    <%= label_tag :otp, 'OTP code', class: 'form__label' %>

<%= t '.otp_prompt' %>

    <%= text_field_tag :otp, '', class: 'form__input', autocomplete: 'one-time-code' %>

  <%= submit_tag t('.enable'), class: 'form__submit' %>
<% end %>

Set autocomplete value for OTP text field

Based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete


<% preview = local_assigns.has_key? :url %>

<% if preview %>

<%= title %>

    <%= link_to t('global.button.all'), url, title: t('global.button.all'), class: 'button--all' %>

<% end %>

<div class="cards--search-results-areas <%= preview ? 'preview' : '' %>">
  <% cards.each do |card| %>
    <%= link_to protected_area_path(card.wdpa_id), title: "View more about the site: #{ card.name }", class: "card__link" do %>

        <%= protected_area_cover(card) %>

<%= card.name %>

    <% end %>
  <% end %>

<% preview = local_assigns.has_key? :url %>

<% if preview %>

<%= title %>

    <%= link_to t('global.button.all'), url, title: t('global.button.all'), class: 'button--all' %>

<% end %>

<div class="cards--search-results-areas <%= preview ? 'preview' : '' %>">
  <% cards.each do |card| %>
    <%= link_to protected_area_path(card.wdpa_id), title: "View more about the site: #{ card.name }", class: "card__link" do %>

        <div alt="title" class="card__image" style="background-image: url(<%= protected_area_cover(card, with_tag: false) %>)">

<%= card.name %>

    <% end %>
  <% end %>

Replace lazy loader for sites images in site page


<% if person.has_announcements? %>

    <%= render "govuk_publishing_components/components/heading", {
        text: "Announcements",
        id: "announcements",
        margin_bottom: 5,
    } %>

    <%= render "govuk_publishing_components/components/subscription-links", {
        email_signup_link: person.email_signup,
        feed_link: person.subscribe_to_feed,
        margin_bottom: 5,
    } %>

    <%= render "govuk_publishing_components/components/document_list", {
        items: person.announcement_items
    } %>

      <%= link_to "View all announcements", person.redirect_to_news_and_communications, class: "govuk-link" %>

<% end %>

<% if person.has_announcements? %>

    <%= render "govuk_publishing_components/components/heading", {
        text: "Announcements",
        id: "announcements",
        margin_bottom: 5,
    } %>

    <%= render "govuk_publishing_components/components/subscription-links", {
        email_signup_link: person.email_signup,
        feed_link: person.subscribe_to_feed,
        margin_bottom: 5,
    } %>

    <%= render "govuk_publishing_components/components/document_list", {
        items: person.announcement_items
    } %>

      <%= link_to "View all announcements", person.link_to_news_and_communications, class: "govuk-link" %>

<% end %>

Fix link to all announcements

Fix link to all announcements

The method is called `link_to_news_and_communications` rather than
`redirect_to_news_and_communications`.


<%
  options = if answer.option.present?
    # select_one
    [answer.option]
  else
    # select_multiple
    answer.choices.select(&:has_coordinates?).map(&:option)
  end
%>

<div id="map_<%= answer.id %>" class="answer-map">

<%= javascript_doc_ready do %>
  new ELMO.Views.AnswerMapView(<%=json({
    el: "#map_#{answer.id}",
    options: options,
    small_marker_url: image_url('markers/small.png')
  })%>);
<% end %>

Initialize AnswerMapView on document ready


<% if current_page?(:controller => 'search', :action => 'search_boxed') %>
  <div class="results-more">
  <% if @results['total'] > 0 %>
    <% if Flipflop.enabled?(:local_browse) && @results['local_view_more'] %>
      <% view_more_url = @results['local_view_more'] %>
    <% elsif Flipflop.enabled?(:primo_search) %>
      <% view_more_url = @results['primo_ui_view_more'] %>
    <% else %>
      <% view_more_url = @results['eds_ui_view_more'] %>
    <% end %>
    <%= link_to(
      "View more #{view_more_text} results",
      view_more_url,
      data: {count: number_with_delimiter(@results['total']), type: 'view all results'}, class: "button button-primary #{ 'hidden' if @results['total'] <= @per_box }") %>
  <% else %>
    No results found.
  <% end %>
  </div>
<% end %>

<% if current_page?(:controller => 'search', :action => 'search_boxed') %>
  <div class="results-more">
  <% if @results['total'] > 0 %>
    <% if Flipflop.enabled?(:local_browse) && @results['local_view_more'] %>
      <% view_more_url = @results['local_view_more'] %>
    <% elsif Flipflop.enabled?(:primo_search) && (params[:target] == ENV.fetch('PRIMO_BOOK_SCOPE') || params[:target] == ENV.fetch('PRIMO_ARTICLE_SCOPE')) %>
      <% view_more_url = @results['primo_ui_view_more'] %>
    <% else %>
      <% view_more_url = @results['eds_ui_view_more'] %>
    <% end %>
    <%= link_to(
      "View more #{view_more_text} results",
      view_more_url,
      data: {count: number_with_delimiter(@results['total']), type: 'view all results'}, class: "button button-primary #{ 'hidden' if @results['total'] <= @per_box }") %>
  <% else %>
    No results found.
  <% end %>
  </div>
<% end %>

Fix 'view more results' URLs when Primo searches are enabled

Why these changes are being introduced:

The 'view more' links for website/Google and ArchivesSpace searches break
when the Primo feature flag is toggled due to a flawed conditional in
the view_all_links partial.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/IMP-2240

How this addresses that need:

This adjusts the aforementioned conditional to check if the Primo feature
flag is enabled AND if the target param is equal to one of the two Primo
targets.

Side effects of this change:

None.


[hekad]
maxprocs = <%= @heka_maxprocs %>
plugin_chansize = 30
pool_size = 130

[hekad]
maxprocs = <%= @heka_maxprocs %>
plugin_chansize = 30
poolsize = 130

Fix Heka poolsize config name

Fix Heka poolsize config name

This config was introduced in 3e39710369273449d3c92b92aa23f7b77a10bb18
but I think the correct name for the setting is `poolsize`.


---
layout: api_layout
title: Collections
parent: /apps.html
source_url: https://github.com/alphagov/collections/blob/master/docs/api.md
---

<%= ExternalDoc.fetch(repository: 'alphagov/collections', path: 'docs/api.md') %>

Add link to APIs in collections

Add link to APIs in collections

This has recently been added.


<%# add navigation links to this file %>

<%= link_to 'EDURange', root_path %>

<%= link_to 'Scenarios', scenarios_path %>

<%= link_to 'Clouds', clouds_path %>

<%= link_to 'Subnets', subnets_path %>

<%= link_to 'Instances', instances_path %>

<%= link_to 'Groups', groups_path %>

<%= link_to 'Players', players_path %>

<%= link_to 'Roles', roles_path %>

<%= link_to 'Cleanup Scenarios', management_status_path %>

<% if current_user %>

<%= link_to 'Sign Out', destroy_user_session_path, method: :delete %>

<% end %>

Add signout link if signed in

Add signout link if signed in


<% if transaction.transaction_type == 'request' %>
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"80", width:"80", align:"left") %>
<%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %> has made a request <%= time_ago_in_words(transaction.created_at) %> ago.
<% elsif transaction.transaction_type == 'response' %>
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"100", width:"100", align:"left") %>
<%= link_to transaction.request.responder.first_name, user_path(transaction.request.responder) %> has responded to <%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %>'s request <%= time_ago_in_words(transaction.created_at) %> ago!
<% elsif transaction.transaction_type == 'fulfillment' %>
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"100", width:"100", align:"left") %>
<%= link_to transaction.request.responder.first_name, user_path(transaction.request.responder) %> has fulfilled <%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %>'s request <%= time_ago_in_words(transaction.created_at) %> ago!
<% else %>
Poop
<% end %>

<% if transaction.transaction_type == 'request' %>
<% request_text = ['cried out for help', 'sent an SOS', 'made a request', 'shouted for aid', 'sent out a smoke signal', 'pinged neighbors', 'lit the beacons']
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"80", width:"80", align:"left") %>
<%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %> <%= request_text.sample %> <%= time_ago_in_words(transaction.created_at) %> ago.
<% elsif transaction.transaction_type == 'response' %>
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"100", width:"100", align:"left") %>
<%= link_to transaction.request.responder.first_name, user_path(transaction.request.responder) %> responded to <%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %>'s request <%= time_ago_in_words(transaction.created_at) %> ago!
<% elsif transaction.transaction_type == 'fulfillment' %>
<%= image_tag(transaction.request.requester.picture, class:"profpic", height:"100", width:"100", align:"left") %>
<%= link_to transaction.request.responder.first_name, user_path(transaction.request.responder) %> fulfilled <%= link_to transaction.request.requester.first_name, user_path(transaction.request.requester) %>'s request <%= time_ago_in_words(transaction.created_at) %> ago!
<% else %>
<% end %>

Add fun transaction messages for kicks

Add fun transaction messages for kicks


<tr data-link="<%= course_slug_path(course.slug) %>" class="<%= user ? date_highlight_class(course) : '' %>">
  <td class="<%= user ? 'u' : '' %>title title">
    <%= course.title %>

    <%= course.recent_edit_count %>

      <%= number_to_human course.word_count %>

    (<%= t("metrics.per_user", number: number_to_human(course.average_word_count)) %>)

    <%= number_to_human course.view_sum %>

      <%= course.user_count %>

    <% unless Features.disable_training? %>
      <%= t("users.training_complete_count", count: course.trained_count) %>
    <% end %>

<tr data-link="<%= course_slug_path(course.slug) %>" class="<%= user ? date_highlight_class(course) : '' %>" role="link">
  <td class="<%= user ? 'u' : '' %>title title">
    <%= course.title %>

    <%= course.recent_edit_count %>

      <%= number_to_human course.word_count %>

    (<%= t("metrics.per_user", number: number_to_human(course.average_word_count)) %>)

    <%= number_to_human course.view_sum %>

      <%= course.user_count %>

    <% unless Features.disable_training? %>
      <%= t("users.training_complete_count", count: course.trained_count) %>
    <% end %>

Add ARIA link role to course rows

Add ARIA link role to course rows

This should restore accessibility to the cohort views, which are no longer clickable by screen reader after the recent style udpates.


# MySQL client configuration.
# This file is managed by Puppet.
#
[client]
user = "root"
password = "<%= @root_password %>"

[mysql]
pager = "less -inSFX"
prompt = "(\R:\m)\_\u@\h:[\d]>\_"
<% if @default_db_name -%>
database = "<%= @default_db_name %>"
<% end -%>
comments = true
show-warnings = true
default-character-set = utf8

# MySQL client configuration.
# This file is managed by Puppet.
#
[client]
user = "root"
password = "<%= @root_password %>"

[mysql]
pager = "less -inSFX"
prompt = "(\R:\m)\_\u@\h:[\d]>\_"
<% if @default_db_name -%>
database = "<%= @default_db_name %>"
<% end -%>
local-infile=1
comments = true
show-warnings = true
default-character-set = utf8

[mysqld]
local-infile=1

Enable LOAD LOCAL INFILE in MySQL

Enable LOAD LOCAL INFILE in MySQL

Without 'local-infile=1' you would get error 'The used command is not allowed
with this MySQL version'

Change-Id: Idf945e28ad8ca97e3f4626dec8137d58bf1456cb


Redis Log

<textarea id="logger" style="width: 100%;" rows="20" cols="50" readonly="true"></textarea>

Use calculated relative URL based on currents document path

Sometimes people don't want to mount the Sidekiq WebGUI directly under /sidekiq, so we should calculate the stream path based on the current document's path.


<%= link_to 'Back', spots_path %>

<%= @spot.name %>

<%= link_to 'Edit', edit_spot_path(@spot) %>

<%= @spot.address %>

<%= @spot.phone %>

<% if @spot.website %>
<%= @spot.website %>

<% end %>
<%#= show_price(@spot.price) %>

<%= show_photo(@spot.photo) if @spot.photo %>

<%= button_to "Leave Comment", { action: "new"}, form_class: "comment" %>
<% @spot.comments.each do |comment| %>
	<%= comment.body %>
<% end %>

<%= link_to 'Back', spots_path %>

<%= @spot.name %>

<%= link_to 'Edit', edit_spot_path(@spot) %>

<%= @spot.address %>

<%= @spot.phone %>

<% if @spot.website %>
<%= @spot.website %>

<% end %>
<%#= show_price(@spot.price) %>

<%= show_photo(@spot.photo) if @spot.photo %>

<%= button_to "Leave Comment", new_spot_comment_path(@spot), method: :get %>
<% @spot.comments.each do |comment| %>
	<%= comment.body %>

<% end %>

Fix logic for leaving a comment on spot

Fix logic for leaving a comment on spot


Blackjack on Rails

Sign in with...

  <%= button_to "Google+", "/auth/google_oauth2/", id: "btnGoogle" %>
  <%= button_to "Facebook", "/auth/facebook/", id: "btnFacebook" %>
  <%= button_to "Play As a Guest!", '/guest_auth', id: 'btnGuest', method: "post" %>

      Created by: <%= link_to "Dusty Chickens", "http://dustychickens.com" %>

Blackjack on Rails

Sign in with...

  <%= button_to "Google+", "/auth/google_oauth2/", id: "btnGoogle" %>
  <%= button_to "Facebook", "/auth/facebook/", id: "btnFacebook" %>
  <%= button_to "Play As a Guest!", '/guest_auth', id: 'btnGuest', method: "post" %>

      Created by: <%= link_to "Mark Romphf", "http://markromphfblog.com" %>

Change the link on the login page.

Change the link on the login page.


Welcome to my personal web page!

      <%= image_tag("wedding-pic-250x250.jpg", alt: "Dillon Downey\'s", class: "image-responsive img-circle") %>

Dev BootCamp Graduate Seeking Web Developer Opportunities

  <%= render 'partials/social_media_nav' %>

      <%= image_tag("Dillon-900x600.jpg", alt: "Dillon Downey\'s portfolio picture", class: "image-responsive img-circle") %>

Dev BootCamp Graduate Seeking Web Developer Opportunities

  <%= render 'partials/social_media_nav' %>

Add new picture of myself

Add new picture of myself


#!/usr/bin/env bash
<%= @init_command %>cd <%= @working_dir %> && <%= @exec_prefix %> <%= @bin_path %> -C <%= @config_path %>

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

APPNAME="<%= @name %>"

echo -n "Starting $APPNAME.."
<%= @init_command %>cd <%= @working_dir %> && <%= @exec_prefix %> <%= @bin_path %> -C <%= @config_path %>

Move starting message to the start script instead of init.d


Rcov Code Coverage Results

C0 code coverage information.

Total Coverage: <%= @rcov.delete(:global_percent_run) %>%

    File Path
    Percent run

  <% count = 0 %>
  <% @rcov.sort_by{|k,v| v[:percent_run]}.each do |e| %>

      <a href="#<%= e[0].gsub(/[^a-z]+/, '_') %>"><%= e[0] %>
      <%= e[1][:percent_run] %>

    <% count += 1 %>
  <% end %>

<% @rcov.each_pair do |fname, file| %>
  <h2 id="<%= fname.gsub(/[^a-z]+/, '_') %>"> <%= fname %>

    <% file[:lines].each do |line| %>

        <% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
        <td class="<%= css_class %>">
<%= line[:content] %>

    <% end %>

<% end %>

Generated on <%= Time.now.localtime %>

Rcov Code Coverage Results

C0 code coverage information.

Total Coverage: <%= @rcov.delete(:global_percent_run) %>%

    File Path
    Percent run

  <% count = 0 %>
  <% @rcov.sort_by{ |k,v| v[:percent_run] }.each do |fname, file| %>

      <a href="#<%= fname.gsub(/[^a-z]+/, '_') %>"><%= fname %>
      <%= file[:percent_run] %>

    <% count += 1 %>
  <% end %>

<% @rcov.sort_by{ |k,v| v[:percent_run] }.each do |fname, file| %>
  <h2 id="<%= fname.gsub(/[^a-z]+/, '_') %>"> <%= fname %>

    <% file[:lines].each do |line| %>

        <% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
        <td class="<%= css_class %>">
<%= line[:content] %>

    <% end %>

<% end %>

Generated on <%= Time.now.localtime %>

Clean up and order rcov details as well

Clean up and order rcov details as well


  <% if @people.any? %>
    <% @people.each do |person| %>
      <%= render person %>
    <% end %>
    <%= link_to t("gobierto_people.welcome.index.people_summary.view_all"), gobierto_people_people_path, class: "see_more", role: "button" %>
  <% else %>

<%= t("gobierto_people.welcome.index.people_summary.no_people")%>.

  <% end %>

<% people ||= @people %>

  <% if people.any? %>
    <% people.each do |person| %>
      <%= render person %>
    <% end %>
    <%= link_to t("gobierto_people.welcome.index.people_summary.view_all"), gobierto_people_people_path, class: "see_more", role: "button" %>
  <% else %>

<%= t("gobierto_people.welcome.index.people_summary.no_people")%>.

  <% end %>

Use local_assign if present in people partial


        <%= form_tag create_path, method: :post do %>

              <%= label_tag :team_name, 'Team Name' %>
              <%= text_field_tag :team_name, '', class: 'form-control', placeholder: 'GOV.UK Signify' %>

              <%= label_tag :colour, 'Background colour (optional)' %>
              How to check your colour choice is readable
              <%= text_field_tag :colour, '', class: 'form-control', placeholder: "purple" %>

                <%= submit_tag 'Signify!', class: 'btn btn-primary btn-lg' %>

        <% end %>

        <%= form_tag create_path, method: :post do %>

              <%= label_tag :team_name, 'Team Name' %>
              <%= text_field_tag :team_name, '', class: 'form-control', placeholder: 'GOV.UK Signify' %>

              <%= label_tag :colour, 'Background colour (optional)' %>
              <%= text_field_tag :colour, '', class: 'form-control', placeholder: "purple" %>

                How to check your colour choice is readable

                <%= submit_tag 'Signify!', class: 'btn btn-primary btn-lg' %>

        <% end %>

Move help text below form

Move help text below form


    <%= image_tag gravatar_for(user), class: "user-image imagecard #{user.role}" %>

    <%= content_tag(:h1, user.full_name, title: user.full_name) %>
    <%= content_tag(:h3, user.role.titlecase) %>

    <%= content_tag(:p, user.bio) %>

    <%= social_icon_links(user) %>

Add new partial with refactored usercard from index


Recent Articles

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

          <%= link_to article.title, article %>

      <% end %>

Tags

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

          <%= link_to "#{tag} (#{articles.size})", tag_path(tag),
              class: "badge no-hvr #{tag}" %>

      <% end %>

Recent Posts

      <% blog.articles.reject { |r| r.respond_to?(:slug) && r.slug.include?('jots') }[0...5].each do |post| %>

          <%= link_to post.title, post %>

      <% end %>

Tags

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

          <%= link_to "#{tag} (#{articles.size})", tag_path(tag),
              class: "badge no-hvr #{tag}" %>

      <% end %>

Update the sidebar to filter out jots

Update the sidebar to filter out jots


<!DOCTYPE html>

	<link rel='stylesheet' href='/stylesheets/normalize.css' type='text/css'>

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">

	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

	<link rel='stylesheet' href='/stylesheets/application.css' type='text/css'>

	<title><%= @title || "Miramir Yacht Club" %></title>

<%= @title || "Miramir Yacht Club" %>

		<% if current_user %>

					<img src="<%= current_user.avatar %>" class="profile-image img-circle"> <%= current_user.username %>

 All Events

<a href="/users/<%= current_user.id %>"> User Dashboard

 Edit Account

 Sign-out

				Logout

				<% else %>

Login

				<% end %>

				<%= yield %>

<!DOCTYPE html>
<html lang="en">
<%= erb :_head %>

<body>
	<%= erb :_header %>
	<div class="container">

		<%= yield %>
	</div>
	<%= erb :_login_modal %>
</body>
</html>

Move Head and Header into partials

Move Head and Header into partials


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

# Listen on port 80
NameVirtualHost *:80
Listen <%= node[:apache][:listen_address] %>:80

# Listen on port 443 if mod_ssl is enabled
<IfModule mod_ssl.c>
    Listen <%= node[:apache][:listen_address] %>:443
</IfModule>

# Listen on port 443 if mod_gnutls is enabled
<IfModule mod_gnutls.c>
    Listen <%= node[:apache][:listen_address] %>:443
</IfModule>

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

# Listen on port 80
NameVirtualHost *:80
Listen <%= node[:apache][:listen_address] %>:80

# Listen on port 443 if mod_ssl is enabled
<IfModule mod_ssl.c>
    NameVirtualHost *:443
    Listen <%= node[:apache][:listen_address] %>:443
</IfModule>

# Listen on port 443 if mod_gnutls is enabled
<IfModule mod_gnutls.c>
    NameVirtualHost *:443
    Listen <%= node[:apache][:listen_address] %>:443
</IfModule>

Enable named based virtual hosts for https


Listing voice_transcriptions

      Content

    <% @voice_transcriptions.each do |voice_transcription| %>

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

    <% end %>

<%= link_to 'New Voice transcription', new_voice_transcription_path %>

Listing voice_transcriptions

      Content

    <% @voice_transcriptions.each do |voice_transcription| %>

        <%= voice_transcription.content %>
        <%= #link_to 'Show', voice_transcription %>
        <%= #link_to 'Edit', edit_voice_transcription_path(voice_transcription) %>
        <%= #link_to 'Destroy', voice_transcription, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= #link_to 'New Voice transcription', new_voice_transcription_path %>

Remove CUD actions from view

Remove CUD actions from view


# Original pre-modified file is copyright Ryan Bates
# See LICENSE_ryanb for full license text

[user]
	name = Abe Voelker
	email = abe@abevoelker.com
[alias]
	co = checkout
[color]
	diff = auto
	status = auto
	branch = auto
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = mate_wait
	autocrlf = input
[apply]
	whitespace = nowarn
[format]
	pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[github]
	user = abevoelker
	token = <%= print("GitHub API Token: "); STDOUT.flush; STDIN.gets.chomp %>

# Original pre-modified file is copyright Ryan Bates
# See LICENSE_ryanb for full license text

[user]
	name = Abe Voelker
	email = abe@abevoelker.com
[alias]
  s = status
  a = add
	co = checkout
[color]
	diff = auto
	status = auto
	branch = auto
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = gvim -f
	autocrlf = input
[apply]
	whitespace = nowarn
[format]
	pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[github]
	user = abevoelker
	token = <%= print("GitHub API Token: "); STDOUT.flush; STDIN.gets.chomp %>

Change default git editor to gVim and add some aliases


window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";

window.CKEDITOR_ASSETS_MAPPING = {
<% if Rails.application.assets.present? %>
<% Rails.application.assets.each_logical_path(->(path, _){ (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
  "<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
<% end %>
}

window.CKEDITOR_GETURL = function( resource ) {
  // If this is not a full or absolute path.
  if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
    resource = this.basePath + resource;

  // Add the timestamp, except for directories.
  if ( resource.charAt( resource.length - 1 ) != '/' ) {
    var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
    if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
  }

  return resource;
}

window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";

window.CKEDITOR_ASSETS_MAPPING = {
<% (Rails.application.assets || environment).each_logical_path(->(path, _) { (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) do |asset| %>
  "<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
}

window.CKEDITOR_GETURL = function( resource ) {
  // If this is not a full or absolute path.
  if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
    resource = this.basePath + resource;

  // Add the timestamp, except for directories.
  if ( resource.charAt( resource.length - 1 ) != '/' ) {
    var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
    if(url) resource = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
  }

  return resource;
}

Work with newer version of sprockets

Work with newer version of sprockets


    #
    Name
    Category
    From
    Finish Time

  <% @event_display.effort_rows.each do |effort_row| %>
      <% if effort_row.bad? %>

      <% elsif effort_row.questionable? %>

      <% else %>

      <% end %>
      <%= effort_row.overall_place %>
      <%= link_to effort_row.full_name, effort_path(effort_row.id) %>
      <%= effort_row.bio_historic %>
      <%= effort_row.state_and_country %>
      <%= effort_row.finish_status.is_a?(String) ?
                                     effort_row.finish_status :
                                     time_format_hhmmss(effort_row.finish_status) %>

  <% end %>

    #
    Name
    Bib#
    Category
    From
    Finish Time

  <% @event_display.effort_rows.each do |effort_row| %>
      <% if effort_row.bad? %>

      <% elsif effort_row.questionable? %>

      <% else %>

      <% end %>
      <%= effort_row.overall_place %>
      <%= link_to effort_row.full_name, effort_path(effort_row.id) %>
      <%= effort_row.bib_number %>
      <%= effort_row.bio_historic %>
      <%= effort_row.state_and_country %>
      <%= effort_row.finish_status.is_a?(String) ?
                                     effort_row.finish_status :
                                     time_format_hhmmss(effort_row.finish_status) %>

  <% end %>

Add bib number to event show view.

Add bib number to event show view.


---
layout: "downloads"
page_title: "Download Consul Template"
sidebar_current: "downloads-consul-template"
description: |-
  From this page you can download Consul Template. This is distributed as a separate tarball.
---

Download Consul Template

        From this page you can download the Consul Template. This is distributed as a separate tarball.

      Download Consul Template

Fix small typo in link

Fix small typo in link


module.exports = {
  sensu: [
  <%- scope.lookupvar("uchiwa::apis").each do | name, api | %>
    {
      name: '<%= name %>',
      host: '<%= api['host'] %>',
      ssl: <%= api['ssl'] %>,
      port: <%= api['port'] %>,
      user: '<%= api['user'] %>',
      pass: '<%= api['pass'] %>',
      path: '<%= api['path'] %>',
      timeout: <%= api['timeout'] %>
    },
  <%- end %>
  ],
  uchiwa: {
    host: '<%= scope.lookupvar("uchiwa::host") %>',
    port: <%= scope.lookupvar('uchiwa::port') %>,
    user: '<%= scope.lookupvar("uchiwa::user") %>',
    pass: '<%= scope.lookupvar("uchiwa::pass") %>',
    stats: <%= scope.lookupvar('uchiwa::stats') %>,
    refresh: <%= scope.lookupvar('uchiwa::refresh') %>
  }
}

{
  "sensu": [
<% scope.lookupvar('uchiwa::apis').each_with_index do |(name,api),index| -%>
    {
      "name": "<%= name %>",
      "host": "<%= api['host'] %>",
      "port": <%= api['port'] || 4567 %>,
      "ssl": <%= api['ssl'] || false %>,
      "user": "<%= api['user'] %>",
      "pass": "<%= api['pass'] %>",
      "path": "<%= api['path'] %>",
      "timeout": <%= api['timeout'] || 5000 %>
    }<%= ',' if index < scope.lookupvar('uchiwa::apis').length - 1 %>
<% end -%>
  ],
  "uchiwa": {
    "host": "<%= scope.lookupvar('uchiwa::host') %>",
    "port": <%= scope.lookupvar('uchiwa::port') %>,
    "user": "<%= scope.lookupvar('uchiwa::user') %>",
    "pass": "<%= scope.lookupvar('uchiwa::pass') %>",
    "stats": <%= scope.lookupvar('uchiwa::stats') %>,
    "refresh": <%= scope.lookupvar('uchiwa::refresh') %>
  }
}

Fix template so it generates valid JSON

Fix template so it generates valid JSON


<% content_for :some_key do %>
---
layout: note
<% if defined? category %><% if category.is_a? Array %><%= "tags: #{category.join(", ")}\n"  %><% else %><%= "tags: #{category}\n" %><% end %><% end %>
<%= "permalink: #{slug}\n" if defined? slug %>
date: <%= published %>
---
<%= "![](#{photo})\n\n" if defined? photo %><%= content %>
<% end %>

<% content_for :some_key do %>
---
layout: note
<% if defined? category %><% if category.is_a? Array %><%= "tags: #{category.join(", ")}\n"  %><% else %><%= "tags: #{category}\n" %><% end %><% end %>
<%= "permalink: #{slug}\n" if defined? slug %>
date: <%= published %>
---
<% if defined? photo
  photo.each do | pic | %>
<%= "![](#{pic})\n\n"  %>
<% end %><% end %><%= content %>
<% end %>

Add support for multiple photos

Add support for multiple photos


<%
   prefix = "#{@authbind ? '/usr/bin/authbind --deep ' : ''}"
   asadmin = "#{node['glassfish']['base_dir']}/versions/current/bin/asadmin"
   domaindir = "--domaindir #{node['glassfish']['domains_dir']}"

   environment = ""
   @new_resource.env_variables.sort.each do |key, value|
     environment+= "#{key}=#{value} "
   end
%>
[Unit]
Description = GlassFish Server for <%= @new_resource.domain_name %>
After = syslog.target network.target remote-fs.target

[Service]
User=<%= node['glassfish']['user'] %>
ExecStart = <%= "#{prefix} #{@start_domain_command}" %>
ExecStop = <%= "#{prefix} #{@stop_domain_command}" %>
ExecReload = <%= "#{prefix} #{@restart_domain_command}" %>
Type = forking
<%- if @new_resource.env_variables %>
Environment = "<%= environment.rstrip %>"
<% end -%>

[Install]
WantedBy = multi-user.target

<%
   prefix = "#{@authbind ? '/usr/bin/authbind --deep ' : ''}"
   asadmin = "#{node['glassfish']['base_dir']}/versions/current/bin/asadmin"
   domaindir = "--domaindir #{node['glassfish']['domains_dir']}"
%>
[Unit]
Description = GlassFish Server for <%= @new_resource.domain_name %>
After = syslog.target network.target remote-fs.target

[Service]
User=<%= node['glassfish']['user'] %>
ExecStart = <%= "#{prefix} #{@start_domain_command}" %>
ExecStop = <%= "#{prefix} #{@stop_domain_command}" %>
ExecReload = <%= "#{prefix} #{@restart_domain_command}" %>
Type = forking
<%- if @new_resource.env_variables
  @new_resource.env_variables.sort.each do |key, value| %>
Environment="<%= key %>=<%= value %>"
<% end -%>
<% end -%>

[Install]
WantedBy = multi-user.target

Fix to systemd environment variables

Fix to systemd environment variables


Add tt link to masthead

Add tt link to masthead


(function() {
  var $newsletterForm = $('.js-newsletter-form'),
      $newsletterInput = $newsletterForm.find('.js-newsletter-input'),
      errorClass = 'is-errored';

  <% if @success %>
    $newsletterForm
      .attr({'role':'alert', 'aria-live': 'polite'})
      .removeClass(errorClass)
      .html('<%= flash[:success] %>');

    $newsletterInput.attr({'aria-invalid' : false });
  <% else %>
    var $error;
    $('p.js-newsletter-error-msg').remove();
    $error = $('<p />')
                .addClass('newsletter__text js-newsletter-error-msg')
                .text('<%= flash[:error] %>')
                .attr('id', 'newsletter_error');

    $newsletterForm.addClass(errorClass).prepend($error);
    $newsletterInput.attr({'aria-invalid' : true, 'aria-describedby' : 'newsletter_error'}).focus();
  <% end %>
})();

(function() {
  var $newsletterForm = $('.js-newsletter-form'),
      $newsletterInput = $newsletterForm.find('.js-newsletter-input'),
      errorClass = 'is-errored';

  <% if @success %>
    $newsletterForm
      .attr({'role':'alert', 'aria-live': 'polite'})
      .removeClass(errorClass)
      .html('<%= flash[:success] %>');

    $newsletterInput.attr({'aria-invalid' : false });
  <% else %>
    var newsletterErrorID = 'newsletter_error',
        $error;

    $('p.js-newsletter-error-msg').remove();
    $error = $('<p />')
                .addClass('newsletter__text js-newsletter-error-msg')
                .text('<%= flash[:error] %>')
                .attr('id', newsletterErrorID);

    $newsletterForm.addClass(errorClass).prepend($error);
    $newsletterInput.attr({'aria-invalid' : true, 'aria-describedby' : newsletterErrorID}).focus();
  <% end %>
})();

Convert hard coded ID into variable on Newsletter signup JS


<%= @name %>,

Thank you for registering in VCC. To confirm your email address, please visit the following URL:

http://<%=Site.current.domain.to_s%>/activate/<%= @hash %>

<%= @name %>,
thank you for registering in VCC.

To confirm your email address, please visit the following URL:
http://<%=Site.current.domain.to_s%>/activate/<%= @hash %>

Fix apparience in confirmation_email template


<%= conversation.subject %>

From: <%= conversation.originator.username %>

  Date: <%=  conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %>

    <%= truncate conversation.messages.last.body, length: 145 %>

  <%= link_to "View Conversation", conversation_path(conversation)  %>

  <%= link_to trash_conversation_path(conversation), class: 'btn btn-floating', method: :post, data: {confirm: 'Are you sure?'} do %>
    delete
  <% end %>

<%= conversation.subject %>

From: <%= conversation.originator.username %>

  Date: <%=  conversation.messages.last.created_at.strftime("%A, %b %d, %Y at %I:%M%p") %>

    <%= truncate conversation.messages.last.body, length: 145 %>

  <%= link_to "View Conversation", conversation_path(conversation)  %>

    <%unless conversation.is_trashed?(current_user) %>
      <%= link_to trash_conversation_path(conversation), class: 'btn btn-floating trash', method: :post, data: {confirm: 'Are you sure?'} do %>
        delete
      <% end %>
    <% end %>

Hide trash icon if message trashed

Hide trash icon if message trashed


<%= t '.challenged', :challenger => @challenger.name, :tournament => @tournament.name %>

<%= t '.rules' %>

[<%= @tournament.name %> - <%= @challenger.name %>](<%= challenge_url @challenge %>)

<%= t '.challenged', :challenger => @challenger.name, :tournament => @tournament.name %>

<%= t '.rules' %>

[<%= @tournament.name %> - <%= @challenger.name %>](<%= game_url @challenge %>)

Fix url in challenged email

Fix url in challenged email


This is where all categories will be displayed.

<% @categories.each do |category| %>

<%= category.name %>

<% end %>

Categories

<% @categories.each do |category| %>

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

<% end %>

Add temporary div.item-container and div.individual-item tags around Category / links. Will have to edit to work more specifically with categories


Welcome to DBC Film Reviews

All Categories

  <% @categories.each do |category| %>

<%= link_to "#{category.name}", category_path(category) %>

      <% category.films.each do |film| %>

<%= link_to "#{film.title}", film_path(film) %>

      <% end %>

  <% end %>

Welcome to DBC Film Reviews

All Categories

<%= link_to "All Users", users_path %>

  <% @categories.each do |category| %>

<%= link_to "#{category.name}", category_path(category) %>

      <% category.films.each do |film| %>

<%= link_to "#{film.title}", film_path(film) %>

      <% end %>

  <% end %>

Add link to all users on category show page


<%= @teacher.name %> Students

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

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

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

<% else %>

    <% counter = 1 %>

      Student Name
      Grade Level
      GPA
      Disciplinary Strikes

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

        <%= counter %>
        <%= render partial: 'student_list', locals: {student: student} %>

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

<% end %>

<%= @teacher.name %>'s Students

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

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

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

<% else %>

    <% counter = 1 %>

      Student Name
      Grade Level
      GPA
      Disciplinary Strikes

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

        <%= counter %>
        <%= render partial: 'student_list', locals: {student: student} %>

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

<% end %>

Add ' to teacher name

Add ' to teacher name


<!DOCTYPE html>
<html lang="sv">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title></title>

  <%= stylesheet_link_tag    'mirror', media: 'all' %>
  <%= javascript_include_tag 'mirror', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= yield %>
</body>
</html>

<!DOCTYPE html>
<html lang="sv">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title></title>

  <script type="text/javascript" src="//fast.fonts.net/jsapi/fadc5a03-3584-47ac-8dbe-4551a7d46774.js"></script>

  <%= stylesheet_link_tag    'mirror', media: 'all' %>
  <%= javascript_include_tag 'mirror', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= yield %>
</body>
</html>

Add fonts.com fonts to Mirror

Add fonts.com fonts to Mirror


Change the event to new_message instead of new_message_posted.


[plugin:auth_tkt]
use = ckan.lib.auth_tkt:make_plugin
# If no secret key is defined here, beaker.session.secret will be used
#secret = somesecret

[plugin:friendlyform]
use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
login_form_url= /user/login
login_handler_path = /login_generic
logout_handler_path = /user/logout
rememberer_name = auth_tkt
post_login_url = /user/logged_in
post_logout_url = /user/logged_out
charset = utf-8

#[plugin:basicauth]
#use = repoze.who.plugins.basicauth:make_plugin
#realm = 'CKAN'

[general]
request_classifier = repoze.who.classifiers:default_request_classifier
challenge_decider = repoze.who.classifiers:default_challenge_decider

[identifiers]
plugins =
    friendlyform;browser
    auth_tkt

[authenticators]
plugins =
    auth_tkt
    ckan.lib.authenticator:UsernamePasswordAuthenticator

[challengers]
plugins =
    friendlyform;browser
#   basicauth

[plugin:auth_tkt]
use = ckan.lib.auth_tkt:make_plugin
# If no secret key is defined here, beaker.session.secret will be used
#secret = somesecret

[plugin:friendlyform]
use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
login_form_url= /user/login
login_handler_path = /login_generic
logout_handler_path = /user/logout
rememberer_name = auth_tkt
post_login_url = /user/logged_in
post_logout_url = /user/logged_out
charset = utf-8

#[plugin:basicauth]
#use = repoze.who.plugins.basicauth:make_plugin
#realm = 'CKAN'

[general]
request_classifier = repoze.who.classifiers:default_request_classifier
challenge_decider = repoze.who.classifiers:default_challenge_decider

[identifiers]
plugins =
    friendlyform;browser
    auth_tkt

[authenticators]
plugins =
    auth_tkt
    ckanext.datagovuk.lib.authenticator:UsernamePasswordAuthenticator

[challengers]
plugins =
    friendlyform;browser
#   basicauth

Use the DGU user authenticator for CKAN application


<%= link_to "Home", root_path %> |
	<%= link_to "Sign up", new_user_path %> |
	<%= link_to "Sign out", '/sessions/destroy', :method => :delete %> |
	<%= link_to "Sign in", '/sessions/new' %> |
	<%= link_to "Sign in with Github", '/auth/github' %> |
	<%= link_to "Sign in with Facebook", '/auth/facebook' %>

<%= link_to "Home", root_path %> |
	<%= link_to "Sign up", new_user_path %> |
	<%= link_to "Sign out", '/sessions/destroy', :method => :delete %> |
	<%= link_to "Sign in", '/sessions/new' %> |
	<%= link_to "Sign in with Facebook", '/auth/facebook' %>

Remove github link from navigation

Remove github link from navigation


<!DOCTYPE html>
<html>
  <head>
    <title><%= @presenter.title %> - GOVUK</title>
    <%= yield :extra_stylesheets %>
    <%= yield :extra_headers %>
    <!--[if gt IE 8]><!--><%= stylesheet_link_tag "application" %><!--<![endif]-->
    <!--[if IE 6]><%= stylesheet_link_tag "application-ie6" %><![endif]-->
    <!--[if IE 7]><%= stylesheet_link_tag "application-ie7" %><![endif]-->
    <!--[if IE 8]><%= stylesheet_link_tag "application-ie8" %><![endif]-->
    <%#= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
  </head>

  <body>
    <main id="wrapper" role="main" class="<%= @presenter.content_class_dasherized %> guide">
      <%= yield %>
    </main>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <title><%= @presenter.title %> - GOVUK</title>
    <%= yield :extra_stylesheets %>
    <%= yield :extra_headers %>
    <!--[if gt IE 8]><!--><%= stylesheet_link_tag "application" %><!--<![endif]-->
    <!--[if IE 6]><%= stylesheet_link_tag "application-ie6" %><![endif]-->
    <!--[if IE 7]><%= stylesheet_link_tag "application-ie7" %><![endif]-->
    <!--[if IE 8]><%= stylesheet_link_tag "application-ie8" %><![endif]-->
    <%= csrf_meta_tags %>
  </head>

  <body>
    <main id="wrapper" role="main" class="<%= @presenter.content_class_dasherized %> guide">
      <%= yield %>
    </main>
  </body>
</html>

Remove unused JS application comment

Remove unused JS application comment


  <% alpha_tags.each_slice(6) do |gr| %>

      <% gr.each do |kg, vg| %>

            <%= kg %>

          <% vg.each do |tag, count| %>

                <%= count %>

              <%= link_to [post_type.pluralize, tag: tag] do %>
                <%= glyph count == 1 ? :tag : :tags %>
                <%= tag %>
              <% end %>

          <% end %>

      <% end %>

  <% end %>

Set col to a different values to improve responsiveness


Listing voice_transcriptions

      Content

    <% @voice_transcriptions.each do |voice_transcription| %>

        <%= voice_transcription.content %>

    <% end %>

Add more space between comments

Add more space between comments


#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>

#include <sylvan.h>

int solve() {
    LACE_ME;

    return 0;
}

int main() {
    lace_init(0, 0);
    lace_startup(0, NULL, NULL);

    sylvan_init_package(1LL<<21, 1LL<<25, 1LL<<20, 1LL<<24);
    sylvan_init_bdd(6);

    solve();
    return 0;
}

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <cstdlib>

#include <sylvan.h>
#include <sylvan_obj.hpp>

using namespace sylvan;

int solve() {
    LACE_ME;
<% n = 0 -%>
<% self.board.each_with_index do |row, i| -%>
  <% row.each_with_index do |field, j| -%>
    <% next if field == Field::WALL %>
    Bdd man_<%= "#{i}_#{j}" %> = Bdd::bddVar(<%= n += 1 %>);
    Bdd block_<%= "#{i}_#{j}" %> = Bdd::bddVar(<%= n += 1 %>);
  <% end -%>
<% end -%>

<% initial_state = self.board.each_with_index.map do |row, i|
  row.each_with_index.map do |field, j|
    next if field == Field::WALL
    ["#{field != Field::MAN ? '!' : ''}man_#{i}_#{j}",
     "#{field != Field::BLOCK ? '!' : ''}block_#{i}_#{j}"]
  end
end
-%>
    Bdd initial_state = <%= initial_state.join(' * ') %>;

    FILE* file = fopen("start.dot", "w");
    sylvan_fprintdot_nc(file, initial_state.GetBDD());
    fclose(file);

    return 0;
}

int main() {
    lace_init(0, 0);
    lace_startup(0, NULL, NULL);

    sylvan_init_package(1LL<<21, 1LL<<25, 1LL<<20, 1LL<<24);
    sylvan_init_bdd(6);

    solve();
    return 0;
}

Add initial state to screen converter

Add initial state to screen converter


#
# Autossh endpoint generated by Puppet.   Direct changes will be lost, you have been warned.
# connection for <%= @host -%> forwarding port <%= @port %> and any monitor ports (if enabled).
#
<% if monitor_port != 0 -%>
command="echo Interactive Access Denied",no-agent-forwarding,no-X11-forwarding,permitopen="localhost:<%= @port -%>",permitopen:"<%= @monitor_port -%>",permitopen="<%= @monitor_port.to_i + 1 -%>" <%= @pubkey %>
<% end -%>
<% if monitor_port == 0 -%>
command="echo Interactive Access Denied",no-agent-forwarding,no-X11-forwarding,permitopen="localhost:<%= @port -%>" <%= @pubkey %>
<% end -%>

#
# Autossh endpoint generated by Puppet.   Direct changes will be lost, you have been warned.
# connection for <%= @host -%> forwarding port <%= @port %> and any monitor ports (if enabled).
#
<% if @monitor_port != '0' -%>
command="echo Interactive Access Denied",no-agent-forwarding,no-X11-forwarding,permitopen="localhost:<%= @port -%>",permitopen:"<%= @monitor_port -%>",permitopen="<%= @monitor_port.to_i + 1 -%>" <%= @pubkey %>
<% end -%>
<% if @monitor_port == '0' -%>
command="echo Interactive Access Denied",no-agent-forwarding,no-X11-forwarding,permitopen="localhost:<%= @port -%>" <%= @pubkey %>
<% end -%>

Fix having no monitor port

Fix having no monitor port


  <% if current_user %>
  Signed in as <%=current_user.name %>
  <% end%>

    <input id="search-bar" name="search-bar" type="text" placeholder="@username">
    <input id="search-button" type="submit" value="Go!">

<gcse:search></gcse:search>

  <% if current_user %>
  Signed in as <%=current_user.name %>
  <% end%>

    <input id="search-bar" name="search-bar" type="text" placeholder="@username">
    <input id="search-button" type="submit" value="Go!">

    <input id="duck-duck-go-bar" name="search-bar" type="text" placeholder="search content">
    <input id="duck-submit" type="submit" value="Go!">

<gcse:search></gcse:search>

Remove google custom search bar -- we will be using the Duck Duck Go API instead. Replaced with input form search bar and button.


Bookmarklet

      Here are some bookmarklets to automate the process of uploading information to RevTilt.

      Clicking the bookmarklet will take you to the share an organization form with as many fields filled out as possible.

      Heads up
      The category dropdown menu still needs to be set manually since the tags on Yelp do not directly map to the RevTilt categories.

      To install a bookmarklet drag one of the links below to your browser's toolbar.

    <%= link_to "RevTilt - Yelp Bookmarklet", bookmarklet_javascript("yelp") %>

    <%= link_to "RevTilt - Yelp Bookmarklet (new window)", bookmarklet_javascript("yelp", true) %>

      If you find a bug, please either file a
      <%= link_to "github issue", APP_CONFIG["github_repo"] + "/issues/new", :target => "_blank" %>
      or email <%= link_to "revtilt@gmail.com", "mailto:revtilt@gmail.com?subject=[Bookmarklet Issue]" %>
      with a description of the problem.

Move the bookmarklets into a well

Move the bookmarklets into a well


You are invited to grab some food by, <%= User.find_by(id: @event.planner_id).full_name %>!

<%= flash[:notice] %>

<%= form_for :preference do |f| %>

    <%= f.label :is_fancy %>

    <%= f.select :is_fancy, [['',''],['true','true'],['false','false']] %>

    <%= f.label :cuisine %>

    <%= f.select :cuisine, [['',''],['Japanese','japanese'],['Chinese','chinese'],['American','american'], ['Italian','italian'],['Indian','indian'],['Mexican','mexican'],['Filipino','filipino'],['Thai','thai'],['Vietnamese','vietnamese']] %>

    <%= f.label :is_vegetarian %>

    <%= f.select :is_vegetarian, [['',''],['true','true'],['false','false']] %>

    <%= f.label :distance %>

    <%= f.select :distance, [['',''],['1 mile','1 mile'],['2 miles','2 miles'],['5 miles','5 miles'], ['10 miles','10 miles']] %>

    <%= f.submit %>

<% end %>

You are invited to grab some food by, <%= User.find_by(id: @event.planner_id).full_name %>!

<%= flash[:notice] %>

<%= form_for :preference do |f| %>

    <%= f.label :is_fancy %>

    <%= f.select :is_fancy, [['',''],['true','true'],['false','false']] %>

    <%= f.label :cuisine %>

    <%= f.select :cuisine, [['',''],['Japanese','japanese'],['Chinese','chinese'],['American','tradamerican'], ['Italian','italian'],['Indian','indpak'],['Mexican','mexican'],['Filipino','filipino'],['Thai','thai'],['Vietnamese','vietnamese'],['African','african'], ['Mediterranean','mediterranean'], ['Korean','korean'], ['German','german'], ['French','french'], ['Cuban','cuban'], ['Greek','greek']].sort %>

    <%= f.label :is_vegetarian %>

    <%= f.select :is_vegetarian, [['',''],['true','true'],['false','false']] %>

    <%= f.label :distance %>

    <%= f.select :distance, [['',''],['1 mile','1 mile'],['2 miles','2 miles'],['5 miles','5 miles'], ['10 miles','10 miles']] %>

    <%= f.submit %>

<% end %>

Add new cuisines to preferences

Add new cuisines to preferences


<%= @book.title %>

        <% @frontmatter.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

        <% end %>

        <% @mainmatter.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

        <% end %>

    <%= link_to "All notes for this book", book_notes_path(@book) %>

<%= @book.title %>

    <%= link_to "All notes for this book", book_notes_path(@book) %>

Frontmatter

      <% @frontmatter.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

      <% end %>

Mainmatter

      <% @mainmatter.each do |chapter| %>

<%= link_to chapter.title, [@book, chapter] %>

      <% end %>

Tidy up presentation of books/show

Tidy up presentation of books/show


Update profile for <%= @user.name %>

<%= form_for @user do |f| %>

  <%= f.label :email %>
  <%= f.text_field :email, :placeholder => "Email address" %>

  <%= f.submit 'Update email' %>

<% end %>

Update profile for <%= @user.name %>

<%= form_for @user do |f| %>

  <%= f.label :email %>
  <%= f.text_field :email, :placeholder => "Email address" %>

  <%= f.submit 'Update email', :class => "btn btn-info" %>

<% end %>

Change update email button to match email styling


      <%= link_to "Create Role", new_admin_role_path, class: "button new_resource", title: "Create a Role" %>

Roles

          Name
          Organisations
          Type
          Permanent secretary
          Currently Appointed
          Actions

        <% @roles.each do |role| %>
          <%= content_tag_for(:tr, role) do %>
            <%= link_to role.name, edit_admin_role_path(role), title: "Edit role #{role.name}" %>
            <%= role.organisation_names %>
            <%= role.humanized_type %>
            <%= yes_or_no(role.permanent_secretary?) %>
            <%= role.current_person_name %>

              <% if role.destroyable? %>
                <%= button_to 'delete', admin_role_path(role), method: :delete %>
              <% else %>
                Cannot delete
              <% end %>

          <% end %>
        <% end %>

      <%= link_to "Create Role", new_admin_role_path, class: "button new_resource", title: "Create a Role" %>

Roles

          Name
          Organisations
          Type
          Permanent secretary
          Currently appointed
          Actions

        <% @roles.each do |role| %>
          <%= content_tag_for(:tr, role) do %>
            <%= link_to role.name, edit_admin_role_path(role), title: "Edit role #{role.name}" %>
            <%= role.organisation_names %>
            <%= role.humanized_type %>
            <%= yes_or_no(role.permanent_secretary?) %>
            <%= role.current_person_name %>

              <% if role.destroyable? %>
                <%= button_to 'delete', admin_role_path(role), method: :delete %>
              <% else %>
                Cannot delete
              <% end %>

          <% end %>
        <% end %>

Standardize capitalization on navigation & headings.

"Currently Appointed" --> "Currently appointed".


  <% if commentable.arguable? %>
    (<%= t('comments.form.alignment.positive') %>: <%= commentable.comments.positive.count %>,
    <%= t('comments.form.alignment.negative') %>: <%= commentable.comments.negative.count %>,
    <%= t('comments.form.alignment.neutral') %>: <%= commentable.comments.neutral.count %>)
  <% else %>
    (<%= commentable.comments.count %>)
  <% end %>

Remove comments against and in favor

Remove comments against and in favor


<%= link_to "User Convos" , user_path(@user), :class => 'button' %>
<%= link_to t("ui.followers"), followers_user_path(@user), :class => 'button' %>
<%= link_to t("ui.followed_users"), followed_users_user_path(@user), :class => 'button' %>
<%= link_to "Friends", friends_user_path(@user), :class => 'button' %>
<%= link_to t("ui.followed_convos"), followed_convos_user_path(@user), :class => 'button' %>

<%= link_to "User Convos" , user_path(@user), :class => 'button' %>
<%= link_to t("ui.following"), followed_users_user_path(@user), :class => 'button' %>
<%= link_to t("ui.followers"), followers_user_path(@user), :class => 'button' %>
<%= link_to "Friends", friends_user_path(@user), :class => 'button' %>
<%= link_to t("ui.followed_convos"), followed_convos_user_path(@user), :class => 'button' %>

Change order and text of profile buttons to make them consistent with the user stats


<%= content_tag_for(:tr, deployed_application) do %>
  <%= deployed_application.name %>
  <%= deployed_application.location_name %>
  <%= deployed_application.brigade_name %>
  View App
<% end %>

Fix bug that creeped in with one of the last deploys


<% if role.supports_historical_accounts? %>

    <%= render "govuk_publishing_components/components/heading", {
      text: t("roles.previous_holders"),
    } %>

      <%= t("roles.find_out_more_html", link: link_to(t("roles.past") + " #{role.title.pluralize}", role.past_holders_url, class: "govuk-link")) %>

<% elsif role.past_holders.present? %>

    <%= render "govuk_publishing_components/components/heading", {
      text: t("roles.previous_holders"),
    } %>
    <%= render "components/taxon-list", {
      items: role.past_holders.map do |rh|
        {
          text: rh['title'],
          path: rh['base_path'],
          description: "#{rh['details']['start_year']} to #{rh['details']['end_year']}"
        }
      end
    } %>

<% end %>

<% if role.supports_historical_accounts? %>

    <%= render "govuk_publishing_components/components/heading", {
      text: t("roles.previous_holders"),
    } %>

      <%= t("roles.find_out_more_html", link: link_to(t("roles.past") + " #{role.title.pluralize}", role.past_holders_url, class: "govuk-link")) %>

<% elsif role.past_holders.present? %>

    <%= render "govuk_publishing_components/components/heading", {
      text: t("roles.previous_holders"),
    } %>
    <%= render "components/taxon-list", {
      heading_level: 3,
      items: role.past_holders.map do |rh|
        {
          text: rh['title'],
          path: rh['base_path'],
          description: "#{rh['details']['start_year']} to #{rh['details']['end_year']}",
        }
      end
    } %>

<% end %>

Fix past role holders header hierarchy

Fix past role holders header hierarchy


<% if @response.total_pages > 1 %>
<%= paginate @response, :theme => :blacklight_compact %>
<% else %>
<%= render_pagination_info(@response) %>
<% end %>

<% if @response.total_pages > 1 %>
<%= paginate @response, :theme => :blacklight_compact %>
<% else %>
<%= page_entries_info(@response) %>
<% end %>

Fix deprecation for Blacklight 4.6

Fix deprecation for Blacklight 4.6


<li id="<%= speaker.id %>" class="<%= position %>" itemscope itemprop="performer" itemtype="http://schema.org/Person">

    <% if speaker.additional_name %>
    <%= speaker.additional_name %>
    <% end %>
    <%= speaker.name %>

    <%= link_to speaker.name, "/speakers/##{speaker.id}" %>
    <%= speaker.title %>
    <% if speaker.keynote %>
      keynote
    <% end %>

<%= speaker.bio %>

    <%= twitter_button speaker.twitter if speaker.twitter %>

    <% if speaker.github %>
      <button class="btn btn-mini">

          <%= link_to("@#{speaker.github}", "https://github.com/#{speaker.github}") %>

      </button>
    <% end %>

<li id="<%= speaker.id %>" class="<%= position %>" itemscope itemprop="performer" itemtype="http://schema.org/Person">

    <% if speaker.additional_name %>
    <%= speaker.additional_name %>
    <% end %>
    <%= speaker.name %>

    <%= link_to speaker.name, "/speakers/##{speaker.id}" %>
    <%= speaker.title %>
    <% if speaker.keynote %>
      keynote
    <% end %>

<%= speaker.bio %>

    <% if speaker.twitter %>
      <%= twitter_button speaker.twitter %>

      <button class="btn btn-mini">

          <%= link_to("@#{speaker.twitter}", "https://twitter.com/#{speaker.twitter}") %>

      </button>
    <% end %>

    <% if speaker.github %>
      <button class="btn btn-mini">

          <%= link_to("@#{speaker.github}", "https://github.com/#{speaker.github}") %>

      </button>
    <% end %>

Add button to twitter for speakers

Add button to twitter for speakers


#!upstart
description "Mailcatcher SMTP dev tool"

start on startup
stop on shutdown

exec mailcatcher --http-ip="<%= node['mailcatcher']['http_ip'] %>" --foreground

#!upstart
description "Mailcatcher SMTP dev tool"

start on startup
stop on shutdown

exec <%= File.join Gem.bindir, 'mailcatcher' %> --http-ip="<%= node['mailcatcher']['http_ip'] %>" --foreground

Use the full path for the mailcatcher gem binary


  <%= form_tag("/questions/#{question.id}", method: "put", class: "col s12") do %>

        <% if answer %>
          <%= label_tag(:answer, "Answer") %>
          <%= text_area(:question, :answer, {class: "materialize-textarea", value: answer}) %>
          <button class="btn waves-effect waves-light" type="submit" name="/questions/#{question.id}">Update
            send
          </button>
        <% else %>
          <%= label_tag(:answer, "Answer") %>
          <%= text_area(:question, :answer, {class: "materialize-textarea"}) %>
          <button class="btn waves-effect waves-light" type="submit" name="/questions/#{question.id}">Submit
            send
          </button>
        <% end %>

  <% end %>

  <%= form_tag("/questions/#{question.id}", method: "put", class: "col s12") do %>

        <% if answer %>
          <%= label_tag(:answer, "Answer") %>
          <%= text_area(:question, :answer, {class: "materialize-textarea", value: answer}) %>
          <button class="btn waves-effect waves-light" type="submit" name="/questions/#{question.id}">Update
            send
          </button>
        <% else %>
          <%= label_tag(:answer, "Answer") %>
          <%= text_area(:question, :answer, {class: "materialize-textarea", placeholder: "Write your answer here!"}) %>
          <button class="btn waves-effect waves-light" type="submit" name="/questions/#{question.id}">Submit
            send
          </button>
        <% end %>

  <% end %>

Add placeholder on answer submit form

Add placeholder on answer submit form


(function() {
  var $el = $('#element_<%= @element.id %>');
  $('.content_editor', $el).removeClass('validation_failed');

<%- if @element_validated -%>

  $el.replaceWith('<%= j render("element", element: @element) %>');
  Alchemy.ElementEditors.reinit($el);
  $("#element_<%= @element.id %>_errors").hide();
  Alchemy.setElementSaved($el);
  Alchemy.growl('<%= _t(:element_saved) %>');
  Alchemy.PreviewWindow.refresh(function() {
    Alchemy.ElementEditors.selectElementInPreview(<%= @element.id %>);
  });
  <%= update_essence_select_elements(@page, @element) -%>

<%- else -%>

  Alchemy.growl('<%= j @notice %>', 'warn');
  $('#element_<%= @element.id %>_errors').html('<%= j @error_message %>

<%== j @element.essence_error_messages.join("

") %>

');
  $("#element_<%= @element.id %>_errors").show();
  $('<%= @element.contents_with_errors.map { |content| "#" + content.dom_id }.join(", ") %>').addClass('validation_failed');
  Alchemy.ElementEditors.scrollToElement('#element_<%= @element.id %>');
  Alchemy.Buttons.enable($el);

<%- end -%>

})();

(function() {
  var $el = $('#element_<%= @element.id %>');
  $('.content_editor', $el).removeClass('validation_failed');

<%- if @element_validated -%>

  $el.replaceWith('<%= j render("element", element: @element) %>');
  Alchemy.ElementEditors.reinit($el);
  $("#element_<%= @element.id %>_errors").hide();
  Alchemy.setElementSaved($el);
  Alchemy.growl('<%= _t(:element_saved) %>');
  Alchemy.Tinymce.init(<%= @element.richtext_contents_ids.to_json %>);
  Alchemy.PreviewWindow.refresh(function() {
    Alchemy.ElementEditors.selectElementInPreview(<%= @element.id %>);
  });
  <%= update_essence_select_elements(@page, @element) -%>
  Alchemy.GUI.initElement('#element_<%= @element.id %>');

<%- else -%>

  Alchemy.growl('<%= j @notice %>', 'warn');
  $('#element_<%= @element.id %>_errors').html('<%= j @error_message %>

<%== j @element.essence_error_messages.join("

") %>

');
  $("#element_<%= @element.id %>_errors").show();
  $('<%= @element.contents_with_errors.map { |content| "#" + content.dom_id }.join(", ") %>').addClass('validation_failed');
  Alchemy.ElementEditors.scrollToElement('#element_<%= @element.id %>');
  Alchemy.Buttons.enable($el);

<%- end -%>

})();

Fix enhanced elements when updating whole elements

Completes 1aecd1530f67d5414f0a21a0a17703b715dbd44a


(function () {
<% if @success %>
$('.js-newsletter-form').removeClass('is-errored').html('<%= flash[:success] %>');
<% else %>
var error = $('<p />').addClass('newsletter__text js-newsletter-error-msg').text('<%= flash[:error] %>');
$('.js-newsletter-form').addClass('is-errored').prepend(error);
<% end %>
})();

(function() {
  <% if @success %>
  $('.js-newsletter-form').removeClass('is-errored').html('<%= flash[:success] %>');
  <% else %>
  $('p.js-newsletter-error-msg').remove();
  var error = $('<p />').addClass('newsletter__text js-newsletter-error-msg').text('<%= flash[:error] %>');
  $('.js-newsletter-form').addClass('is-errored').prepend(error);
  <% end %>
})();

Fix embarrassing :bug: with multiple error messages on newsletter signup.

@ourmaninamsterdam :eyes:


  <%= image_tag_for_key('run_workflow', taverna_player.new_run_path(:workflow_id => workflow, :version => version), nil, nil, "Run #{human_name}") -%>

    <%= image_tag_for_key('sweep', new_sweep_path(:workflow_id => workflow.id), nil, nil, "Run Data Sweep") -%>

<% if workflow.can_manage? -%>

<%= image_tag_for_key('manage', edit_workflow_path(workflow, :version => version), nil, nil, "Manage #{human_name}") -%>

<% end -%>

<% display_workflow = workflow.find_version(version) %>

<% if display_workflow.contains_downloadable_items? && display_workflow.is_downloadable? -%>
    <%# param code is used for temporary link -%>
    <% if can_download_asset?(workflow, params[:code]) -%>
        <%
           path = polymorphic_path(workflow,:version=>version,:action=>:download,:code=>params[:code])
        %>

          <%= image_tag_for_key('download', path, "Download #{human_name}", nil, "Download #{human_name}") -%>

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

  <%= image_tag_for_key('run_workflow', taverna_player.new_run_path(:workflow_id => workflow, :version => version), nil, nil, "Run #{human_name}") -%>

    <%= image_tag_for_key('sweep', new_sweep_path(:workflow_id => workflow.id), nil, nil, "Run Data Sweep") if workflow.input_ports.select{|port| (port.port_type.name == WorkflowInputPortType::DATA)}.length > 0 -%>

<% if workflow.can_manage? -%>

<%= image_tag_for_key('manage', edit_workflow_path(workflow, :version => version), nil, nil, "Manage #{human_name}") -%>

<% end -%>

<% display_workflow = workflow.find_version(version) %>

<% if display_workflow.contains_downloadable_items? && display_workflow.is_downloadable? -%>
    <%# param code is used for temporary link -%>
    <% if can_download_asset?(workflow, params[:code]) -%>
        <%
           path = polymorphic_path(workflow,:version=>version,:action=>:download,:code=>params[:code])
        %>

          <%= image_tag_for_key('download', path, "Download #{human_name}", nil, "Download #{human_name}") -%>

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

Allow sweeps to be created from the workflows/show page only if there is at least one data port.


Information about Jarvice

avg:bosh.healthmonitor.system.cpu.user{ deployment: <%= deployment %> } by {job,index}

<%= environment %>: Jarvice CPU (%)

avg:bosh.healthmonitor.system.mem.percent{ deployment: <%= deployment %> } by {job,index}

<%= environment %>: Jarvice Memory (%)

<%= environment %> Jarvice Information

Add dashboards for jarvice monitoring

Add dashboards for jarvice monitoring

[#101778802]

Signed-off-by: Kira Combs <327dac51f3a5158dc1dbf428a088e367dce1ec10@pivotal.io>


<% content_for :page_title do %>Admin Reports<% end %>

Admin Reports

<%= link_to "AMR Report", reports_amr_data_index_path %>

<%= link_to "Data Feeds summary", data_feeds_path %>

<%= link_to "Weather Data Feed Report (calendar)", reports_data_feed_show_path(DataFeeds::WeatherUnderground.first, :temperature) %>

<%= link_to "Solar Irradiation Data Feed Report (calendar)", reports_data_feed_show_path(DataFeeds::WeatherUnderground.first, :solar_irradiation) %>

<%= link_to "Solar PV Data Feed Report (calendar)", reports_data_feed_show_path(DataFeeds::SolarPvTuos.first, :solar_pv) %>

<% content_for :page_title do %>Admin Reports<% end %>

Admin Reports

<%= link_to "AMR Report", reports_amr_data_index_path %>

<%= link_to "Data Feeds summary", data_feeds_path %>

      <% DataFeeds::WeatherUnderground.all.each do |data_feed| %>

<%= link_to "#{data_feed.title} - temperature", reports_data_feed_show_path(data_feed, :temperature) %>

<%= link_to "#{data_feed.title} - solar irradiation", reports_data_feed_show_path(data_feed, :solar_irradiation) %>

      <% end %>
      <% DataFeeds::SolarPvTuos.all.each do |data_feed| %>

<%= link_to  data_feed.title, reports_data_feed_show_path(data_feed, :solar_pv) %>

      <% end %>

Fix to allow these data feed reports to be easily accessed


<%= render request %>

<if @request.is_fulfilled>

<%= render "votes/vote_form", :object => @user, :vote => @vote %>

<% end %>

<%= render @request %>

<% if @request.is_fulfilled %>

<%= render "votes/vote_form", :object => @user, :vote => @vote %>

<% end %>

Add correct syntax to the show view.

Add correct syntax to the show view.


Manage Users

<%= link_to "Add User", new_user_path, class: "btn btn-primary" %>

    Edit
    Email
    Fax Number

    <% @users.each do |user| %>
      <tr data-user-id="<%= user.id %>">
        <%= link_to "Edit", edit_user_path(user) %>
        <%= link_to user.email, user_path(user) %>
        <%= user.fax_number %>

    <% end %>

Fix typo on users index

Fix typo on users index


class Create<%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :<%= table_name %> do |t|
      t.string :to_state, null: false
      t.text :metadata<%= ", default: \"{}\"" unless mysql? %>
      t.integer :sort_key, null: false
      t.integer :<%= parent_id %>, null: false
      t.timestamps
    end

    add_index :<%= table_name %>, :<%= parent_id %>
    add_index :<%= table_name %>, [:sort_key, :<%= parent_id %>], unique: true
  end
end

class Create<%= migration_class_name %> < ActiveRecord::Migration
  def change
    create_table :<%= table_name %> do |t|
      t.string :to_state, null: false
      t.text :metadata<%= ", default: \"{}\"" unless mysql? %>
      t.integer :sort_key, null: false
      t.integer :<%= parent_id %>, null: false
      t.timestamps
    end

    add_index :<%= table_name %>, [:<%= parent_id %>, :sort_key], unique: true
  end
end

Optimize MySQL indexes for transition model

See https://github.com/gocardless/statesman/issues/59 for more details.


#!/usr/bin/env bash

# job template binding variables

# job name & index of this VM within cluster
# e.g. JOB_NAME=redis, JOB_INDEX=0
export NAME='<%= name %>'
export JOB_INDEX=<%= index %>
# full job name, like redis/0 or webapp/3
export JOB_FULL="$NAME/$JOB_INDEX"
export VAULT_ADDR='http://127.0.0.1:8200'
export VAULT_TOKEN="<%= p("vault.update.step_down_token","") %>"
<% if_p("vault.listener.tcp.tls.certificate", "vault.listener.tcp.tls.key") do || %>
export VAULT_SKIP_VERIFY=1
export VAULT_ADDR='https://127.0.0.1:8200'
<% end %>

Handle step-down when tls is enabled

Handle step-down when tls is enabled


  <%= category.description %>
  <%= link_to '', edit_category_path(category), class: 'btn btn-default btn-block-xs glyphicon glyphicon-pencil' %>

  <button type="button" class="btn btn-primary pull-right" data-create-item data-category="<%= category.id %>" data-category-desc="<%= category.description %>">
    Create Item
  </button>

      Description
      Quantity In Stock
      Quantity Requested

    <% items.each do |item| %>

        <%= item.description %>
        <%= item.current_quantity %>
        <%= item.requested_quantity %>

        <%= link_to '', edit_item_path(item.id), class: 'btn btn-default btn-block-xs glyphicon glyphicon-pencil' %>

    <% end %>

  <%= category.description %>
  <%= link_to '', edit_category_path(category), class: 'btn btn-default btn-xs glyphicon glyphicon-pencil' %>

  <button type="button" class="btn btn-primary pull-right" data-create-item data-category="<%= category.id %>" data-category-desc="<%= category.description %>">
    Create Item
  </button>

      Description
      Quantity In Stock
      Quantity Requested

    <% items.each do |item| %>

        <%= item.description %>
        <%= item.current_quantity %>
        <%= item.requested_quantity %>

        <%= link_to '', edit_item_path(item.id), class: 'btn btn-default btn-block-xs glyphicon glyphicon-pencil' %>

    <% end %>

Reduce size of edit button

Reduce size of edit button


<%
  info.write_at_end_of_build = true
%>

<%= document.message %>
<% document.message = "Hello World!" %>

<%
  info.write_at_end_of_build = true
%>

<%= store.message %>
<% store.message = "Hello World!" %>

Use store instead of document object in spec/fixtures/rerun


*** Probes ***

# THIS FILE IS MANAGED BY PUPPET

<% probes.each do |probe| -%>
+ <%= probe['name'] %>
binary = <%= probe['binary'] %>
step = <%= probe['step'] %>

<% end -%>

*** Probes ***

# THIS FILE IS MANAGED BY PUPPET

<% probes.each do |probe| -%>
+ <%= probe.delete('name') %>
<% probe.each_pair do |k,v| -%>
<%= k %> = <%= v %>
<% end -%>

<% end -%>

Allow arbitrary probe config values

Allow arbitrary probe config values

This changes the statically configured options for binary and step to
allow configuring any probe configuration that is passed in the hash by
the user.  This is needed for probes like AnotherDNS that have no binary
option, but have other useful options.


<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file><%= scope.lookupvar('cosmos::params::cosmos_basedir') %>/var/log/cosmos-api.log</file>
        <encoder>
            <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="es.tid.cosmos" level="DEBUG">
        <appender-ref ref="STDOUT" />
    </logger>

    <root level="INFO">
        <appender-ref ref="FILE" />
    </root>
</configuration>

<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file><%= scope.lookupvar('cosmos::params::cosmos_basedir') %>/var/log/cosmos-api.log</file>
        <encoder>
            <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="es.tid.cosmos" level="DEBUG">
        <appender-ref ref="STDOUT" />
    </logger>

    <!-- Loggers that are reporting false errors. -->
    <logger name="com.wordnik.swagger.play.HelpApi" level="OFF"/>
    <logger name="com.wordnik.swagger.core.util.TypeUtil" level="OFF"/>

    <root level="INFO">
        <appender-ref ref="FILE" />
    </root>
</configuration>

Disable loggers reporting false errors

Disable loggers reporting false errors

As reported in #1475, Swagger is logging several errors that are not
having any negative effect in the app. This loggers should be disabled
to avoid false errors to be reported in Cosmos log.


<%= dashboard_control_bar() %>

Subject report links

<%= link_to 'Control Assignment Report', controls_path %>

<%= link_to 'Case Assignment Report', cases_path %>

subjects not sent to icf (30+ days following consent)

subjects ascertained with no consent (14+ days following consent)

subjects ready for intro letter

aging report - cases waiting for BC Requests

aging report - BC Requests sent, not returned

example search results:

search results:

table(icf_master_id,study_id,subject_name,reference_date)

<%= dashboard_control_bar() %>

Subject report links

<%= link_to 'Control Assignment Report', controls_path %>

<%= link_to 'Case Assignment Report', cases_path %>

<%= link_to 'Abstracts', abstracts_path %>

Put link to abstracts on study_subjects/reports.


<tr id="<%= format %>-campaign-image">

    <%= format.capitalize %> image

<%= size %>

    <% if @edition.send("#{format}_image") %>
      <% if @edition.send("#{format}_image").state == "unscanned" %>

<%= @edition.send("#{format}_image").name %> is being scanned for viruses

      <% else %>

          <%= link_to @edition.send("#{format}_image").file_url do %>
            <%= image_tag @edition.send("#{format}_image").file_url, :height => "200px" %>
          <% end %>

      <% end %>

<%= label_tag do %>Remove image? <%= check_box_tag "edition[remove_#{format}_image]", "1", false, disabled: @resource.locked_for_edits?, class: 'js-no-ajax' %><% end %>

    <% end %>
    <%= f.input "#{format}_image".to_sym, :as => :file, :label => "Upload image:", input_html: { disabled: @resource.locked_for_edits? } %>

<tr id="<%= format %>-campaign-image">

    <%= format.capitalize %> image

<%= size %>

    <% if @edition.send("#{format}_image") %>
      <% if @edition.send("#{format}_image")["state"] == "unscanned" %>

<%= @edition.send("#{format}_image")["name"] %> is being scanned for viruses

      <% else %>

          <%= link_to @edition.send("#{format}_image")["file_url"] do %>
            <%= image_tag @edition.send("#{format}_image")["file_url"], :height => "200px" %>
          <% end %>

      <% end %>

<%= label_tag do %>Remove image? <%= check_box_tag "edition[remove_#{format}_image]", "1", false, disabled: @resource.locked_for_edits?, class: 'js-no-ajax' %><% end %>

    <% end %>
    <%= f.input "#{format}_image".to_sym, :as => :file, :label => "Upload image:", input_html: { disabled: @resource.locked_for_edits? } %>

Fix image upload view to handle GDS API Adapters response

GDS API Adapters returns a hash response, however the image upload view accessed this as if it were an OpenStruct, and so editing campaigns would break. This fixes the view.
Trello: https://trello.com/c/dhivh7TF/593-fix-campaigns-in-publisher


<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="images/favicon.ico">
    <title>AFTERBURNER | Training Tomorrow's Software Engineers</title>

    <link href="/alt/css/bootstrap.css" rel="stylesheet">

            <%= yield %>

Add Google analytics to alt layout

Add Google analytics to alt layout