Ruby on Rails Guides (<%= @edge ? @version[0, 7] : @version %>)

<% if @edge %>

  These are Edge Guides, based on the current <a href="https://github.com/rails/rails/tree/<%= @version %>">master branch.

  If you are looking for the ones for the stable version, please check
  http://guides.rubyonrails.org instead.

<% else %>

  These are the new guides for Rails 4.0 based on <a href="https://github.com/rails/rails/tree/<%= @version %>"><%= @version %>.
  These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.

<% end %>

  The guides for Rails 3.2.x are available at http://guides.rubyonrails.org/v3.2.14/.

  The guides for Rails 2.3.x are available at http://guides.rubyonrails.org/v2.3.11/.

Ruby on Rails Guides (<%= @edge ? @version[0, 7] : @version %>)

<% if @edge %>

  These are Edge Guides, based on the current <a href="https://github.com/rails/rails/tree/<%= @version %>">master branch.

  If you are looking for the ones for the stable version, please check
  http://guides.rubyonrails.org instead.

<% else %>

  These are the new guides for Rails 4.0 based on <a href="https://github.com/rails/rails/tree/<%= @version %>"><%= @version %>.
  These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.

<% end %>

  The guides for Rails 3.2.x are available at http://guides.rubyonrails.org/v3.2.15/.

  The guides for Rails 2.3.x are available at http://guides.rubyonrails.org/v2.3.11/.

Update guides welcome page to point to version 3.2.15 [ci skip]


Share a Dance

  <%= new_dance_button_green_html %>

Find Dances

  <input id="figure-query-buffer" type='text'>

  <table id="dances-table", class="table table-bordered table-hover table-condensed", data-source="<%= dances_filter_path(format: :json) %>">

        Title
        Choreographer
        Hook
        Formation
        User
        Updated
        Entered
        Published

<%= link_to 'About ContraDB.com', about_path %>

<%= @prefs_json %>

ContraDB

Explore contra dances using advanced figure search, choosing from among every dance in a live, cloud-based, crowd-sourced database. <%= link_to 'Learn about our vision', about_path %>.

Share a Dance

  <%= new_dance_button_green_html %>

Find Dances

  <input id="figure-query-buffer" type='text'>

  <table id="dances-table", class="table table-bordered table-hover table-condensed", data-source="<%= dances_filter_path(format: :json) %>">

        Title
        Choreographer
        Hook
        Formation
        User
        Updated
        Entered
        Published

<%= @prefs_json %>

Add <h1> to top of page with more prominent about link and long sentence


<% if authenticated? %>
You have <%= @todays_commits %> commits today, compared to <%= @yesterdays_commits %> yesterday!

<%= @message %>
<% else %>
The gitometer is a motivational speaker.

Login with GitHub

<% end %>

<% if authenticated? %>
You have <%= @todays_commits %> commits today, compared to <%= @yesterdays_commits %> yesterday!

<%= @message %>
<% else %>
The gitometer is a motivational speaker.

Login with GitHub

Gitometer is © 2011 Christopher Meiklejohn.

The motivational speaker computes commits in UTC.
The motivational speaker is only concerned with commits to your own repos.

However you can change that.
<% end %>

Add more information to the landing page.


    Use the file input, below, to test uploading a few images directly to
    S3. Either click the button to choose one or more files (multi-select
    is enabled), or try dropping some files on it.

  <form class="well">
    <legend>
    <input type="file" id="files" name="files" multiple>
  </form>

Make 3 thumbnails fit in previews area

Make 3 thumbnails fit in previews area


<% posts.each_with_index do |post, index| %>

        <%= index + 1 %>

    <%= render partial: 'posts/post_metadata', locals: { post: post } %>

    <% if post.picture? %>

        <%= image_tag post.picture.url(:thumb) %>

    <% end %>

<%= link_to post.title, post %>

<%= truncate(post.body, length: 90, escape: false) { link_to "Read more ...", post, class: 'read-more' } %>

      <div id="post_<%= post.id %>_likes" class="pull-left">
        <%= render partial: 'posts/likes', locals: { post: post } %>

      <div id="post_<%= post.id %>_bookmarks" class="pull-right">
        <%= render partial: 'posts/bookmarks', locals: { post: post } %>

        <% if post.responses.any? %>
          <%= link_to_responses_to(post) %>
        <% end %>

<% end %>

<% posts.each_with_index do |post, index| %>

        <%= index + 1 %>

    <%= render partial: 'posts/post_metadata', locals: { post: post } %>

    <% if post.picture? %>

        <%= image_tag post.picture.url(:thumb) %>

    <% end %>

<%= link_to post.title, post %>

      <% if post.lead %>

<%= truncate(post.lead, length: 190, separator: ' ', escape: false) %>

        <%= link_to "Read more", post, class: 'read-more' %>
      <% end %>

      <div id="post_<%= post.id %>_likes" class="pull-left">
        <%= render partial: 'posts/likes', locals: { post: post } %>

      <div id="post_<%= post.id %>_bookmarks" class="pull-right">
        <%= render partial: 'posts/bookmarks', locals: { post: post } %>

        <% if post.responses.any? %>
          <%= link_to_responses_to(post) %>
        <% end %>

<% end %>

Fix lead in top_stories partial

Fix lead in top_stories partial


This book is translated into
  German,
  Chinese,
  French,
  Japanese and
  Dutch.

Partial translations available in
  Arabic,
  Czech,
  Spanish,
  Indonesian,
  Italian,
  Macedonian,
  Polish,
  Thai and
  Russian.

This book is translated into
  German,
  Chinese,
  French,
  Japanese,
  Dutch,
  Russian,
  Korean,
  Brazilian Portugese and
  Czech.

Partial translations available in
  Arabic,
  Spanish,
  Indonesian,
  Italian,
  Macedonian,
  Polish,
  Turkish,
  Taiwanese Mandarin,
  Spanish (Nicaragua),
  Catalan,
  Thai and
  Finnish.

Update the list of available languages for the book.

The algorithm applied is quite simple:

 1. Run `summary.rb` in the progit working dir
 2. Languages with 99% or above are fully translated
 3. Languages with 10% or above are partially translated


   <%= image_tag "people1.png", :id => "bg", alt: "", :class=> "background-image" %>

Log in to your account

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

            <%= f.email_field :email, autofocus: true, :class => "input-field-login", :placeholder => "Email" %>

            <%= f.password_field :password, autocomplete: "off", :class => "input-field-login", :placeholder => "Password" %>

          <% if devise_mapping.rememberable? %>

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

          <% end

            <%= f.submit "Submit", :class => "btn" %>

        <% end %>

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

   <%= image_tag "people1.png", :id => "bg", alt: "", :class=> "background-image" %>

Log in to your account

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

            <%= f.email_field :email, autofocus: true, :class => "input-field-login", :placeholder => "Email" %>

            <%= f.password_field :password, autocomplete: "off", :class => "input-field-login", :placeholder => "Password" %>

          <% if devise_mapping.rememberable? %>

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

          <% end %>

            <%= f.submit "Submit", :class => "btn" %>

        <% end %>

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

Fix missing %> on login page

Fix missing %> on login page


<!DOCTYPE html>

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

    <%= render 'layouts/header' %>
    <%= yield %>

  <%= render 'layouts/footer' %>

<!DOCTYPE html>

  <title>Epix</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => 'reload' %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => 'reload' %>
  <%= csrf_meta_tags %>
  <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= render 'layouts/header' %>
    <%= yield %>

  <%= render 'layouts/footer' %>

Add meta in head to apply responsiveness


<!DOCTYPE html>

  <title>Borderlands Armory</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>

<%= yield %>

Copyright © 2012 by Lifted Studios.  All Rights Reserved.

"Borderlands" is a registered trademark of Gearbox Software, LLC.

Unify copyright and trademark information.


<h1> This is all of your tweets </h1>

<%@user.tweets.each do |tweet|  %>
  <p><%= tweet.body %> </p>
<% end %>

 This is all of your tweets

<form action="/users/<%=@user.id%>/tweets" method="post">
Post a New Tweet:
<input type="text" name="body" placeholder="Your Tweet here"><input type="submit" value="Tweet">
</form>

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

<%= tweet.body %>

<% end %>

Add a tweet button to an individuals users page


Add New Post

	we will add new post here

Add New Post

	<form role="form">
		<textarea class="form-control" rows="6"></textarea>

    	<button type="submit" class="btn btn-primary">Submit</button>
	</form>

Add textarea and primary button

Add textarea and primary button


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

  <link rel="icon" sizes="16x16 32x32" href="favicon.png">
  <link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="favicon.png" />

  <meta name="description" content="Pomodoro Time Organizer">

  <title>CherryTomato</title>
  <link rel="stylesheet" href="/assets/app.css">
</head>
<body>
  <%= erb :_navbar %>

  <%= yield %>

  <script src="/assets/app.js"></script>
</body>
</html>

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

  <link rel="icon" sizes="16x16 32x32" href="assets/favicon.png">
  <link rel="shortcut icon" type="image/x-icon" href="assets/favicon.png" />
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/favicon.png" />

  <meta name="description" content="Pomodoro Time Organizer">

  <title>CherryTomato</title>
  <link rel="stylesheet" href="/assets/app.css">
</head>
<body>
  <%= erb :_navbar %>

  <%= yield %>

  <script src="/assets/app.js"></script>
</body>
</html>

Set the correct path for favicon

Set the correct path for favicon


# /etc/multipath.conf
#
# DO NOT CHANGE THIS FILE MANUALLY!
#
# This file is managed by the Chef `sys::multipath` recipe.

defaults {
     user_friendly_names yes
}

# /etc/multipath.conf
#
# DO NOT CHANGE THIS FILE MANUALLY!
#
# This file is managed by the Chef `sys::multipath` recipe.

defaults {
     user_friendly_names yes
     path_grouping_policy failover
}

Add failover as default for multipath-policy


<%
require 'benchmark'
doc_start_time = Time.now
width_override = yield(:width) ? "width: #{yield(:width)}px !important;" : nil
%>
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
  <meta name="robots" content="noindex, nofollow" />
  <title>WesACB - <%= yield(:title) %></title>
  <%= stylesheet_link_tag    'application', media: 'all',
                                            'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

    <%= render 'layouts/title' %>
    <table width="100%" class="content" style="<%= width_override %>">
      <%= yield %>

      <%= link_to "Terms of Use", terms_path %> |
      <%= link_to "FAQ",          faq_path %> |
      <%= link_to "Statistics",   stats_path %>

      Page generated in <%= (Time.now-doc_start_time).round(2) %> seconds

<%
require 'benchmark'
doc_start_time = Time.now
width_override = yield(:width) ? "width: #{yield(:width)}px !important;" : nil
%>
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
  <meta name="robots" content="noindex, nofollow" />
  <title>WesACB - <%= yield(:title) %></title>
  <%= stylesheet_link_tag    'application', media: 'all',
                                            'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

    <%= render 'layouts/title' %>
    <table width="100%" class="content" style="<%= width_override %>">
      <%= yield %>

      <%= link_to "Terms of Use", terms_path %> |
      <%= link_to "FAQ",          faq_path %> |
      <%= link_to "Statistics",   stats_path %>

      Page generated in <%= (Time.now-doc_start_time).round(3) %> seconds

