      <%= render "partials/social_buttons", url: url %>

      <%= link_to t('nlt.about'), about_path %> |
      <%= link_to t('nlt.blog'), "http://blog.alabs.es/category/nolotiro-org/" %> |
      <%= link_to t('nlt.faqs'), faqs_path %> |
      <%= link_to t('nlt.all_ads'), ads_listall_path(type: 'give') %> |
      <%= link_to t('nlt.translations'), translate_path %> |

        <%= image_tag("alabs.png", alt: "aLabs logo") %>

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

    <%= link_to t('nlt.legal_notice'), legal_path %> |
    <%= link_to t('nlt.privacy'), privacy_path %> |
    <%= link_to t('nlt.developers'), 'https://github.com/alabs/nolotiro.org' %> |
    <%= link_to t('nlt.contact'), contact_path %> |
    <%= link_to t('nlt.suggestions'),
                'https://nolotiro.uservoice.com/forums/30282?lang',
                target: "_blank" %>

      <%= render "partials/social_buttons", url: url %>

      <%= link_to t('nlt.about'), about_path %> |
      <%= link_to t('nlt.blog'), "http://blog.alabs.es/category/nolotiro-org/" %> |
      <%= link_to t('nlt.faqs'), faqs_path %> |
      <%= link_to t('nlt.all_ads'), ads_listall_path(type: 'give') %> |
      <%= link_to t('nlt.translations'), translate_path %> |

        <%= image_tag("alabs.png", alt: "aLabs logo") %>

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

    <%= link_to t('nlt.legal_notice'), legal_path %> |
    <%= link_to t('nlt.privacy'), privacy_path %> |
    <%= link_to t('nlt.developers'), 'https://github.com/alabs/nolotiro.org' %> |
    <%= link_to t('nlt.contact'), contact_path %> |
    <%= link_to t('nlt.suggestions'),
                'https://nolotiro.uservoice.com/forums/30282',
                target: "_blank" %>

Remove unnecessary part from uservoice URL


<% content_for :page_title, "#{@site.abbr} Hits Summary" %>
<%= breadcrumb(@site.default_host.hits.build) %>

<%= "#{@site.abbr} Hits Summary" %>

<%= render partial: 'hits_tabs', locals: { active: 'Summary' } %>

<% if any_hits_for?(@point_categories) %>
  <%= render partial: 'hits_graph', locals: { point_categories: @point_categories } %>
<% end %>

<% @sections.each do |category| %>
  <%= render partial: 'summary_section', locals: { category: category } %>
<% end %>

<% content_for :page_title, "#{@site.abbr} Hits Summary" %>
<%= breadcrumb(@site.default_host.hits.build) %>

<%= "#{@site.abbr} Hits Summary" %>

<%= render partial: 'hits_tabs', locals: { active: 'Summary' } %>

<% if any_hits_for?(@point_categories) %>
  <%= render partial: 'hits_graph', locals: { point_categories: @point_categories } %>
<% end %>

<% @sections.each do |category| %>
  <% if category.hits.any?  %>
    <%= render partial: 'summary_section', locals: { category: category } %>
  <% end  %>
<% end %>

Hide summary sections with no hits

Hide summary sections with no hits


<!DOCTYPE html>

  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <meta id='latitude' content='<%= @map_location[:latitude] %>' />
  <meta id='longitude' content='<%= @map_location[:longitude] %>' />
  <title>Results for <%= CONFIG['name'] %></title>

  <%= stylesheet_link_tag 'application' %>

  <%= javascript_include_tag 'home' %>

<%= notice %>

<%= yield %>

Use protocol relative URLs to enable HTTPS


Status

    Name
    Last Ping

  <% SmokeDetector.order("last_ping DESC").each do |sd| %>

      <%= sd.location %>
      <td class="status-<%= sd.status_color %>"><%= sd.last_ping %> (<%= time_ago_in_words(sd.last_ping)%> ago)

  <% end %>

Status

    Name
    Last Ping

  <% SmokeDetector.order("last_ping DESC").each do |sd| %>

      <%= sd.location %>
      <td class="status-<%= sd.status_color %>"><%= sd.last_ping %> (<%= time_ago_in_words(sd.last_ping, include_seconds: true)%> ago)

  <% end %>

Include seconds in last ping time-ago

Include seconds in last ping time-ago


<%= render 'header', :study => @study %>

  Description

  <%= @study.description %>

  Question

  Which place looks <%= @study.question %>?

<%# Allow editor to create add a region set if necessary %>
<% if @study.region_set.nil? %>

You have not yet associated an Image Set. You can create a
     <%= link_to 'New Image Set', new_region_path() + '?study_id=' + @study.id.to_s() + '&create_set=true' %> or
     search for one below.

<% else %>

Image Set

      Map
      Name
      # Locations Included

    <% @study.region_set.regions.each do |region| %>

        <a href="<%= url_for(region) %>"><img src="http://maps.googleapis.com/maps/api/staticmap?center=<%= region.latitude %>,<%= region.longitude %>&zoom=<%= region.zoom %>&size=150x100&sensor=false">
      <%= link_to region.name, region %>
      <%= region.locations.count %>

    <% end %>

<% end %>

<%= render 'header', :study => @study %>

  Description

  <%= @study.description %>

  Question

  Which place looks <%= @study.question %>?

<%# Allow editor to create add a region set if necessary %>
<% if user_signed_in? && @study.user_id == current_user.id %>
  <% if @study.region_set.nil? %>

You have not yet associated an Image Set. You can create a
       <%= link_to 'New Image Set', new_region_path() + '?study_id=' + @study.id.to_s() + '&create_set=true' %> or
       search for one below.

  <% else %>

Image Set

        Map
        Name
        # Locations Included

      <% @study.region_set.regions.each do |region| %>

          <a href="<%= url_for(region) %>"><img src="http://maps.googleapis.com/maps/api/staticmap?center=<%= region.latitude %>,<%= region.longitude %>&zoom=<%= region.zoom %>&size=150x100&sensor=false">
        <%= link_to region.name, region %>
        <%= region.locations.count %>

      <% end %>

  <% end %>
<% end %>

Check for user login and ownership before showing image set editing


<% page_title "#{@document_series.name}", "Document series" %>

<%= link_to "Back to #{@document_series.organisation.name}", admin_organisation_path(@document_series.organisation) %>

<%= @document_series.name %>

<%= govspeak_to_html @document_series.description %>

<% if @document_series.editions.any? %>

    <% @document_series.editions.each do |edition| %>
      <%= content_tag_for :li, edition do %>
        <%= document_series_edition_with_state(edition) %>
      <% end %>
    <% end %>

<% else %>

No associated editions

<% end %>

<%= link_to "Edit", edit_admin_organisation_document_series_path(@document_series.organisation, @document_series), class: "btn" %>

<% page_title "#{@document_series.name}", "Document series" %>

<%= link_to "Back to #{@document_series.organisation.name}", admin_organisation_path(@document_series.organisation) %>

<%= link_to "View on public site", organisation_document_series_path(@document_series.organisation, @document_series) %>

<%= @document_series.name %>

<%= govspeak_to_html @document_series.description %>

<% if @document_series.editions.any? %>

    <% @document_series.editions.each do |edition| %>
      <%= content_tag_for :li, edition do %>
        <%= document_series_edition_with_state(edition) %>
      <% end %>
    <% end %>

<% else %>

No associated editions

<% end %>

<%= link_to "Edit", edit_admin_organisation_document_series_path(@document_series.organisation, @document_series), class: "btn" %>

Include link to document series public view.


<!DOCTYPE html>
<html lang="en">
  <head>
    <%= render partial: 'layouts/shared/head' %>
  </head>
  <body class="<%= @body_class %>">
    <%= render partial: 'layouts/shared/navigation' %>

    <div class="container-fluid">
      <%= render partial: 'layouts/shared/flash' %>

      <%= yield %>
    </div>

    <%= render partial: 'layouts/shared/foot' %>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <%= render partial: 'layouts/shared/head' %>
  </head>
  <body class="<%= @body_class %>">
    <%= render partial: 'layouts/shared/modal' %>
    <%= render partial: 'layouts/shared/navigation' %>

    <div class="container-fluid">
      <%= render partial: 'layouts/shared/flash' %>

      <%= yield %>
    </div>

    <%= render partial: 'layouts/shared/foot' %>
  </body>
</html>

Enable modals for fluid/without_rows layout


Hey there,

<%= link_to "Verify #{@user.display_name}", @admin_url %>

Professor affiliation: <%= @user.affiliation %>
Professor email address: <%= @user.email_address %>

Add <br> tag in professor verification template.


Your id

<%= translate_address @return_address %>

    <%= render 'generate_form' %>

  <%= render 'coupons' %>
  <%= render 'coupons_in_circulation' %>
  <%= render 'returned_coupons' %>

Remove your id from coupons page

Remove your id from coupons page


Step 1 - Create an account

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

<%= f.label :email %>

  <%= f.email_field :email, :autofocus => true %>

<%= f.label :password %>

  <%= f.password_field :password %>

<%= f.label :password_confirmation %>

  <%= f.password_field :password_confirmation %>

<%= f.submit "Sign up", class: 'btn btn-lg btn-success', style: 'margin-top: 1em' %>

<% end %>

Add view for step 1

Add view for step 1

Ugly but it works.


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

    <%= f.label :max_flags, "Maximum autoflags per day" %>

    <%= f.number_field :max_flags, :class => "form-control" %>

    <%= f.label :sites, "Sites" %>

    <%= f.select :sites, options_for_select(Site.mains.order(:site_name).map{ |s| [s.site_name, s.id] }, @preference.site_ids), {}, { :multiple => true, :class => "form-control selectpicker", "data-live-search" => true, "data-actions-box" => true, "data-dropup-auto" => false, :title => "Choose the sites this preference should apply to" } %>

  <% if (@preference.user || current_user).moderator_sites.any? %>

      We won't cast flags on any sites where you're a moderator, regardless of your settings here. That'd be these sites:

        <% (@preference.user || current_user).moderator_sites.each do |ms| %>

<%= ms.site.site_name %>

        <% end %>

  <% end %>

    <%= f.submit "Save", :class => "btn btn-success" %>

<% end %>

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

    <%= f.label :max_flags, "Maximum autoflags per day (per site)" %>

    <%= f.number_field :max_flags, :class => "form-control" %>

    <%= f.label :sites, "Sites" %>

    <%= f.select :sites, options_for_select(Site.mains.order(:site_name).map{ |s| [s.site_name, s.id] }, @preference.site_ids), {}, { :multiple => true, :class => "form-control selectpicker", "data-live-search" => true, "data-actions-box" => true, "data-dropup-auto" => false, :title => "Choose the sites this preference should apply to" } %>

  <% if (@preference.user || current_user).moderator_sites.any? %>

      We won't cast flags on any sites where you're a moderator, regardless of your settings here. That'd be these sites:

        <% (@preference.user || current_user).moderator_sites.each do |ms| %>

<%= ms.site.site_name %>

        <% end %>

  <% end %>

    <%= f.submit "Save", :class => "btn btn-success" %>

<% end %>

Add clarification to max autoflags preferences

See #106


---
title: Feedback
---

  Loading...

  Loading...

Add feedback form for students

Add feedback form for students


#
# Custom jail <%= @name %>
# Managed by Puppet
#

[<%= @name %>]
enabled  = <%= @enabled %>
<% if @action -%>
action   = <%= @action %>
<% end -%>
filter   = <%= @filter %>
logpath  = <%= @logpath %>
maxretry = <%= @maxretry %>
<% if @findtime -%>
findtime     = <%= @findtime %>
<% end -%>
bantime  = <%= @bantime %>
<% if @port -%>
port     = <%= @port %>
<% end -%>
<% if @backend -%>
backend  = <%= @backend %>
<% end -%>
<% if @ignoreip -%>
ignoreip = <% @ignoreip.each do |ip_address| -%><%= ip_address %> <% end -%>
<% end -%>

#
# Custom jail <%= @name %>
# Managed by Puppet
#

