  <% if params[:search].empty? %>

 There is no content matching "<%= params[:search] %>."

  <% else %>

 Content with "<%= params[:search] %>" in the Title:

    <% @searched_stories.each do |story| %>
      <% display_string = story.title %>
      <% x = params[:search].upcase %>
         <% if display_string.include?(params[:search]) %>
         <% display_string.sub!(params[:search], x ) %>

<%= link_to display_string, story_path(story) %>

         <% end %>

         <% if story.snippet.content.include?(params[:search]) %>

 Snippets that mention "<%= params[:search] %>":

<%= link_to story.snippet.content, snippet_path(story.snippet) %>

          <% end %>

      <% end %>
  <% end %>

  <% if @searched_stories.empty? %>

 There is no Story content matching "<%= params[:search] %>."

  <% else %>

 Stories with "<%= params[:search] %>" in the Title:

    <% @searched_stories.each do |story| %>
      <% x = params[:search].upcase %>
      <% if story.title.include?(params[:search]) %>
        <% display_string = story.title %>
        <% display_string.sub!(params[:search], x ) %>

<%= link_to display_string, story_path(story) %>

       <% end %>
     <% end %>

 Stories that mention "<%= params[:search] %>":

     <% @searched_stories.each do |story| %>
       <% if story.content.include?(params[:search]) %>

<%= link_to story.title, story_path(story) %>

       <% end %>
     <% end %>

  <% end %>

    <% @searched_snippets.each do |snip| %>
       <% if snip.content.include?(params[:search]) %>

 Snippets that mention "<%= params[:search] %>":

<%= link_to snip.content, snippet_path(snip) %>

    <% end %>
  <% end %>

Clean up logic in stories search view

Clean up logic in stories search view


$('#project_form').replaceWith('<%= j render 'form', :project => @project, :remote => true %>');

if (($('#project_modal').data('bs.modal') || { isShown: false }).isShown == false) {
  $('#project_modal').modal('show');
}

$('#project_modal #project_form').replaceWith('<%= j render 'form', :project => @project, :remote => true %>');

if (($('#project_modal').data('bs.modal') || { isShown: false }).isShown == false) {
  $('#project_modal').modal('show');
}

Fix javascript new form replacing while editing project


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

  ga('create', 'UA-44195191-1', 'auto');
  ga('send', 'pageview');
</script>

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

  ga('create', 'UA-43628753-4', 'auto');
  ga('send', 'pageview');
</script>

Update Google Analytics tracking code per AJ


<%= link_to image_tag("echowaves.gif", :border => 0, :width => "282px", :height => "50px" ), home_path %>

      <% if logged_in? %>
	  		<%= link_to image_tag(current_user.gravatar_url, :border => 0, :wigth => 40, :height => 40, :class => "avatar"),
	  				conversation_messages_path(current_user.personal_conversation) %> |
	  		<%= link_to "edit your profile", edit_user_path(current_user)  %> |
	  		<%= link_to t("ui.logout"), logout_path %> <%=current_user.login %>
	  	<%else%>
	  		<%= link_to t("ui.login"), new_session_path %>
	  	<%end%>

<%= link_to image_tag("echowaves.gif", :border => 0, :width => "282px", :height => "50px" ), home_path %>

      <% if logged_in? %>
	  		<%= link_to image_tag(current_user.gravatar_url, :border => 0, :wigth => 40, :height => 40, :class => "avatar", :style => 'float:left;margin-right:4px;'),
	  				conversation_messages_path(current_user.personal_conversation) %>
	  		<%=current_user.login %>

	  		<%= link_to "edit profile", edit_user_path(current_user)  %>
	  		<%= link_to t("ui.logout"), logout_path %>
	  	<%else%>
	  		<%= link_to t("ui.login"), new_session_path %>
	  	<%end%>

Add a temporary edit profile link to header, so the users can change their timezones


  <% @snippets.each do |snippet| %>

<%= link_to snippet.content[0...249].html_safe, snippet_path(snippet) %>

  <% end %>

  <% @snippets.each do |snippet| %>

<%= link_to snippet.content, snippet_path(snippet) %>

  <% end %>

Change link_to for now because of blank snippets


<article class="post" id="<%= @post.presenter.dom_id %>" data-pos="<%= @post.pos %>">

    <% if @post.options_raw %>
      <%= mail_to @post.options_raw do %><%= @post.author || "anonymous" %><% end %>
    <% else %>
      <%= @post.author %>
    <% end %>
    <%= link_to time_tag(@post.created_at, format:@board.config.time_format), post_path(@post), rel:'bookmark' %>
    #<%= @post.pos %>

      <% if !@post.topic.locked? %>
        <%= link_to 'Reply', topic_path(@post.topic), class:'reply' %>
      <% end %>

  <%= render_cell :post, :images, @post %>

    <%= @post.content_html %>

  <% if @post.children.exists? %>

      replied by:
      <% @post.children.each do |r| %>
        <%= link_to "> #{r.pos}", topic_path(@post.topic, anchor:r.presenter.dom_id) %>
      <% end %>

  <% end %>

<article class="post" id="<%= @post.presenter.dom_id %>" data-pos="<%= @post.pos %>">

    #<%= @post.pos %>
    <% if @post.options_raw %>
      <%= mail_to @post.options_raw do %><%= @post.author || "anonymous" %><% end %>
    <% else %>
      <%= @post.author %>
    <% end %>
    <%= link_to time_tag(@post.created_at, format:@board.config.time_format), post_path(@post), rel:'bookmark' %>

      <% if !@post.topic.locked? %>
        <%= link_to 'Reply', topic_path(@post.topic), class:'reply' %>
      <% end %>

  <%= render_cell :post, :images, @post %>

    <%= @post.content_html %>

  <% if @post.children.exists? %>

      replied by:
      <% @post.children.each do |r| %>
        <%= link_to "> #{r.pos}", topic_path(@post.topic, anchor:r.presenter.dom_id) %>
      <% end %>

  <% end %>

Move pos to the front

Move pos to the front

It is used more often than date but is short (difficult to locate)


server {
  listen 51000;
  server_name <%= domain %>;

  root <%= current_path %>/public;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= shared_path %>/log/access.log combined;
  error_log <%= shared_path %>/log/error.log;

  # Serve this rails site with Passenger.
  passenger_enabled on;
  passenger_base_uri /;

  # Set the current environment.
  rails_env <%= rails_env %>;
}

<% if(rails_env == "production") %>
# Pre-start the rails app.
passenger_pre_start http://<%= domain %>:51000/;
<% end %>

server {
  listen 51000;
  server_name <%= domain %>;

  root <%= current_path %>/public;

  # Write the real client IP when it's passed via X-Forwarded-For from HAProxy.
  set_real_ip_from 127.0.0.1;
  real_ip_header X-Forwarded-For;

  access_log <%= shared_path %>/log/access.log combined;
  error_log <%= shared_path %>/log/error.log;

  # Serve this rails site with Passenger.
  passenger_enabled on;
  passenger_base_uri /;

  # Set the current environment.
  rails_env <%= rails_env %>;

  # Allow for larger request bodies to allow for huge documentation pages.
  client_max_body_size 10m;
}

<% if(rails_env == "production") %>
# Pre-start the rails app.
passenger_pre_start http://<%= domain %>:51000/;
<% end %>

Fix big documentation pages failing to save in the admin by allowing nginx to accept bigger request bodies.


default

A single submission step, default workflow

Update the default workflow to allow_access_grants


require 'rails_helper'

RSpec.describe "<%= type %>#destroy", type: :request do
  context 'basic destroy' do
    let!(:<%= file_name %>) { FactoryBot.create(:<%= file_name %>) }

    it 'updates the resource' do
      expect {
        delete "/<%= api_namespace %>/v1/<%= type %>/#{<%= file_name %>.id}"
      }.to change { <%= model_klass %>.count }.by(-1)

      expect(response.status).to eq(204)
    end
  end
end

require 'rails_helper'

RSpec.describe "<%= type %>#destroy", type: :request do
  context 'basic destroy' do
    let!(:<%= file_name %>) { create(:<%= file_name %>) }

    it 'updates the resource' do
      expect {
        delete "/<%= api_namespace %>/v1/<%= type %>/#{<%= file_name %>.id}"
      }.to change { <%= model_klass %>.count }.by(-1)

      expect(response.status).to eq(204)
    end
  end
end

Remove explicit FactoryGirl/Bot from destroy spec gen

We are including the method helpers so we can just use `#create`
directly.


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

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

      <%= order.supplier_delivery.name %>

<%= order.supplier_delivery.description %>

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

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

<% end %>

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

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

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

<%= order.supplier_delivery.description %>

      <% end %>

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

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

<% end %>

Check if supplier delivery is selected

Check if supplier delivery is selected


  <title>TicTacToe</title>

TicTacToe

      <%= session[:board].board_arr[0] %>
      <%= session[:board].board_arr[1] %>
      <%= session[:board].board_arr[2] %>

      <%= session[:board].board_arr[3] %>
      <%= session[:board].board_arr[4] %>
      <%= session[:board].board_arr[5] %>

      <%= session[:board].board_arr[6] %>
      <%= session[:board].board_arr[7] %>
      <%= session[:board].board_arr[8] %>

 <%= session[:message]%>

<%= session[:board].turn%>'s Turn

Enter a number between <%= session[:board].valid_slots %> that corresponds with the opening slots starting from the top left.

  <form method='post' action='/game/move'>
    Position:
    <input type='text' name='grid_position' id='grid_position' autofocus />
    <input type='submit' value='Submit' />
  </form>

  <%= erb :board %>

<%= session[:message]%>

<%= session[:board].turn%>'s Turn

Enter a number between <%= session[:board].valid_slots %> that corresponds with the opening slots starting from the top left.

  <form method='post' action='/game/move'>
    POSITION:
    <input type='text' name='grid_position' id='grid_position' autofocus />

    <input class="button" type='submit' value='SUBMIT' />
  </form>

Use partial to show board

Use partial to show board


<%= paginator.render do %>
  <nav class="ui right floated mobile only pagination menu">
    <%= prev_page_tag unless current_page.first? %>
    <% each_page do |page| %>
      <% if page.left_outer? || page.right_outer? || page.inside_window? %>
        <%= page_tag page %>
      <% elsif !page.was_truncated? %>
        <%= gap_tag %>
      <% end %>
    <% end %>
    <%= next_page_tag unless current_page.last? %>
  </nav>
<% end %>

<%= paginator.render do %>
  <nav class="ui right floated pagination menu">
    <%= prev_page_tag unless current_page.first? %>
    <% each_page do |page| %>
      <% if page.left_outer? || page.right_outer? || page.inside_window? %>
        <%= page_tag page %>
      <% elsif !page.was_truncated? %>
        <%= gap_tag %>
      <% end %>
    <% end %>
    <%= next_page_tag unless current_page.last? %>
  </nav>
<% end %>

Remove unused CSS classes from the paginator


<% javascript('export_configure') %>
<form method="get" action="<%= export_project_plan_path(plan.project, plan) -%>" target="_blank">
  <%= label_tag(:format, t('helpers.format')) %>
  <%= select_tag(:format, options_for_select(%i( pdf text html xml json ), :pdf)) %>
  <%= submit_tag(t('helpers.export'), class: 'btn btn-primary') %>