Change rounding to 3 seconds

Change rounding to 3 seconds


<% if order.errors.any? %>

Your order could not be placed at this time. Please fix the following errors:

      <% order.errors.full_messages.each do |order_error_message| %>

<%= order_error_message %>

          <% if order_error_message == "Shipper is invalid" %>

              <% order.shipper.errors.full_messages.each do |shipper_error_message| %>

<%= shipper_error_message %>

              <% end %>

          <% elsif order_error_message == "Recipient is invalid"%>

              <% order.recipient.errors.full_messages.each do |recipient_error_message| %>

<%= recipient_error_message %>

              <% end %>

          <% end %>

      <% end %>

<% end %>

Create errors partial for new orders

Create errors partial for new orders


<% content_for :introduction do %>
  <%= raw @page.content_for(:introduction) % @project_infos %>
<% end %>

<% content_for :key_features do %>
  <div class="inner-wrapper">
    <%= raw @page.content_for(:key_features) %>
  </div>
<% end %>

<%= render 'refinery/content_page', hide_sections: [:body_content_title] %>

  <%= @page.title %>

<% content_for :introduction do %>
  <%= raw @page.content_for(:introduction) % @project_infos %>
<% end %>

<% content_for :key_features do %>

    <%= raw @page.content_for(:key_features) %>

<% end %>

<%= render 'refinery/content_page', hide_sections: [:body_content_title] %>

Add visuallyhidden h1 to home template

Add visuallyhidden h1 to home template


  <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) },
                 :method => 'get', :class => 'search_form' ) do %>

_('Searches')

      <%= assets_menu(@asset) %>
      <%= filters(@asset) %>

        <%= search_input_with_suggestions('query', @asset, @query, {:id => 'search-input', :size => 50, :placeholder => hint}) %>

      <%= submit_button(:search, _('Search')) %>

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

  <% end %>

  <% if @empty_query %>
    <% hint = environment.search_hints[@asset] %>
    <% if hint and !hint.blank? %>

<%= hint %>

    <% end %>
  <% end %>

  <%= form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.path : nil ) },
                 :method => 'get', :class => 'search_form' ) do %>

<% _('Searches') %>

      <%= assets_menu(@asset) %>
      <%= filters(@asset) %>

        <%= search_input_with_suggestions('query', @asset, @query, {:id => 'search-input', :size => 50, :placeholder => hint}) %>

      <%= submit_button(:search, _('Search')) %>

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

  <% end %>

  <% if @empty_query %>
    <% hint = environment.search_hints[@asset] %>
    <% if hint and !hint.blank? %>

<%= hint %>

    <% end %>
  <% end %>

Add title for search page header 2

Add title for search page header 2


<server>

 <featureManager>
     <feature>servlet-3.0</feature>
 </featureManager>

  <httpEndpoint id="defaultHttpEndpoint" host="0.0.0.0" httpPort="9080" httpsPort="9443"/>
  <% @apps.each do |appName| -%>
  <% newname = appName.split(/\.(ZIP|zip|[EeJjRrWw][Aa][Rr]|[Ee][BbSs][Aa])/) %>
   <include optional="true" location="<%= scope.lookupvar('wlp::includesDir_final') %>/<%= newname.first%>.xml"/>
 <% end -%>
</server>

<server>

 <featureManager>
     <feature>servlet-3.0</feature>
 </featureManager>

  <httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443"/>
  <% @apps.each do |appName| -%>
  <% newname = appName.split(/\.(ZIP|zip|[EeJjRrWw][Aa][Rr]|[Ee][BbSs][Aa])/) %>
   <include optional="true" location="<%= scope.lookupvar('wlp::includesDir_final') %>/<%= newname.first%>.xml"/>
 <% end -%>
</server>

Fix httpEndpoint host attribute to default to *

Fixes #2


New Data Set

<%= render 'form', data_set: @data_set %>

<%= link_to 'Back', admin_data_sets_path %>

New Data Set

<%= render 'form', data_set: @data_set %>

<%= link_to 'Back', admin_contest_path(@data_set.contest) %>

Fix back link to contest_path

Fix back link to contest_path


<!DOCTYPE html>
<html>
<head>
  <title>RailsApp</title>
  <%= stylesheet_link_tag    "application" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>

  <%= render 'layouts/breadcrumbs' %>

  <%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>RailsApp</title>
  <%= csrf_meta_tags %>
</head>
<body>

  <%= render 'layouts/breadcrumbs' %>

  <%= yield %>

</body>
</html>

Change to stop including assets

Change to stop including assets


---
title: "Community"
---

  See Who's Using Ember.js

  <% data.users.each_slice(3) do |slice| %>

      <% slice.each do |user| %>

          <a href="<%= user.url %>" rel="nofollow">
            <img src="/images/about/<%= user.image %>">

      <% end %>

  <% end %>

  To add your company or project to this page, submit a Pull Request.
Be sure that your logo has a transparent background and includes adequate white space.

---
title: "Community"
---

  See Who's Using Ember.js

  <% data.users.each_slice(3) do |slice| %>

      <% slice.each do |user| %>

          <a href="<%= user.url %>" rel="nofollow">
            <img src="/images/about/<%= user.image %>" width="210" height="103" alt="">

      <% end %>

  <% end %>

  To add your company or project to this page, submit a Pull Request.
Be sure that your logo has a transparent background and includes adequate white space.

Add fixed dimensions to user image tags as a quick fix for supporting HiDPI logos


<form method="GET" action="<%= url %>" class="search_form">
  <input id="search" name="search" size="22" type="search" value="<%= params[:search] %>" />
  <input id="dialog" name="dialog" type="hidden" value="<%= from_dialog? %>" />
  <%= submit_tag t('admin.search'), :name => "" %>
</form>

<form method="GET" action="<%= url %>" class="search_form">
  <input id="search" name="search" size="22" type="search" value="<%= params[:search] %>" />
  <input id="dialog" name="dialog" type="hidden" value="<%= from_dialog? %>" />
  <%= submit_tag t('admin.search'), :name => nil %>
</form>

Make sure the required alt attribute is created.


<% content_for :title do %>Authorities - Licensing performance - GOV.UK<% end %>
<% @js_config = { "controller" => "licensing/controllers/authorities" } %>

      Licensing performance
      Authorities
      (authorities on GOV.UK only)

National and local authorities

<%= @num_authorities %>

    <% @authorities.each do |letter, group| %>

<%= letter.upcase %>

        <% group.each do |authority| %>

<%= link_to authority.name, authority_path(authority.slug) %>

        <% end %>

    <% end %>

<% content_for :title do %>Authorities - Licensing performance - GOV.UK<% end %>
<% @js_config = { "controller" => "licensing/controllers/authorities" } %>

      Licensing performance
      Authorities
      Figures for all authorities offering licenses through GOV.UK

National and local authorities

<%= @num_authorities %>

    <% @authorities.each do |letter, group| %>

<%= letter.upcase %>

        <% group.each do |authority| %>

<%= link_to authority.name, authority_path(authority.slug) %>

        <% end %>

    <% end %>

Update sub for authorities list

Update sub for authorities list


<% if profile %>

    <%= profile_picture_link(profile) %>

        <%= link_to profile.fullname, profile %>

        <%= profile.main_topic_or_first_topic.truncate(60) if profile.main_topic_or_first_topic %>

<% end %>

Make sure a profile exists in the partial


<%= tab :overview, :route => :admin, :icon => 'icon-dashboard' %>
<%= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations, :icon => 'icon-shopping-cart' %>
<%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons, :icon => 'icon-th-large' %>
<%= tab :reports, :icon => 'icon-file'  %>
<%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration', :icon => 'icon-wrench', :url => spree.edit_admin_general_settings_path %>

<%= tab :overview, :route => :admin, :icon => 'icon-dashboard' %>
<%= tab :orders, :payments, :creditcard_payments, :shipments, :credit_cards, :return_authorizations, :icon => 'icon-shopping-cart' %>
<%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :icon => 'icon-th-large' %>
<%= tab :reports, :icon => 'icon-file'  %>
<%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :label => 'configuration', :icon => 'icon-wrench', :url => spree.edit_admin_general_settings_path %>

Adjust admin product tab selected

Adjust admin product tab selected

removing taxon from the list of controllers which make it selected

Fixes #2579


  <%= simple_form_for [sufia, @form], html: { multipart: true } do |f| %>
    <%= hidden_field_tag('redirect_tab', 'descriptions') %>

Descriptions * indicates required fields

        <% f.object.terms.each do |term| %>
          <%= render_edit_field_partial(term, f: f) %>
        <% end %>

      <%= f.submit class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" do %>
         Save Descriptions
      <% end %>

  <% end %>

  <%= simple_form_for [sufia, @form], html: { multipart: true } do |f| %>
    <%= hidden_field_tag('redirect_tab', 'descriptions') %>

Descriptions * indicates required fields

        <% f.object.terms.each do |term| %>
          <%= render_edit_field_partial(term, f: f) %>
        <% end %>

      <%= button_tag class: 'btn btn-primary btn-lg', id: "upload_submit", name: "update_descriptions" do %>
         Save Descriptions
      <% end %>

  <% end %>

Fix Generic File metadata update button

Fix Generic File metadata update button


<%
  calculator = local_assigns[:calculator]
  errors = calculator.try(:errors)
%>

Find out what you’d get after tax

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

<form action="/take-whole-pot/results#calculator" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: local_assigns[:pot],
             label: 'Total pension pot value',
             error_message: errors.try(:fetch, :pot).try(:first) %>

  <%= render 'calculators/form_input_currency',
             field: :income,
             value: local_assigns[:income],
             label: 'Income for the year',
             hint: 'Includes your salary, savings, benefits and State Pension payments',
             error_message: errors.try(:fetch, :income).try(:first) %>

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

<%
  calculator = local_assigns[:calculator]
  errors = calculator.try(:errors)
%>

Find out what you’d get after tax

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

<form action="/take-whole-pot/results#calculator" method="get">
  <%= render 'calculators/form_input_currency',
             field: :pot,
             value: local_assigns[:pot],
             label: 'Total pension pot value',
             error_message: errors.try(:get, :pot).try(:first) %>

  <%= render 'calculators/form_input_currency',
             field: :income,
             value: local_assigns[:income],
             label: 'Income for the year',
             hint: 'Includes your salary, savings, benefits and State Pension payments',
             error_message: errors.try(:get, :income).try(:first) %>

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

Fix inline calculator error messages

Fix inline calculator error messages


Remove hardcoded conversion_label from conversion partial


<%= render "shared/globalize_locales",
           resource: @process,
           display_style: lambda { |locale| enable_translation_style(@process, locale) } %>