[<%= @name %>]
enabled  = <%= @enabled %>
<% if @action -%>
action   = <%= @action %>
<% end -%>
filter   = <%= @filter %>
logpath  = <%= @logpath %>
maxretry = <%= @maxretry %>
<% if @findtime -%>
findtime     = <%= @findtime %>
<% end -%>
bantime  = <%= @bantime %>
<% if @port -%>
port     = <%= @port %>
<% end -%>
<% if @backend -%>
backend  = <%= @backend %>
<% end -%>
<% if !@ignoreip.empty? -%>
ignoreip = <% @ignoreip.each do |ip_address| -%><%= ip_address %> <% end -%>
<% end -%>

Check for empty ignoreip in custom_jail template


//<?php

// Welcome survey
$wgWelcomeSurveyExperimentalGroups['exp2_target_popup']['range'] = '0-9';

// Help panel
$wgGEHelpPanelLinks = [
  [
    'title' => 'Main_Page',
    'text' => 'Amazing help page'
  ],
  [
    'title' => 'Talk:Main_Page',
    'text' => 'Another great resource'
  ]
];
$wgGEHelpPanelHelpDeskTitle = 'Project:Help_Desk';
$wgGEHelpPanelViewMoreTitle = 'Main_Page';
$wgGEHelpPanelSearchForeignAPI = 'https://en.wikipedia.org/w/api.php';

// Homepage
$wgGEHomepageTutorialTitle = 'Tutorial';
$wgGEHomepageMentorsList = 'Mentors';

// Misc
$wgAllowHTMLEmail = true;

//<?php

// Welcome survey
$wgWelcomeSurveyExperimentalGroups['exp2_target_specialpage']['range'] = '0-9';

// Help panel
$wgGEHelpPanelLinks = [
  [
    'title' => 'Main_Page',
    'text' => 'Amazing help page'
  ],
  [
    'title' => 'Talk:Main_Page',
    'text' => 'Another great resource'
  ]
];
$wgGEHelpPanelHelpDeskTitle = 'Project:Help_Desk';
$wgGEHelpPanelViewMoreTitle = 'Main_Page';
$wgGEHelpPanelSearchForeignAPI = 'https://en.wikipedia.org/w/api.php';

// Homepage
$wgGEHomepageTutorialTitle = 'Tutorial';
$wgGEHomepageMentorsList = 'Mentors';

// Misc
$wgAllowHTMLEmail = true;

growthexperiments: Use special page version of welcome survey

...to match production config.

Change-Id: Ic7a324a7fa794b86c4f63213b97589be77022325


<!-- create a new idea, has a form for title and body, as well as information about how to create an idea -->

Create an Idea

There will be text here about how to create an idea.

<% if @errors %>
  <% @errors.full_messages.each do |e| %>

<%= e %>

  <% end %>
<% end %>

<%= form_for :idea, url: ideas_path do |f| %>
  <%= f.label :title %>:
  <%= f.text_field :title %>

  <%= f.label :description %>:
  <%= f.text_area :description %>

  <%= f.submit "Share Your Idea" %>
<% end %>

Add old missing new idea view file

Add old missing new idea view file


<% provide(:title, 'Sign Up') %>

Formulario de Registro

    <%= form_for @user, url: {action: "create"} do |f| %>
      <%= f.label :username, "Usuario:" %>
      <%= f.text_field :username %>

      <%= f.label :dni_number, "Cédula:" %>
      <%= f.text_field :dni_number %>

      <%= f.label :first_name, "Nombres:" %>
      <%= f.text_field :first_name %>

      <%= f.label :last_name, "Apellido" %>
      <%= f.text_field :last_name %>

      <%= f.label :birth_date, "Nacido en:" %>
      <%= f.text_field :birth_date, 'data-provide' => 'datepicker' %>

      <%= f.label :email, "Email:" %>
      <%= f.email_field :email %>

      <%= f.label :phone, "Teléfono:" %>
      <%= f.text_field :phone %>

      <%= f.label :password, "Contraseña" %>
      <%= f.password_field :password %>

      <%= f.label :password_confirmation, "Confirmación" %>
      <%= f.password_field :password_confirmation %>

      <%= f.submit "Crear mi cuenta", class: "btn btn-primary" %>
    <% end %>

<% provide(:title, 'Sign Up') %>

Formulario de Registro

    <%= form_for @user, url: {action: "create"} do |f| %>
      <%= f.label :username, "Usuario:" %>
      <%= f.text_field :username %>

      <%= f.label :identity, "Cédula:" %>
      <%= f.text_field :identity %>

      <%= f.label :first_name, "Nombres:" %>
      <%= f.text_field :first_name %>

      <%= f.label :last_name, "Apellido" %>
      <%= f.text_field :last_name %>

      <%= f.label :birth_date, "Nacido en:" %>
      <%= f.text_field :birth_date, 'data-provide' => 'datepicker' %>

      <%= f.label :email, "Email:" %>
      <%= f.email_field :email %>

      <%= f.label :password, "Contraseña" %>
      <%= f.password_field :password %>

      <%= f.label :password_confirmation, "Confirmación" %>
      <%= f.password_field :password_confirmation %>

      <%= f.submit "Crear mi cuenta", class: "btn btn-primary" %>
    <% end %>

Modify fields naming to fit with user model.


<!doctype html>

    <title>Books to read on Goodreads</title>
    <meta charset="utf-8">
    <meta name="generator" content="what2read - https://github.com/agorf/what2read">

        Rank
        Title
        Authors
        Score
        Average Rating
        Ratings
        Link

      <% books.each.with_index(1) do |book, rank| %>

          <%= rank %>
          <%= book.title %>
          <%= book.authors.join(', ') %>
          <%= '%.2f' % book.score if book.score > 0 %>
          <%= book.average_rating %>
          <%= book.ratings_count %>
          <a href="<%= book.link %>">Goodreads

      <% end %>

<!doctype html>

    <title>Books to read on Goodreads</title>
    <meta charset="utf-8">
    <meta name="generator" content="what2read - https://github.com/agorf/what2read">

        Rank
        Title
        Authors
        Score
        Average Rating
        Ratings
        Link

      <% books.each.with_index(1) do |book, rank| %>

          <%= rank %>
          <%= book.title %>
          <%= book.authors.join(', ') %>
          <%= '%.2f' % book.score if book.score > 0 %>
          <%= '%.2f' % book.average_rating %>
          <%= book.ratings_count %>
          <a href="<%= book.link %>">Goodreads

      <% end %>

Print book average rating with 2 decimals


<!DOCTYPE html>

  <title>Mguides</title>
  <%= stylesheet_link_tag '/guide-assets/stylesheets/formtastic.css', '/guide-assets/stylesheets/formtastic_changes.css', '/stylesheets/admin/jquery-ui-1.8.14.css' %>
  <%= csrf_meta_tag %>
  <%= yield :extra_headers %>

      <% [:notice, :alert].select { |k| flash[k].present? }.each do |k| %>
        <p class="flash-<%= k %>">
          <%= flash[k] %>

      <% end %>

      <%= yield %>

      <%= javascript_include_tag '/guide-assets/javascripts/application.js', '/guide-assets/javascripts/jquery.mustache.js', '/guide-assets/javascripts/jquery-ui-1.8.14.custom.min.js', '/guide-assets/javascripts/form-tools.js' %>
      <%= yield :extra_javascript %>

<!DOCTYPE html>

  <title>Mguides</title>
  <%= stylesheet_link_tag '/guide-assets/stylesheets/formtastic.css', '/guide-assets/stylesheets/formtastic_changes.css', '/stylesheets/admin/jquery-ui-1.8.14.css' %>
  <%= csrf_meta_tag %>
  <%= yield :extra_headers %>

      <% [:notice, :alert].select { |k| flash[k].present? }.each do |k| %>
        <p class="flash-<%= k %>">
          <%= flash[k] %>

      <% end %>

      <% unless current_page?(admin_root_path) %>

<%= link_to 'Return to dashboard', admin_root_path %>

      <% end %>

      <%= yield %>

      <%= javascript_include_tag '/guide-assets/javascripts/application.js', '/guide-assets/javascripts/jquery.mustache.js', '/guide-assets/javascripts/jquery-ui-1.8.14.custom.min.js', '/guide-assets/javascripts/form-tools.js' %>
      <%= yield :extra_javascript %>

Add 'return to dashboard' link into layout


<%= form_for @user, :html => { class: "user-form" } do |f| %>
	<% if @user.errors.any? %>
		<%= render partial: 'shared/error_message', locals: { errors: @user.errors }%>
	<% end %>

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

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

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

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

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

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

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

<% end %>

<%= form_for @user, :html => { class: "user-form" } do |f| %>
	<% if @user.errors.any? %>
		<%= render partial: 'shared/error_message', locals: { errors: @user.errors }%>
	<% end %>

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

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

		<%= f.label :postal_code %>
		<%= f.text_field :postal_code, placeholder: "X1X 1X1" %>

		<%= f.label :email %>
		<%= f.text_field :email, placeholder: "sample@okcouncillr.com" %>

		<%= f.label :password %>
		<%= f.password_field :password, placeholder: "minimum 8 characters" %>

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

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

<% end %>

Add Placeholder To User Form, Show Correct Format


<!DOCTYPE html>
<html>
<head>
  <title>Hrdb</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

<% if current_user %>
  Logged in as <%= current_user.email %>.
  <%= link_to "Log out", logout_path %>
<% else %>
  <%= link_to "Sign up", signup_path %> or
  <%= link_to "log in", login_path %>.
<% end %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Hrdb</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

<p>
<%= link_to "People", people_path %> |
<%= link_to "Projects", projects_path %> |
<% if current_user %>
  Logged in as <%= current_user.email %>.
  <%= link_to "Log out", logout_path %>
<% else %>
  <%= link_to "Sign up", signup_path %> or
  <%= link_to "log in", login_path %>.
<% end %>
</p>

</body>
</html>

Add index links to main layout.

Add index links to main layout.


<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title><%= content_for?(:title) ? yield(:title) : "photoplop" %></title>

    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "vendor/modernizr" %>
    <%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
    <link href='http://fonts.googleapis.com/css?family=Galindo|Lato:400,700,400italic' rel='stylesheet' type='text/css'>

      <%= link_to "Home", root_path %> |
      <% if current_user %>
        Log Out
      <% else %>
        <a href="<%= new_user_path %>">Create an Account
        Log In
      <% end %>

    <%= yield %>

<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title><%= content_for?(:title) ? yield(:title) : "photoplop" %></title>

    <%= stylesheet_link_tag    "application" %>
    <%= javascript_include_tag "vendor/modernizr" %>
    <%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
    <link href='http://fonts.googleapis.com/css?family=Galindo|Lato:400,700,400italic' rel='stylesheet' type='text/css'>

photoplop

      <% if current_user %>

<%= link_to "Logout", logout_path %>

      <% else %>

<%= link_to "Sign Up", new_user_path %>

<%= link_to "Log In", login_path %>

      <% end %>

      <%= yield %>

Change nav bar to off canvas menu

Change nav bar to off canvas menu


<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
    <title>Feeder</title>
    <%= javascript_pack_tag 'application' %>
    <%= stylesheet_pack_tag 'application' %>
    <%= csrf_meta_tags %>
    <link rel="icon" href="data:,">
    <%= render(partial: 'partials/google_analytics') if Rails.env.production? %>

<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
    <meta name="description" content="Imaginary friends automata for Freefeed.net">
    <title>Feeder</title>
    <%= javascript_pack_tag 'application' %>
    <%= stylesheet_pack_tag 'application' %>
    <%= csrf_meta_tags %>
    <link rel="icon" href="data:,">
    <%= render(partial: 'partials/google_analytics') if Rails.env.production? %>

Add service description to the page layout header


<!DOCTYPE html>
<html>
<head>
  <title>BestThingEver</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>

<!DOCTYPE html>

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

      Best Thing Ever

Top Scores

Vote Again

    <%= yield %>

Add navbar to application view