</form>

			<a class="accordion-toggle" data-toggle="collapse" data-parent="#settings-accordion" href="#<%= plan.version.phase.id %>">
				Settings

		<div id="<%= plan.version.phase.id %>" class="accordion-project collapse">

				<%= render(partial: 'settings/plans/export_formatting_form', locals: { plan: plan }) %>

<% javascript('export_configure') %>
<form method="get" action="<%= export_project_plan_path(plan.project, plan) -%>" target="_blank">
  <%= label_tag(:format, t('helpers.format')) %>
  <%= select_tag(:format, options_for_select(%i( pdf text html xml json ), :pdf)) %>
  <%= submit_tag(t('helpers.export'), class: 'btn btn-primary') %>
</form>

			<a class="accordion-toggle" data-toggle="collapse" data-parent="#settings-accordion" href="#<%= plan.version.phase.id %>">
				Settings - <%= plan_settings_indicator(plan) -%>

		<div id="<%= plan.version.phase.id %>" class="accordion-project collapse">

				<%= render(partial: 'settings/plans/export_formatting_form', locals: { plan: plan }) %>

Bring back plan_settings_indicator to export settings form


<%= notice %>

Views

<%= bootstrap_table do |table|
  table.headers << 'Name'
  table.headers << 'Model'
  table.headers << 'Code'
  table.headers << 'Edit'

  @views.each do |view|
    table.rows << [
        view.name,
        view.model,
        view.code,
        link_to('Edit view', edit_view_path(view))
    ]
  end
end %>

<%= link_to 'New View', new_view_path %>

<%= notice %>

Views

<%= bootstrap_table do |table|
  table.headers << 'Name'
  table.headers << 'Model'
  table.headers << 'Code'
  table.headers << 'Show'
  table.headers << 'Edit'
  table.headers << 'Destroy'

  @views.each do |view|
    table.rows << [
        view.name,
        view.model,
        view.code,
        link_to('Show view', view_path(view)),
        link_to('Edit view', edit_view_path(view)),
        link_to('Destroy view', view, method: :delete, data: { confirm: 'Are you sure?' })
    ]
  end
end %>

<%= link_to 'New View', new_view_path %>

Add show and destroy links to views table


<% content_for(:meta_title, t('nlt.home_title')) %>

<% content_for :action do %>

    <% if location_suggest %>
      <%= link_to t('nlt.change_city'), location_ask_path %>
    <% end %>

    <% if location_suggest %>
      <% title = t('nlt.view_ads_on', location: location_suggest.city) %>
      <%= link_to_change_location location_suggest.fullname, title %>
    <% else %>
      <%= link_to t('nlt.view_ads_on_your_city'), location_ask_path %>
    <% end %>

<% end %>

<%= t('nlt.last_published_gifts') %>

  <%= render 'ads/list_with_adsense', ads: @ads %>

   <%= link_to t('nlt.view_more_ads'), ads_listall_path(type: :give, page: 2) %>

  <%= render "partials/section_locations" %>

  <%= render "partials/section_last_week_users" %>

  <%= render "partials/section_overall_users" %>

Make "Last published gifts" the h1 element

It's more important than rankings. Give it more importance.


feedbin.updateFeeds('<%= j render partial: 'feeds/feeds', locals: {collections: @collections, tags: @tags, feeds: @feeds} %>');
feedbin.hideTagsForm();
$('[data-behavior~=show_tags_form]').replaceWith('<%= j render partial: "shared/buttons/tag", locals: {feed: nil, tags: nil, tag: @new_tag} %>');
$('[data-behavior~=unsubscribe]').replaceWith('<%= j render partial: "shared/buttons/destroy_tag", locals: {tag: @new_tag} %>');
$('[data-behavior~=mark_all_as_read]').replaceWith('<%= j render partial: "shared/buttons/mark_all_as_read", locals: {type: @type, data: @data} %>');

feedbin.updateFeeds('<%= j render partial: 'feeds/feeds', locals: {collections: @collections, tags: @tags, feeds: @feeds} %>');
$('[data-behavior~=feeds_target] [data-tag-id~=<%= @new_tag.id %>] .tag-link').click()
feedbin.hideTagsForm();
$('[data-behavior~=show_tags_form]').replaceWith('<%= j render partial: "shared/buttons/tag", locals: {feed: nil, tags: nil, tag: @new_tag} %>');
$('[data-behavior~=unsubscribe]').replaceWith('<%= j render partial: "shared/buttons/destroy_tag", locals: {tag: @new_tag} %>');
$('[data-behavior~=mark_all_as_read]').replaceWith('<%= j render partial: "shared/buttons/mark_all_as_read", locals: {type: @type, data: @data} %>');

Update entries column when renaming tags.


<%= f.field_container :volume_price_model, class: ['form-group'] do %>
  <%= f.label :volume_price_model_id, I18n.t('spree.volume_price_model') %>
  <%= f.collection_select :volume_price_model_ids,
    Spree::VolumePriceModel.all, :id, :name,
    {
      include_blank: I18n.t('spree.match_choices.none')
    },
    {
      class: 'custom-select',
      disabled: cannot?(:edit, Spree::VolumePriceModel)
    } %>
  <%= f.error_message_on :volume_price_model %>
<% end %>

    <%= f.field_container :volume_price_model, class: ['form-group'] do %>
      <%= f.label :volume_price_model_id, I18n.t('spree.volume_price_model') %>
      <%= f.collection_select :volume_price_model_ids,
        Spree::VolumePriceModel.all, :id, :name,
        {
          include_blank: I18n.t('spree.match_choices.none')
        },
        {
          class: 'custom-select fullwidth',
          disabled: cannot?(:edit, Spree::VolumePriceModel)
        } %>
      <%= f.error_message_on :volume_price_model %>
    <% end %>

Put volume_price_model select into grid

Put volume_price_model select into grid


<%= render partial: "spree/admin/variants/autocomplete", formats: :js %>
<%= render partial: "spree/admin/variants/autocomplete_stock", formats: :js %>

      <%= Spree.t(:add_product) %>

      <%= label_tag :add_variant_id, Spree.t(:name_or_sku) %>
      <%= hidden_field_tag :add_variant_id, "", class: "variant_autocomplete" %>

<%= render partial: "spree/admin/variants/autocomplete", formats: :js %>
<%= render partial: "spree/admin/variants/autocomplete_stock", formats: :js %>

      <%= Spree.t(:add_product) %>

      <%= label_tag :add_variant_id, Spree.t(:name_or_sku) %>
      <%= hidden_field_tag :add_variant_id, "", class: "variant_autocomplete d-block w-100" %>

Order variant autocomplete select style fix


  <% if test_case_result.answer.correct? %>

  <% else %>

  <% end %>

            <%= test_case_result.test_case.title %>

            <button data-toggle="modal" data-target="" class="btn btn-default btn-sm pull-right">
               Diff
            </button>

Create a partial to test case result

Create a partial to test case result


  This is a JSON API for sport data.
  You can find fixtures, rosters and match events here.

  Read API documentation <%= link_to "here", "http://docs.hackday1.apiary.io/" %>

Example endpoints

<%= link_to "Leagues", api_leagues_path %>

<%= link_to "Fixtures", api_league_fixtures_path(39) %>

<%= link_to "Arsenal Roster", api_league_roster_path(39, 21) %>

<%= link_to "Liverpool - Manchester United events", api_league_fixture_events_path(39, 1439948) %>

  This is a JSON API for sport data.
  You can find fixtures, rosters and match events here.

  Read API documentation <%= link_to "here", "http://docs.hackday1.apiary.io/" %>

  See the source code <%= link_to "here", "https://github.com/X8/football-api/" %>

Example endpoints

<%= link_to "Leagues", api_leagues_path %>

<%= link_to "Fixtures", api_league_fixtures_path(39) %>

<%= link_to "Arsenal Roster", api_league_roster_path(39, 21) %>

<%= link_to "Liverpool - Manchester United events", api_league_fixture_events_path(39, 1439948) %>

Add a link to the source code

Add a link to the source code


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

  ga('create', 'UA-19569290-4', 'holderdeord.no');
  ga('send', 'pageview');
</script>

<!-- ga.js -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-19569290-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

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

  ga('create', 'UA-19569290-4', 'holderdeord.no');
  ga('send', 'pageview');
  ga('set', 'anonymizeIp', true);
</script>

Remove ga.js + more use anonymizeip for analytics


<% provide(:title, "Edit account") %>
<% provide(:button_text, "Save changes") %>
<% provide(:path, user_path(@user)) %>
<% provide(:verb, :patch) %>

Your account

    <%= render 'form' %>

To see a list of all your payments, click the following button...

    <button class="btn btn-info btn-block js-payments" data-toggle="collapse" data-target="#payments">
      Payment$
    </button>

<% provide(:title, "Edit account") %>
<% provide(:button_text, "Save changes") %>
<% provide(:path, user_path(@user)) %>
<% provide(:verb, :patch) %>

Your account

    <%= render 'form' %>

To see a list of all your payments, click the following button...

    <button class="btn btn-info btn-block js-payments" data-toggle="collapse" data-target="#payments">Payment$</button>

Make aesthetic modification to Users edit view


<%if current_user.id != @user.id%>

Going somewhere?

This is not you! Either go back

      <%= link_to "< Back", user_url(current_user), method: :get %>

Or log out and sign in under your accout

      <%= link_to 'Login', login_path, method: :get, id: 'loginLink', class: 'login'%>

<%else%>

Edit User

    <%= render 'form' %>

    <%= link_to "< Back", user_url(current_user), method: :put %>

<%end%>

<%if current_user.id != @user.id%>

Going somewhere?

This is not you! Either go back

      <%= link_to "< Back", user_url(current_user), method: :get %>

Or log out and sign in under your accout

      <%= link_to 'Login', login_path, method: :get, id: 'loginLink', class: 'login'%>

<%else%>

Edit User

    <%= render 'form' %>

    <%= link_to "< Back", user_url(current_user), method: :get %>

<%end%>

Update back button to a get

Update back button to a get


<%= User.find(params[:id]).username %>'s Profile

    <% if @groups.length > 0 %>

Your Groups

          <% @groups.each do |group| %>

<a href="/groups/<%= group.id %>"><%= group.name %>

          <% end %>

    <% end %>

Your Top 40 Artists

      <% if @user_artists.length > 0 %>
        <%= render partial: 'artists/rankings_table', locals: {artists: @user_artists} %>
      <% else %>
        You haven't voted on any artists yet. Get started now!
      <% end %>

      <% if current_user %>

<%= link_to 'Edit Your Profile', edit_user_path(current_user) %>

      <% end %>

<%= User.find(params[:id]).username %>'s Profile

    <% if @groups.length > 0 %>

Your Groups

          <% @groups.each do |group| %>

<a href="/groups/<%= group.id %>"><%= group.name %>

          <% end %>

    <% else %>
      You haven't joined any groups yet. Look at the groups page to get started!
    <% end %>

Your Top 40 Artists

      <% if @user_artists.length > 0 %>
        <%= render partial: 'artists/rankings_table', locals: {artists: @user_artists} %>
      <% else %>
        You haven't voted on any artists yet. Get started now!
      <% end %>

      <% if current_user %>

<%= link_to 'Edit Your Profile', edit_user_path(current_user) %>

      <% end %>

Make user page mobile responsive

Make user page mobile responsive


<% provide(:title, @user.name) %>
<h1>
  <%= gravatar_for @user %>
  <%= @user.name %>
</h1>
<%= "WPM: #{@user.WPM}" if @user.WPM %>