<%= translatable_form_for [:admin, @process], url: url, html: {data: {watch_changes: true}} do |f| %>

  <%= render "shared/errors", resource: @process %>

    <%= f.check_box :homepage_enabled, label: t("admin.legislation.processes.form.homepage_enabled") %>

  <%= f.translatable_fields do |translations_form| %>

        <%= translations_form.cktext_area :homepage,
                                          language: I18n.locale,
                                          label: t("admin.legislation.processes.form.homepage"),
                                          ckeditor: { height: 500, toolbar: "admin" },
                                          hint: t("admin.legislation.processes.form.homepage_description") %>

  <% end %>

    <%= f.submit(class: "button success expanded", value: t("admin.legislation.processes.#{admin_submit_action(@process)}.submit_button")) %>

<% end %>

Align admin legislation homepages form fields with new translations interface


## Description:
 <%= loggregator_pagerduty %>
The count of sent messages from the Metron Agent does not match the count of received messages on the Doppler Server.

## Escalation Path:
  LAMBDA Team.

## Reasons this has alerted before:
- Doppler had run out of file descriptors. Check by doing `ulimit -a`

## What we have done before:
- Recreated doppler servers when they had run out of file descriptors.

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

<%= environment %> CF: Loggregator Message reliability from Metron to Doppler below threshold

Question: avg(last_1h):100 * rate(sum:datadog.nozzle.DopplerServer.listeners.receivedEnvelopes{*}) / ( rate(sum:datadog.nozzle.MetronAgent.DopplerForwarder.sentMessages{*}) + rate(sum:datadog.nozzle.loggregator.metron.egress{*}) ) < 85

Question: avg(last_1h):100 * ( rate(sum:datadog.nozzle.DopplerServer.listeners.receivedEnvelopes{*}) + rate(sum:datadog.nozzle.loggregator.doppler.ingress{*}) ) / ( rate(sum:datadog.nozzle.MetronAgent.DopplerForwarder.sentMessages{*}) + rate(sum:datadog.nozzle.loggregator.metron.egress{*}) ) < 85

Add doppler ingress metric to monitor

Add doppler ingress metric to monitor

Signed-off-by: Jason Keene <6860b6804203c35846513c1877d6effca68277e9@pivotal.io>


<%# no need for thumbnails unless there is more than one image %>
<% if (@product.images + @product.variant_images).uniq.size > 1 %>

    <% @product.images.each do |i| %>
      <li class='tmb-all tmb-<%= i.viewable.id %>'>
        <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>

    <% end %>

    <% if @product.has_variants? %>
      <% @product.variant_images.each do |i| %>
        <% next if @product.images.include?(i) %>
        <li class='vtmb tmb-<%= i.viewable.id %>'>
          <%= link_to(image_tag(i.attachment.url(:mini)), i.attachment.url(:product)) %>

      <% end %>
    <% end %>

<% end %>

<%# no need for thumbnails unless there is more than one image %>
<% if @product.gallery.images.size > 1 %>

    <% @product.gallery.images.each do |image| %>
      <% next if image.viewable_id != @product.master.id %>
      <li class='tmb-all tmb-<%= image.viewable_id %>'>
        <%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>

    <% end %>

    <% if @product.has_variants? %>
      <% @product.gallery.images.each do |image| %>
        <% next if image.viewable_id == @product.master.id %>
        <li class='vtmb tmb-<%= image.viewable_id %>'>
          <%= link_to(image_tag(image.url(:mini)), image.url(:product)) %>

      <% end %>
    <% end %>

<% end %>

Modify product thumbnails for frontend

Modify product thumbnails for frontend

Doing this allows a developer to plug in different galleries for
variants and products and not need to modify existing core models to
change image providers.

This change is motivated by the need to remove the deprecated Paperclip
project from Solidus.

See PR 2337 for more context.


[slack]
name=slack
baseurl=https://packagecloud.io/slacktechnologies/slack/fedora/21/x86_64
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
priority=<%= @priority %>
<% unless @exclude.empty? -%>
exclude=<%= @exclude.to_a.join(' ') %>
<% end -%>
<% unless @include.empty? -%>
includepkgs=<%= @include.to_a.join(' ') %>
<% end -%>

[slack]
name=slack
baseurl=https://packagecloud.io/slacktechnologies/slack/fedora/21/x86_64
enabled=1
gpgcheck=0
gpgkey=https://packagecloud.io/gpg.key
repo_gpgcheck=1
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
priority=<%= @priority %>
<% unless @exclude.empty? -%>
exclude=<%= @exclude.to_a.join(' ') %>
<% end -%>
<% unless @include.empty? -%>
includepkgs=<%= @include.to_a.join(' ') %>
<% end -%>

Update GPG settings for Slack repo

Update GPG settings for Slack repo


<%= render "apps/heading", app: @app, tab: "info" %>

        Name
        <%= @app.name %>

        Deploy URL
        dokku@<%= @app.server.ip %>:<%= @app.name %>

        Domain
        <%= @app.domain %>
        <%# link_to "Change", "#" %>

        Active services
        <%= @app.services.map(&:name).join(", ").presence || "None" %>
        <%= link_to "Change", "#" %>

      <%#
 %>
      <%#   SSL active	 %>
      <%#   No	 %>
      <%#   <%= link_to "Enable SSL", "#" %1>	 %>
      <%#
 %>

<%= render "apps/heading", app: @app, tab: "info" %>

        Name
        <%= @app.name %>

        Deploy URL
        dokku@<%= @app.server.ip %>:<%= @app.clean_name %>

        Domain
        <%= @app.domain %>
        <%# link_to "Change", "#" %>

        Active services
        <%= @app.services.map(&:name).join(", ").presence || "None" %>
        <%= link_to "Change", "#" %>

      <%#
 %>
      <%#   SSL active	 %>
      <%#   No	 %>
      <%#   <%= link_to "Enable SSL", "#" %1>	 %>
      <%#
 %>

Make sure we use the clean name for deploy Url

Signed-off-by: Jeroen van Baarsen <2e488d5cebaf6d2832884be70e328933bd4c80ab@gmail.com>


<% content_for :title, "Tag: #{@tag.name}" %>

<%= @tag.name %>

  <% @tag.sorted_pages.each do |page| %>

<%= link_to page.name, page_path(page) %>

  <% end %>

<% content_for :title, "Tag: #{@tag.name}" %>

<%= @tag.name %>

  <% @tag.sorted_pages.each do |page| %>

<%= link_to page.title, page_path(page) %>

  <% end %>

Use page title on tag show page

Use page title on tag show page


Posts tagged with <%=@tag.name%>:

<% @tag.questions.each do |question| %>
    <%= render partial: "questions/question", locals: {question: question} %>
<% end %>

Questions tagged with <%=@tag.name%>:

<% @tag.questions.each do |question| %>

<%= link_to question.title, question_path(question) %>

<% end %>

Add tags for styling and change the view to have links to all questions associated to that tag


Redirects

    From
    To

  <% redirects.each do |redirect| %>

      <%= link_to website_url(redirect.from_base_path) %>
      <%= link_to website_url(redirect.to_base_path) %>

  <% end %>

Redirects

    From
    To
    Added

  <% redirects.order('created_at DESC').each do |redirect| %>

      <%= redirect.created_at.to_formatted_s(:long) %>
      <%= link_to redirect.from_base_path, website_url(redirect.from_base_path), target: '_blank' %>
      <%= link_to redirect.to_base_path, website_url(redirect.to_base_path), target: '_blank' %>

  <% end %>

Make links to redirects work

Make links to redirects work

Providing only one argument to `link_to` will generate a link to the
page itself. The original intent was of course to link to the URL.

Also adds the created date for extra context.


MIGRAINE TRIGGER SEARCH

    <input class="search-box" type="text" placeholder="Is it a migraine trigger? start typing to search >>" ng-model="search">

{{trigger.name}}

Add link back to project description in header


production:
  morphology: stem_en
  index_exact_words: 1
  <% if node[:chef][:roles].include?('app') || node[:chef][:roles].include?('worker') %>
  address: <%= @server_address %>
  port: <%= @server_port %>
  mem_limit: <%= @memory_limit %>
  version: <%= @version %>
  <% end %>
  searchd_log_file: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>shared/log/searchd.log
  query_log_file: <%=node[:apache][:web_dir]%>apps/<%=node[:apache][:name]%>/shared/log/searchd.query.log
  pid_file: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>/shared/tmp/searchd.pid
  searchd_file_path: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>/shared/db/sphinx/production

production:
  morphology: stem_en
  index_exact_words: 1
  <% if node[:chef][:roles].include?('app') || node[:chef][:roles].include?('worker') %>
  address: <%= @server_address %>
  port: <%= @server_port %>
  mem_limit: <%= @memory_limit %>
  version: <%= @version %>
  <% end %>
  searchd_log_file: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>/shared/log/searchd.log
  query_log_file: <%=node[:apache][:web_dir]%>apps/<%=node[:apache][:name]%>/shared/log/searchd.query.log
  pid_file: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>/shared/tmp/searchd.pid
  searchd_file_path: <%=node[:apache][:web_dir]%>/apps/<%=node[:apache][:name]%>/shared/db/sphinx/production

Add missing / in path

Add missing / in path


<%# Non-link tag that stands for skipped pages...
  - available local variables
    current_page:  a page object for the currently displayed page
    total_pages:   total number of pages
    per_page:      number of items to fetch per page
    remote:        data-remote
-%>

<%= raw(t 'views.pagination.truncate') %>

Make _gap use bootstrap's disabled class


      Mafia Stars

      <% if current_admin.present? %>
          <a href="<%= add_game_path(tournament: 'ms') %>">Добавить результаты игры

          <a href="<%= new_big_tournament_tour_path %>">Добавить новый тур

          <a href="<%= big_tournament_tours_path %>">Упрвление турами

      <% end %>
      <% @tours.each do |tour| %>
          <% if tour.id == 7 %>
              <a href="<%= mcl_cup_path(id: tour.id) %>"> <%= tour.name %>

          <% else %>
              <a href="<%= mafia_stars_results_path(id: tour.id) %>"> <%= tour.name %>

          <% end %>
      <% end %>

      Турниры

      <% if current_admin.present? %>
          <a href="<%= add_game_path(tournament: 'ms') %>">Добавить результаты игры

          <a href="<%= new_big_tournament_tour_path %>">Добавить новый тур

          <a href="<%= big_tournament_tours_path %>">Упрвление турами

      <% end %>
      <% @tours.each do |tour| %>
          <% if tour.id == 7 %>
              <a href="<%= mcl_cup_path(id: tour.id) %>"> <%= tour.name %>

          <% else %>
              <a href="<%= mafia_stars_results_path(id: tour.id) %>"> <%= tour.name %>

          <% end %>
      <% end %>

Change mafia stars to tournaments