Add navbar to application view


<!DOCTYPE html>
<html>
<head>
  <title>Release</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>

<!DOCTYPE html>

  <title><%= yield :page_title %> | GOV.UK Release</title>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <%= stylesheet_link_tag "application", :media => "all" %>
  <%= csrf_meta_tag %>
  <%= yield :extra_headers %>

        <%= link_to 'GOV.UK Release', {:controller => "applications"}, :class => "brand" %>

<%= nav_link 'Applications', '/applications' %>

              Services

GDS blog

GDS wiki

<%= link_to 'Sign out', :controller => "applications" %>

    <% [:notice, :alert].select { |k| flash[k].present? }.each do |k| %>
      <div class="alert <%= k %>">
        <%= flash[k] %>

    <% end %>

    <%= yield %>

© GDS. Release version: <%= CURRENT_RELEASE_SHA %>

  <%= javascript_include_tag "application" %>

Update the wrapper to use bootstrap

Update the wrapper to use bootstrap


<!DOCTYPE html>
<html>
  <head>
    <%= javascript_include_tag "webcomponentsjs/webcomponents" unless Rails.env.test? %>

    <title>The Open Journal</title>

    <%= stylesheet_link_tag    "application", media: "all"%>
    <%= html_import_tag "application" %>

    <%= javascript_include_tag "application" %>

    <script charset="utf-8" src='/pdf.js'></script>
    <script charset="utf-8" src="https://vivin.net/pub/pdfjs/textlayerbuilder.js"></script>
    <%= csrf_meta_tags %>
  </head>
<body unresolved fullbleed>

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

</body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <%= javascript_include_tag "webcomponentsjs/webcomponents" unless Rails.env.test? %>

    <title>The Open Journal</title>

    <%= stylesheet_link_tag    "application", media: "all"%>
    <%= html_import_tag "application" %>

    <%= javascript_include_tag "application" %>

    <script charset="utf-8" src='/pdf.js'></script>
    <script charset="utf-8" src="http://vivin.net/pub/pdfjs/textlayerbuilder.js"></script>
    <%= csrf_meta_tags %>
  </head>
<body unresolved fullbleed>

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

</body>
</html>

Load textlayerbuilder over http instead of https to get rid of errors.


    トップ
    | Kata (Wiki)
    | 公式ブック

本WEBサイトのソースコードや社団法人の定款などは GitHub 上で公開されています。

Copyright © 2016 一般社団法人 CoderDojo Japan

    トップ
    | Kata (Wiki)
    | 公式ブック

本WEBサイトのソースコードや社団法人の定款などは GitHub 上で公開されています。

© 2016 一般社団法人 CoderDojo Japan

Cut 'Copyright' to shorten footer more

Cut 'Copyright' to shorten footer more


  Mode edition
  Sauvegarder
  Annuler
   Aller au panneau d'administration

Revert "remove dependence with refinery"

This reverts commit e727b354e209e49173f87ebd9c0d33b3f617eb63.


Jekyll websites

            Name
            Title
            Production URL

            <% @sites.each do |site| %>

                <a href="/hyde/select?id=<%= site.id %>"><%= site.id %>
                <%= site.config['title'] %>
                <a href="<%= site.config['url'] %>"><%= site.config['url'] %>

            <% end %>

    Create website

Create website

Jekyll websites

            Name
            Title
            Production URL

            <% @sites.each do |site| %>

                <a href="/hyde/select?id=<%= site.id %>"><%= site.id %>
                <%= site.config['title'] %>
                <a href="<%= site.config['url'] %>"><%= site.config['url'] %>

            <% end %>

Move create site button to upper right corner

Just like we have it on the Posts list page.


<% if tracker = Spree::Tracker.current %>

  <%= javascript_tag do %>
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '<%= tracker.analytics_id %>']);
    _gaq.push(['_trackPageview']);

    <% if flash[:commerce_tracking] && @order.present? %>
      <%# more info: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEcommerce %>
      _gaq.push(['_addTrans',
        "<%= j @order.number %>",
        "",
        "<%= @order.total %>",
        "<%= @order.adjustments.tax.sum(:amount) %>",
        "<%= @order.adjustments.shipping.sum(:amount) %>",
        "<%= j @order.bill_address.city %>",
        "<%= j @order.bill_address.state_text %>",
        "<%= j @order.bill_address.country.name %>"
      ]);
      <% @order.line_items.each do |line_item| %>
        _gaq.push(['_addItem',
          "<%= j @order.number %>",
          "<%= j line_item.variant.sku %>",
          "<%= j line_item.variant.product.name %>",
          "",
          "<%= line_item.price %>",
          "<%= line_item.quantity %>"
        ]);
      <% end %>
      _gaq.push(['_trackTrans']);
    <% end %>

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = '//google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  <% end %>
<% end %>

Move Google Analytics script from spree_frontend to ofn: this is one of the very last dependencies to spree_frontend code


#!/usr/bin/env puma

directory "<%= @working_dir %>"
<%- if @tag -%>
tag <%= @tag %>
<% end -%>
<%= @app if @app %>
<%- if @rackup -%>
rackup "<%= @rackup %>"
<% end -%>
<%- if @preload_app && @phased_restart == false -%>
preload_app!
<% end -%>
<%- if @prune_bundler -%>
prune_bundler
<%- end -%>
environment "<%= @environment %>"
daemonize <%= @daemonize %>
pidfile  "<%= @pidfile %>"
state_path "<%= @statepath %>"
stdout_redirect '<%= @stdout_redirect %>', '<%= @stderr_redirect %>', <%= @output_append %>
<%- if @quiet -%>
quiet
<%- end -%>
threads <%= @thread_min %>, <%= @thread_max %>
bind "<%= @bind %>"
workers <%= @workers %>
worker_timeout <%= @worker_timeout %>
<%- if @on_worker_boot -%>
on_worker_boot do
  <%= @on_worker_boot %>
end
<%- end -%>
<%- if @activate_control_app -%>
activate_control_app "<%= @control_app_bind %>"
<%- end -%>

#!/usr/bin/env puma

directory "<%= @working_dir %>"
<%- if @tag -%>
tag <%= @tag %>
<% end -%>
<%= @app if @app %>
<%- if @rackup -%>
rackup "<%= @rackup %>"
<% end -%>
<%- if @preload_app && @phased_restarts == false -%>
preload_app!
<% end -%>
<%- if @prune_bundler -%>
prune_bundler
<%- end -%>
environment "<%= @environment %>"
daemonize <%= @daemonize %>
pidfile  "<%= @pidfile %>"
state_path "<%= @statepath %>"
stdout_redirect '<%= @stdout_redirect %>', '<%= @stderr_redirect %>', <%= @output_append %>
<%- if @quiet -%>
quiet
<%- end -%>
threads <%= @thread_min %>, <%= @thread_max %>
bind "<%= @bind %>"
workers <%= @workers %>
worker_timeout <%= @worker_timeout %>
<%- if @on_worker_boot -%>
on_worker_boot do
  <%= @on_worker_boot %>
end
<%- end -%>
<%- if @activate_control_app -%>
activate_control_app "<%= @control_app_bind %>"
<%- end -%>

Fix typo preventing preload_app from enabling


$ cat /etc/profile
# $FreeBSD: releng/10.1/etc/profile 208116 2010-05-15 17:49:56Z jilles $
#
# System-wide .profile file for sh(1).
#
# This file is managed by Chef
# Do not edit this file by hand!
#
# Uncomment this to give you the default 4.2 behavior, where disk
# information is shown in K-Blocks
# BLOCKSIZE=K; export BLOCKSIZE
#
# For the setting of languages and character sets please see
# login.conf(5) and in particular the charset and lang options.
# For full locales list check /usr/share/locale/*
# You should also read the setlocale(3) man page for information
# on how to achieve more precise control of locale settings.
#
# Check system messages
# msgs -q
# Allow terminal messages
# mesg y

<% if @profile[:path] %>
<%   if @profile[:path_append] %>
PATH=$PATH:<%= "#{@profile[:path].join ':'}" %>
<%   else %>
PATH=<%= "#{@profile[:path].join ':'}"  %>
<%   end %>
<% end %>

<%= @profile[:append_scripts].join "\n" %>

Remove accidentally included command in template.


<%= @question.title %>

<%= @question.content%>

Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %>

<%= link_to "Edit my question", edit_question_path %>
<%= link_to "Delete my question", question_path, method: :delete %>

  <% @question.answers.each do |answer|%>

      <%= answer.content %>

  <% end %>

<%= @question.title %>

<%= @question.content%>

Asked by <%= @question.user.name %> on <%= std_format_date(@question.created_at) %>

<% if current_user == @question.user %>
  <%= link_to "Edit my question", edit_question_path %>
  <%= link_to "Delete my question", question_path, method: :delete %>
<% end %>

  <% @question.answers.each do |answer|%>

      <%= answer.content %>

  <% end %>

Hide edit and delete questions links on qeustions/show view from all users except question owner


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

<%= csrf_meta_tags %>
<%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload', debug: false %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload', debug: false %>

Set debug to false to concatenate css and js files in development


server {
  # This serves:
  #   - `apt.cluster` internally.
  #   - `apt.production.alphagov.co.uk` externally.
  server_name apt.* apt-origin.*;
  root <%= @root_dir -%>/public;

  access_log /var/log/nginx/apt-access.log timed_combined;
  access_log /var/log/nginx/apt-json.event.access.log json_event;
  error_log /var/log/nginx/apt-error.log;

  location / {
    autoindex on;
  }
}

server {
  # This serves:
  #   - `apt.cluster` internally.
  #   - `apt.production.alphagov.co.uk` externally.
  server_name apt.* apt-origin.*;
  root <%= @root_dir -%>/public;

  <% if @real_ip_header != '' -%>
    # Use an unspoofable header from an upstream CDN or L7 load balancer
    real_ip_header <%= @real_ip_header -%>;
    set_real_ip_from 0.0.0.0/0;
  <% end -%>

  access_log /var/log/nginx/apt-access.log timed_combined;
  access_log /var/log/nginx/apt-json.event.access.log json_event;
  error_log /var/log/nginx/apt-error.log;

  location / {
    autoindex on;
  }
}

Allow use of RealIpModule if enabled in Nginx

The Nginx RealIpModule allows us to log the value of the X-True-Client-IP
header as the IP we appear to receive requests from in the Nginx logs. This
is important as otherwise we see all requests as coming from the CDN edge.
The value of `set_real_ip_from` is set to 0.0.0.0/0 because we don't need to
restrict which hosts can send us True-Client-IP right now. If we need to
in future, that's where we'll do it.

This will only run where `real_ip_header` is set in Hiera; without a value,
it won't run.

The VCL in Fastly sorts the passing of the client's real IP through to this
header. See
https://github.gds/gds/cdn-configs/blob/master/fastly/vcl_templates/apt.vcl.erb#L34
for details.

To test this works, I span up `apt-1` in Vagrant (10.0.2.15), and then used
`curl -ivk -H "X-True-Client-IP: 1.1.1.1" http://10.0.2.15` from my local
machine. This produced:

1.1.1.1 - - [12/Nov/2014:10:04:02 +0000]  "GET / HTTP/1.1" 404 162 "-"
"curl/7.30.0" 0.014 - - - - 10.0.2.15

in the Nginx access logs.

To check that it actually worked, I then changed the value of the
X-True-Client-IP header to 2.2.2.2, and ended up with:

2.2.2.2 - - [12/Nov/2014:10:06:10 +0000]  "GET / HTTP/1.1" 404 162 "-"
"curl/7.30.0" 0.008 - - - - 10.0.2.15

Now happy that this works.


#!/bin/bash
BACKUPROOT="/data/backups"
CLIENTNAME="<%= @host_name %>"
SOURCEDIR="<%= @directory %>"
# Not currently used here, probably will use it for auto-cleanup later
FREQUENCY="<%= @frequency %>"
DATE=`date +"%Y%m%d"`
logger -p local3.info -t govuk-backup Backup of $CLIENTNAME:$SOURCEDIR started
mkdir -p ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}
rsync -qa -e "ssh -o VisualHostKey=false" --delete govuk-backup@${CLIENTNAME}:${SOURCEDIR} ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}
echo "Date: $DATE" > ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}/BACKUPINFO
logger -p local3.info -t govuk-backup Backup of $CLIENTNAME:$SOURCEDIR ended