<% provide(:title, @user.name) %>
<h1>
  <%= gravatar_for @user %>
  <%= @user.name %>
</h1>
<%# "WPM: #{@user.WPM}" if @user.WPM %>

Disable wpm display until new solution in place


<ul class="grid rows-<%= @dashboard.rows %> cols-<%= @dashboard.columns %>" id="<%= @dashboard.slug %>">
  <% @dashboard.metrics.each do |metric| %>
    <li class="row-<%= metric[:row] %> col-<%= metric[:col] %> height-1 width-1">

        <iframe src='/metrics/<%= metric[:name] %>?layout=bare&boxcolour=<%= metric[:boxcolour] %>&textcolour=<%= metric[:textcolour] %><%= metric[:visualisation].blank? ? '' : "&type=#{metric[:visualisation]}" %>'
                width='100%'
                height='100%'
                frameBorder='0'
                scrolling='no'>

  <% end %>

<ul class="grid rows-<%= @dashboard.rows %> cols-<%= @dashboard.columns %>" id="<%= @dashboard.slug %>">
  <% @dashboard.metrics.each do |metric| %>
    <li class="row-<%= metric[:row] %> col-<%= metric[:col] %> height-<%= metric[:height] || 1 %> width-<%= metric[:width] || 1 %>">

        <iframe src='/metrics/<%= metric[:name] %>?layout=bare&boxcolour=<%= metric[:boxcolour] %>&textcolour=<%= metric[:textcolour] %><%= metric[:visualisation].blank? ? '' : "&type=#{metric[:visualisation]}" %>'
                width='100%'
                height='100%'
                frameBorder='0'
                scrolling='no'>

  <% end %>

Add widths and heights to dashboard

Add widths and heights to dashboard


Request

  <% if endpoint.request.headers.present? %>

Headers

<%= JSON.pretty_generate(endpoint.request.headers) %>

  <% end %>

  <% if endpoint.request.params %>

Parameters

        <% endpoint.request.params.each do |param| %>

              <%= param.name %>

                <%= param.type %>

              <% if param.required %>

              <% else %>

              <% end %>

              <%= param.description %>
              <% if param.example %>

                  (example: <%= param.example %>)

              <% end %>

        <% end %>

  <% end %>

Request

  <% if endpoint.request.headers? %>

Headers

<%= JSON.pretty_generate(endpoint.request.headers) %>

  <% end %>

  <% if endpoint.request.params? %>

Parameters

        <% endpoint.request.params.each do |param| %>

              <%= param.name %>

                <%= param.type %>

              <% if param.required %>

              <% else %>

              <% end %>

              <%= param.description %>
              <% if param.example %>

                  (example: <%= param.example %>)

              <% end %>

        <% end %>

  <% end %>

Fix headers and params conditions for request partial


# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
<% configuration[:network][:interfaces].each do |iface| %>
# <%= iface.desc %>
auto <%= iface.name %>
iface <%= iface.name %> inet static
  <% if iface[:address] %>
  address <%= iface[:address] %>
  <% end %>
  <% if iface[:netmask] %>
  netmask <%= iface[:netmask] %>
  <% end %>
  <% if iface[:network] %>
  network <%= iface[:network] %>
  <% end %>
  <% if iface[:broadcast] %>
  broadcast <%= iface[:broadcast] %>
  <% end %>
  <% if iface[:gateway] %>
  gateway <%= iface.gateway %>
  <% end %>
<% end %>

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
<% configuration[:network][:interfaces].each do |iface| %>
# <%= iface[:desc] %>
auto <%= iface[:name] %>
iface <%= iface[:name] %> inet static
  <% if iface[:address] %>
  address <%= iface[:address] %>
  <% end %>
  <% if iface[:netmask] %>
  netmask <%= iface[:netmask] %>
  <% end %>
  <% if iface[:network] %>
  network <%= iface[:network] %>
  <% end %>
  <% if iface[:broadcast] %>
  broadcast <%= iface[:broadcast] %>
  <% end %>
  <% if iface[:gateway] %>
  gateway <%= iface[:gateway] %>
  <% end %>
<% end %>

Fix a few lingering template changes.

Fix a few lingering template changes.

Signed-off-by: Rails Machine <c62973cc56845b0e473e9e3c40b6e1f0a84662ef@railsmachine.com>


<!DOCTYPE html>

  <title>Giftoppr</title>
  <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= csrf_meta_tags %>
  <%= render :partial => 'layouts/head_js' %>

        <%= image_tag "logo.png", :width => 253, :height => 55 %>

        <%= image_tag "by.png", :width => 158, :height => 38 %>

        <% if user_signed_in? %>

Hi <%= current_user.name %>!

<%= link_to "Logout", auth_logout_path %>

        <% else %>

<%= link_to "Signin with Dropbox", auth_path(:dropbox) %>

        <% end %>

    <%= yield %>

Revert "Move head.js call to just after the script loader."

This reverts commit fe808aa46dbe9c85063e97f4170b847c03703913.


<!DOCTYPE html>

  <title><%= yield :page_title %> - GOV.UK</title>
    <%= stylesheet_link_tag "application.css" %>

  <%= csrf_meta_tags %>
  <%= render partial: 'govuk_component/analytics_meta_tags', locals: { content_item: @contact.contact } %>
  <%= yield :extra_headers %>

      <%= link_to "Home", '/' %>

    <%= yield :breadcrumbs %>

    <div id="page" class="<%= content_for?(:page_class) ? yield(:page_class) : '' %>" >
      <%= yield %>

Remove invalid breadcrumbs aria role

Remove invalid breadcrumbs aria role

`role="breadcrumbs"` is not a thing.
https://www.w3.org/TR/wai-aria/roles#role_definitions

We previously removed from the component:
https://github.com/alphagov/static/pull/737


<!DOCTYPE html>

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

			Home

<%= yield %>

<!DOCTYPE html>

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

        Home
        Current User Goes Here
        <%= link_to "Login", "/"  %>

<%= yield %>

Add placeholder for login link and current user


<!DOCTYPE html>

    <title><%= full_title(yield(:title)) %></title>
    <%= render 'layouts/stylesheets' %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>

      <%= render 'layouts/header' %>

      <% flash.each do |key, value| %>
        <%= content_tag(:div, value, class: "flash #{key}") %>
      <% end %>
      <%= yield %>

      <%= render 'layouts/footer' %>
      <%= "" if Rails.env.development? %>

Use https to access mathjax cdn

Use https to access mathjax cdn


<%
  @title = :email_tracking_title.t(:name => @name.display_name)

  tabs = [
    link_to(:cancel_and_show.t(:type => :name),
            :action => 'show_name', :id => @name.id)
  ]
  @tabsets = { right: draw_tab_set(tabs) }
%>

<%= :email_tracking_help.tp %>

<%= form_tag(:action => 'email_tracking', :id => @name.id) do %>

    <%= if @notification
      submit_tag(:UPDATE.t, class: "btn") + ' ' + submit_tag(:DISABLE.t, class: "btn")
    else
      submit_tag(:ENABLE.t, class: "btn")
    end %>

  <%= :email_tracking_note.t %>:

  <%= :email_tracking_note_help.t %>

  <%= text_area('notification', 'note_template', cols: 80, value: @note_template, autofocus: true) %>

<% end %>

<%
  @title = :email_tracking_title.t(name: @name.display_name)

  tabs = [
    link_to(:cancel_and_show.t(type: :name), action: :show_name, id: @name.id)
  ]
  @tabsets = { right: draw_tab_set(tabs) }
%>

<%= :email_tracking_help.tp %>

<%= form_tag(action: :email_tracking, id: @name.id) do %>

    <%= if @notification
      submit_tag(:UPDATE.t, class: "btn") + ' ' + submit_tag(:DISABLE.t, class: "btn")
    else
      submit_tag(:ENABLE.t, class: "btn")
    end %>

  <%= :email_tracking_note.t %>:

  <%= :email_tracking_note_help.t %>

  <%= text_area(:notification, :note_template, cols: 80, rows: 16,
                value: @note_template, autofocus: true) %>

<% end %>

Increase height of email tracking template window to display entire default template.