Change mafia stars to tournaments


    <% @stylesheets.each do |group| %>
      <% section = group[0] %>
      <% section_slug = section.downcase.gsub(/[^a-z1-9]+/, '-').chomp('-') %>
      <% chunks = group[1] %>

      <li class="h1 <%= "active" if section.downcase.gsub(/[^a-z1-9]+/, '-').chomp('-') == params[:section] %>">
        <%= link_to section, vivus_section_path(section_slug) %>

        <% if chunks.present? %>

            <% chunks.each do |chunk| %>

                <%= link_to chunk.name, vivus_section_path(section_slug, anchor: chunk.slug) %>

            <% end %>

        <% end %>

    <% end %>

    <% @stylesheets.each do |group| %>
      <% section = group[0] %>
      <% section_slug = section.downcase.gsub(/[^a-z1-9]+/, '-').chomp('-') %>
      <% components = group[1] %>

      <li class="h1 <%= "active" if section.downcase.gsub(/[^a-z1-9]+/, '-').chomp('-') == params[:section] %>">
        <%= link_to section, vivus_section_path(section_slug) %>

        <% if components.present? %>

            <% components.each do |component| %>

                <%= link_to component.name, vivus_section_path(section_slug, anchor: component.slug) %>

            <% end %>

        <% end %>

    <% end %>

Call a component by component in the nav.


<div data-id="<%= response.id %>"class="response">

 Nathan

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

   Comments

  <% 3.times do %>
    <%= render 'comment' %>
  <% end %>

Move data-id attribute to comments as an example.


<% content_for(:title, "Job Signups") %>
<% if @period.nil? %>
  <%= render("work/shared/no_period_notice") %>
<% else %>
  <%= render("shifts") %>

      <%= render("pagination") %>

      <%= lenses[:choosee].render %>

<% end %>
<%= javascript_tag do %>
  $(function() {
    new Gather.Views.Work.ShiftsView({el: '#content', autorefresh: <%= @autorefresh.to_json %>});
  });
<% end %>

<% content_for(:title, "Job Signups") %>
<% content_for(:top_buttons) do %>
  <%= calendar_exports_link %>
<% end %>

<% if @period.nil? %>
  <%= render("work/shared/no_period_notice") %>
<% else %>
  <%= render("shifts") %>

      <%= render("pagination") %>

      <%= lenses[:choosee].render %>

<% end %>
<%= javascript_tag do %>
  $(function() {
    new Gather.Views.Work.ShiftsView({el: '#content', autorefresh: <%= @autorefresh.to_json %>});
  });
<% end %>

Add calendar export link to shift page

9216: Add calendar export link to shift page


<% if @guestnum == nil %>
  <% @guestnum = 0 %>
<% end %>

  <%= label_tag 'Firstname:' %>
  <%= text_field_tag 'firstnames[]' %>
  <%= label_tag 'Lastname:' %>
  <%= text_field_tag 'lastnames[]' %>

    <%= label_tag 'Attending?' %>
    Yes!: <%= radio_button_tag "attending[#{@guestnum}]", 'true', true %>
    Nope: <%= radio_button_tag "attending[#{@guestnum}]", 'false' %>

<% if @guestnum == nil %>
  <% @guestnum = 0 %>
<% end %>

  <%= label_tag 'First name:' %>
  <%= text_field_tag 'firstnames[]' %>
  <%= label_tag 'Last name:' %>
  <%= text_field_tag 'lastnames[]' %>

    <%= label_tag 'Attending?' %>
    Yes!: <%= radio_button_tag "attending[#{@guestnum}]", 'true', true %>
    Nope: <%= radio_button_tag "attending[#{@guestnum}]", 'false' %>

Fix typos in the invite

Fix typos in the invite


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

  <% @spots.each do |spot| %>

<%= link_to spot.name, spot_path(spot) %>

<%= spot.address %>

<%= spot.phone %>

<%= spot.website %>

<%= spot.photo %>

      <%= spot.favorites_count %>
      <% if @user %>
        <% if @user.favorite == nil %>
          <%= link_to 'My Favorite!', "/spots/#{spot.id}/favorites", :method => :post %>
        <% elsif @user && spot.favorites.include?(@user.favorite) %>

This is your favorite!

        <% else %>

Thinking of changing your mind?

        <% end %>
      <% end %>

  <% end %>

Add search form to spot index

Add search form to spot index


<% if current_process %>
  <% content_for :breadcrumb_current_item do %>

      <%= link_to t('gobierto_participation.layouts.menu_subsections.processes'), gobierto_participation_processes_path %>

    /

      <%= link_to current_process.title, gobierto_participation_process_path(current_process.slug) %>

  <% end %>
<% end %>

        <%= raw @information_text %>

<% if current_process %>
  <% content_for :breadcrumb_current_item do %>

      <%= link_to t('gobierto_participation.layouts.menu_subsections.processes'), gobierto_participation_processes_path %>

    /

      <%= link_to current_process.title, gobierto_participation_process_path(current_process.slug) %>

  <% end %>
<% end %>

<%= content_for :body_attributes do %>
  class="theme-participation gobierto_participation content"
<% end %>

        <%= raw @information_text %>

Add process information class to body

Add process information class to body


---
- scm:
    name: govuk-provisioning_Launch_VMs_Licensify
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
              - master
- job:
    name: Launch_VMs_Licensify
    display-name: Launch VMs for Licensify
    project-type: freestyle
    description: |
      Job to launch Licensify virtual machines in <%= @environment -%>.
      If you are running this to bring up a new machine you will need to be signing certs on the puppetmaster
      with `fab <%= @environment -%> puppet.sign_certificates`
    properties:
        - github:
            url: https://github.gds/gds/alphagov-deployment/
        - inject:
            properties-content: |
              VCLOUD_ORG=<%= @vcloud_properties_licensify['organisation'] %>
              VCLOUD_ENV=<%= @vcloud_properties_licensify['environment'] %>
              VCLOUD_USERNAME=${USERNAME}@${VCLOUD_ORG}
              VCLOUD_HOST=<%= @vcloud_properties['host'] %>
    scm:
      - govuk-provisioning_Launch_VMs_Licensify
    builders:
        - shell: |
            ./vcloud-launcher/jenkins.sh
    parameters:
        - string:
            name: USERNAME
            description: your vcloud username
            default: false
        - string:
            name: CONFIG_GLOB
            description: glob for config files.
            default: "licensify.yaml"
        - password:
            name: VCLOUD_PASSWORD
            description: your vcloud password
            default: false

---
- scm:
    name: govuk-provisioning_Launch_VMs_Licensify
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
              - master
- job:
    name: Launch_VMs_Licensify
    display-name: Launch VMs for Licensify
    project-type: freestyle
    description: |
      Job to launch Licensify virtual machines in <%= @environment -%>.
      If you are running this to bring up a new machine you will need to be signing certs on the puppetmaster
      with `fab <%= @environment -%> puppet.sign_certificates`
    properties:
        - github:
            url: https://github.gds/gds/alphagov-deployment/
        - inject:
            properties-content: |
              VCLOUD_ORG=<%= @vcloud_properties_licensify['organisation'] %>
              VCLOUD_ENV=<%= @vcloud_properties_licensify['environment'] %>
              VCLOUD_USERNAME=${USERNAME}@${VCLOUD_ORG}
              VCLOUD_HOST=<%= @vcloud_properties_licensify['host'] %>
    scm:
      - govuk-provisioning_Launch_VMs_Licensify
    builders:
        - shell: |
            ./vcloud-launcher/jenkins.sh
    parameters:
        - string:
            name: USERNAME
            description: your vcloud username
            default: false
        - string:
            name: CONFIG_GLOB
            description: glob for config files.
            default: "licensify.yaml"
        - password:
            name: VCLOUD_PASSWORD
            description: your vcloud password
            default: false

Fix hostname for building licensing machines


#!/bin/bash

export JASYPT_ENCRYPTOR_PASSWORD=<%= @properties_encryption_key %>
export SPRING_CONFIG_LOCATION=<%= @spring_config_location %>
export LOGGING_CONFIG=<%= @logging_config_file %>
export JAVA_OPTS="<%= @java_options %>"

<%= @bin_directory %>/<%= @app_name %>.jar

#!/bin/bash

export JASYPT_ENCRYPTOR_PASSWORD=<%= @properties_encryption_key %>
export SPRING_CONFIG_LOCATION=classpath:/,<%= @spring_config_location %>
export LOGGING_CONFIG=<%= @logging_config_file %>
export JAVA_OPTS="<%= @java_options %>"

<%= @bin_directory %>/<%= @app_name %>.jar

Upgrade to Spring Boot 2.1

Upgrade to Spring Boot 2.1


  <div class='card-image' style='background-image: url(<%= project.card_image_url || "http://placehold.it/640x480"%>)'>

      <%= link_to project.name, project_path(project), title: project.name %>

<%= truncate(project.blurb, length: 140)%>

      <%= pluralize(number_with_delimiter(project.points_donated), 'pt') %>

    <%= link_to 'learn more', project_path(project), class: 'card-learn-more' %>

  <%= link_to project_path(project), title: project.name  do %>
    <div class='card-image' style='background-image: url(<%= project.card_image_url || "http://placehold.it/640x480"%>)'>

  <% end %>

      <%= link_to project.name, project_path(project), title: project.name %>

<%= truncate(project.blurb, length: 140)%>

      <%= pluralize(number_with_delimiter(project.points_donated), 'pt') %>

    <%= link_to 'learn more', project_path(project), class: 'card-learn-more' %>

Make project card image clickable.

Make project card image clickable.


<% address_id = address_type.chars.first %>

<% ADDRESS_FIELDS.each do |field| %>
  <% if field == "country" %>
    <p class="form-group" id="<%= "#{address_id}country" %>">
      <%= address_form.label :country_id, Spree.t(:country) %>*

      <span id="<%= "#{address_id}country-selection" %>">
        <%= address_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>

  <% elsif field == "state" %>
    <%= address_field(address_form, :state, address_id) { address_state(address_form, address.country, address_id) } if Spree::Config[:address_requires_state] %>
  <% else %>
    <% next if field == "company" && !Spree::Config[:company] %>
    <% next if field == "alternative_#{address_id}_phone" && !Spree::Config["alternative_#{address_id}_phone"] %>
    <%= address_field(address_form, field.to_sym, address_id) %>
  <% end %>
<% end %>

<% address_id = address_type.chars.first %>

<% ADDRESS_FIELDS.each do |field| %>
  <% if field == "country" %>
    <p class="form-group" id="<%= "#{address_id}country" %>">
      <%= address_form.label :country_id, Spree.t(:country) %>*

      <span id="<%= "#{address_id}country-selection" %>">
        <%= address_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required form-control'} %>

  <% elsif field == "state" %>
    <%= address_field(address_form, :state, address_id) { address_state(address_form, address.country, address_id) } if Spree::Config[:address_requires_state] %>
  <% else %>
    <% next if field == "company" && !Spree::Config[:company] %>
    <% next if field == "alternative_#{address_id}_phone" && !Spree::Config["alternative_#{address_id}_phone"] %>
    <%= address_field(address_form, field.to_sym, address_id) %>
  <% end %>