#!/bin/bash
BACKUPROOT="/data/backups"
CLIENTNAME="<%= @host_name %>"
SOURCEDIR="<%= @directory %>"
# Not currently used here, probably will use it for auto-cleanup later
FREQUENCY="<%= @frequency %>"
DATE=`date +"%Y%m%d"`
logger -p local3.info -t govuk-backup Backup of $CLIENTNAME:$SOURCEDIR started
mkdir -p ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}
rsync -qa -e "ssh -o VisualHostKey=false" --delete govuk-backup@${CLIENTNAME}:${SOURCEDIR} ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}/
echo "Date: $DATE" > ${BACKUPROOT}/${CLIENTNAME}${SOURCEDIR}/BACKUPINFO
logger -p local3.info -t govuk-backup Backup of $CLIENTNAME:$SOURCEDIR ended

Fix the rsync command so that we do not have subdirs of the backup


<%=@artist.name%>

    <%= image_tag @artist.avatar.url(:thumb) %>

Collections

About

Events

        <% @collections.each do |collection| %>

               <%= collection.name %>

stuff

        <% end %>

 The "about me" info

 Come to my show

  <% if current_user && current_user.id == @artist.id %>

      <a href="<%=new_user_collection_path(@artist.id)%>">Add a Collection

  <% end %>

<%=@artist.name%>

    <%= image_tag @artist.avatar.url(:thumb) %>

Collections

About

Events

        <% if @collections && @collections.each do |collection| %>

               <%= collection.name %>

stuff

        <% end %>

 The "about me" info

 Come to my show

  <% if current_user && current_user.id == @artist.id %>

      <a href="<%=new_user_collection_path(@artist.id)%>">Add a Collection

  <% end %>

Add fallback for artist having no collections to prevent an error


    User
    Title
    Start
    End

<% for vent in @latest %>

    <%= image_tag vent.user.gravatar_url %>
    <%=h vent.user.username %>
    <%=h vent.title %>
    <%=h vent.start_date.to_s %>
    <%=h vent.end_date.to_s %>

<% end %>

Add some model for latest

Add some model for latest


<% provide(:title, "Sökning") %>

Alla böcker som matchar sökningen <%= params[:query] %> (
      <% unless @books.nil? %>
        <%= @books.count %>
      <% else %>
        0
      <% end %>
      )

      <%unless @books.nil? %>
        <%= render @books %>

    <% end %>

Add credit to js function

Add credit to js function


Contact Us

Thank you for your interest in the project. We have receieved your comments and will
   respond as soon as possible.

You can also continue to <%= link_to 'Browse the system', root_url %> as a guest or learn more through the following resources.

Bug tracking

Project wiki

Fix links in the comment acceptance page


Email: <%= @community_support_request.email %>
Name: <%= @community_support_request.name %>
Betriebssystem Hersteller: <%= @community_support_request.operating_system %>
Betriebssystem Version: <%= @community_support_request.operating_system_version %>
Browser Hersteller: <%= @community_support_request.browser_vendor %>
Browser Version: <%= @community_support_request.browser_version %>
<% if @community_support_request.is_logged_in %>
  BenutzerIn ist eingeloggt mit: <%= @community_support_request.email %>
  OSM Username: <%= @community_support_request.osm_username %>
<% end %>
Sprache: <%= I18n.locale %>
Message:
<%= @community_support_request.message %>

Fix indentation in email for osm username and logged in


  <%= render partial: "gobierto_plans/plan_types/sdg/header" %>

    <%= render partial: "gobierto_plans/plan_types/sdg/icons" %>

  <% @sdgs.sdgs_distribution.each do |sdg, projects| %>
      <%= render partial: "gobierto_plans/plan_types/sdg/projects", locals: { sdg: sdg, projects: projects } %>
  <% end %>

Hide projects list in plan home

Hide projects list in plan home


<!DOCTYPE html>

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

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

  <title></title>

  <%if current_user %>

      Logout

  <%else%>

      Login

      Create Account

  <%end%>

    Home

    Post New Video

  <%= yield %>

<!DOCTYPE html>

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

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

  <title></title>

    Home

  <%if current_user %>

      Logout

      Post New Video

  <%else%>

      Login

      Create Account

  <%end%>
  <%= yield %>

Move home button and allow only users to create videos


upstream api-gateway {
    server <%= @ip %>:8080       weight=5;
}

upstream backendmonitor {
    server <%= @ip %>:22000      weight=5;
}

server {
    listen 443 ssl;
    server_name <%= @hostname %>;
    ssl_certificate /etc/nginx/ssl/<%= @hostname %>.crt;
    ssl_certificate_key /etc/nginx/ssl/<%= @hostname %>.key;

    location /  {
        proxy_pass http://api-gateway/api;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /events {
        proxy_pass  http://backendmonitor;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	    proxy_set_header Connection '';
	    proxy_http_version 1.1;
	    proxy_read_timeout 3600s;
	    chunked_transfer_encoding off;
	    proxy_buffering off;
	    proxy_cache off;
	    error_page 504 =200 @eventsource-close-graceful;
    }

    location @eventsource-close-graceful {
        add_header Content-Type text/event-stream;
        return 200;
    }

}

upstream api-gateway {
    server <%= @ip %>:8080       weight=5;
}

upstream backendmonitor {
    server <%= @ip %>:22000      weight=5;
}

server {
    listen 443 ssl;
    server_name <%= @hostname %>;
    ssl_certificate /etc/nginx/ssl/<%= @hostname %>.crt;
    ssl_certificate_key /etc/nginx/ssl/<%= @hostname %>.key;

    location /  {
        proxy_pass http://api-gateway/;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location /events {
        proxy_pass  http://backendmonitor;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	    proxy_set_header Connection '';
	    proxy_http_version 1.1;
	    proxy_read_timeout 3600s;
	    chunked_transfer_encoding off;
	    proxy_buffering off;
	    proxy_cache off;
	    error_page 504 =200 @eventsource-close-graceful;
    }

    location @eventsource-close-graceful {
        add_header Content-Type text/event-stream;
        return 200;
    }

}

Fix path for the API

Fix path for the API


Record Event

<%= form_for event, url: { action: "create" }, html: { class: "new_event" } do |f| %>
	<%= f.label 			:details, 			"What happened?" 															%>
	<%= f.text_area 	:details 												 															%>
	<%= f.label 			:date, 					"When?" 																			%>
	<%= f.date_field 	:date 																												%>
	<%= f.label 			:location, 			"Where?" 																			%>
	<%= f.text_field 	:location 																										%>
	<%= f.label 			:offender, 			"Who's the perp?" 														%>
	<%= f.text_field 	:offender 																										%>
	<%= f.label 			:submitter, 		"Include your name for followup? (optional)" 	%>
	<%= f.text_field 	:submitter 																										%>
	<%= f.submit 											"Submit" 																			%>
<% end %>

Record Event

<%= form_for event, url: { action: "create" }, html: { class: "new_event" } do |f| %>
	<%= f.label 			:details, 			"What happened?" 															%>
	<%= f.text_area 	:details 												 															%>
	<%= f.label 			:date, 					"When?" 																			%>
	<%= f.date_field 	:date 																												%>
	<%= f.label 			:location, 			"Where?" 																			%>
	<%= f.text_field 	:location 																										%>
	<%= f.label 			:offender, 			"Who's the perp?" 														%>
	<%= f.text_field 	:offender 																										%>
	<%= f.label 			:submitter, 		"Include your name for followup? (optional)" 	%>
	<%= f.text_field 	:submitter 																										%>
	<%= f.label  			:event_photo,		"Upload a Photo from the Incident"						%>
	<%= f.file_field	:event_photo																									%>
	<%= f.submit 											"Submit" 																			%>
<% end %>

Add photo upload form to event creation page


Past Games

Year

    <% for year in Game.years %>
        <% if year == @selected_year %>

<%= "#{year} - #{year + 1}" %>

        <% else %>

<%= link_to "#{year} - #{year + 1}", past_games_path(year) %>

        <% end %>
    <% end %>

<%= render :partial => "event_calendar_table", :locals => { :games => @games } %>

Stop year labels overlapping in mobile.

Stop year labels overlapping in mobile.


<%= user.name %>

<%= link_to 'Delete', user_path(user), method: :delete, data: { confirm: 'Are you sure?' } %>

<%= user.name %>

<%= user.email %>

<%= link_to 'Delete', user_path(user), method: :delete, data: { confirm: 'Are you sure?' } %>

Add email to user partial

Add email to user partial


<%= notice %>

Listing Costs

        Title
        Due
        Amount
        Parent

      <% @costs.each do |cost| %>

          <%= cost.title %>
          <%= cost.due %>
          <%= cost.amount %>
          <%= cost.parent_id %>
          <%= link_to 'Show', cost %>
          <%= link_to 'Edit', edit_cost_path(cost) %>
          <%= link_to 'Destroy', cost, method: :delete, data: { confirm: 'Are you sure?' } %>

      <% end %>

  <%= link_to 'New Cost', new_cost_path %>

<%= notice %>

Listing Costs

        Title
        Due
        Amount
        Parent

      <% @costs.each do |cost| %>

          <%= cost.title %>
          <%= cost.due %>
          <%= cost.amount %>
          <%= cost.parent_id %>
          <%= link_to 'Show', cost %>
          <%= link_to 'Edit', edit_cost_path(cost) %>
          <%= link_to 'Destroy', cost, method: :delete, data: { confirm: 'Are you sure?' } %>

      <% end %>

  <%= link_to 'New Cost',class: 'new-cost', new_cost_path %>

Add class names to all things needing styling


Edit Course

<%= form_tag :action => 'update', :id => @course.id do %>
   <%= render :partial => 'course' %>
   <%= submit_tag "Update" %>
<% end %>

<%= render :partial => '/shared_scripts/back' %>

Edit Course

<%= form_for @course do %>
   <%= render :partial => 'course' %>
   <%= submit_tag "Update" %>
<% end %>

<%= render :partial => '/shared_scripts/back' %>

Allow editing of a course.

Allow editing of a course.

This was caused by a difference in form_for vs. form_tag helper in Rails 2 to
Rails 3.


<%= form_for(item) do |f| %>

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

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

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

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

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

    <%= f.submit %>

<% end %>

<% @item.errors.each do |error_array, error| %>

<%= flash[:error] = error %>

<% end %>

Add logic that loops through Item error messages and displays appropriate messages


  <%= render :partial => 'shared/photo_pair',
             :locals => {:star => star, :size => :square} %>

      <%= star.reason %>

      <%= friendly_time(star.created_at) %>

  <%= render :partial => 'stars/second', :locals => {:star => star} %>

    <% star.comments.each do |comment| %>

        <%= photo(comment.author) %>
        <%= comment.author.name %>
        <%= comment.body %>
        <%= friendly_time(comment.created_at) %>

    <% end %>

  <%= render :partial => 'shared/photo_pair',
             :locals => {:star => star, :size => :square} %>

      <%= star.reason %>

      <%= friendly_time(star.created_at) %>

          <% form_for(Comment.new(:star_id => star.id, :author_id => current_user.id)) do |f| %>
            <%= f.error_messages %>
	    <%= f.hidden_field :star_id %>
	    <%= f.hidden_field :author_id %>

              <%= f.label :body %>

              <%= f.text_field :body %>

              <%= f.submit 'Create' %>

          <% end %>

  <%= render :partial => 'stars/second', :locals => {:star => star} %>

    <% star.comments.each do |comment| %>

        <%= photo(comment.author) %>
        <%= comment.author.name %>
        <%= comment.body %>
        <%= friendly_time(comment.created_at) %>

    <% end %>

Add the comment form for each star