* Prevents user from mistakenly thinking she deleted entire template.  See [Pivotal #129185765](https://www.pivotaltracker.com/story/show/129185765).
* Also trivial refactored view to use more current, idiomatic Rails.


        <button id="close" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

          <%= form_tag search_answers_team_url(@team), remote: true, class: "form-inline" do %>

                   Filtros

              <%= text_field_tag :key_words, nil, class: "form-control" %>

                <%= submit_tag 'Buscar', class: "form-control btn btn-flat btn-primary" %>

              <%= render "filters" %>

          <% end %>

        <button id="close" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

          <%= form_tag search_answers_team_path(@team), method: :get, remote: true, class: "form-inline" do %>

                   Filtros

              <%= text_field_tag :key_words, nil, class: "form-control" %>

                <%= submit_tag 'Buscar', class: "form-control btn btn-flat btn-primary" %>

              <%= render "filters" %>

          <% end %>

Change form method to get

Change form method to get


<%= %w[mode miimon downdelay updelay lacp_rate primary primary_reselect xmit_hash_policy].reject { |thing| scope[thing] == :undef }.map {|thing| "#{thing}=#{scope[thing]}"}.join(' ') -%>

<%= %w[mode miimon downdelay updelay lacp_rate primary primary_reselect xmit_hash_policy].reject { |thing| scope.lookupvar(thing) == :undef }.map {|thing| "#{thing}=#{scope.lookupvar(thing)}"}.join(' ') -%>

Use 2.7 compatible syntax for accessing scope object


Hi there,

I'm Steph.

A web developer passioante about building amazing products

LotifyMe

iBall

Friendzone

iLove

SurveyUnicorn

Boba Racer

GraPhantasy (in progress)

  stephaniebarreyro [at] gmail [dot] com

  linkedin.com/in/barreyro

Add basic content and divs.

Add basic content and divs.


## Description:
 <%= loggregator_pagerduty %>

There are more than {{threshold}} drains per adapter. You need to scale the number of adapters.

<%= environment %> CF: More than {{threshold}} drains per adapter

Question: avg(last_5m):avg:datadog.nozzle.cf_syslog_drain.scheduler.drains{*} / avg:datadog.nozzle.cf_syslog_drain.scheduler.adapters{*} > 500

Question: avg(last_30m):avg:datadog.nozzle.cf_syslog_drain.adapter.drain_bindings{bosh_environment:vpc-bosh-run-pivotal-io} > 550

## Description:
{{#is_alert}} <%= loggregator_pagerduty %> {{/is_alert}}
{{#is_warning}}@cf-loggregator@pivotal.io{{/is_warning}}

There are more than {{threshold}} drains per adapter. You need to scale the number of adapters.

Update drain binding alerts to include warnings

Signed-off-by: John Cornish <c2b52b810843975f620b46da0881d5da0a3da265@pivotal.io>


<% text_for :title do %>
  You’ll need a visa to join your family or partner in the UK
<% end %>

<% govspeak_for :body do %>
  Apply for a [family permit](/family-permit).
<% end %>

<% text_for :title do %>
  You’ll need a visa to join your family or partner in the UK
<% end %>

<% govspeak_for :body do %>
  You can apply for a free [family permit](/family-permit) to join your partner or family member for up to 6 months.

  You cannot work or study. If you plan to do these things, you may be able to apply for a visa.

  ##If you’re staying longer than 6 months

  What you can apply for depends on your family member’s situation.

  ###Your partner or family member was living in the UK before 31 December 2020

  You may be able to apply to the free [EU Settlement Scheme](/settled-status-eu-citizens-families). You get more rights than with a visa or family permit - you can live, work and study in the UK for as long as you like.

  ###Your partner or family member are working or studying in the UK

  You may be able to apply as a ‘dependant’ of your partner or family member’s visa. You can work or study if your application is successful.

  [Browse for your family member’s type of visa](/browse/visas-immigration) to find out how to apply.
<% end %>

Clarify options for visa nationals with EEA family


<%= @user.alias %> <%= user_notification_button(@account, @user) %>

<% @device_tokens = @user.device_tokens %>
<%= render "notifiable_admin/admin/device_tokens/table" %>

<%= @user.alias %> <%= user_notification_button(@app, @user) %>

<% @device_tokens = @user.device_tokens %>
<%= render "notifiable_admin/admin/device_tokens/table" %>

Fix private message button bug

Fix private message button bug


<%= params[:flaggable_type].classify %> Flags

<%= form_tag do %>

        Feature

      <%= render partial: "feature_form", collection: @features, as: :feature %>

<% end %>

Add table-responsive wrapper to flags table


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

if [ ! -f /usr/bin/chef-client ]; then
  rpm -Uvh http://rbel.frameos.org/rbel6
  wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6
  rpm --import RPM-GPG-KEY-EPEL-6
  rm -f RPM-GPG-KEY-EPEL-6
  cat > /etc/yum.repos.d/epel.repo <<EOF
[epel]
name=EPEL RPM Repository for Red Hat Enterprise Linux
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=\$basearch
gpgcheck=1
enabled=0
EOF

  yum install -y rubygem-chef ruby-devel libxml2-devel libxslt-devel wget --enablerepo=epel,rbel6
fi

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

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

(
cat <<'EOP'
<%= { "run_list" => @run_list }.to_json %>
EOP
) > /etc/chef/first-boot.json

<%= start_chef %>'

Add CentOS 6.x bootstrap script.

Add CentOS 6.x bootstrap script.


<%= render partial: 'hits',
  locals: {
     hits: @category.hits,
     site: @site,
     points: @category.points,
     title: "All hits",
<<<<<<< HEAD
     active: 'All hits',
=======
     active: 'Hits',
>>>>>>> Extend bootstrap header styles and update breadcrumb paths
     no_content_message: "We don’t have any traffic data for #{@site.abbr} #{@period.no_content}."
   }
%>

<%= render partial: 'hits',
  locals: {
     hits: @category.hits,
     site: @site,
     points: @category.points,
     title: "All hits",
     active: 'All hits',
     no_content_message: "We don’t have any traffic data for #{@site.abbr} #{@period.no_content}."
   }
%>

Rename hits to all hits

Rename hits to all hits

- Rename Hits to All hits for tabs and graphs


<% title('Home') %>

<% if !current_user %>
  <%= render partial: 'shared/subscribe' %>
<% end %>

<% if current_user %>

All

<% end %>

<% @posts.each do |post| %>
  <% @post = post %>
  <%= render :partial => 'posts/heading' %>
<% end %>

<%= will_paginate @posts %>

<% content_for :sidebar do %>
  <%= render partial: 'shared/sidebar' %>
<% end %>

<% title('Home') %>

<% if current_user %>

All

<% end %>

<% @posts.each do |post| %>
  <% @post = post %>
  <%= render :partial => 'posts/heading' %>
<% end %>

<%= will_paginate @posts %>

<% content_for :sidebar do %>
  <%= render partial: 'shared/sidebar' %>
<% end %>

Remove newsletter subscription box for now.


<% content_for :page_title do %>Thredded Setup » <%= setting_up %><% end %>

Setup → <%= setting_up %>

<%= render "new_#{step}" %>

Add the page title for the setup process


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

you can chat with me in my <%= link_to "personal convo", conversation_path(@user.personal_conversation) %>

  <%= @user.personal_conversation.description %>

<%= render "user_links" %>

Convos started by <%= @user.login %>

	  <%= will_paginate @conversations %>

			<%= render :partial => 'conversations/conversation',
			          :collection => @conversations %>

		<%= will_paginate @conversations %>

  <%= link_to t("ui.back"), users_path %>

<%= render :partial => 'convo_stats' %>
<%= render "user_links" %>

you can chat with me in my <%= link_to "personal convo", conversation_path(@user.personal_conversation) %>

  <%= @user.personal_conversation.description %>

Convos started by <%= @user.login %>

	  <%= will_paginate @conversations %>

			<%= render :partial => 'conversations/conversation',
			          :collection => @conversations %>

		<%= will_paginate @conversations %>

  <%= link_to t("ui.back"), users_path %>

Move user links to a better place

Move user links to a better place


Welcome <%=@user.email%>. You reside in <%=@district%>

Your polling place

<%=@polling_place%>

Upcoming elections

<%@state_elections.each do |election|%>

      <%=election.election_title%>

Election date: <%=election.election_date%>

Voter registration: <%=election.voter_registration%>

Absentee ballot request: <%=election.absentee_ballot_request%>

Early in-person voting: <%=election.absentee_ballot_return%>

Voter registration: <%=election.early_in_person_voting%>

<%= @voter_registration_data.early_in_person_voting %>

<%end%>

State voting information

<%= render "zipcodes/state_voter_info" %>

Fix first panel so it displays seperately from second panel


    <%= link_to icon(scormfile), scormfile, :title => scormfile.title %>

      <%= link_to scormfile.title, scormfile %>

      <%= link_to truncate_name(scormfile.author.name, length: 25), scormfile.author.subject %>

Add quiz s result for SCORM packages

Add quiz s result for SCORM packages


  <form class="search_form">
    Query
    <input id="query" name="query" type="text" size="60" />

    <input id="bt_search" name="bt_search" type="submit" value="Search" />
  </form>
  <button class="next">Next</button>

  <form class="search_form">
    Query
    <input id="query" name="query" type="text" size="60" />
    <select name="category">
      <option value="Business">Business</option>
      <option value="Entertainment">Entertainment</option>
      <option value="Health">Health</option>
      <option value="Politics">Politics</option>
      <option value="Sports">Sports</option>
      <option value="US">US</option>
      <option value="World">World</option>
      <option value="ScienceAndTechnology">Science and Technology</option>
    </select>
    <input id="bt_search" name="bt_search" type="submit" value="Search" />
  </form>

Add news category option to form

Add news category option to form


Surveys Taken

        <% @surveys_taken.each do |survey| %>
        <a class="thumbnail-link" href="<%= survey_url(survey) %>">

            <img src="<%= survey.image %>" alt="">

<%= survey.title %>

        <% end %>

Surveys Created

        <% @surveys_created.each do |survey| %>
        <a class="thumbnail-link" href="<%= survey_url(survey) %>">

            <img src="<%= survey.image %>" alt="">

<%= survey.title %>

        <% end %>

Surveys Taken

        <% @surveys_taken.each do |survey| %>
        <a class="thumbnail-link" href="<%= survey_url(survey) + "/results" %>">

            <img src="<%= survey.image %>" alt="">

<%= survey.title %>

        <% end %>

Surveys Created

        <% @surveys_created.each do |survey| %>
        <a class="thumbnail-link" href="<%= survey_url(survey) + "/results" %>">

            <img src="<%= survey.image %>" alt="">

<%= survey.title %>

        <% end %>

Fix survey links on Homepage

Fix survey links on Homepage


[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
pluginsync=true

[agent]
##This is managed by puppet
server=<%= server_name %>
certname=<%= @clean_certname %>
report=true
pluginsync=true

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
pluginsync=true

[agent]
##This is managed by puppet
server=<%= @server_name %>
certname=<%= @clean_certname %>
report=true
pluginsync=true

Fix up the old style template

Fix up the old style template


      ID
      Label
      Exit status
      Started
      Finished

      <%= command.id %>
      <%= command.label %>
      <%= command.exitstatus || 'Still running' %>
      <%= command.created_at %>
      <%= command.updated_at %>

<%- style = (command.exitstatus != 0 || command.exitstatus.blank?) ? 'block' : 'none' %>
<table class="index sortable togglable" style="display: <%= style -%>">

Command

      <%=simple_format command.command %>

<table class="index sortable togglable" style="display: <%= style -%>">

Output

      <%=simple_format command.output %>

Add class="toggleme" to a thead, to prevent the field from collapsing after selecting output text in a web browswer (previously, the mouse-up triggered a close-on-click for the DOM element). Whitespace police.


No Users

There are no users in the system.

<% if @show_help %>

    You may create the first user by running the command:
    rake onebody:new_user <% unless Site.current.default? %>SITE="<%=h Site.current.name %>"<% end %>

<% end %>

No Users

There are no users in the system.

<% if @show_help %>

    You may create the first user by running the command:
    rake onebody:new_user <% unless Site.current.default? %>SITE="<%=h Site.current.name %>"<% end %>

    Alternatively, you can load up OneBody with some sample data by running the command:
    rake onebody:load_sample_data <% unless Site.current.default? %>SITE="<%=h Site.current.name %>"<% end %>

<% end %>

Improve help text when system has no users.


<script type="text/javascript">
  var entriesController = new EntriesController();
  entriesController.initialize();
  entriesController.scrollEnabled = false;
  $( window ).off('scroll');
  entriesController.fetchEntry(<%= slug %>);
</script>

<script type="text/javascript">
  var entriesController = new EntriesController();
  entriesController.initialize();
  entriesController.scrollEnabled = false;
  $( window ).off('scroll');
  entriesController.fetchEntry("<%= @slug %>");
</script>

Fix in entries show JS

Fix in entries show JS


<!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>

   Home
   <% if current_user %>
   Logout
   Signed in as: <a href="/users/<%= current_user.username %>"><%= current_user.username %>
   <% end %>

 <%= yield %>

Add nav bar to header.

Add nav bar to header.


<% @content_title = "Resources" %>

Software Craftsmanship

  <% sc_urls = ["http://blog.objectmentor.com/",
                "http://blog.8thlight.com/",
                "http://codekata.pragprog.com/"] %>
  <% sc_urls.each do |url| %>

<%= auto_link url %>

  <% end %>

Ruby

  <% ruby_urls = ["http://rubyquiz.com/"] %>
  <% ruby_urls.each do |url| %>

<%= auto_link url %>

  <% end %>

Rails

  <% rails_urls = ["http://www.therailsway.com/",
                "http://railsbridge.org/"] %>
  <% rails_urls.each do |url| %>

<%= auto_link url %>

  <% end %>

What's your favorite Resource?

  Send us an email at <%= mail_to "codingmentors@gmail.com" %> and we'll add it!

Add resources to the guide

Add resources to the guide


  This is a JSON API for sport data.
  You can find fixtures, rosters and match events here.

Example endpoints

<%= link_to "Leagues", api_leagues_path %>

<%= link_to "Fixtures", api_league_fixtures_path(39) %>

<%= link_to "Arsenal Roster", api_league_roster_path(39, 21) %>

<%= link_to "Liverpool - Manchester United events", api_league_fixture_events_path(39, 1439948) %>

  This is a JSON API for sport data.
  You can find fixtures, rosters and match events here.

  Read API documentation <%= link_to "here", "http://docs.hackday1.apiary.io/" %>

Example endpoints

<%= link_to "Leagues", api_leagues_path %>

<%= link_to "Fixtures", api_league_fixtures_path(39) %>

<%= link_to "Arsenal Roster", api_league_roster_path(39, 21) %>

<%= link_to "Liverpool - Manchester United events", api_league_fixture_events_path(39, 1439948) %>

Add a link to API docs

Add a link to API docs


<!-- Footer -->
<footer>
  <nav class="debug col-md-12 navbar navbar-default navbar-fixed-bottom row text-center">
    <%= render 'partials/social_media_nav' %>
  </nav>
</footer>

<!-- Footer -->
<footer>
  <nav class="debug navbar navbar-default navbar-fixed-bottom row text-center">
    <div class="col-md-12">
    <%= render 'partials/social_media_nav' %>
    </div>
  </nav>
</footer>

Fix footer width with div aroun partial taking class col-md-12


  <% if current_user %>
    <%= link_to 'Logout', logout_path %>
  <% else %>
    <%= link_to 'Login', login_path %>
    <%= link_to 'Signup', new_user_path %>
  <% end %>

  <% if current_user %>
    <%= link_to 'Add Post', new_post_path %>
    <%= link_to 'Logout', logout_path %>
  <% else %>
    <%= link_to 'Login', login_path %>
    <%= link_to 'Signup', new_user_path %>
  <% end %>

Add link to new post in navbar

Add link to new post in navbar


<%= form.inputs do %>
  <%= form.input :name %>
  <%= form.input :postal_address %>

  <%= form.inputs 'Phone numbers' do %>
    <% form.object.phone_numbers.each do |phone_number| %>
      <%= semantic_fields_for 'contact[phone_numbers_attributes][]', phone_number, :index => nil do |form| %>

          <%= render 'phone_numbers/form', :form => form %>

      <% end %>
    <% end %>

    <%= semantic_fields_for 'contact[phone_numbers_attributes][]', PhoneNumber.new, :index => nil do |form| %>

        <%= render 'phone_numbers/form', :form => form %>

    <% end %>

    <%= form.submit 'Add new phone number', :class => 'new-item' %>
  <% end %>

  <%= form.input :email_address %>
  <%= form.input :website_url %>
  <%= form.input :opening_hours %>

<%= link_to 'Cancel', form.object.new_record? ? contacts_path : contact_path(form.object), :class => 'button' %>

<%= form.submit "#{form.object.new_record? ? 'Create' : 'Update'} Contact", :class => form.object.new_record? ? 'create' : 'update' %>

<% end %>

<%= javascript_tag do %>
  $(function () {
    var blankPhoneNumber = $('.phone-group.blank');
    blankPhoneNumber.hide();
  });
<% end %>

Hide blank phone number form with JavaScript


Home

My Account

Shopping Cart

Checkout

      <%= link_to Spree.t(:home), spree.root_path %>

    <%= link_to Spree.t(:my_account), spree.account_path if spree_current_user %>

      <%= link_to Spree.t(:shopping_cart), spree.cart_path %>

    <%= link_to Spree.t(:checkout), spree.checkout_path %>

Enable button left, shopping cart, falta el efecto ajax and multilenguaje


<%= javascript_tag %Q{
    var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + notifierJsScheme + "#{host}/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E"));
  }
%>

<%= javascript_tag %Q{
    Airbrake.setKey('#{api_key}');
    Airbrake.setHost('#{host}');
    Airbrake.setEnvironment('#{environment}');
    Airbrake.setErrorDefaults({ url: "#{escape_javascript url}", component: "#{controller_name}", action: "#{action_name}" });
  }
%>

<%= javascript_tag %Q{
  (function(){
    var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + notifierJsScheme + "#{host}/javascripts/notifier.js' type='text/javascript'%3E%3C/script%3E"));
  })();
}%>

<%= javascript_tag %Q{
    window.Airbrake = Airbrake || Hoptoad;
    Airbrake.setKey('#{api_key}');
    Airbrake.setHost('#{host}');
    Airbrake.setEnvironment('#{environment}');
    Airbrake.setErrorDefaults({ url: "#{escape_javascript url}", component: "#{controller_name}", action: "#{action_name}" });
  }
%>

Use either Airbrake or Hoptoad object.

Use either Airbrake or Hoptoad object.

The current http://airbrakeapp.com/javascripts/notifier.js (v0.1.0)
defines a Hoptoad object, which Airbrake 3.0 expects an Airbrake object.
Add Hoptoad as a fall-back. Also wrap the first javascript with a
closure so it won't pollute the global namespace.


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

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

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

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

Clean up the pattern to match one digit

Clean up the pattern to match one digit


#!/bin/sh

REQUIRED_PUPPET_VERSION=<%= properties['min_puppet_version'] %>

check_puppet_ver() {
  puppet_bin=$(which puppet)

  if [ ! -z $puppet_bin ]; then
    installed_puppet_version=$(puppet --version)
  else
    installed_puppet_version=0
  fi

  if [ $(echo "$installed_puppet_version\n$REQUIRED_PUPPET_VERSION" | sort -V | head -n1) != "$REQUIRED_PUPPET_VERSION" ]; then
    return 1 # must be installed / upgraded
  else
    return 0 # version is ok
  fi
}

install_puppet() {
  cat > /etc/apt/sources.list.d/puppet.list << EOF
# file created by the GeoMapFish Installer
deb [trusted=yes] file:/opt/<%= properties['profile'] %>-installer/packages/apt wheezy puppetlabs
EOF

  apt-get update
  apt-get install -y puppet facter libaugeas-ruby1.9
}

if [ -z "$1" ]; then
  echo "Please pass a puppet recipe (.pp file) as argument"
  exit 1
fi

if ! check_puppet_ver; then
  echo "Puppet is not installed or too old. Installing..."
  install_puppet

  if ! check_puppet_ver; then
    echo "Something went wrong during the installation! Please fix manually."
    exit 2
  fi
fi

echo "Running Puppet..."
puppet apply --confdir /opt/<%= properties['profile'] %>-installer/ $@

#!/bin/sh

REQUIRED_PUPPET_VERSION=<%= properties['min_puppet_version'] %>

check_puppet_ver() {
  puppet_bin=$(which puppet)

  if [ ! -z $puppet_bin ]; then
    installed_puppet_version=$(puppet --version)
  else
    installed_puppet_version=0
  fi

  if [ $(echo "$installed_puppet_version\n$REQUIRED_PUPPET_VERSION" | sort -V | head -n1) != "$REQUIRED_PUPPET_VERSION" ]; then
    return 1 # must be installed / upgraded
  else
    return 0 # version is ok
  fi
}

install_puppet() {
  cat > /etc/apt/sources.list.d/puppet.list << EOF
# file created by the GeoMapFish Installer
deb [trusted=yes] file:/opt/<%= properties['profile'] %>-installer/packages/apt wheezy puppetlabs
EOF

  apt-get update
  apt-get install -y sudo
  apt-get install -y puppet facter libaugeas-ruby1.9
}

if [ -z "$1" ]; then
  echo "Please pass a puppet recipe (.pp file) as argument"
  exit 1
fi

if ! check_puppet_ver; then
  echo "Puppet is not installed or too old. Installing..."
  install_puppet

  if ! check_puppet_ver; then
    echo "Something went wrong during the installation! Please fix manually."
    exit 2
  fi
fi

echo "Running Puppet..."
puppet apply --confdir /opt/<%= properties['profile'] %>-installer/ $@

Add installation of base dependency packages

Currently only 'sudo'. Our sudo module is broken and does not work
if sudo is not installed before puppet runs.


<% url = @bucket.new_record? ? team_path(current_user.team) : team_bucket_path(current_user.team, @bucket) %>

<%= form_for @bucket, :url => url do |f| %>
  <% if @bucket.errors.any? %>

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

      <% @bucket.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :name %>

    <%= f.text_field :name %>

    <%= f.submit %>

<% end %>

<% url = @bucket.new_record? ? team_buckets_path(current_user.team) : team_bucket_path(current_user.team, @bucket) %>

<%= form_for @bucket, :url => url do |f| %>
  <% if @bucket.errors.any? %>

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

      <% @bucket.errors.full_messages.each do |message| %>

<%= message %>

      <% end %>

  <% end %>

    <%= f.label :name %>

    <%= f.text_field :name %>

    <%= f.submit %>

<% end %>

Fix bucket new form path

Fix bucket new form path


Courses

  <% @courses.each do |course| %>

<%= link_to course.title, course_path(course) %>

      <% render partial: "/languages/display_languages", collection: course.languages, as: :language %>

  <% end %>

Courses

<%= link_to "Add Course", new_course_path %>

  <% @courses.each do |course| %>

<%= link_to course.title, course_path(course) %>

      <% render partial: "/languages/display_languages", collection: course.languages, as: :language %>

  <% end %>

Move Add course link here.

Move Add course link here.


			Posição
			Usuário
			Quantidade

		<% @i = 0 %>
		<% @top_users.each do |user| %>

			 <%= "#{@i += 1} º"%>

			<%= link_to gravatar_for(user, class: "img-circle img-responsive"), user %>

			<%= link_to user.at_username, user.at_username %>

			 <%= "#{user.donated_amount} ml "%>

		<% end %>

<%= render 'ranking/ranking', top_users: @top_users %>

Move form to a partial template

[Template] Move form to a partial template


<% content_for :header do %>

Settings

Set your time zone.

<% end %>

<%= form_tag settings_path, method: :put, id: "settings-form" do %>

    <%= time_zone_select :user,
      :time_zone,
      ActiveSupport::TimeZone.us_zones,
      { default: current_user.time_zone },
      { class: "form-control input-lg" }
    %>

  <button type="submit" class="btn btn-default btn-lg">Save</button>
  or <%= link_to "cancel", dashboard_path %>.
<% end %>

<% content_for :header do %>

Settings

What's your time zone?

<% end %>

<%= form_tag settings_path, method: :put, id: "settings-form" do %>

    <%= time_zone_select :user,
      :time_zone,
      ActiveSupport::TimeZone.us_zones,
      { default: current_user.time_zone },
      { class: "form-control input-lg" }
    %>

  <button type="submit" class="btn btn-default btn-lg">Save</button>
  or <%= link_to "cancel", dashboard_path %>.
<% end %>

Make settings a bit friendlier

Make settings a bit friendlier


<% representations = current_user.represented.unshift(current_user) - [current_subject] %>
<% unless representations.empty? %>

  <%= link_to t('representation.switch'), "javascript:;", :class=>"session_change" %>

    <% representations.each do |representation| %>

      <%= link_to truncate_name(representation.name, :length => 15) + (content_tag(:span, representation.pending_contacts_count.to_s, :class => "switch_pending_count") if representation.pending_contacts_count > 0), { :s => representation.slug }, { :style => "background: transparent url('#{ image_path representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;" } %>

    <% end %>

<% end %>

<% representations = current_user.represented.unshift(current_user) - [current_subject] %>
<% unless representations.empty? %>

  <%= link_to t('representation.switch'), "javascript:;", :class=>"session_change" %>

    <% representations.each do |representation| %>

      <%  pending_total = representation.mailbox.notifications.not_trashed.unread.count %>
      <%= link_to truncate_name(representation.name, :length => 15) + (content_tag(:span, pending_total.to_s, :class => "switch_pending_count") if pending_total > 0), { :s => representation.slug }, { :style => "background: transparent url('#{ image_path representation.logo.url(:representation)}') no-repeat left center;margin-left:2px;" } %>

    <% end %>

<% end %>

Change session menu to include unread notifications rather than pending contacts


<IfModule mod_fastcgi.c>
        AddHandler php5-fcgi .php
        Action php5-fcgi /php5-fcgi
        Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
        FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host <%= scope.lookupvar('apache2::fpm_host') -%>:<%= scope.lookupvar('apache2::fpm_port') -%> -pass-header Authorization
</IfModule>

<IfModule mod_fastcgi.c>
  AddHandler php5-fcgi .php
  Action php5-fcgi /php5-fcgi
  Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
  FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host <%= scope.lookupvar('apache2::fpm_host') -%>:<%= scope.lookupvar('apache2::fpm_port') -%> -pass-header Authorization
<% if @osfamily == 'Debian' and @operatingsystemrelease == '13.10' -%>

  <Directory />
    Require all granted
  </Directory>
<% end -%>
</IfModule>

Support for apache 2.4 in ubuntu 13.10

Support for apache 2.4 in ubuntu 13.10


<%#
# Application Layout

This view template is used as the layout
for every page that Administrate generates.

By default, it renders:
- Navigation
- Content for a search bar
  (if provided by a `content_for` block in a nested page)
- Flashes
- Links to stylesheets and JavaScripts
%>

<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
  <meta charset="utf-8">
  <meta name="ROBOTS" content="NOODP">
  <meta name="viewport" content="initial-scale=1">
  <title>
    <%= content_for(:title) %> | <%= Rails.application.class.parent_name.titlecase %>
  </title>
  <%= render "stylesheet" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="app-container">
    <%= render "navigation" -%>

    <main class="main-content" role="main">
      <%= content_for(:search) %>
      <%= render "flashes" -%>
      <%= yield %>
    </main>
  </div>

  <%= render "javascript" %>
</body>
</html>

<%#
# Application Layout

This view template is used as the layout
for every page that Administrate generates.

By default, it renders:
- Navigation
- Content for a search bar
  (if provided by a `content_for` block in a nested page)
- Flashes
- Links to stylesheets and JavaScripts
%>

<!DOCTYPE html>
<html lang="<%= I18n.locale %>">
<head>
  <meta charset="utf-8">
  <meta name="ROBOTS" content="NOODP">
  <meta name="viewport" content="initial-scale=1">
  <title>
    <%= content_for(:title) %> - <%= Rails.application.class.parent_name.titlecase %>
  </title>
  <%= render "stylesheet" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <div class="app-container">
    <%= render "navigation" -%>

    <main class="main-content" role="main">
      <%= content_for(:search) %>
      <%= render "flashes" -%>
      <%= yield %>
    </main>
  </div>

  <%= render "javascript" %>
</body>
</html>

Use a hyphen separator in page titles

Use a hyphen separator in page titles

The vertical pipe is read aloud by screen readers. So a page title of
`page | Administrate` would be read as "page vertical pipe
Administrate."

By using a hyphen instead, the screen reader will read as "page,
Administrate."

Related: https://github.com/thoughtbot/administrate/issues/794


{
  "version": "https://jsonfeed.org/version/1",
  "title": "The Setup<% if @category %> / <%= @category.capitalize %><% end %>",
  "home_page_url": "https://usesthis.com/",
  "feed_url": "http://usesthis.com/<% if @category %>/interviews/<%= @category %>/<% end %>feed/",
  "author": {
    "name": "Daniel Bogan"
  },
  "items": [
  <% @posts.each do |interview| %>
    {
      "id": "http://usesthis.com/interviews/<%= interview.slug %>/",
      "title": "<%= interview.title %>",
      "url": "http://usesthis.com/interviews/<%= interview.slug %>/",
      "image": "http://usesthis.com/images/interviews/<%= interview.slug %>/portrait.jpg",
      "date_published": "<%= interview.date.strftime('%FT%T') %>Z",
      "content_html": "<%= interview.rendered_contents.gsub('"', '\"') %>"
    }<%= "," unless interview == @posts.last %>
  <% end %>
  ]
}

Add the JSON feed template.

Add the JSON feed template.


<%= f.inputs do %>
  <%= render :partial => 'shared/common_edition_attributes', :locals => {:f => f} %>

      <%= f.input :body, :as => :text, :input_html => { :disabled => @resource.locked_for_edits? } %>

<% end %>

<%= render partial: 'shared/workflow_buttons', locals: { f: f } %>

<%= f.inputs do %>
  <%= render :partial => 'shared/common_edition_attributes', :locals => {:f => f} %>
  <%= f.input :body, :as => :text, :input_html => { :disabled => @resource.locked_for_edits?, class: 'input-md-10' } %>
<% end %>

<%= render partial: 'shared/workflow_buttons', locals: { f: f } %>

Use input helper classes on answer form

Use input helper classes on answer form


Bitcoin Calculator

        <%= render 'shared/breadcrumb' %>
        <%= render 'shared/social_media' %>

0 BTC

$0

        BTC Calculator Input
        <input id='btc_calculator_input' type="number" pattern='[0-9]*' class="form-control" placeholder="1.75">

        USD Calculator Input
        <input id='usd_calculator_input' type="number" pattern='[0-9]*' class="form-control" placeholder="50">

<input type="radio" name='bitcoin_calculator' value='btc' checked>BTC

<input type="radio" name='bitcoin_calculator' value='usd'>USD

Exchange Rate: $<%= @exchange_rate %> / 1 BTC

Bitcoin Calculator

        <%= render 'shared/breadcrumb' %>
        <%= render 'shared/social_media' %>

0 BTC

$0

        BTC Calculator Input
        <input id='btc_calculator_input' type="number" class="form-control" placeholder="1.75">

        USD Calculator Input
        <input id='usd_calculator_input' type="number" class="form-control" placeholder="50">

<input type="radio" name='bitcoin_calculator' value='btc' checked>BTC

<input type="radio" name='bitcoin_calculator' value='usd'>USD

Exchange Rate: $<%= @exchange_rate %> / 1 BTC

Remove alternate numeric keyboards due to inability to define decimal enabling pattern attribute.


<%= link_to "Add New Company", new_company_path%>

companies

  <% @companies.each do |company| %>

<%= company.name %>

        <% company.users.each do |employee| %>
          <%= link_to employee.username, user_path(employee) %>
        <% end  %>

<%= link_to "Edit Company", edit_company_path(company)%>

<%= link_to 'Delete Posting', company_path(company), method: :delete %>

  <% end  %>

Add link to make new company to index

Add link to make new company to index


<%= form_tag(search_pictures_path, method: :get, enforce_utf8: false, class: 'search') do %>

    Search
    <%= search_field_tag :q, params[:q], placeholder: 'Search pictures...', class: 'form-control', 'aria-label' => 'Query' %>

      <button class="btn btn-secondary" id="search-submit" aria-label="Search">
        <%= fa_icon('search') %>
      </button>

<% end %>

<%= form_tag(search_pictures_path, method: :get, enforce_utf8: false, class: 'search') do %>

    <%= search_field_tag :q, params[:q], placeholder: 'Search pictures...', class: 'form-control', 'aria-label' => 'Query' %>

      <button class="btn btn-secondary" id="search-submit" aria-label="Search">
        <%= fa_icon('search') %>
      </button>

<% end %>

Remove label to fix border on search input


    <div class="vote-count" data-id="<%= suggestion.id %>">
      <%= suggestion.vote_count %>

    <div class="vote" data-id="<%= suggestion.id %>">
      <% if vote_for_suggestion %>
        <%= semantic_form_for vote_for_suggestion, html: { method: :delete } do |f| %>
          <%= f.input :suggestion_id, as: :hidden, input_html: { value: suggestion.id } %>
          <%= f.action :submit, button_html: { value: "✔" } %>
        <% end %>
      <% else %>
        <%= semantic_form_for suggestion.votes.build do |f| %>
          <%= f.input :suggestion_id, as: :hidden, input_html: { value: suggestion.id } %>
          <%= f.action :submit, button_html: { value: "✔" } %>
        <% end %>
      <% end %>

    <%= suggestion.description %>

    <div class="vote-count" data-id="<%= suggestion.id %>">
      <%= suggestion.vote_count %>

      <% if vote_for_suggestion %>
        <div class="vote undo-vote" data-id="<%= suggestion.id %>">
          <%= semantic_form_for vote_for_suggestion, html: { method: :delete } do |f| %>
            <%= f.input :suggestion_id, as: :hidden, input_html: { value: suggestion.id } %>
            <%= f.action :submit, button_html: { value: "✔" } %>
          <% end %>

      <% else %>
        <div class="vote" data-id="<%= suggestion.id %>">
          <%= semantic_form_for suggestion.votes.build do |f| %>
            <%= f.input :suggestion_id, as: :hidden, input_html: { value: suggestion.id } %>
            <%= f.action :submit, button_html: { value: "✔" } %>
          <% end %>

      <% end %>

    <%= suggestion.description %>

Add additional css class 'undo-vote' to votes which can be undone


Your monthly expenses

      <% @user.expenses.each do |expense| %>

$<%= expense.amount %>

      <% end %>

Your monthly expenses

      <% current_user.expenses.each do |expense| %>

$<%= expense.amount %>

      <% end %>

Update views to reflect current_user change


<% if user_signed_in? %>

Have a question?

Chat with the Odin community on Discord!

    <%= link_to ODIN_CHAT_URL, class: "button button--dark text-lg px-14" do %>
      Open Discord
    <% end %>

<% else %>

Start learning for free

    <%= form_with url: sign_up_path, method: :get do |form| %>

        <%= form.email_field :email, placeholder: 'Email Address', required: true, class: 'w-60 p-2 focus:outline-none bg-white block rounded-none lg:w-80 lg:text-md rounded-l-md' %>
        <%= form.submit 'Get Started!', class: 'button button--primary py-2' %>

    <% end %>

<% end %>

<% if user_signed_in? %>

Have a question?

Chat with the Odin community on Discord!

    <%= link_to ODIN_CHAT_URL, class: "button button--dark text-lg px-14" do %>
      Open Discord
    <% end %>

<% else %>

Start learning for free

    <%= form_with url: sign_up_path, method: :get do |form| %>

        <%= form.email_field :email, placeholder: 'Email Address', required: true, class: 'form-input border-none focus:ring-0 w-60 p-2 focus:outline-none bg-white block rounded-none lg:w-80 lg:text-md rounded-l-md' %>
        <%= form.submit 'Get Started!', class: 'button button--primary py-2' %>

    <% end %>

<% end %>

Chore: Enable Tailwind Form Plugin for Email CTA.

Because:
* We will be enabling the Tailwind form plugin for all form fields by default.

This commit:
* Enabled the TW form plugin for the email cta field manually and fixes styling.


  <%= f.label :name %>

  <%= f.text_field :name %>

  <%= f.label :short_name %>

  <%= f.text_field :short_name %> @<%= APP_CONFIG[:email_domain] %>

  <%= f.label :description %>

  <%= f.text_area :description, :rows => 5 %>

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

  <%= f.label :name %>

  <%= f.text_field :name %>

  <%= f.label :short_name %>

  <%= f.text_field :short_name %> @<%= APP_CONFIG[:email_domain] %>

  <%= f.label :description %>

  <%= f.text_area :description, :rows => 5 %>

  <%= f.check_box :private %>
  <%= f.label :private, 'Make this list private (invitation only)' %>

Add some clarity to the public/private option when creating a list


# Generated by Chef
<% case @platform %>
<% when 'ubuntu' %>
  <% case @platform_version %>
  <% when '10.04' %>
startup=1
  <% when '12.04', '14.04' %>
START=yes
  <% end %>
<% when 'debian' %>
START=yes
<% end %>

# Generated by Chef
<% case @platform %>
<% when 'ubuntu' %>
  <% case @platform_version %>
  <% when '10.04' %>
startup=1
  <% else %>
START=yes
  <% end %>
<% when 'debian' %>
START=yes
<% end %>

Support for Ubuntu 16.04 LTS

Support for Ubuntu 16.04 LTS


#!/bin/sh

# Cleanup archive directory
find /store/postgresql/system/archive -mtime +10 -print0 | xargs -0r rm

#!/bin/sh

# Cleanup archive directory
find -L /store/postgresql/archive -mtime +10 -print0 | xargs -0r rm

Correct location of archived logs for expiry


<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  <% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> reference documentation with fast, fuzzy search, keyboard shortcuts, mobile version, offline access, and more."><% else %><meta name="robots" content="noindex"><% end %>
  <meta name="format-detection" content="telephone=no">
  <meta property="og:image" content="http://cdn.devdocs.io/images/icon-128.png">
  <title>DevDocs<%= ": #{@doc['name']} API Documentation" if doc_index_page? %></title>
  <link rel="icon" type="image/x-icon" href="//cdn.devdocs.io/favicon.ico">
  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
  <link rel="stylesheet" href="<%= main_stylesheet_path %>" data-alt="<%= alternate_stylesheet_path %>">
  <%= javascript_tag 'application', asset_host: false %><% unless App.production? %>
  <%= javascript_tag 'debug' %><% end %>

DevDocs requires JavaScript to run.
<%= erb :app %>

<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  <% if doc_index_page? %><meta name="description" content="<%= @doc['name'] %> reference documentation with fast, fuzzy search, keyboard shortcuts, mobile version, offline access, and more."><% else %><meta name="robots" content="noindex"><% end %>
  <meta name="format-detection" content="telephone=no">
  <meta property="og:image" content="http://cdn.devdocs.io/images/icon-128.png">
  <title>DevDocs<%= ": #{@doc['name']} API Documentation" if doc_index_page? %></title>
  <link rel="canonical" href="http://devdocs.io<%= request.path %>">
  <link rel="icon" type="image/x-icon" href="//cdn.devdocs.io/favicon.ico">
  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
  <link rel="stylesheet" href="<%= main_stylesheet_path %>" data-alt="<%= alternate_stylesheet_path %>">
  <%= javascript_tag 'application', asset_host: false %><% unless App.production? %>
  <%= javascript_tag 'debug' %><% end %>

DevDocs requires JavaScript to run.
<%= erb :app %>

Add canonical link to all pages

Add canonical link to all pages


# Spotlight serves assets from the public directory
# of the currently deployed version of the app.
location /spotlight/ {
  expires 2h;
  rewrite ^/spotlight(.*)$ $1 break;
  root /opt/spotlight/current/public;
}

# Spotlight serves assets from the public directory
# of the currently deployed version of the app.
location /spotlight/ {
  expires 5m;
  rewrite ^/spotlight(.*)$ $1 break;
  root /opt/spotlight/current/public;
}

Reduce cache time of Spotlight assets vhost

Until we have proper cachebusting in place, we shouldn't cache this for
so long. Under the kind of load we'll see nginx won't have a problem
serving a few static files every couple of minutes.


<%= name %>

NTD $<%= current_price %>

<%= t("ticket.description.#{@plan}") %>

<%= t("ticket.info.#{@plan}.origin_price", price: price) %>

    <% informations.each do |info| %>

<%= info %>

    <% end %>

  <% if @site.ticket_early_bird_due_to.present? %>

      <%= t("ticket.info.#{@plan}.early_bird_price", price: early_price, date: l(@site.ticket_early_bird_due_to.to_date, format: :long)) %>

  <% end %>

    <%= link_to t('ticket.buy_now'), @site.ticket_buy_link, class: 'inline-block px-8 py-3 rounded-full bg-white text-red-500', target: '_blank' %>

Update PassComponent to ensure button position


<!DOCTYPE html>

    <title><%= full_title(yield(:title)) %></title>
    <%= stylesheet_link_tag    "application", media: "all" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
    <%= render 'layouts/shim' %>

    <%= render 'layouts/header' %>

      <% if notice %>

<%= notice %>

      <% end %>
      <% if alert %>

<%= alert %>

      <% end %>
      <%= yield %>
      <%= render 'layouts/footer' %>

<!DOCTYPE html>

    <title><%= full_title(yield(:title)) %></title>
    <%= stylesheet_link_tag    "application", media: "all" %>
    <%= javascript_include_tag "application" %>
    <%= csrf_meta_tags %>
    <%= render 'layouts/shim' %>

    <%= render 'layouts/header' %>

      <% if flash[:success] %>

<%= flash[:success] %>

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

<%= flash[:notice] %>

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

<%= [:alert] %>

      <% end %>
      <%= yield %>
      <%= render 'layouts/footer' %>

Fix flash display for success messages

Fix flash display for success messages


<!DOCTYPE html>

    <title>Biblion | <%= yield(:title) %></title>
    <%= csrf_meta_tags %>
    <meta name="description" content="På Biblion kan du ge och få böcker av andra människor, helt gratis! Registrera dig för att börja, eller ta en titt för att se vilka
    böcker som ligger ute nu.">
    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= render 'layouts/header' %>

      <% flash.each do |msg_type, msg| %>
      <div class="alert alert-<%= msg_type %>"><%= msg %>

      <% end %>
      <%= yield %>

 <%= debug(params) if Rails.env.development? %>

    <%= render 'layouts/footer' %>

<!DOCTYPE html>

    <title>Biblion | <%= yield(:title) %></title>
    <%= csrf_meta_tags %>
    <meta name="google-site-verification" content="sthr8ei4f8LsG-T4j8vXf4bizRkUmLnfUyVXbRK5ynY" />
    <meta name="description" content="På Biblion kan du ge och få böcker av andra människor, helt gratis! Registrera dig för att börja, eller ta en titt för att se vilka
    böcker som ligger ute nu.">
    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <%= render 'layouts/header' %>

      <% flash.each do |msg_type, msg| %>
      <div class="alert alert-<%= msg_type %>"><%= msg %>

      <% end %>
      <%= yield %>

 <%= debug(params) if Rails.env.development? %>

    <%= render 'layouts/footer' %>

Add google webmaster verification tag

Add google webmaster verification tag


<h5> Write a comment </h5>
<%= form_for(@comment, url: comment_post_path(@comment.commentable_id)) do |f| %>
  <%= f.text_area :comment %>
  <br />
  <%= f.submit 'Submit', class: 'btn btn-primary btn-block'  %>
<% end %>

<h5> Write a comment </h5>
<%= form_for(@comment, url: comment_post_path(@comment.commentable_id)) do |f| %>
  <%= f.text_area :comment, cols: 20, rows: 5 %>
  <br />
  <%= f.submit 'Submit', class: 'btn btn-primary btn-block'  %>
<% end %>

Change comment dimensions to display a bigger box


<%= form_for [@assignment, exam_template], url: split_assignment_exam_template_path(id: exam_template.id),
             html: { multipart: true },
             remote: true,
             authenticity_token: true do |f| %>

      <%= f.label t('exam_templates.split.instruction') %>
      <%= f.file_field :pdf_to_split %>

<%= submit_tag t('exam_templates.split.split') %>

<% end %>

<%= form_for [@assignment, exam_template], url: split_assignment_exam_template_path(id: exam_template.id),
             html: { multipart: true },
             authenticity_token: true do |f| %>

      <%= f.label t('exam_templates.split.instruction') %>
      <%= f.file_field :pdf_to_split %>

<%= submit_tag t('exam_templates.split.split') %>

<% end %>

Fix behaviour on PDF split form submit.

scanned-exams: Fix behaviour on PDF split form submit.


        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' and params[:action] != 'search' %>"><%= link_to _("Home"), frontpage_path %>

        <li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_path, :id => 'make-request-link' %>

        <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>">
            <%= link_to _("Browse requests"), request_list_successful_path %>

        <li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default_path %>

<% unless AlaveteliConfiguration::blog_feed.empty? %>
        <li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_path %>

<% end %>
        <li class="<%= 'selected' if params[:controller] == 'help' %>"><%= link_to _("About"), help_about_path %>

Rename Help to About in topnav

Rename Help to About in topnav


<title><%= title %></title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<%= meta_data_tags %>
<%= stylesheet_link_tag 'store/all', :media => 'screen' %>
<%= csrf_meta_tags %>
<%= javascript_include_tag 'store/all' %>
<%= yield :head %>

<title><%= title %></title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<%== meta_data_tags %>
<%= stylesheet_link_tag 'store/all', :media => 'screen' %>
<%= csrf_meta_tags %>
<%= javascript_include_tag 'store/all' %>
<%= yield :head %>

Revert "Fix typo in shared/_head template.", which introduces bug

This reverts commit 84ccd9f8372305db162553b0592852181c80de33.


<% @ideas.each do |idea| %>

<%= link_to(idea.title, idea_path(idea)) %>

  <%= idea.comments.count %> comments

<% end %>

<% @ideas.each do |idea| %>

<%= link_to(idea.title, idea_path(idea)) %>
  <%= idea.comments.count %>

<% end %>

Add styling of ideas and add comment bubble


Nested Resources for All Tools

<% @tools.each do |tool| %>

<%= tool.name %>

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

<%= link_to resource.name, resource.url %> | <button class="btn btn-default">Resource Page</button>

<%= resource.summary %>

    <% end %>

<% end %>

Nested Resources for All Tools

<% @tools.each do |tool| %>

<%= link_to tool.name, tool_path(tool.id) %>

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

<%= link_to resource.name, resource.url %> | <button class="btn btn-default">Resource Page</button>

<%= resource.summary %>

    <% end %>

<% end %>

Add link to tool show page on Tool index


[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
[color]
	ui = auto
[color "diff"]
	meta = magenta
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = vim
[apply]
	whitespace = nowarn
[git-up "rebase"]
	arguments = --preserve-merges
[merge]
	ff = false
[push]
	default = simple
[pretty]
	normal = %C(yellow)%h%Creset %s %C(cyan)(%an, %cr)%Creset
	decorate = %C(yellow)%h%C(green)%d%Creset %s %C(cyan)(%an, %cr)%Creset

[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
[color]
	ui = auto
[color "diff"]
	meta = magenta
[core]
	excludesfile = <%= ENV['HOME'] %>/.gitignore
	editor = vim
[apply]
	whitespace = nowarn
[git-up "rebase"]
	arguments = --preserve-merges
[merge]
	ff = false
[push]
	default = simple
[pull]
	rebase = true
[pretty]
	normal = %C(yellow)%h%Creset %s %C(cyan)(%an, %cr)%Creset
	decorate = %C(yellow)%h%C(green)%d%Creset %s %C(cyan)(%an, %cr)%Creset

Make `git pull` default to rebase.

Make `git pull` default to rebase.


  <%= form_for [@question, answer, @comment] do |f| %>
    <%= f.hidden_field :commentable_type, :value => "Answer" %>
    <%= f.hidden_field :commentable_id, :value => answer.id %>

    <%= f.text_field :content, class: "comment-content" %>
    <%= f.submit %>
  <% end %>

  <%= form_for [@question, answer, @comment] do |f| %>
    <%= f.hidden_field :commentable_type, :value => "Answer" %>
    <%= f.hidden_field :commentable_id, :value => answer.id, class: "commentable-id" %>

    <%= f.text_field :content, class: "comment-content" %>
    <%= f.submit %>
  <% end %>

Add hidden field to form

Add hidden field to form


Ministry of Justice

People Finder

<%= yield %>

------------------------------------------
If you're unsure an email is from the MOJ:

• forward it to phishing@digital.justice.gov.uk

Ministry of Justice

People Finder

<%= yield %>

------------------------------------------
If you're unsure an email is from the MOJ:

• forward it to security@justice.gov.uk

Update to correct email address

Update to correct email address


    <%= button_to 'match', match_path, method: 'get', params: {id: parcel.id} %>

<%= parcel.description %>

<%= parcel.destination_address.city %>

  <%= parcel.deliver_by %>

  <%= form_for parcel, :method => :delete do  %>
    <%= submit_tag "Delete" %>
    <% end %>

    <%= button_to 'match', match_path, method: 'get', params: {id: parcel.id} %>

<%= parcel.description %>

<%= parcel.destination_address.city %>

    <%= parcel.deliver_by %>

    <%= button_to 'Edit', edit_parcel_path(parcel.id), method: 'get' %>
    <%= button_to 'Delete', parcel_path(parcel.id), method: 'delete' %>

Add edit button for parcel, refactor delete button


Meal Time

We have lots of delicious options.

    <% [@western_item, @asian_item, @adventurous_item].each do |item| %>

          Try this <%= item.cuisine %>  Item:<%= item.name %>

It comes from <%= item.restaurant_name %> at the smokin' hot price of <%= item.price %>

Harry gives it a <%= item.harrys_choice ? "THUMBS UP" : "THUMBS DOWN" %>

<%= image_tag item.photo_path, :class => 'img-rounded' %>

    <% end %>

Meal Time

We have lots of delicious options.

    <% [@western_item, @asian_item, @adventurous_item].each do |item| %>

          Try this <%= item.cuisine %>  Item: <a href="/food_item/show/<%= item.id %>"><%= item.name %>

It comes from <%= item.restaurant_name %> at the smokin' hot price of <%= item.price %>

Harry gives it a <%= item.harrys_choice ? "THUMBS UP" : "THUMBS DOWN" %>

<%= image_tag item.photo_path, :class => 'img-rounded' %>

    <% end %>

Add link to show the detail page of food item


<%= @model.name.demodulize.titleize.singularize %>

<%- form_for(@item, :url => project_yogo_data_index_path(@project, @model.name.demodulize),
                    :builder => YogoDataFormBuilder,
                    :html => { :method => :post, :enctype => 'multipart/form-data' } ) do |f| -%>

      <%- @model.properties.each do |p| %>
        <% if p.name != :id %>

            <%= f.label(p.name, p.name.to_s.titleize) %>:
            <%= f.field_for_param(p) %>

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

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

<%= @model.name.demodulize.titleize.singularize %>

<%- form_for(@item, :url => project_yogo_data_index_path(@project, @model.name.demodulize),
                    :builder => YogoDataFormBuilder,
                    :html => { :method => :post, :enctype => 'multipart/form-data' } ) do |f| -%>

 <%- for error in @item.errors -%>
  <%= error %>
 <%- end -%>

      <%- @model.properties.each do |p| %>
        <% if p.name != :id %>

            <%= f.label(p.name, p.name.to_s.titleize) %>:
            <%= f.field_for_param(p) %>

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

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

Print out error messages from the models.


Admininstrative Menu

<%= link_to 'Manage Events', events_path %>

<%= link_to 'Manage Scenarios', scenarios_path %>

<%= link_to 'Manage Users', users_path %>

<% if user_signed_in? && current_user.email == 'silbeg@gmail.com' && params['show-env'] %>
    <%= debug ENV.to_h.to_yaml %>
<% end %>

Admininstrative Menu

More stuff will be coming here, such as the ability to drill into events, etc.

<%= link_to 'Manage Events', events_path %>

<%= link_to 'Manage Scenarios', scenarios_path %>

<%= link_to 'Manage Users', users_path %>

<% if user_signed_in? && current_user.email == 'silbeg@gmail.com' && params['show-env'] %>
    <%= debug ENV.to_h.to_yaml %>
<% end %>

Add jumbotron and some info text

Add jumbotron and some info text


<% board.pins.each do |pin| %>

    <form method="POST" action="/<%= pin.id %>">
      <input name="value" value="<%= pin.value %>" type="hidden"/>
      <button type="submit" value="Setzen" class="button <%= 0 == pin.value ? 'gray' : 'blue' %>">

<%= pin %>

      </button>
    </form>

<% end %>

<% board.pins.each do |pin| %>

    <form method="POST" action="/<%= pin.id %>">
      <input name="value" value="<%= 0 == pin.value ? '1' : '0' %>" type="hidden"/>
      <button type="submit" value="Setzen" class="button <%= 0 == pin.value ? 'blue' : 'gray' %>">

<%= pin %>

      </button>
    </form>

<% end %>

Swap values for toggle function

Swap values for toggle function


<component>

    <templateId root="2.16.840.1.113883.10.20.22.2.17"/>

    <title>Social History</title>
    <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'social_history'} %>
    <% entries.each_with_index do |entry, i| -%>
    <entry typeCode="DRIV">
      <observation classCode="OBS" moodCode="EVN">
        <templateId root="2.16.840.1.113883.10.20.22.4.38"/>

        <id root="<%= UUID.generate %>"/>
        <%== code_display(entry, {:preferred_code_sets => ['SNOMED-CT']}) %>
        <statusCode code="completed"/>
        <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
      </observation>l
    </entry>
    <% end -%>

</component>

<component>

    <templateId root="2.16.840.1.113883.10.20.22.2.17"/>

    <title>Social History</title>
    <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'social_history'} %>
    <% entries.each_with_index do |entry, i| -%>
    <entry typeCode="DRIV">
      <observation classCode="OBS" moodCode="EVN">
        <templateId root="2.16.840.1.113883.10.20.22.4.38"/>

        <id root="<%= UUID.generate %>"/>
        <%== code_display(entry, {:preferred_code_sets => ['SNOMED-CT']}) %>
        <statusCode code="completed"/>
        <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
      </observation>
    </entry>
    <% end -%>

</component>

Remove stray "l" after closing observation tag


description "etcd service registry"

start on started
stop on shutdown

exec /usr/local/bin/etcd <%= @args %> -d <%= node[:etcd][:state_dir] %> -n <%= node[:fqdn] %>

description "etcd service registry"

start on started networking
stop on shutdown

exec /usr/local/bin/etcd <%= @args %> -d <%= node[:etcd][:state_dir] %> -n <%= node[:fqdn] %>

Change upstart script to start on networking

Currently etcd starts before networking; networking should start first so that etcd can listen on the configured interfaces.


Seems like you're having fun... If you register you can make Groups!

Find and join your friends. Vote with your group to see which Artists come out on top.

        x

Seems like you're having fun... If you register you can make Groups!

Find and join your friends. Vote with your group to see which Artists come out on top. Check out our How to Play instructions for more info.

        x

Update _clicks modal with more info.

Update _clicks modal with more info.


<% if @presenter.has_meta_description? %>
  <% content_for :head do %>
    <meta name="description" content="<%= @presenter.meta_description %>">
  <% end %>
<% end %>

  <hgroup>

      Quick answer
      <%= @presenter.title %>

    <% if @presenter.has_subtitle? %>

<%= @presenter.subtitle %>

    <% end %>
  </hgroup>

        <% if @presenter.has_body? %>
          <%= @presenter.body %>
        <% end %>

          <a href="<%= smart_answer_path(@name, started: 'y') %>" class="big button">Get started

      <%= @presenter.devolved_body if @presenter.has_devolved_body? %>

<% if @presenter.has_meta_description? %>
  <% content_for :head do %>
    <meta name="description" content="<%= @presenter.meta_description %>">
  <% end %>
<% end %>

  <hgroup>

      Quick answer
      <%= @presenter.title %>

    <% if @presenter.has_subtitle? %>

<%= @presenter.subtitle %>

    <% end %>
  </hgroup>

Not what you're looking for? ↓

        <% if @presenter.has_body? %>
          <%= @presenter.body %>
        <% end %>

          <a href="<%= smart_answer_path(@name, started: 'y') %>" class="big button">Get started

      <%= @presenter.devolved_body if @presenter.has_devolved_body? %>

Add skiplink to related topics

Add skiplink to related topics


<!DOCTYPE html>
<html>
<head>
  <title><%= content_for(:title) or raise "Call content_for :title, 'x'" %></title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag 'vendor', 'application', "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
  <%= render 'layouts/google_analytics' %>
</head>
<body class="<%= params[:action] %>">

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title><%= content_for(:title) or raise "Call content_for :title, 'x'" %></title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag 'vendor', 'application', "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>

  <%= render 'layouts/google_analytics' %>

  <% if params[:action] == 'menu' %>
    <meta name="viewport" content="width=960">
  <% elsif params[:action] == 'exercise' %>
    <meta name="viewport" content="width=840, minimal-ui">
  <% end %>
</head>
<body class="<%= params[:action] %>">

<%= yield %>

</body>
</html>

Set width and minimal for Mobile Safari

Set width and minimal for Mobile Safari


<% @subject = "subject: Ragios Status Report" %>

Ragios Status Report

From <%= @time_since_last_status_report.to_s(:short) %> to <%= Time.now.to_s(:short) %>
 <%=@jobs.length.to_s %> monitors running on the system
    <% count = 0 %>
<% @jobs.each do |monitor|  %>
    <% count = count + 1 %>
    <%= count %>. <%= monitor.test_description %>

    Running since: <%= monitor.creation_date.to_s(:short) %>

    Last test was performed on: <%= monitor.time_of_last_test.to_s(:short) %>
    Last Test Result:
                 <%= monitor.describe_test_result %> = <%= monitor.test_result %>

    Total number of tests performed: <%= monitor.total_num_tests.to_s %>

                   PASSED <%= monitor.num_tests_passed.to_s %> tests
                   FAILED <%= monitor.num_tests_failed.to_s %> tests

    Tests are performed every: <%= monitor.time_interval %>
    Notification Interval for failed tests: <%= monitor.notification_interval %>
<% end  %>

<% @subject = "subject: Ragios Status Report" %>

Ragios Status Report

From <%= @time_since_last_status_report.to_s(:short) %> to <%= Time.now.to_s(:short) %>
 <%=@jobs.length.to_s %> monitors running on the system
    <% count = 0 %>
<% @jobs.each do |monitor|  %>
    <% count = count + 1 %>
    <%= count %>. <%= monitor.test_description %>

    Running since: <%= monitor.creation_date.to_s(:short) %>

    Last test was performed on: <%= monitor.time_of_last_test.to_s(:short) %>
    Last Test Result:
                 <%= monitor.describe_test_result %> = <%= monitor.test_result %>

    Total number of tests performed: <%= monitor.total_num_tests.to_s %>

                   PASSED <%= monitor.num_tests_passed.to_s %> tests
                   FAILED <%= monitor.num_tests_failed.to_s %> tests
                   <% uptime = (monitor.num_tests_passed / monitor.total_num_tests) * 100 %>
                   UPTIME <%= uptime.to_s(:short) %>%

    Tests are performed every: <%= monitor.time_interval %>
    Notification Interval for failed tests: <%= monitor.notification_interval %>
<% end  %>

Add Uptime percentage value to status report