<% end %>

Adjust country select for bootstrap

Adjust country select for bootstrap

This adds the bootstrap styling to the country select box in the address forms. Goodlooking!


[user]
  name = <%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>
  email = <%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>
[alias]
  co = checkout
  ci = commit
  st = status
  br = branch
  addm = !git-ls-files -m -z | xargs -0 git-add && git status                     # add modified files
  addu = !git-ls-files -o --exclude-standard -z | xargs -0 git-add && git status  # add new files
  rmm  = !git ls-files -d -z | xargs -0 git-rm && git status                      # remove deleted file
[color]
  ui = true
[core]
  excludesfile = <%= ENV['HOME'] %>/.gitignore
  autocrlf = input
  editor = gvim -f
[apply]
  whitespace = nowarn
[github]
  user = <%= print("GitHub Username: "); STDOUT.flush; STDIN.gets.chomp %>
  token = <%= print("GitHub API Token: "); STDOUT.flush; STDIN.gets.chomp %>
[merge]
  tool = kdiff3
[push]
  default = tracking

[user]
  name = <%= print("Your Name: "); STDOUT.flush; STDIN.gets.chomp %>
  email = <%= print("Your Email: "); STDOUT.flush; STDIN.gets.chomp %>
[alias]
  co = checkout
  ci = commit
  st = status
  br = branch
  l = log --decorate
  addm = !git-ls-files -m -z | xargs -0 git-add && git status                     # add modified files
  addu = !git-ls-files -o --exclude-standard -z | xargs -0 git-add && git status  # add new files
  rmm  = !git ls-files -d -z | xargs -0 git-rm && git status                      # remove deleted file
[color]
  ui = true
[core]
  excludesfile = <%= ENV['HOME'] %>/.gitignore
  autocrlf = input
  editor = gvim -f
[apply]
  whitespace = nowarn
[github]
  user = <%= print("GitHub Username: "); STDOUT.flush; STDIN.gets.chomp %>
  token = <%= print("GitHub API Token: "); STDOUT.flush; STDIN.gets.chomp %>
[merge]
  tool = kdiff3
[push]
  default = tracking

Add 'git l' alias for 'git log --decorated'


<%= ENV['OPENSHIFT_NODE4_DIR'] %>bin/node/bin:<%= ENV['HOME'] %>.gem/bin/

<%= ENV['OPENSHIFT_NODE4_DIR'] %>bin/node/bin
<%= ENV['HOME'] %>/.gem/bin/

Add '/' and try to fix duplicate path elements.

Signed-off-by: Keith Robertson <10d2c9d246f30512b2f83b76cef5f45955435ef6@redhat.com>


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

<%= heading_tag t('layouts.base.title'), class: 'visually-hidden' %>

<%= render 'shared/trust_banner', items: t('.trust_banner_list') %>

    <%= heading_tag(level: heading_level ||= 2, class: 'l-home-directory__title') do %>
      <%= t('.directory_heading') %>
    <% end %>
    <%= render 'shared/directory', items: category_navigation %>

<%= render 'shared/tool_promos', items: t('.tools') %>

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

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

<%= heading_tag t('layouts.base.title'), class: 'visually-hidden' %>

<%= render 'shared/trust_banner', items: t('.trust_banner_list') %>

    <%= heading_tag(level: heading_level ||= 2, class: 'l-home-directory__title') do %>
      <%= t('.directory_heading') %>
    <% end %>
    <%= render 'shared/directory', items: category_navigation %>

<% if Feature.active?(:tools_promos) %>
  <%= render 'shared/tool_promos', items: t('.tools') %>

<% end %>

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

Add feature toggle around tools_promo section


Signup for Blog App

    <%= render "shared/errors", article: @user %>

            <%= form_for @user, html: { class: "mdl-card mdl-shadow--2dp card-form" } do |f|%>

                        <%= f.label :username, class: "mdl-textfield__label" %>
                        <%= f.text_field :username, class: "mdl-textfield__input" %>

                        <%= f.label :email, class: "mdl-textfield__label" %>
                        <%= f.email_field :email, class: "mdl-textfield__input" %>

                        <%= f.label :password, class: "mdl-textfield__label" %>
                        <%= f.password_field :password, class: "mdl-textfield__input" %>

                    <%= f.submit "Sign Up", class: "mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect" %>
                    <%= link_to "Back to the list", articles_path, class: "mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect" %>

            <% end %>

Create signup template for users

Create signup template for users


<!DOCTYPE html>
<html>
    <head>
        <title>Mailpenny</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
        <%= csrf_meta_tags %>
        <%= yield :meta_data %>
        <%= stylesheet_link_tag    'application', media: 'all' %>
        <%= render 'favicon' %>

    </head>

    <body>
        <%= render 'header' %>
        <%= render 'flash_messages'%>
        <%= yield :body %>
        <%= render 'footer' %>
        <%= javascript_include_tag 'application' %>
    </body>
</html>

<!DOCTYPE html>
<html>
    <head>
        <title>Mailpenny</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
        <%= csrf_meta_tags %>
        <%= yield :meta_data %>
        <%= stylesheet_link_tag    'application', media: 'all' %>
        <%= render 'favicon' %>

    </head>

    <body>

        <%= render 'header' %>
        <%= render 'flash_messages'%>
        <%= yield :body %>
        <%= render 'footer' %>
        <% if user_signed_in? %>
        <!-- begin user information -->
        <%= tag("div", class: 'hidden-user-information', data: {
          intercom_app_id: 'qvnmie0g',
          user_id: current_user.id,
          user_name: current_user.profile.name,
          user_email: current_user.email,
          user_created_at: current_user.created_at.to_i
          })  %>
        <!-- end user information -->
        <% end %>
        <%= javascript_include_tag 'application' %>
    </body>
</html>

Add user data attributes when user is logged in


<!DOCTYPE html>

  <title>IreulWeb</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="/favicon.gif">
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<%= yield %>

<% if session[:user_id] %>

        <%= react_component('RadioSkipButton', {
            httpMethod: "post",
            radioMethod: "/radio/skip",
            label: "Skip"
        }) %>

<%= sprintf("%.2f", (Time.now.to_f - @start_time)) %>s

        <%= link_to 'Admin', admin_path, data: { no_turbolink: true } %>
        <%= button_to 'Logout', logout_path, method: :delete %>

<% end %>

<!DOCTYPE html>

  <title>IreulWeb</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="shortcut icon" href="/favicon.gif">
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

<%= yield %>

<% if session[:user_id] %>

        <%= react_component('RadioSkipButton', {
            httpMethod: "post",
            radioMethod: "/radio/skip",
            label: "Skip"
        }) %>

<%= sprintf("%.2f", (Time.now.to_f - @start_time)) %>s

<%= User.find(session[:user_id]).name %>

        <%= link_to '/', '/', data: { no_turbolink: true } %>
        <%= link_to 'Admin', admin_path, data: { no_turbolink: true } %>
        <%= button_to 'Logout', logout_path, method: :delete %>

<% end %>

Add user name, home link to admin bar

Add user name, home link to admin bar


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

<!DOCTYPE html>

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

    <%= render 'layouts/navigation' %>

      <%= render 'layouts/messages' %>
      <%= yield %>

            powered by Grantzilla

Add powered by to the footer

Add powered by to the footer


<!DOCTYPE html>

  <title><%= yield(:title).blank? ? "Fridge" : yield(:title) %></title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <meta name="viewport" content="width=device-width">
  <%= csrf_meta_tags %>

<%# Navmenu collapsed by default %>
<%= render partial: "shared/navmenu" %>

<%# Page wrap is the element pushed aside by nav menu %>

  <%= render partial: "shared/navbar" %>
  <%# Content is what is filled by the pages %>

    <%= yield %>

Remove Rails Rumble banner from site.

Remove Rails Rumble banner from site.


<!DOCTYPE html>
<html>
  <head>
    <title>RailsOnlineShop</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>
  <% if logged_in?%>
    <%= link_to "HOME", items_path %> | <%= link_to "PROFILE", current_user %> | <%= link_to "LOGOUT", logout %>
  <% else %>
    <%= link_to "HOME", items_path %> | <%= link_to "REGISTER", new_user_path %> | <%= link_to "LOGIN", login_path %>
  <% end %>
    <%= yield %>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <title>RailsOnlineShop</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>
  <% if logged_in?%>
    <%= link_to "HOME", items_path %> | <%= link_to "PROFILE", current_user %> | <%= link_to "LOGOUT", logout_path, method: :delete %>
  <% else %>
    <%= link_to "HOME", items_path %> | <%= link_to "REGISTER", new_user_path %> | <%= link_to "LOGIN", login_path %>
  <% end %>
    <%= yield %>
  </body>
</html>

Update links so that the logout link is appropriately written.. was experiencing issues because of this


<% content_for :main do %>

  <% if content_for?(:context_bar) %>

        <%= yield :context_bar %>

  <% end %>

    <%= yield %>

<% end %>

<%= render template: 'layouts/application' %>

Remove redundant class from context bar

Remove redundant class from context bar


  <%= form_for [@question, answer] do |f| %>
  <%= answer.id %>
  <%= f.hidden_field :answer_id, :value => answer.id %>
  <%= f.check_box :accepted %>
  <%= f.submit "BEST ANSWER" %>
<% end %>

  <%= form_for [@question, answer] do |f| %>
  <%= f.hidden_field :answer_id, :value => answer.id %>
  <%= f.check_box :accepted %>
  <%= f.submit "BEST ANSWER" %>
<% end %>

Clean up edit answer form

Clean up edit answer form


<% title "Welcome to Cartoque!" %>

<div id="welcome-container">

<%= welcome_box do %>
  <%= render 'stats_general' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_databases' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_storage' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_maintenance' %>
<% end %>

<%= welcome_box "" %>

<%= welcome_box do %>
  <%= render 'comp_vmware' %>
<% end %>

<%= welcome_box do %>
  <%= render 'comp_nagios' %>
<% end %>

</div><!-- #welcome-container -->

<% title "Welcome to Cartoque!" %>

<div id="welcome-container">

<%= welcome_box do %>
  <%= render 'stats_general' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_databases' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_storage' %>
<% end %>

<%= welcome_box do %>
  <%= render 'stats_maintenance' %>
<% end %>

<%= welcome_box "" %>

</div><!-- #welcome-container -->

Disable comparison boxes on welcome page, they're not ready for the moment


<!DOCTYPE html>

  <link rel="stylesheet" href="/css/normalize.css">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  <link rel="stylesheet" href="/css/application.css">
  <link rel="stylesheet" href="/css/game.css">

  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  <link rel="icon" href="/favicon.ico" type="image/x-icon">
  <title></title>

Play

Hi Scores

      <% if session[:user_id] %>

Logout

      <% else %>

Login

      <% end %>

    <%= yield %>

Add deer and tree script tags

Add deer and tree script tags