Add the comment form for each star


# Host definitions
#
# Autogenerated by Chef.

define host {
  use server
  address <%= node['ipaddress'] %>
  host_name <%= node['hostname'] %>
  hostgroups <%= node['nagios']['server_role'] %>,<%= node['os'] %>
}

<% @nodes.each do |n| -%>
<% unless n.name == node.name -%>
define host {
  use server
  address <%= n['ipaddress'] %>
  host_name <%= n['hostname'] %>
<% if n.run_list.roles.nil? || n.run_list.roles.length == 0 -%>
  hostgroups all,<%= n.os %>
<% else -%>
  hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n['os'] %>
<% end -%>
}
<% end -%>

<% end -%>

<% @unmanaged_hosts.each do |n| -%>
define host {
  use server
  address <%= n['address'] %>
  host_name <%= n['id'] %>
  hostgroups <%= n['hostgroups'].join(",") %>
  notifications_enabled <%= n['notifications'] %>
}
<% end -%>

# Host definitions
#
# Autogenerated by Chef.

define host {
  use server
  address <%= node['ipaddress'] %>
  host_name <%= node['hostname'] %>
  hostgroups <%= node['nagios']['server_role'] %>,<%= node['os'] %>
}

<% @nodes.each do |n| -%>
<% unless n.name == node.name -%>
define host {
  use server
  address <%= n['ipaddress'] %>
  host_name <%= n['hostname'] %>
  <% if node['nagios']['multi_environment_monitoring'] -%>
  <% if n.run_list.roles.nil? || n.run_list.roles.length == 0 -%>
  hostgroups all,<%= n.os %><% if n.chef_environment != '_default' -%>, <%= n.chef_environment %> <% end -%>
  <% else -%>
  hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n.os %><% if n.chef_environment != '_default' -%>, <%= n.chef_environment %> <% end -%>
  <% end -%>
  <% elsif -%>
  <% if n.run_list.roles.nil? || n.run_list.roles.length == 0 -%>
  hostgroups all,<%= n.os %>
  <% else -%>
  hostgroups <%= n.run_list.roles.to_a.join(",") %>,<%= n['os'] %>
  <% end -%>
  <% end -%>
}
<% end -%>
<% end -%>

<% @unmanaged_hosts.each do |n| -%>
define host {
  use server
  address <%= n['address'] %>
  host_name <%= n['id'] %>
  hostgroups <%= n['hostgroups'].join(",") %>
  notifications_enabled <%= n['notifications'] %>
}
<% end -%>

Write out hosts with environments if enabled


    Menu

      The Pensions Guidance Service

    Menu

      Book a pension guidance session

Update service header text and link

Update service header text and link


<script>
  (function(i,s,o,g,r,a,m){i['InstanaEumObject']=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','//eum.instana.io/eum.min.js','ineum');
  ineum('apiKey', '<%=::Instana.config[:eum_api_key]%>');
  ineum('traceId', '<%=::Instana.tracer.trace_id%>');

  <% if !::Instana.config[:eum_baggage].empty? %>
    <% ::Instana.config[:eum_baggage].each do |k, v| %>
      ineum('meta', '<%=k%>', '<%=v%>');
    <% end %>
  <% end %>
</script>

<script>
  (function(i,s,o,g,r,a,m){i['InstanaEumObject']=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','//eum.instana.io/eum.min.js','ineum');
  ineum('apiKey', '<%=::Instana.config[:eum_api_key]%>');
  ineum('traceId', '<%=::Instana.tracer.trace_id_header%>');

  <% if !::Instana.config[:eum_baggage].empty? %>
    <% ::Instana.config[:eum_baggage].each do |k, v| %>
      ineum('meta', '<%=k%>', '<%=v%>');
    <% end %>
  <% end %>
</script>

Revert "Flip to trace id"

Revert "Flip to trace id"

This reverts commit 1b7ecf27a978bcec28f2a4e1478733d9569737e1.


<%= form_for(@comment) do |f| %>
  <%= f.label(:content) %>
  <%= f.text_field(:content) %>
  <%= f.submit %>
<% end %>

<%= form_for(:comment, url: post_comments_path) do |f| %>
  <%= f.label(:content) %>
  <%= f.text_field(:content) %>
  <%= f.submit %>
<% end %>

Change form on comment creation

Change form on comment creation


<head>
  <meta charset="utf-8" >
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width" />
  <title><%= yield_content :title %></title>
  <meta name="description" content="<%= yield_content :description %>" />
  <meta name="keywords" content="<%= yield_content :meta_keywords %>" />
  <meta property="fb:app_id" content="<%= yield_content :meta_title %>" />
  <meta name="google-site-verification" content="<%= yield_content t('meta.google_site_verification') %>" />
  <meta property="og:title" content="<%= yield_content :meta_title %>"/>
  <meta property="og:type" content="<%= yield_content :type %>"/>
  <meta property="og:site_name" content="<%= yield_content :fb_site_name %>"/>
  <meta property="og:description" content="<%= yield_content :fb_description %>"/>
  <%= stylesheet_link_tag "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css", "all" %>
  <%= stylesheet_link_tag "//cloud.typography.com/6902032/784442/css/fonts.css", "all" %>
  <%= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" %>
  <%= javascript_include_tag "modernizr", "plugins", "all" %>
  <%= csrf_meta_tags %>
  <%= yield_content :head %>
</head>

<head>
  <meta charset="utf-8" >
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width" />
  <title><%= yield_content :title %></title>
  <meta name="description" content="<%= yield_content :description %>" />
  <meta name="keywords" content="<%= yield_content :meta_keywords %>" />
  <meta property="fb:app_id" content="<%= yield_content :meta_title %>" />
  <meta name="google-site-verification" content="<%= yield_content t('meta.google_site_verification') %>" />
  <meta property="og:title" content="<%= yield_content :meta_title %>"/>
  <meta property="og:type" content="<%= yield_content :type %>"/>
  <meta property="og:site_name" content="<%= yield_content :fb_site_name %>"/>
  <meta property="og:description" content="<%= yield_content :fb_description %>"/>
  <%= stylesheet_link_tag "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" %>
  <%= stylesheet_link_tag "//cloud.typography.com/6902032/784442/css/fonts.css", "all" %>
  <%= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" %>
  <%= javascript_include_tag "modernizr", "plugins", "all" %>
  <%= csrf_meta_tags %>
  <%= yield_content :head %>
</head>

Remove duplicate reference to "all"

Remove duplicate reference to "all"


Welcome to Sorter!

The perfect place to organize all your web resources on anything coding. And see what others are learning.

<% if user_signed_in? %>

Here's what people have been reading:

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

<%= link_to resource.title, resource_path(resource) %> - <%= link_to resource.language_name, language_path(resource.language) %>

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

<%= link_to "##{topic.name}", topic_path(topic) %>

        <% end %>

    <% end %>

<% end %>

<%= link_to "Sign in with GitHub", user_github_omniauth_authorize_path %>

Welcome to Sorter!

The perfect place to organize all your web resources on anything coding. And see what others are learning.

<% if user_signed_in? %>

Here's what people have been reading:

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

<%= link_to resource.title, resource_path(resource) %> - <%= link_to resource.language_name, language_path(resource.language) %>

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

<%= link_to "##{topic.name}", topic_path(topic) %>

        <% end %>

    <% end %>

Check out available <%= link_to "Courses", courses_path %>

<% end %>

<%= link_to "Sign in with GitHub", user_github_omniauth_authorize_path if !user_signed_in?%>

Hide github omniauth link when logged in.


You are invited to an event!

<%= flash[:notice] %>

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

    <%= f.label :is_fancy %>

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

    <%= f.label :cuisine %>

    <%= f.select :cuisine, [['',''],['Japanese','japanese'],['Chinese','chinese'],['American','american'], ['Italian','italian'],['Indian','indian']] %>

    <%= f.label :is_vegetarian %>

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

    <%= f.label :distance %>

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

    <%= f.submit %>

<% end %>

You are invited to an event!

<%= flash[:notice] %>

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

    <%= f.label :is_fancy %>

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

    <%= f.label :cuisine %>

    <%= f.select :cuisine, [['',''],['Japanese','japanese'],['Chinese','chinese'],['American','tradamerican'], ['Italian','italian'],['Indian','indpak']] %>

    <%= f.label :is_vegetarian %>

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

    <%= f.label :distance %>

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

    <%= f.submit %>

<% end %>

Update form for selecting cuisines with correct yelp terms


GLF!

It's time to vote for GLF! (or possibly some other "GL" day). Awesome!

  <% if current_user.nil? %>
    <%= link_to "Sign up now!", new_user_registration_path, class: "btn btn-large btn-primary" %>
  <% end %>

<%= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org/' %>
<%= link_to image_tag("glf.png", alt: "GLF"), 'http://glf.localstatic.com/' %>

GLF!

It's time to vote for GLF! (or possibly some other "GL" day). Awesome!

  <% if current_user.nil? %>
    <%= link_to "Sign up now!", new_user_registration_path, class: "btn btn-large btn-primary" %>
  <% end %>

<%#= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org/' %>
<%#= link_to image_tag("glf.png", alt: "GLF"), 'http://glf.localstatic.com/' %>

Disable logo images on home page

Disable logo images on home page


$("#expenses_grid").html("<%= escape_javascript(render partial: 'expenses_list', locals: { expenses: @selected, wishlist: @wishlist } ) %>").html_safe;

  var old_budget = parseFloat($('h4 .best_in_place[data-bip-attribute="budget"]').text().replace(/[A-Za-z$-,]/g, ""));
  var balance = parseFloat($('#balance-field').text().replace(/[A-Za-z$-,]/g, ""));

Move global variable to approprite view

Move global variable to approprite view


<% wrap_layout :layout do %>

<%= date %>

<%= title %>

<%= topic_list %>

    <% if soundcloud_id %>

        <iframe
          width="100%"
          height="450"
          scrolling="no"
          frameborder="no"
          src=<%= big_soundcloud_player %>>

    <% end %>

    <% if interviewee %>

Other Episodes

      <a class='other-episodes' href="/betweenscreens/tags/<%= dasherize(interviewee) %>.html"><%= interviewee %>
    <% end %>

    <%= current_article.body %>

<% end %>

<% wrap_layout :layout do %>

<%= date %>

<%= title %>

      <% current_page.tags.each do |tag| %>
        <% if tag == current_page.tags.last %>
          <%= link_to "#{tag}", tag_path(tag), :class => 'tag-list-link' %>
        <% else %>
          <%= link_to "#{tag}", tag_path(tag), :class => 'tag-list-link' %>
          <%= " |" %>
        <% end %>
      <% end %>

    <% if soundcloud_id %>

        <iframe
          width="100%"
          height="450"
          scrolling="no"
          frameborder="no"
          src=<%= big_soundcloud_player %>>

    <% end %>

    <% if interviewee %>

Other Episodes

      <a class='other-episodes' href="/betweenscreens/tags/<%= dasherize(interviewee) %>.html"><%= interviewee %>
    <% end %>

    <%= current_article.body %>

<% end %>

Replace static tag list w/ link lis in blog detail


<% content_for :body_classes, "users confession--index" %>

<%= notice %>

      <%= link_to 'Ny bekännelse', new_confession_path, :class => "button button--green" %>

    <% @confessions.each do |confession| %>

        <%= simple_format(truncate(confession.body, :length => 200)) %>

          <%= link_to "Redigera", edit_confession_path(confession), :class => "button button--green" %>

    <% end %>

      <%= link_to "Logga ut", destroy_user_session_path, :method => :delete, :class => "button button--gray-40 button--small" %>

<% content_for :body_classes, "users confession--index" %>

<%= notice %>

      <%= link_to 'Ny bekännelse', new_confession_path, :class => "button button--green" %>

    <% @confessions.each do |confession| %>

        <%= simple_format(truncate(confession.body, :length => 200)) %>

          <%= link_to "Redigera", edit_confession_path(confession), :class => "button button--green" %>
          <% unless confession.featured? %>
            <%= link_to "Ta bort", edit_confession_path(confession), :class => "button button--gray-40 button--small", data: { confirm: "Vill du verkligen ta bort denna?"} %>
          <% end %>

    <% end %>

      <%= link_to "Logga ut", destroy_user_session_path, :method => :delete, :class => "button button--gray-40 button--small" %>

Add remove button for non featured confessions


<% content_for(:title) do %>
    <%- "#{@src_set.name} memes" -%>
<% end %>

<%= @src_set.name %>

<%= render(partial: 'src_images/src_images', locals: {
  user: current_user,
  show_remove_from_set: @src_set.try(:user) == current_user,
  show_delete: false,
  src_images: @src_images,
  more_images: false }) %>

<% if current_user && @src_set.user == current_user %>
    <%= button_to 'Delete Set', {:action => :destroy, :id => @src_set.name},
                  :confirm => "Are you sure?", :method => :delete, :class => 'btn btn-danger' %>
<% end %>

<% content_for(:title) do %>
    <%- "#{@src_set.name} memes" -%>
<% end %>

<%= @src_set.name %>

<%= render(partial: 'src_images/src_images', locals: {
  user: current_user,
  show_remove_from_set: @src_set.try(:user) == current_user,
  show_delete: false,
  src_images: @src_images,
  more_images: false }) %>

<% if current_user && @src_set.user == current_user %>
    <%= button_to 'Delete Set', {action: :destroy, id: @src_set.name},
                  confirm: 'Are you sure?', method: :delete, class: 'btn btn-danger' %>
<% end %>

Use ruby 1.9 style hashes

Use ruby 1.9 style hashes


<% content_for :body_class, "home-page" %>

<% content_for :canonical do %>
  <%= render "shared/canonical", href: root_url %>
<% end %>

<% if has_banners? %>
  <%= render "shared/banner" %>
<% end %>

<% provide :social_media_meta_tags do %>
  <%= render "shared/social_media_meta_tags",
              social_url: root_url %>
<% end %>

<%= render "header", header: @header %>

  <%= render "feeds" %>

    <div class="small-12 column <%= 'large-8' if feed_processes_enabled? %>">
      <%= render "cards" %>

      <%= render "processes" %>

  <% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %>
    <%= render "recommended",
                recommended_debates: @recommended_debates,
                recommended_proposals: @recommended_proposals %>
  <% end %>

<% content_for :body_class, "home-page" %>

<% content_for :canonical do %>
  <%= render "shared/canonical", href: root_url %>
<% end %>

<% if has_banners? %>
  <%= render "shared/banner" %>
<% end %>

<% provide :social_media_meta_tags do %>
  <%= render "shared/social_media_meta_tags",
              social_url: root_url %>
<% end %>

<%= render "header", header: @header %>

  <%= render "feeds" %>

	<% if @cards.any? %>
      <div class="small-12 column <%= 'large-8' if feed_processes_enabled? %>">
        <%= render "cards" %>

	<% end %>

      <%= render "processes" %>

  <% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %>
    <%= render "recommended",
                recommended_debates: @recommended_debates,
                recommended_proposals: @recommended_proposals %>
  <% end %>

Hide Featured section on Home Page if there are no cards


Pilot

    <% if Time.zone.now < Time.zone.parse('May 1, 2016') %>

    <% else %>

Map is undergoing maintenance. Please check back later.

    <% end %>

Add auto-removal after heating season so we make a better map


<%= project.name %>

  You are about to delete this project - this will remove the
  project and any participant suggested tags that may still be outstanding,
  and cannot be undone.

  <%= button_to "Confirm delete",
    project_path(project),
    method: :delete,
    class: 'btn btn-danger add-right-margin' %>

  <%= link_to "Cancel", :back, class: "cancel-link" %>

<%= project.name %>

  You are about to permanently delete this project - this
  action will remove all unsaved progress.

  <%= button_to "Confirm delete",
    project_path(project),
    method: :delete,
    class: 'btn btn-danger add-right-margin' %>

  <%= link_to "Cancel", :back, class: "cancel-link" %>

Simplify project delete message to remove ambiguity


  <a class="facebook icon" href="http://www.facebook.com/sharer/sharer.php?u=<%= product_url(@product) %>" target="_blank">fb
  <a class="twitter icon" href="http://twitter.com/share?text=<%= accurate_title %> by @nys&url=<%= product_url(@product) %>" target="_blank">tw
  <a class="pinterest icon" href="http://pinterest.com/pin/create/button/?url=<%= product_url(@product) %>&media=<%= @product.images.order(:position).first.attachment %>" target="_blank">pi
  sv

  <sv:product-button type="boxed"></sv:product-button>

  <a class="facebook icon" href="http://www.facebook.com/sharer/sharer.php?u=<%= product_url(@product) %>" target="_blank">
  <a class="twitter icon" href="http://twitter.com/share?text=<%= accurate_title %> by @NYSunshine3&url=<%= product_url(@product) %>" target="_blank">
  <a class="pinterest icon" href="http://pinterest.com/pin/create/button/?url=<%= product_url(@product) %>&media=<%= @product.images.order(:position).first.attachment %>" target="_blank">

  <sv:product-button type="boxed"></sv:product-button>

Update twitter handle in sharing

Update twitter handle in sharing


<% unless @message %>
    <%= form_tag("/submit", method: "post") do %>

Inscrivez vous pour recevoir une version beta
 de l'app sur votre iPhone

      <%= email_field_tag :email, '', class: "form-control", placeholder: t(:email_placeholder) %>
      <%= submit_tag t(:get_beta_access), class: 'btn btn-lg btn-primary btn-block', id: "submit" %>
    <% end %>
  <% else %>
    <p class="alert alert-<%= @type %>">
      <%= @message %>

  <% end %>

<% unless @message %>
    <%= form_tag("/submit", method: "post") do %>

Inscrivez vous pour recevoir une version beta
 de l'app sur votre iPhone

      <%= email_field_tag :email, '', class: "form-control", placeholder: t(:email_placeholder) %><%= submit_tag t(:get_beta_access), class: 'btn btn-lg btn-primary btn-block', id: "submit" %>
    <% end %>
  <% else %>
    <p class="alert alert-<%= @type %>">
      <%= @message %>

  <% end %>

Remove space between field and submit

Remove space between field and submit


    TeamTracker

<%= link_to('Home', teams_path) %>

      <% if user_signed_in? %>

<%= link_to('Logout', destroy_user_session_path, method: :delete) %>

      <% else %>

<%= link_to('Login', new_user_session_path)  %>

      <% end %>

    TeamTracker

<%= link_to('Home', teams_path) %>

      <% if user_signed_in? %>

<%= link_to('Games', games_path) %>

<%= link_to('Teams', teams_path) %>

<%= link_to('Players', players_path) %>

<%= link_to('Logout', destroy_user_session_path, method: :delete) %>

      <% else %>

<%= link_to('Login', new_user_session_path)  %>

      <% end %>

Edit navbar to have links to the various model categories


<%= render 'form' %>

<ul class="user-login-links">
  <li> <%= link_to 'Signup', new_user_url %> </li>
  <li> <%= link_to 'Recover lost password', recover_users_url %> </li>
</ul>
<%#
# Copyright (c) 2008 Todd Willey <todd@rubidine.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-%>

<%= render 'form' %>

<ul class="user-login-links">
  <% if UserSystem.public_account_creation -%>
    <li> <%= link_to 'Signup', new_user_url %> </li>
  <% end -%>
  <li> <%= link_to 'Recover lost password', recover_users_url %> </li>
</ul>
<%#
# Copyright (c) 2008 Todd Willey <todd@rubidine.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-%>

Hide link to create new accounts if there is no public registration.


<head>
  <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0;">
  <meta name="apple-mobile-web-app-capable" content="yes">
	<link href='/favicon.ico' rel='icon' type='image/x-icon'>
	<title>CatchLater</title>
	<%= stylesheet_link_tag 'application' %>
  <link href="http://fonts.googleapis.com/css?family=Molengo:regular|News+Cycle|Sue+Ellen+Francisco" rel="stylesheet" type="text/css">
  <%= csrf_meta_tag %>
  <% if controller.controller_name == 'videos' && current_user %>
  <%= auto_discovery_link_tag :atom, '/videos/feed.atom?key=' + current_user.feedKey %>
  <% end %>
</head>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="description" content="Save online videos across the web for later viewing">
  <meta id="viewport" name="viewport" content="initial-scale=1.0,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0">
  <meta name="apple-mobile-web-app-capable" content="yes">
	<link href='/favicon.ico' rel='icon' type='image/x-icon'>
	<title>CatchLater</title>
	<%= stylesheet_link_tag 'application' %>
  <link href="http://fonts.googleapis.com/css?family=Molengo:regular|News+Cycle|Sue+Ellen+Francisco" rel="stylesheet" type="text/css">
  <%= csrf_meta_tag %>
  <% if controller.controller_name == 'videos' && current_user %>
  <%= auto_discovery_link_tag :atom, '/videos/feed.atom?key=' + current_user.feedKey %>
  <% end %>
</head>

Modify viewport meta; add charset, ua, description meta


List of Trails

<% @trails.each do |trail| %>

<%= trail.name %>

<% end %>

Create view for mountain trails

Create view for mountain trails


{
  backends: [<% backends.each do |backend| -%>
  "<%= backend %>",
  <% end -%>]
, graphitePort: "<%= graphiteport %>"
, graphiteHost: "<%= graphiteserver %>"
, address: "<%= address %>"
, port: "<%= listenport %>"
, flushInterval: "<%= flushinterval %>"
, percentThreshold: [<%= percentthreshold.join(', ') %>]
<% config.each do |k, v| -%>
, <%= k %>: <%= v %>
<% end -%>
}

{
  backends: [<% @backends.each do |backend| -%>
  "<%= backend %>",
  <% end -%>]
, graphitePort: "<%= @graphiteport %>"
, graphiteHost: "<%= @graphiteserver %>"
, address: "<%= @address %>"
, port: "<%= @listenport %>"
, flushInterval: "<%= @flushinterval %>"
, percentThreshold: [<%= @percentthreshold.join(', ') %>]
<% @config.each do |k, v| -%>
, <%= k %>: <%= v %>
<% end -%>
}

Use instance-variable syntax in templates

to avoid deprecation warnings in puppet 3.2


Teilnehmer

  <%= f.fields_for :participant do |p| %>
    <%= p.input :first_name %>

    <%= p.input :last_name %>

    <%= f.input :role_id, collection: Role.all, prompt: "Bitte wählen" %>

    <%= f.input :instrument_id, collection: Instrument.all(order: "name"), prompt: "Bitte wählen" %>

    <%= p.input :birthdate, as: :date, order: [:day,:month,:year],
          start_year: Time.now.year - 5, end_year: Time.now.year - 27,
          prompt: { day: "Tag", month: "Monat", year: "Jahr" }, input_html: { class: "span2" } %>

    <%= p.input :gender, collection: [:m, :f], as: :radio_buttons %>

    <%= p.input :street %>

    <%= p.input :postal_code %>

    <%= p.input :city %>

    <%= p.input :country_id, collection: Country.all(:order => "name"), prompt: "Bitte wählen" %>

    <%= p.input :phone %>

    <%= p.input :email %>
  <% end %>

    <%= link_to_remove_fields "Diesen Teilnehmer entfernen", f %>

Teilnehmer

  <%= f.fields_for :participant do |p| %>
    <%= p.input :first_name %>

    <%= p.input :last_name %>

    <%= f.input :role_id, collection: Role.all, prompt: "Bitte wählen" %>

    <%= f.input :instrument_id, collection: Instrument.all(order: "name"), prompt: "Bitte wählen" %>

    <%= p.input :birthdate, as: :date, order: [:day,:month,:year],
          start_year: Time.now.year - 5, end_year: Time.now.year - 27,
          prompt: { day: "Tag", month: "Monat", year: "Jahr" }, input_html: { class: "span2" } %>

    <%= p.input :gender, collection: [:m, :f], as: :radio_buttons %>

    <%= p.input :street %>

    <%= p.input :postal_code %>

    <%= p.input :city %>

    <%= p.input :country_id, collection: Country.all(:order => "name"), prompt: "Bitte wählen",
                hint: "Gemeint ist das Land des Wohnorts, nicht die Staatsbürgerschaft." %>

    <%= p.input :phone %>

    <%= p.input :email %>
  <% end %>

    <%= link_to_remove_fields "Diesen Teilnehmer entfernen", f %>

Add hint for country field of participant


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

location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
  # Override QUERY_STRING to force mapserver query parameters
  fastcgi_param QUERY_STRING "map=/srv/imagery/mapserver/layer-<%= @layer %>.map&mode=tile&layers=<%= @layer %>&tilemode=gmap&tile=$2+$3+$1";
  fastcgi_pass "unix:/var/run/mapserver-fastcgi/layer-<%= @layer %>.socket";
  fastcgi_buffers 8 64k;
  fastcgi_cache "fastcgi_cache_zone"
  include fastcgi_params;

  gzip off;
}

<% if @root_layer -%>
rewrite "^/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
<% end -%>
<% @url_aliases.each do |url| -%>
rewrite "^<%= url %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
<% end -%>

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

location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
  # Override QUERY_STRING to force mapserver query parameters
  fastcgi_param QUERY_STRING "map=/srv/imagery/mapserver/layer-<%= @layer %>.map&mode=tile&layers=<%= @layer %>&tilemode=gmap&tile=$2+$3+$1";
  fastcgi_pass "unix:/var/run/mapserver-fastcgi/layer-<%= @layer %>.socket";
  fastcgi_buffers 8 64k;
  fastcgi_cache "fastcgi_cache_zone";
  include fastcgi_params;

  gzip off;
}

<% if @root_layer -%>
rewrite "^/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
<% end -%>
<% @url_aliases.each do |url| -%>
rewrite "^<%= url %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
<% end -%>

Fix nginx cache zone in imagery

Fix nginx cache zone in imagery


<%
pages = sitemap.resources.find_all { |p| p.source_file.match(/\.md/) }
entries = []

pages.each_with_index do |page, index|
  object = {}
    entry = {
      :id    => index,
      :title => retrieve_page_header(page),
      :url   => page.url,
      :content => page.render({:layout => false })
    }
  entries << entry
end
%>
<%= entries.to_json %>

<%
pages = sitemap.resources.find_all do |p|
  p.source_file.match(/\.md/) if p.source_file
end
entries = []

pages.each_with_index do |page, index|
  object = {}
    entry = {
      :id    => index,
      :title => retrieve_page_header(page),
      :url   => page.url,
      :content => page.render({:layout => false })
    }
  entries << entry
end
%>
<%= entries.to_json %>

Allow guides nav to be used without a title

This was raising an error in the middleman console


  <% if user_signed_in? %>
    <% if current_user.admin? %>
      <%= link_to "Admin", admin_path %>
    <% end %>
    <%= link_to "Sign out", destroy_user_session_path %>

  <% else %>
    <%= link_to "Sign up", new_user_registration_path %>
    <%= link_to "Sign in", new_user_session_path %>
    <%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %>
  <% end -%>

  <% if user_signed_in? %>
    <% if current_user.admin? %>
      <%= link_to "Admin", admin_path %>
    <% end %>
    <%= link_to "Sign out", destroy_user_session_path %>

    <%= link_to "Settings", edit_user_registration_path %>
  <% else %>
    <%= link_to "Sign up", new_user_registration_path %>
    <%= link_to "Sign in", new_user_session_path %>
    <%= link_to "Sign in with Facebook", user_omniauth_authorize_path(:facebook) %>
  <% end -%>

Add Devise page for user to edit his email, password or cancel account.


<% if debug? %>

      Debug info:
      <% @presenter.current_state.to_hash.each do |k, v| %>
        <%= "#{k}: #{v.to_s}"%>
      <% end %>

      Session store:
      <% @session_store.hash.each do |k, v| %>
        <%= "#{k}: #{v.inspect}"%>
      <% end if @session_store %>

<% end %>

<% if debug? %>

      Debug info:
      <% @presenter.state.to_hash.each do |k, v| %>
        <%= "#{k}: #{v.to_s}"%>
      <% end %>

<% end %>

Update debug for updated state object

Update debug for updated state object

FlowPresenter now uses state rather than current_state as it has no
other types of states.

State now encapsulates the information from a session store so the extra
code isn't needed. This resolves an inconsistency for query string based
flows that weren't output here.


//= require require_config

if(MAS.supports.fonts && MAS.bootstrap.fontsUrl) {

  require(['webfonts'], function () {
    var fontConfig = {
      custom: {
        families: ['museo_sans', 'icon-font'],
        urls: [MAS.bootstrap.fontsUrl]
      }
    };
    WebFont.load(fontConfig);
  })
}

require(['analytics'], function (analytics) {
  analytics.scrollTracking({
    el: '.editorial',
    triggerPoints: [0.25, 0.5, 0.75, 1]
  });
});

require([MAS.bootstrap.I18n_locale, 'collapsable'], function (Text, Collapsable) {
  var articleCollapsables = new Collapsable({
    showOnlyFirst:true,
    showIcon:true,
    textString: {
      showThisSection: Text.show || 'Show this section',
      hideThisSection: Text.hide || 'Hide this section'
    }
  });
  var primaryNav = new Collapsable({
    closeOffFocus:true,
    accordion:true,
    triggerEl: '#primary-nav > li > a',
    targetEl: '.primary-nav__dropdown',
    parentWrapper: '#primary-nav'
  });
  var mobileNav = new Collapsable({
    closeOffFocus:true,
    accordion:true,
    triggerEl: '.mobile-nav a',
    targetType: 'href',
    parentWrapper: '#primary-nav'
  });
});

//= require require_config

if(MAS.supports.fonts && MAS.bootstrap.fontsUrl) {

  require(['webfonts'], function () {
    var fontConfig = {
      custom: {
        families: ['museo_sans', 'icon-font'],
        urls: [MAS.bootstrap.fontsUrl]
      }
    };
    WebFont.load(fontConfig);
  })
}

require(['analytics'], function (analytics) {
  analytics.scrollTracking({
    el: '.editorial',
    triggerPoints: [0.25, 0.5, 0.75, 1]
  });
});

require([MAS.bootstrap.I18n_locale, 'collapsable'], function (Text, Collapsable) {
  var articleCollapsables = new Collapsable({
    showOnlyFirst:true,
    showIcon:true,
    textString: {
      showThisSection: Text.show || 'Show this section',
      hideThisSection: Text.hide || 'Hide this section'
    }
  });
  var primaryNav = new Collapsable({
    closeOffFocus:true,
    accordion:true,
    triggerEl: '#primary-nav > li > a',
    targetEl: '.primary-nav__dropdown',
    parentWrapper: '#primary-nav'
  });
  var mobileNav = new Collapsable({
    closeOffFocus:false,
    accordion:true,
    triggerEl: '.mobile-nav a',
    targetType: 'href',
    parentWrapper: '#primary-nav'
  });
});

Disable menu closing on focusout

Disable menu closing on focusout


unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY)
  OpenStreetMap::Application.config.after_initialize do
    unless webmaster = User.find_by_email("webmaster@openstreetmap.org")
      webmaster = User.new
      webmaster.display_name = "OpenStreetMap Webmaster"
      webmaster.email = "webmaster@openstreetmap.org"
      webmaster.pass_crypt = SecureRandom.hex
      webmaster.status = "active"
      webmaster.save!
    end

    permissions = Hash[ClientApplication.all_permissions.map { |p| [ p, true ] }]

    unless id = webmaster.client_applications.find_by_name("iD")
      id = ClientApplication.new
      id.name = "iD"
      id.url = "http://<%= @site %>/"
      id.save!
    end

    ID_KEY = id.key

    unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2")
      potlatch = ClientApplication.new
      potlatch.name = "Potlatch 2"
      potlatch.url = "http://<%= @site %>/"
      potlatch.save!
    end

    POTLATCH2_KEY = potlatch.key

    unless website = webmaster.client_applications.find_by_name("Web Site")
      website = ClientApplication.new
      website.name = "Web Site"
      website.url = "http://<%= @site %>/"
      website.save!
    end

    OAUTH_KEY = website.key
  end
end

unless Object.const_defined?(:Rake) or Object.const_defined?(:POTLATCH2_KEY)
  OpenStreetMap::Application.config.after_initialize do
    unless webmaster = User.find_by_email("webmaster@openstreetmap.org")
      webmaster = User.new
      webmaster.display_name = "OpenStreetMap Webmaster"
      webmaster.email = "webmaster@openstreetmap.org"
      webmaster.pass_crypt = SecureRandom.hex
      webmaster.status = "active"
      webmaster.save!
    end

    unless id = webmaster.client_applications.find_by_name("iD")
      id = webmaster.client_applications.new
      id.name = "iD"
      id.url = "http://<%= @site %>/"
      ClientApplication.all_permissions.each { |p| id[p] = true }
      id.save!
    end

    ID_KEY = id.key

    unless potlatch = webmaster.client_applications.find_by_name("Potlatch 2")
      potlatch = webmaster.client_applications.new
      potlatch.name = "Potlatch 2"
      potlatch.url = "http://<%= @site %>/"
      ClientApplication.all_permissions.each { |p| potlatch[p] = true }
      potlatch.save!
    end

    POTLATCH2_KEY = potlatch.key

    unless website = webmaster.client_applications.find_by_name("Web Site")
      website = webmaster.client_applications.new
      website.name = "Web Site"
      website.url = "http://<%= @site %>/"
      ClientApplication.all_permissions.each { |p| website[p] = true }
      website.save!
    end

    OAUTH_KEY = website.key
  end
end

Fix up issues in dev server rails setup script


<%= link_to 'Back', spots_path %>

<%= @spot.name %>

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

<%= button_to "Delete", @spot, method: :delete, action: 'destroy' %>
<%= button_to "Edit", edit_spot_path(@spot), method: :get %>

<%= @spot.address %>

<%= @spot.phone %>

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

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

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

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

<% end %>

<%= link_to 'Back', spots_path %>

<%= @spot.name %>

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

<%= button_to "Delete", @spot, method: :delete, action: 'destroy' %>
<%= button_to "Edit", edit_spot_path(@spot), method: :get %>

<%= @spot.address %>

<%= @spot.phone %>

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

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

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

<%= button_to "Leave Comment", new_spot_comment_path(@spot), method: :get %>

<%= form_for [@spot, Comment.new]  do |f| %>
  <%= f.text_area :body, :placeholder => "How is this spot?" %>

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

<% @spot.comments.each do |comment| %>
	<%= render partial:'inlinecomment', locals: {spot: @spot, comment: comment} %>
<% end %>

Add leave comment form, print comments out via partial


<%= render :partial => 'admin_data/search/search/title', :locals => {
                                                         :records => @records,
                                                         :total_num_of_children => @total_num_of_children } %>

  <%= will_paginate @records, :container => false, :params => {:klass => klass.name} %>

      <% columns_order(klass).each do |column| %>
         <%= column_title(klass, column) %>
      <% end %>

  <% @records.each do |record| %>

      <% columns_order(klass).each do |column| %>

          <% if (column == klass.primary_key) %>
            <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record)) %>
         <% else %>
            <%=h get_value_for_column(column_native(klass, column), record) %>
          <% end %>

      <% end %>

  <% end %>

  <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>