<!DOCTYPE html>
<html lang="en">
<head>
  <!--
    normalize.css removes cross-browser differences in defaults, e.g.,
    differences in how form elements appear between Firefox and IE
    See: http://necolas.github.com/normalize.css/
  -->
  <link rel="stylesheet" href="/css/normalize.css">
  <!--
    application.css is where you put your styles
  -->
  <link rel="stylesheet" href="/css/application.css">

  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script src="/js/application.js"></script>

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

<!DOCTYPE html>

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

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

  <title></title>

  <% if current_user %>
    Log Out
  <% else %>
    Log In |  Sign Up
  <% end %>
  <%= yield %>

Add sign up and login links to body.

Add sign up and login links to body.


<% unless user_signed_in? %>

Factlink helps people find credibility in the world's information. The service is built on the belief that information should be openly shared, accessible, and transparent. Factlink provides immediate access to the state of knowledge on the topics people are discussing by transforming web documents into dynamic channels of information.

Why not join us? It is easy! <%= link_to("Register your free account here.", new_user_registration_path, :style => "") %>
<% end %>

Top users

	Check out these Factlink users.

<% @users.each do |user| %>
	<%= render :partial => "home/snippets/user_li", :locals => {  :user => user } %>
<% end %>

<% unless user_signed_in? %>

Factlink helps people find credibility in the world's information. The service is built on the belief that information should be openly shared, accessible, and transparent. Factlink provides immediate access to the state of knowledge on the topics people are discussing by transforming web documents into dynamic channels of information.

Why not join us? It is easy! <%= link_to("Register your free account here.", new_user_registration_path, :style => "") %>
<% end %>

Top users

	Check out these Factlink users.

<% interesting_users_without.each do |user| %>
	<%= render :partial => "home/snippets/user_li", :locals => {  :user => user } %>
<% end %>

Stop using the @users, use interesting_users_without in stead


#!/bin/sh

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

# setup

PLANETDIR="<%= @basedir %>/planet"
PLANETPREV="${PLANETDIR}/planet-previous.pbf"
PLANETCURR="${PLANETDIR}/planet.pbf"
PLANETNEW="${PLANETDIR}/planet-new.pbf"

retval=1
while [ $retval -eq 1 ]; do
    pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR
    retval=$?
done

if [ $retval -ne 0 ]; then
    exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

#!/bin/sh

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

# setup

PLANETDIR="<%= @basedir %>/planet"
PLANETPREV="${PLANETDIR}/planet-previous.pbf"
PLANETCURR="${PLANETDIR}/planet.pbf"
PLANETNEW="${PLANETDIR}/planet-new.pbf"
PLANETTMP="${PLANETDIR}/planet-tmp.pbf"

pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR
retval=$?

while [ $retval -eq 1 ]; do
    mv "$PLANETNEW" "$PLANETTMP"
    pyosmium-up-to-date -v -o $PLANETNEW $PLANETTMP
    retval=$?
    rm "$PLANETTMP"
done

if [ $retval -ne 0 ]; then
    exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

Handle planet updates that need multiple passes correctly


<%= I18n.t('people.person', :count => @group.people.count) %>

<% if group_people_count > 25 and params[:action] == 'show' %>

    (<%= I18n.t('groups.25_of') %> <%= group_people_count %>)
    <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %>

<% end %>

  <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %>
    <% if person = membership.person %>

          <a href="<%= url_for person %>">
            <%= render :partial => 'people/thumbnail', :locals => {:person => person} %>

          <%= link_to h(person.name), person %>
          <% if person.birthday_soon? %>

              <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %>
              <%= person.birthday.to_s(:date_without_year) %>

          <% end %>

    <% end %>
  <% end %>

<%= I18n.t('people.person', :count => group_people_count = @group.people.count) %>

<% if group_people_count > 25 and params[:action] == 'show' %>

    (<%= I18n.t('groups.25_of') %> <%= group_people_count %>)
    <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %>

<% end %>

  <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %>
    <% if person = membership.person %>

          <a href="<%= url_for person %>">
            <%= render :partial => 'people/thumbnail', :locals => {:person => person} %>

          <%= link_to h(person.name), person %>
          <% if person.birthday_soon? %>

              <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %>
              <%= person.birthday.to_s(:date_without_year) %>

          <% end %>

    <% end %>
  <% end %>

Fix bug showing group people.

Fix bug showing group people.


import bugsnag from '@bugsnag/js'
import bugsnagReact from '@bugsnag/plugin-react'

// Support component names relative to this directory:
const componentRequireContext = require.context("components", true)
const ReactRailsUJS = require("react_ujs")
ReactRailsUJS.useContext(componentRequireContext)

const Headroom = require("headroom.js")

window.bugsnagClient = bugsnag({ apiKey: '<%= ENV['BUGSNAG_FRONTEND'] %>', releaseStage: '<%= Rails.env %>', notifyReleaseStages: <%= NOTIFY_RELEASE_STAGES %>, appVersion: '<%= ENV['HEROKU_RELEASE_VERSION'] || 'dev' %>', logger: null })
window.bugsnagClient.use(bugsnagReact, React)

document.addEventListener("DOMContentLoaded", function() {
  const navbar = document.querySelector(".navbar")
  if (navbar) {
    new Headroom(navbar, {
      "classes": {
        "initial": "animated",
        "pinned": "slideDown",
        "unpinned": "slideUp"
      }
    }).init()

    if (window.location.hash) {
      setTimeout(() => navbar.classList.add("slideUp"), 100)
    }
  }
})

import bugsnag from '@bugsnag/js'
import bugsnagReact from '@bugsnag/plugin-react'
import React from 'react'

// Support component names relative to this directory:
const componentRequireContext = require.context("components", true)
const ReactRailsUJS = require("react_ujs")
ReactRailsUJS.useContext(componentRequireContext)

const Headroom = require("headroom.js")

window.bugsnagClient = bugsnag({ apiKey: '<%= ENV['BUGSNAG_FRONTEND'] %>', releaseStage: '<%= Rails.env %>', notifyReleaseStages: <%= NOTIFY_RELEASE_STAGES %>, appVersion: '<%= ENV['HEROKU_RELEASE_VERSION'] || 'dev' %>', logger: null })
window.bugsnagClient.use(bugsnagReact, React)

document.addEventListener("DOMContentLoaded", function() {
  const navbar = document.querySelector(".navbar")
  if (navbar) {
    new Headroom(navbar, {
      "classes": {
        "initial": "animated",
        "pinned": "slideDown",
        "unpinned": "slideUp"
      }
    }).init()

    if (window.location.hash) {
      setTimeout(() => navbar.classList.add("slideUp"), 100)
    }
  }
})

Fix error in bugsnag setup

Fix error in bugsnag setup


<%= @merchant.business_name %>

See Your Menu

<%= link_to "Menu", merchant_items_path(@merchant) %>

Your info

    <%= @merchant.username %>

    <%= @merchant.financial_info %>

<%= link_to 'Back', merchants_path %>

<%= @merchant.business_name %>

See Your Menu

<%= link_to "Menu", merchant_items_path(@merchant) %>

Your info

    <%= @merchant.username %>

    <%= @merchant.financial_info %>

<%= link_to("See Your Seatings!", merchant_seatings_path(@merchant)) %>

<%= link_to 'Back', merchants_path %>

Add Seatings To Merchant Page

Add Seatings To Merchant Page


Install the app to the homescreen (currently supported in android) in fullscreen mode, instead of standalone.

I hope this gets rid of the status bar that appears when loading images via http (to warn the user of a potential risk, loading http content in an https page). This is rather unavoidable right now, and I'd like to remove the status bar.


<%= link_to image_tag("quickbit-logo.png", :border=>0, :class => 'header_image'), "/" %>

 We do not support your browser at this time

    <%= render '/status' %>

<%= javascript_include_tag "file_receiver" %>

<%= link_to image_tag("quickbit-logo.png", :border=>0, :class => 'header_image'), "/" %>

 We do not support your browser at this time

    <%= render '/status' %>

   FAQ

<%= javascript_include_tag "file_receiver" %>

Add FAQ link to footer on receivers page


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

<%= track.title %>

<%= track.artist_name %>

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

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

Genre: <%= track.genre %>

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

<%= track.lyrics %>

<%end%>

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

<%= track.title %>

<%= track.artist_name %>

      <div class="poppingover" title="tempo: <%= track.audio_features.tempo  %>
        valence: <%= track.audio_features.valence %> tempo: <%= track.audio_features.tempo  %>
          valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
            valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
              valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
                valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
                  valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
                    valence: <%= track.audio_features.valence %>tempo: <%= track.audio_features.tempo  %>
                      valence: <%= track.audio_features.valence %>  ">
        Details

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

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

Genre: <%= track.genre %>

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

<%= track.lyrics %>

<%end%>

Add details tooltip to see more partial

Add details tooltip to see more partial


<% if can? :create, new_post(receiver) %>
  <div class="wall_input">
    <%= form_for Post.new(owner_id: Actor.normalize_id(receiver)), remote: true do |f| %>
      <%= f.hidden_field :owner_id %>

      <%= f.text_field :text, placeholder: t('post.input') %>

      <%= f.submit t('activity.share') %>

      <% SocialStream.activity_forms.each do |element| %>
        <%= render partial: "#{ element.to_s.pluralize }/new_activity",
                   locals: { f: f, receiver: receiver } %>
      <% end %>

      <%= f.select "relation_ids", options_for_select(current_subject.activity_relations_for(receiver).sort.map{ |r| [ r.name, r.id ] }), {}, { multiple: true } %>

    <% end %>
  </div>

  <%= javascript_tag do %>
    $(function(){
      SocialStream.Wall.show({
        wallInput: {
          blankText: "<%= t "activity.privacy.contact.#{ receiver == current_subject ? :myself : :outside }.#{ receiver.class.to_s.underscore }" %>"
        }
      });
    });
  <% end %>
<% end %>

<% if can? :create, new_post(receiver) %>
  <div class="wall_input">
    <%= form_for Post.new(owner_id: Actor.normalize_id(receiver)), remote: true do |f| %>
      <%= f.hidden_field :owner_id %>

      <%= f.text_field :text, placeholder: t('post.input') %>

      <%= f.submit t('activity.share') %>

      <% SocialStream.activity_forms.each do |element| %>
        <%= render partial: "#{ element.to_s.pluralize }/new_activity",
                   locals: { f: f, receiver: receiver } %>
      <% end %>

      <%= f.select "relation_ids", options_for_select(current_subject.activity_relations_for(receiver).sort.map{ |r| [ r.name, r.id ] }), {}, { multiple: true } %>

    <% end %>
  </div>

  <%= javascript_tag do %>
    $(function(){
      SocialStream.Wall.show({
        wallInput: {
          blankText: "<%= t "activity.privacy.contact.#{ receiver == current_subject ? :myself : :outside }.#{ receiver.class.to_s.underscore }", receiver: receiver.name %>"
        }
      });
    });
  <% end %>
<% end %>

Fix wall_input contact selector text

Fix wall_input contact selector text


  <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
    <%= list.tag :li do %>
      <%= link_to child.display_title, scrivito_path(child) %>
    <% end %>
  <% end %>

  <%= scrivito_tag :h1,  @obj, :title %>
  <%= scrivito_tag :div, @obj, :abstract %>
  <%= scrivito_image_tag @obj, :image, class: "img-responsive" %>
  <%= scrivito_tag :div, @obj, :body %>

  <%= content_tag  :div, scrivito_value(@obj.created.strftime("作成日:%Y年%m月%d日")),
                   class: "text-muted text-right h5" %>

<%= render 'shared/sitemap_sotechsha' if @sts_posts %>
<%= render 'shared/footer' %>

	  <%= scrivito_tag_list :ul, @obj, :toclist do |list, child| %>
	    <%= list.tag :li do %>
	      <%= link_to child.display_title, scrivito_path(child) %>
	    <% end %>
	  <% end %>

	  <%= scrivito_tag :h1,  @obj, :title %>
	  <%= scrivito_tag :div, @obj, :abstract %>
	  <%= scrivito_image_tag @obj, :image, class: "img-responsive" %>
	  <%= scrivito_tag :div, @obj, :body %>

	  <%= content_tag  :div, scrivito_value(@obj.last_changed.strftime("更新日: %Y年%m月%d日")),
              class: "text-muted text-right h5" %>

	  <%= render 'shared/sitemap_sotechsha' if @sts_posts %>
	  <%= render 'shared/footer' %>

Apply clean blog design for existing posts as well


  <% if can? :create, Payment %>

      <%= link_to "Pay Now", new_payment_path, :class => "payment_link" %>

      Prices Increase in
      <% rp = RegistrationPeriod.relevant_period(Date.today) %>
      <%if rp.nil?  %>
        [Unknown]
      <% else %>
        <%= distance_of_time_in_words(DateTime.now, rp.end_date) + " (" + ((rp.end_date) + 1).strftime("%b %e") + ")" %>
      <% end %>

  <% end %>

  <% if can? :create, Payment %>

      <%= link_to "Pay Now", new_payment_path, :class => "payment_link" %>

      Prices Increase
      <% rp = RegistrationPeriod.relevant_period(Date.today) %>
      <%if rp.nil?  %>
        [Unknown]
      <% else %>
        <% if (DateTime.now > rp.end_date) %>
          very soon
        <% else %>
          in <%= distance_of_time_in_words(DateTime.now, rp.end_date) + " (" + ((rp.end_date) + 1).strftime("%b %e") + ")" %>
        <% end %>
      <% end %>

  <% end %>

Adjust the way we print times if we are between 2 periods


    <% if school.active? %>

        <%= link_to school_path(school) do %>
          <%= school.name %>
        <% end -%>

        <% if user_signed_in? && current_user.admin? %>
          <% if school.meters_for_supply(:electricity).any? %>
            <%= fa_icon(fuel_type_icon(:electricity)) %>
          <% end %>
          <% if school.meters_for_supply(:gas).any? %>
            <%= fa_icon(fuel_type_icon(:gas)) %>
          <% end %>
          <% if school.has_solar_pv? %>
            <%= fa_icon(:sun) %>
          <% end %>
          <% if school.has_storage_heaters? %>
            <%= fa_icon(:plug) %>
          <% end %>
        <% end %>
        <%= school.address %> <%= school.postcode %>

    <% else %>

        <%= link_to school_path(school) do %>
          <%= school.name %>
        <% end -%>

    <% end %>

    <% if school.active? %>

        <%= link_to school_path(school) do %>
          <%= school.name %>
        <% end -%>

        <% if school.meters_for_supply(:electricity).any? %>
          <%= fa_icon(fuel_type_icon(:electricity)) %>
        <% end %>
        <% if school.meters_for_supply(:gas).any? %>
          <%= fa_icon(fuel_type_icon(:gas)) %>
        <% end %>
        <% if school.has_solar_pv? %>
          <%= fa_icon(:sun) %>
        <% end %>
        <% if school.has_storage_heaters? %>
          <%= fab_icon(:intercom) %>
        <% end %>
        <%= school.address %> <%= school.postcode %>

    <% else %>

        <%= link_to school_path(school) do %>
          <%= school.name %>
        <% end -%>

    <% end %>

Switch to allow anyone to view icons and update storage heater icon


<% if (@current_controller == "talks" && @current_action == "unscheduled") then heading_element = "h2" else heading_element = "h1" end %>
<<%= heading_element %> class="heading">
  <%= ((@talk.title.blank?) ? "[Untitled]" : @talk.title) %>
</<%= heading_element %>>
<% if (!@talk.speaker unless @talk.speaker.blank?) %>

<%= @talk.speaker %>

<% end %>
<% if (@talk.description unless @talk.description.blank?) %>

<%= @talk.description %>

<% end %>

<% if (@current_controller == "talks" && @current_action == "unscheduled") then heading_element = "h2" else heading_element = "h1" end %>
<<%= heading_element %> class="heading">
  <%= ((@talk.title.blank?) ? "[Untitled]" : @talk.title) %>
</<%= heading_element %>>
<% if (@talk.speaker unless @talk.speaker.blank?) %>

<%= @talk.speaker %>

<% end %>
<% if (@talk.description unless @talk.description.blank?) %>

<%= @talk.description %>

<% end %>

Fix for speaker's name not showing in show talk view.


root /app/web;

location / {
    # try to serve file directly, fallback to rewrite
    try_files $uri @rewriteapp;
}

location @rewriteapp {
    # rewrite all to app.php
    rewrite ^(.*)$ /app.php/$1 last;
}

location ~ ^/(app|app_dev)\.php(/|$) {
    fastcgi_pass php;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
    fastcgi_buffers 256 4k;
}

<% if ENV.has_key? "DOCUMENT_ROOT" and ENV['DOCUMENT_ROOT'] != nil %>
root <%= ENV['DOCUMENT_ROOT'] %>;
<% else %>
root /app/web;
<% end %>

location / {
    # try to serve file directly, fallback to rewrite
    try_files $uri @rewriteapp;
}

location @rewriteapp {
    # rewrite all to app.php
    rewrite ^(.*)$ /app.php/$1 last;
}

location ~ ^/(app|app_dev)\.php(/|$) {
    fastcgi_pass php;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS off;
    fastcgi_buffers 256 4k;
}

Make document root overridable for symfony apps


$('.modal').modal('hide');
$('#admin-in-place-editor').html("<%= escape_javascript(render('list')) %>");
window.adminInPlaceEditor.init();
window.adminInPlaceEditor.alertSuccess("Operation successful");

$('.modal').modal('hide');
$('#admin-in-place-editor').html("<%= escape_javascript(render('list')) %>");
window.adminInPlaceEditor.initEditors();
window.adminInPlaceEditor.alertSuccess("Operation successful");

Fix bug with multiple records being added after the first addition


<script>
	var campaign_data = {
		title: "<%= escape_javascript(@campaign.title) %>",
		id: <%= @campaign.id %>,
		url: document.location.protocol + '//' + document.location.host + "<%= campaign_path(@campaign) %>",
		description: "<%= escape_javascript(@campaign.description) %>",
	  facebook_description: "<%= escape_javascript(facebook_description(@campaign, current_user)) %>",
	  facebook_message: "<%= escape_javascript(facebook_message(@campaign, current_user)) %>",
	  initiator: <%= (initiator_view(@campaign)) ? 'true' : 'false' %>,
	  <%- if initiator_view(@campaign) %>
	  facebook_post_title: "<%= escape_javascript(t('campaigns.show.tell_about_your_campaign')) %>",
	  <%- elsif supporter_initiator_view(@campaign) %>
	  facebook_post_title: "<%= escape_javascript(t('campaigns.show.tell_youre_a_supporter')) %>",
	  <%- end %>
	  facebook_post_description: "<%= escape_javascript(t('campaigns.show.post_to_wall')) %>",
	  facebook_send_title: "<%= escape_javascript(t('shared.facebook.send')) %>",
	  facebook_send_description: "<%= escape_javascript(t('shared.facebook.send_to_people')) %>"
	};
</script>

<script>
	var campaign_data = {
		title: "<%= escape_javascript(truncate(@campaign.title, 47)) %>",
		id: <%= @campaign.id %>,
		url: document.location.protocol + '//' + document.location.host + "<%= campaign_path(@campaign) %>",
		description: "<%= escape_javascript(truncate(@campaign.description, 252)) %>",
	  facebook_description: "<%= escape_javascript(facebook_description(@campaign, current_user)) %>",
	  facebook_message: "<%= escape_javascript(facebook_message(@campaign, current_user)) %>",
	  initiator: <%= (initiator_view(@campaign)) ? 'true' : 'false' %>,
	  <%- if initiator_view(@campaign) %>
	  facebook_post_title: "<%= escape_javascript(t('campaigns.show.tell_about_your_campaign')) %>",
	  <%- elsif supporter_initiator_view(@campaign) %>
	  facebook_post_title: "<%= escape_javascript(t('campaigns.show.tell_youre_a_supporter')) %>",
	  <%- end %>
	  facebook_post_description: "<%= escape_javascript(t('campaigns.show.post_to_wall')) %>",
	  facebook_send_title: "<%= escape_javascript(t('shared.facebook.send')) %>",
	  facebook_send_description: "<%= escape_javascript(t('shared.facebook.send_to_people')) %>"
	};
</script>

Truncate title and description to under FB max char limits for the fields.


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

<%= link_to url_for(repositories_order: descending ? 'ascending' : 'descending'),
  class: 'btn btn-primary' do %>
  <i class="icon-chevron-<%= descending ? 'down' : 'up' %> icon-white"></i>
<% end %>

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

<%= link_to url_for(repositories_order: descending ? 'ascending' : 'descending'),
  class: 'btn btn-primary', title: 'Sort ' + (descending ? 'ascending' : 'descending') do %>
  <i class="icon-chevron-<%= descending ? 'down' : 'up' %> icon-white"></i>
<% end %>

Add title to repo sorting button

Add title to repo sorting button


---
- job:
    name: record-taxonomy-metrics
    display-name: Record metrics about the Topic Taxonomy
    project-type: freestyle
    description: |
      This job runs a rake task in Content Tagger to send metrics
      about the Topic Taxonomy to statsd.
    logrotate:
      daysToKeep: 30
    triggers:
      - timed: 'H/30 * * * *'
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - shell: |
          #!/bin/bash
          set -eu

          cd "${WORKSPACE}"

          CONTENT_TAGGER=$(govuk_node_list --single-node -c backend)

          ssh deploy@$CONTENT_TAGGER "cd /var/apps/content-tagger && govuk_setenv content-tagger bundle exec rake metrics:taxonomy:record_all"