<%= render :partial => 'admin_data/search/search/title', :locals => {
                                                         :records => @records,
                                                         :total_num_of_children => @total_num_of_children } %>

  <%= will_paginate @records, :container => false, :params => {:klass => klass.name} %>

      <% columns_order(klass).each do |column| %>
         <%= column_title(klass, column) %>
      <% end %>

  <% @records.each do |record| %>

      <% columns_order(klass).each do |column| %>

          <% if (column == klass.primary_key) %>
            <%= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record.id)) %>
         <% else %>
            <%=h get_value_for_column(column_native(klass, column), record) %>
          <% end %>

      <% end %>

  <% end %>

  <%= will_paginate @records, :container => false, :params => {:klass => klass.name.underscore} %>

Fix routing error when viewing certain pages caused by id paramter being pass record object instead of record id


#powder Quote Database (qdb)

  <% @quotes.each do |q| %>

Quote #<%=q.id%> by <%=q.author%>

 <%= q.quote %>

  <% end %>

#powder Quote Database (qdb)

  <% @quotes.each do |q| %>

Quote <a href="/quote/<%=q.id%>">#<%=q.id%> by <%=q.author%>

 <%= q.quote %>

  <% end %>

Add a link to the quote page from the quote listing


<% cache(["gobierto_cms/pages/meta_welcome", current_site, I18n.locale]) do %>
  <% title(@page.title) %>
  <% description(truncate(strip_tags(@page.body), length: 100)) %>

  <% content_for :javascript_module_link do %>
    <%= javascript_packs_with_chunks_tag 'cms', 'data-turbolinks-track': true %>
  <% end %>

  <% content_for :stylesheet_module_link do %>
    <%= stylesheet_packs_with_chunks_tag 'cms' %>
  <% end %>

  <%= render @page.template %>
<% end %>

<% content_for :javascript_module_link do %>
  <%= javascript_packs_with_chunks_tag 'cms', 'data-turbolinks-track': true %>
<% end %>

<% content_for :stylesheet_module_link do %>
  <%= stylesheet_packs_with_chunks_tag 'cms' %>
<% end %>

<% cache(["gobierto_cms/pages/meta_welcome", current_site, I18n.locale]) do %>
  <% title(@page.title) %>
  <% description(truncate(strip_tags(@page.body), length: 100)) %>

  <%= render @page.template %>
<% end %>

Load resources outside the cache

Load resources outside the cache


<canvas class="pad" width="300" height="55" data-object="signature-display" data-signature-string="<%= object.get_response(:raw) %>"></canvas>

<canvas class="pad" width="300" height="55" data-object="signature-display" data-signature-string="<%= object.get_response(:raw) if object %>"></canvas>

Check if object exists first before trying signature


global
    log 127.0.0.1   local1 info
    daemon
    user vcap
    group vcap
    maxconn 64000

defaults
    log global
    timeout connect 30000ms
    timeout client <%= p("request_timeout_in_seconds").to_i * 1000 %>ms
    timeout server <%= p("request_timeout_in_seconds").to_i * 1000 %>ms

listen mysql-cluster
    stick-table type ip size 1
    stick on dst
    bind 0.0.0.0:3306
    option httpchk GET / HTTP/1.1\r\nHost:\ www
    mode tcp
    option tcplog
<% p('mysql_ips').each do |ip| %>
    server mysql-0 <%= ip %>:3306 check port 9200 inter 5000 rise 2 fall 1
<% end %>

listen stats :1936
    mode http
    stats enable
    stats uri /
    stats auth admin:<%= p("haproxy_stats_password") %>

global
    log 127.0.0.1   local1 info
    daemon
    user vcap
    group vcap
    maxconn 64000

defaults
    log global
    timeout connect 30000ms
    timeout client <%= p("request_timeout_in_seconds").to_i * 1000 %>ms
    timeout server <%= p("request_timeout_in_seconds").to_i * 1000 %>ms

listen mysql-cluster
    stick-table type ip size 65000
    stick on dst
    bind 0.0.0.0:3306
    option httpchk GET / HTTP/1.1\r\nHost:\ www
    mode tcp
    option tcplog
<% p('mysql_ips').each_with_index do |ip, idx| %>
    server mysql-<%= idx %> <%= ip %>:3306 check port 9200 inter 5000 rise 2 fall 1
<% end %>

listen stats :1936
    mode http
    stats enable
    stats uri /
    stats auth admin:<%= p("haproxy_stats_password") %>

Increase HAProxy stick table size.

Increase HAProxy stick table size.

[#77823944]


# Global default settings.
global:
  scrape_interval: "15s"     # By default, scrape targets every 15 seconds.
  evaluation_interval: "15s" # By default, evaluate rules every 15 seconds.

scrape_configs:
<% for job in @jobs||[] %>
- job_name: "<%= job.name %>"
  <% if job.scrape_interval %>
  scrape_interval: "<%= job.scrape_interval %>"
  <% end %>
  <% if job.scrape_timeout %>
  scrape_timeout: "<%= job.scrape_timeout %>"
  <% end %>
  metrics_path: "<%= job.metrics_path %>"
  target_groups:
    - targets: <%= job.target.kind_of?(String) ? [job.target] : job.target %>
<% end %>

<% if @rule_filenames %>
rule_files:
<% @rule_filenames.each do |filename| %>
  - <%= filename %>
<% end %>
<% end %>

Fix missing end in template

Fix missing end in template


  <% if element.file.file? %>

<%= image_tag element.image.url %>

  <% end %>

<%= element.title %>

<%= element.description %>

  <% if element.element_link %>
    <%= link_to "View More", element.element_link %>
  <% end %>

  <% if element.image.file? %>

<%= image_tag element.image.url %>

  <% end %>

<%= element.title %>

<%= element.description %>

  <% if element.element_link %>
    <%= link_to "View More", element.element_link %>
  <% end %>

Change file to image in element view

Change file to image in element view


provides "postgresql"

postgresql Mash.new

Dir.glob("/etc/postgresql/*/*/postgresql.conf").each do |conf|
  cluster = conf.sub("/etc/postgresql/", "").sub("/postgresql.conf", "")

  postgresql[:clusters] = Mash.new unless postgresql[:clusters]
  postgresql[:clusters][cluster] = Mash.new unless postgresql[:clusters][cluster]
  postgresql[:clusters][cluster][:version] = cluster.split("/").first.to_f

  IO.foreach(conf) do |line|
    if line =~ /^ *port *= *([0-9]+)\s+/
      postgresql[:clusters][cluster][:port] = $1
    end
  end
end

Ohai.plugin(:Postgresql) do
  provides "postgresql"

  collect_data(:default) do
    postgresql Mash.new

    Dir.glob("/etc/postgresql/*/*/postgresql.conf").each do |conf|
      cluster = conf.sub("/etc/postgresql/", "").sub("/postgresql.conf", "")

      postgresql[:clusters] = Mash.new unless postgresql[:clusters]
      postgresql[:clusters][cluster] = Mash.new unless postgresql[:clusters][cluster]
      postgresql[:clusters][cluster][:version] = cluster.split("/").first.to_f

      IO.foreach(conf) do |line|
        if line =~ /^ *port *= *([0-9]+)\s+/
          postgresql[:clusters][cluster][:port] = $1
        end
      end
    end
  end
end

Rework postgresql ohai plugin as a version 7 plugin


          Tweetable

Helping people to be concise while expressing themselves.

          <%= link_to 'Login with Google', '/auth/google_oauth2', :class=> 'btn btn-danger btn-large' %>

          Tweetable

Helping people to be concise, Precisely.

          <%= link_to 'Login with TW Mail', '/auth/google_oauth2', :class=> 'btn btn-danger btn-large' %>

[Abhishek] Change the tagline for the App in Login Page


#!/bin/bash

./configure \
  --disable-interactive \
<% @compile_extra_modules.each do |value| -%>
  --enable-extras=m_<%= value %>.cpp \
<% end -%>
<% if @gnutls -%>
  --enable-gnutls \
<% end -%>
<% if @openssl -%>
  --enable-openssl \
<% end -%>
<% if @epoll -%>
  --enable-epoll \
<% end -%>
<% if @kqueue -%>
  --enable-kqueue \
<% end -%>
  --prefix=<%= @prefix %> \
  --binary-dir=<%= @binary_dir %> \
  --module-dir=<%= @module_dir %> \
  --config-dir=<%= @config_dir %> \
  --data-dir=<%= @data_dir %> \
  --log-dir=<%= @log_dir %> \
  --uid=<%= @user %>

#!/bin/bash

export PERL5LIB=<%= @install_dir %>
./configure \
  --disable-interactive \
<% @compile_extra_modules.each do |value| -%>
  --enable-extras=m_<%= value %>.cpp \
<% end -%>
<% if @gnutls -%>
  --enable-gnutls \
<% end -%>
<% if @openssl -%>
  --enable-openssl \
<% end -%>
<% if @epoll -%>
  --enable-epoll \
<% end -%>
<% if @kqueue -%>
  --enable-kqueue \
<% end -%>
  --prefix=<%= @prefix %> \
  --binary-dir=<%= @binary_dir %> \
  --module-dir=<%= @module_dir %> \
  --config-dir=<%= @config_dir %> \
  --data-dir=<%= @data_dir %> \
  --log-dir=<%= @log_dir %> \
  --uid=<%= @user %>

Fix perl issue with running configure script


***
Chef-Client - <%= node.name %>
Hostname: <%= node['cloud'] ? node['cloud']['public_hostname'] : node['fqdn'] %>
<% if ! Chef::Config[:solo] -%>
Chef Server: <%= Chef::Config[:chef_server_url] %>
<% end -%>
<% if node.chef_environment != '_default' -%>
Environment: <%= node.chef_environment %>
<% end -%>
Last Run: <%= ::Time.now %>

Roles:
<% node['roles'].each do |role| -%>
  <%= role %>
<% end -%>
<% if node['tags'] && !node['tags'].empty? -%>

Tags:
<% node['tags'].each do |tag| -%>
  <%= tag %>
<% end -%>
<% end -%>
***

<%= node['motd-tail']['additional_text'] %>

***
Chef-Client - <%= node.name %>
Hostname: <%= node['cloud'] ? node['cloud']['public_hostname'] : node['fqdn'] %>
<% if ! Chef::Config[:solo] -%>
Chef Server: <%= Chef::Config[:chef_server_url] %>
<% end -%>
<% if node.chef_environment != '_default' -%>
Environment: <%= node.chef_environment %>
<% end -%>
Last Run: <%= ::Time.now %>

Roles and Recipes:
<% node['roles'].each do |role| -%>
  Role: <%= role %>
<% end -%>
<% node['recipes'].each do |recipe| -%>
  Recipe: <%= recipe %>
<% end -%>
<% if node['tags'] && !node['tags'].empty? -%>

Tags:
<% node['tags'].each do |tag| -%>
  <%= tag %>
<% end -%>
<% end -%>
***

<%= node['motd-tail']['additional_text'] %>

Add recipes to the motd

Add recipes to the motd


  <% if @model.name =~ /3D/ %>

Sorry, but 3D models cannot be viewed as applets.  You must download this model to try it.

  <% else %>
  <applet
     code="org.nlogo.applet.LiteApplet"
     align="baseline"
     width="<%= @model.dimensions[:width] -%>" height="<%= @model.dimensions[:height] -%>"
     archive="/applet/<%= @model.netlogo_version_for_applet -%>/NetLogoLite.jar">
    <param name="DefaultModel" value="<%= url_for :controller => :browse, :action => :model_contents, :id => @model.id %> ">
  </applet>
  <% end %>

<%= @applet_html -%>

  <% if @model.name =~ /3D/ %>

Sorry, but 3D models cannot be viewed as applets.  You must download this model to try it.

  <% else %>
  <applet
     code="org.nlogo.lite.Applet"
     align="baseline"
     width="<%= @model.dimensions[:width] -%>" height="<%= @model.dimensions[:height] -%>"
     archive="/applet/<%= @model.netlogo_version_for_applet -%>/NetLogoLite.jar">
    <param name="DefaultModel" value="<%= url_for :controller => :browse, :action => :model_contents, :id => @model.id %> ">
  </applet>
  <% end %>

<%= @applet_html -%>

Revert "Perhaps the applet class was changed?!?"

This reverts commit 5cd28ec78282655440754afec35c372dbb7e50d4 [formerly 0232dd575b86c12ff18b4cb1f283b86bca2f5c45].

Former-commit-id: 26e1cab5c95d1ed89931b43ddf5cd53b3715db10