---
- job:
    name: record-taxonomy-metrics
    display-name: Record metrics about the Topic Taxonomy
    project-type: freestyle
    description: |
      This job runs a rake task in Content Tagger to send metrics
      about the Topic Taxonomy to statsd.
    logrotate:
      daysToKeep: 30
    triggers:
      - timed: 'H/30 * * * *'
    properties:
      - build-discarder:
          days-to-keep: 30
          artifact-num-to-keep: 5
    builders:
      - trigger-builds:
          - project: run-rake-task
            block: true
            predefined-parameters: |
              TARGET_APPLICATION=content-tagger
              MACHINE_CLASS=backend
              RAKE_TASK=metrics:taxonomy:record_all

Use run-rake-task in record-taxonomy-metrics job


<li class="feed-item <%= item.type.parameterize %>">

    <% if can_recommend? item %>

        <% if item.recommended? %>
          <%= link_to t("feeder.views.unrecommend"), feeder.unrecommend_item_path(id: item.id), method: :post %>
        <% else %>
          <%= link_to t("feeder.views.recommend"), feeder.recommend_item_path(id: item.id), method: :post %>
        <% end %>

    <% end %>

  <% if item.recommended? %>

      Recommended

  <% end %>

  <%= render "feeder/types/#{item.type}", feedable: item.feedable %>

<li class="feed-item <%= item.type.parameterize %><%= " sticky" if item.sticky? %>">

    <% if can_recommend? item %>

        <% if item.recommended? %>
          <%= link_to t("feeder.views.unrecommend"), feeder.unrecommend_item_path(id: item.id), method: :post %>
        <% else %>
          <%= link_to t("feeder.views.recommend"), feeder.recommend_item_path(id: item.id), method: :post %>
        <% end %>

    <% end %>

  <% if item.recommended? %>

      Recommended

  <% end %>

  <%= render "feeder/types/#{item.type}", feedable: item.feedable %>

Add a "sticky" CSS class to sticky items


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

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

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

mkdir -p /etc/chef

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

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

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

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

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

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

<%= start_chef %>'

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


<!doctype html>

        <meta charset="utf-8">
        <title>Movie Lovers</title>

        <link rel="stylesheet" href="main.css">

Movie Lovers

            You searched for:
            <%= @title %>.

            There were
            <%= @results %>
            results.

            <% @movies.each do |movie| %>

<img src="<%= movie.poster %>">

            <% end %>

<!doctype html>

        <meta charset="utf-8">
        <title>Movie Lovers</title>

        <link rel="stylesheet" href="main.css">

Movie Lovers

            You searched for:
            <%= @title %>.

            There were
            <%= @results %>
            results.

            <% @movies.each do |movie| %>

                    <img src="<%= movie.poster %>" alt="<%= movie.title %>">

            <% end %>

Add movie title as image alternate text

Add movie title as image alternate text


<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?v=3&sensor=false&libraries=places" %>

<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?v=3&libraries=places" %>

Remove sensor param from gmap URL so to avoid SensorNotRequired warning


<% @body_id = 'author-page' %>
<% @body_class = 'serif-headers' %>
<% cache @author do %>

		<%= image_tag @author.photo.url %>

			<%= display_bookmarks(@author) if gem_available? 'spree_social_bookmarks' %>
			<%= content_tag(:h1, @author.name) %>

			<%== auto_link(RDiscount.new(@author.biography || "", :smart).to_html, :html => { :encode => 'javascript' }) %>

<% if @author.videos.present? %>

	<%= content_tag(:h2, t(:speaker_video_samples)) %>

	<% @author.videos.each do |video| %>
	<div class="<%= cycle('alpha', 'omega') %> columns eight">
		<%= render 'spree/products/video_player', :video => video, :html_options => { :width => 400 } %>

	<% end %>

<% end %>

	<%= render 'products', :author => @author %>

<% end %>

<% @body_id = 'author-page' %>
<% @body_class = 'serif-headers' %>
<% cache @author do %>

		<%= image_tag @author.photo.url(:small) %>

			<%= display_bookmarks(@author) if gem_available? 'spree_social_bookmarks' %>
			<%= content_tag(:h1, @author.name) %>

			<%== auto_link(RDiscount.new(@author.biography || "", :smart).to_html, :html => { :encode => 'javascript' }) %>

<% if @author.videos.present? %>

	<%= content_tag(:h2, t(:speaker_video_samples)) %>

	<% @author.videos.each do |video| %>
	<div class="<%= cycle('alpha', 'omega') %> columns eight">
		<%= render 'spree/products/video_player', :video => video, :html_options => { :width => 400 } %>

	<% end %>

<% end %>

	<%= render 'products', :author => @author %>

<% end %>

Use smaller image on author page

Use smaller image on author page


<%= render partial: 'tasks/plugins' %>
<%= render partial: "stacks/header", locals: { stack: @stack } %>

<div class="deploy-main" data-repo-full-name="<%= @stack.github_repo_name %>">

  <div class="deploy-banner <%= task.status %>" data-task-status="<%= task.status %>">

      <%= task.author.name %>

        <%= content_for :task_title %>

      <span class="deploy-abort" data-task-status="<%= task.status %>">
        <%= link_to abort_stack_task_path(@stack, task), class: 'btn btn--delete deploy-action' do %>
        Abort Deploy
        Aborting
        <% end %>

  <code data-task-status="<%= task.status %>" data-next-chunks-url="<%= next_chunks_url(task) %>"><%= task.chunk_output %>

Fix extra whitespace issue in task output


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

@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"SE_TRANSIENT_FIELD_NOT_RESTORED"})
@javax.servlet.annotation.WebServlet( urlPatterns = { "<%= client.local_config_url %>" } )
public class <%= client.config_service_name %>
  extends javax.servlet.http.HttpServlet
{
  private static final long serialVersionUID = 1;

  @Override
  protected void doGet( final javax.servlet.http.HttpServletRequest request,
                        final javax.servlet.http.HttpServletResponse response )
    throws javax.servlet.ServletException, java.io.IOException
  {
    try
    {
      response.setContentType( javax.ws.rs.core.MediaType.APPLICATION_JSON );
      javax.json.Json.createWriter( response.getOutputStream() ).
        writeObject( org.realityforge.keycloak.domgen.JndiUtil.buildJsonFromContext( new javax.naming.InitialContext(), "<%= client.jndi_config_base %>" ) );
    }
    catch ( final java.lang.Exception e )
    {
      throw new javax.servlet.ServletException( e );
    }
  }
}

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

@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"SE_TRANSIENT_FIELD_NOT_RESTORED"})
@javax.servlet.annotation.WebServlet( urlPatterns = { "<%= client.local_config_url %>" } )
public class <%= client.config_service_name %>
  extends javax.servlet.http.HttpServlet
{
  private static final long serialVersionUID = 1;

  @Override
  protected void doGet( final javax.servlet.http.HttpServletRequest request,
                        final javax.servlet.http.HttpServletResponse response )
    throws javax.servlet.ServletException, java.io.IOException
  {
    try
    {
      final javax.json.JsonObjectBuilder builder = javax.json.Json.createObjectBuilder();
      org.realityforge.keycloak.domgen.JndiUtil.buildJsonFromContext( builder, new javax.naming.InitialContext(), "<%= client.jndi_config_base %>" );
      response.setContentType( javax.ws.rs.core.MediaType.APPLICATION_JSON );
      javax.json.Json.createWriter( response.getOutputStream() ).writeObject( builder.build() );
    }
    catch ( final java.lang.Exception e )
    {
      throw new javax.servlet.ServletException( e );
    }
  }
}

Prepare template for customization of the json


<% content_for :page_title do %>
  <%= link_to Spree.t(:reports), spree.admin_reports_url %> /
  <%= Spree.t(:sales_totals) %>
<% end %>

  <%= render partial: 'spree/admin/shared/report_order_criteria' %>

      <%= Spree.t(:currency) %>
      <%= Spree.t(:item_total) %>
      <%= Spree.t(:adjustment_total) %>
      <%= Spree.t(:sales_total) %>

    <% @totals.each do |key, row| %>

        <%= key %>
        <%= row[:item_total].format %>
        <%= row[:adjustment_total].format %>
        <%= row[:sales_total].format %>

    <% end %>

<% content_for :page_title do %>
  <%= link_to Spree.t(:reports), spree.admin_reports_url %> /
  <%= Spree.t(:sales_totals) %>
<% end %>

  <%= render partial: 'spree/admin/shared/report_order_criteria' %>

      <%= Spree.t(:currency) %>
      <%= Spree.t(:item_total) %>
      <%= Spree.t(:adjustment_total) %>
      <%= Spree.t(:sales_total) %>

    <% @totals.each do |key, row| %>

        <%= key %>
        <%= Spree::Money.new(row[:item_total], { currency: key }) %>
        <%= Spree::Money.new(row[:adjustment_total], { currency: key }) %>
        <%= Spree::Money.new(row[:sales_total], { currency: key }) %>

    <% end %>

Use Spree::Money to display values in Sales Total report

Fixes #7701


require "<%= component.gem_name %>/version"

module <%= gem_module %>
  class Engine < ::Rails::Engine
    # Rails -> use vendor directory.
  end
end

require "<%= component.gem_name %>/version"

if defined?(Rails)
  module <%= gem_module %>
    class Engine < ::Rails::Engine
      # Rails -> use vendor directory.
    end
  end
end

Add check if Rails is defined

Add check if Rails is defined


	<%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %>

		<%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %>

	<% end %>

	<%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %>

		<%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control input-lg') %>

	<% end %>

Add input-lg class to input, change how school info section shows when keyup--uses visibility property instead of just display


// var fact = $("div[data-fact-id=<%= @fact_relation.fact.id %>]");
// var active =  fact.find(".tab_content:visible");
//
// var no_fact_message = active.find(".no-evidence");
// if (no_fact_message.length > 0) {
//  no_fact_message.remove();
// }
//
// active.find('table.evidence-for-list > tbody').append("
<%= escape_javascript(render(:partial => "/facts/partial/evidence_bubble", :locals => {  :fact => fact_relation.fact, :fact_relation => fact_relation})) %>
").factlink();
// fact.trigger("factlink:switchTabAction", [active.attr("rel")]);

// Reset window

// Add the evidence

var fact =  $("div.fact-block[data-fact-id=<%=@fact_relation.fact.id%>]");
var evidenceList = fact.find('.evidence-list ul');

$('.page').hide();
$('.evidence-list').show();

evidenceList.prepend("<%= escape_javascript(render(:partial => '/facts/partial/evidence_bubble', :locals => { :fact_relation => @fact_relation } )) %>").factlink();

var fact =  $("div.fact-block[data-fact-id=<%=@fact_relation.fact.id%>]");
var evidenceList = fact.find('.evidence-list ul');

// Reset window
fact.find('.no-evidence-message').hide();

fact.find('.page').hide();
fact.find('.evidence-list').show();

// Add the evidence
evidenceList.prepend("<%= escape_javascript(render(:partial => '/facts/partial/evidence_bubble', :locals => { :fact_relation => @fact_relation } )) %>").factlink();

Remove 'no-evidence'-message when adding evidence