<VirtualHost *:80>
  ServerName <%= @params[:server_name] %>
  <% if @params[:server_aliases] && !@params[:server_aliases].empty? -%>
  ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %>
  <% end -%>
  DocumentRoot <%= @params[:docroot] %>
  RewriteEngine On

  <Directory <%= @params[:docroot] %>>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  <Directory />
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  <Location /server-status>
    SetHandler server-status

    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
  </Location>

  LogLevel <%= node[:apache][:log_level] %>
  ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
  CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined

  FileETag none

  RewriteEngine On

  # Canonical host, <%= @params[:server_name] %>
  RewriteCond %{HTTP_HOST}   !^<%= @params[:server_name] %> [NC]
  RewriteCond %{HTTP_HOST}   !^$
  RewriteRule ^/(.*)$        http://<%= @params[:server_name] %>/$1 [L,R=301]

  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
  RewriteCond %{SCRIPT_FILENAME} !maintenance.html
  RewriteRule ^.*$ /system/maintenance.html [L]

  <% if node[:deploy][application_name].present? and node[:deploy][application_name][:aliases] %>
      <% node[:deploy][application_name][:aliases].each do |alias| %>
          Alias <%= alias[:url_path] %> <%= @params[:docroot] %><%= alias[:file_path] %>
      <% end %>
  <% end %>

</VirtualHost>

Add possibility to setup app apache aliases


<!DOCTYPE html>
<%= content_tag(:html, lang: I18n.locale) do %>
<head>
  <title><%= @page_title.presence || 'Pageflow' %></title>

  <%= csrf_meta_tags %>

  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  <meta name="apple-mobile-web-app-capable" content="yes" />

  <%= yield :head %>
</head>

<body>
  <%= yield %>
</body>
<% end %>

Add simple application layout for pageflow

Used by public files views which display media tags for non-js
variant.


<%= form_for [@course, folder_to_change], :html => { :class => 'form-horizontal' }, :url => course_material_create_path(@course, @folder), :method => subfolder_method do |f| %>

    <%= f.label :name, :class => 'control-label' %>

      <%= f.text_field :name, :class => 'text_field span10', :required => 'required' %>

    <%= f.label :description, :class => 'control-label' %>

      <%= f.text_area :description, :class => 'text_field html-editor span10', :rows => 10 %>

    <%= hidden_field_tag :type, :subfolder %>
    <%= f.submit nil, :class => 'btn btn-primary', data: {disable_with: "Submitting..."} %>
    <button type="button" class="btn" data-dismiss="modal">Cancel</button>

<% end %>

<%= form_for [@course, folder_to_change], :html => { :class => 'form-horizontal' }, :url => course_material_create_path(@course, @folder), :method => subfolder_method do |f| %>

    <%= f.label :name, :class => 'control-label' %>

      <%= f.text_field :name, :class => 'text_field span10', :required => 'required' %>

    <%= f.label :description, :class => 'control-label' %>

      <%= f.text_area :description, :class => 'text_field html-editor span10', :rows => 10 %>

    <%= hidden_field_tag :type, :subfolder %>
    <%= f.submit "Submit", :class => 'btn btn-primary', data: {disable_with: "Submitting..."} %>
    <button type="button" class="btn" data-dismiss="modal">Cancel</button>

<% end %>

Change button text to "Submit".

Change button text to "Submit".


export SSL_SUPPORTED_TLS_VERSIONS="<%= p('rabbitmq-server.ssl.versions') %>"
export SSL_KEY="<%= p("rabbitmq-server.ssl.key") %>"
export SSL_VERIFY="<%= p("rabbitmq-server.ssl.verify") %>"
export SSL_VERIFICATION_DEPTH="<%= p("rabbitmq-server.ssl.verification_depth") %>"
export SSL_FAIL_IF_NO_PEER_CERT="<%= p("rabbitmq-server.ssl.fail_if_no_peer_cert") %>"

export CLUSTER_PARTITION_HANDLING="<%= p("rabbitmq-server.cluster_partition_handling") %>"
export DISK_ALARM_THRESHOLD="<%= p("rabbitmq-server.disk_alarm_threshold") %>"
export LOAD_DEFINITIONS="<%= p("rabbitmq-server.load_definitions") %>"

export SSL_KEY=""
export LOAD_DEFINITIONS=""

export SSL_SUPPORTED_TLS_VERSIONS="<%= p('rabbitmq-server.ssl.versions') %>"
export SSL_VERIFY="<%= p("rabbitmq-server.ssl.verify") %>"
export SSL_VERIFICATION_DEPTH="<%= p("rabbitmq-server.ssl.verification_depth") %>"
export SSL_FAIL_IF_NO_PEER_CERT="<%= p("rabbitmq-server.ssl.fail_if_no_peer_cert") %>"

<% if_p("rabbitmq-server.ssl.key") do |key| %>
  export SSL_KEY="<%= key %>"
<% end %>

export CLUSTER_PARTITION_HANDLING="<%= p("rabbitmq-server.cluster_partition_handling") %>"
export DISK_ALARM_THRESHOLD="<%= p("rabbitmq-server.disk_alarm_threshold") %>"

<% if_p("rabbitmq-server.load_definitions") do |definitions| %>
  export LOAD_DEFINITIONS="<%= definitions %>"
<% end %>

Validate if bosh properties are provided

* Sets default to empty if that's now given


---
:ipxe:
    :images:
        :initrd: <%= @ipxe_initrd %>
        :kernel: <%= @ipxe_kernel %>
    :kernel_flags: <%= @ipxe_kernel_flags %>
    :menu_default: intake
    :image_server: http://<%= @image_service %>/genesis
:genesis_server: http://<%= @genesis_service %>
:tasks_url: http://<%= @genesis_ipaddress %>:8888/tasks
:yum_repos:
    :epel:
        :label:   "[epel]"
        :name:    "epel"
        :descr:   "Epel"
        :baseurl: "<%= @rpm_base_url %>"
        :enabled:   1
        :priority:  1
        :gpgcheck:  0
:gem_files:
    "genesis_framework": http://<%= @genesis_ipaddress %>:8888/gem/genesis_framework
:gem_args: &gem_args --no-ri --no-rdoc # Arguments to pass to gem install. Can include --source for internal repos
:collins:
    :host: <%= @collins_url %>
:ntp_server: <%= @ntp_server %>
:loggers:
  - Collins
:facter_cache: true # If true, genesis will cache the facts from facter for the whole run. Defaults to true.

Add facter_cache option to example config


---
  - hosts: <%= @env %>
    sudo: yes

    vars_files:
      - ./vars/<%= @env %>.yml

    roles:
      - common
      - ruby-common
      - rails
      - apache
      - passenger
      - letsencrypt
      - postgresql
      - delayed_job

---
  - hosts: <%= @env %>
    become: yes

    vars_files:
      - ./vars/<%= @env %>.yml

    roles:
      - common
      - yarn
      - nodejs
      - ruby-common
      - rails
      - puma
      - nginx
      - letsencrypt
      - nginx
      - postgresql
      - monit
      - logrotate
      - collectd
      - delayed_job

Update playbook template with more up-to-date roles list


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

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

Adjust admin product tab selected

Adjust admin product tab selected

removing taxon from the list of controllers which make it selected

Fixes #2579


    <fieldset class="inputs">
      <%= render :partial => 'shared/common_edition_attributes', :locals => {:f => f} %>

          <%= f.label :body %>

          <%= f.text_area :body, rows: 20, disabled: @resource.locked_for_edits?, class: "form-control" %>

    </fieldset>

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

    <fieldset class="inputs">
      <%= render :partial => 'shared/common_edition_attributes', :locals => {:f => f} %>

      <%= form_group(f, :body) do %>
        <%= f.text_area :body, rows: 20, disabled: @resource.locked_for_edits?, class: "form-control" %>
      <% end %>
    </fieldset>

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

Convert the HelpPage format to use the FormHelper module


My Responses

  <% @responses.each do |resp| -%>

      <% if resp.questionnaire.is_open -%>
        <%= link_to resp.questionnaire.title, answer_path(resp.questionnaire) %>
      <% else -%>
        <%=h resp.questionnaire.title %> (survey closed)
      <% end -%>

        <%= resp.created_at.strftime "%a, %b %d, %Y" %>

  <% end -%>

  <% link_to responses_questionnaires_path, :class => "bigbutton" do -%>
    View all my responses »
  <% end -%>

My Responses

  <% @responses.each do |resp| -%>

      <% if resp.questionnaire.is_open -%>
        <%= link_to resp.questionnaire.title, answer_path(resp.questionnaire) %>
      <% else -%>
        <%=h resp.questionnaire.title %> (survey closed)
      <% end -%>

        <%= time_ago_in_words resp.created_at %> ago

  <% end -%>

  <% link_to responses_questionnaires_path, :class => "bigbutton" do -%>
    View all my responses »
  <% end -%>

Use relative time ago instead of timestamp


wrapper = $("#notification-" + "<%= @email_notification.id %>");

<% if @email_notification.valid? %>
  $(".form-value", wrapper).show();
  $(".notification-edit-form", wrapper).hide();
  $(".actions", wrapper).show();
  $(".notification-edit-form input.datepicker", wrapper).val("<%= @email_notification.formatted_trigger_at_date %>");
  $(".notification-edit-form input.timepicker", wrapper).val("<%= @email_notification.formatted_trigger_at_time %>");
  $(".trigger-at", wrapper).html("<%= @email_notification.decorate.formatted_trigger_time %>");
<% else %>
  $(".notification-edit-form input", wrapper).closest(".input").addClass("field-with-errors");
<% end %>

wrapper = $("#notification-" + "<%= @email_notification.id %>");

<% if @email_notification.valid? %>
  $(".form-value", wrapper).removeClass("hidden");
  $(".notification-edit-form", wrapper).addClass("hidden");
  $(".actions", wrapper).removeClass("hidden");
  $(".notification-edit-form input.datepicker", wrapper).val("<%= @email_notification.formatted_trigger_at_date %>");
  $(".notification-edit-form input.timepicker", wrapper).val("<%= @email_notification.formatted_trigger_at_time %>");
  $(".trigger-at", wrapper).html("<%= @email_notification.decorate.formatted_trigger_time %>");
<% else %>
  $(".notification-edit-form input", wrapper).closest(".input").addClass("field-with-errors");
<% end %>

Fix settings JS so you can re-edit dates


Please select the Subject in the hierarchy tree where you would like to add your new Subject

<%= javascript_include_tag 'kmaps_engine/kmaps_fancytree' %>
<%= javascript_on_load do %>
        $("#relation_tree_container").kmapsTree({
          termindex_root: "<%= Feature.config.url %>",
          kmindex_root: "<%= MmsIntegration::Picture.config.url %>",
          type: "<%= Feature.uid_prefix %>", //subjects
          root_kmap_path: '',
          baseUrl: "<%= new_admin_feature_path %>?parent_id=%%ID%%",
          expand_path: "",
          perspective: "<%= current_perspective.code %>",
          displayPopup: false
        });
<% end %>

Add partial for select ancestor

Add partial for select ancestor

Added the select_ancestor partial that shows the hierarchical tree in
the editorial interface for adding new features.


 Let them know what you really think

Custom handwritten notes delivered by post: $4.99

    <% @templates.each do |template| %>

        <a
          href="/card_templates/<%= template.id %>/cards/new"
          id="template-<%= template.id %>-create"
        >
          <img
            id="template-<%= template.id %>-image"
            src="/assets/<%= template.image_file %>"
            class="img-fluid img-thumbnail"
            alt="<%= template.greeting %> template"
          >

    <% end %>

Update template index view to match new structure


How are you doing? Simply reply to this email with your entry.

<% if @entry %>
Remember this? <%= (time_ago_in_words(@entry.created_at)).capitalize %> ago you wrote the following:

<%= @entry.body %>
<% end %>

How are you doing? Simply reply to this email with your entry.

<% if @entry %>
Remember this? <%= (time_ago_in_words(@entry.created_at)).capitalize %> ago you wrote the following:

----------------------

<%= @entry.body %>
<% end %>

Add simple separator in prompt email for scanning


This is the charts template

	User:
	<select ng-model="filters.userId" class="form-control select-user" ng-options="user.id as user.name for user in users">
	</select>

			<input ng-model="filters.earning" type="checkbox">Earning

			<input ng-model="filters.charge" type="checkbox">Charge

{{filters.earning}}
	{{filters.charge}}
	{{filters.userId}}
	{{transactionType}}

	<button class="btn btn-primary" ng-click="getTransactions({'earning': filters.earning, 'charge': filters.charge, 'userId': filters.userId })">Submit</button>

	<canvas id="line" class="chart chart-line" data="data" labels="labels" legend="true" options="options" series="series" click="onClick"></canvas>

This is the charts template

	User:
	<select ng-model="filters.userId" class="form-control select-user" ng-options="user.id as user.name for user in users">
	</select>

			<input ng-model="filters.earning" type="checkbox">Earning

			<input ng-model="filters.charge" type="checkbox">Charge

{{filters.earning}}
	{{filters.charge}}
	{{filters.userId}}
	{{transactionType}}

	<button class="btn btn-primary" ng-click="getTransactions({'userId': filters.userId })">Submit</button>

	<canvas id="line" class="chart chart-line" data="data" labels="labels" legend="true" options="options" series="series" click="onClick"></canvas>

Update the getTransactions call in submit button to pass only userId option instead of extraneous options no longer used


<% flash.each do |level, message| %>
	<div class="alert alert-<%= level %>"><%= message %>

<% end %>

<% flash.each do |level, message| %>
	<div data-alert class="alert-box <%= level %>"><%= message %></div>
<% end %>

Update flash messages to work with Foundation


<%= render 'layouts/header.html.erb' %>

All submissions

      Full name
      Age
      Average rate
      Rates count
      Registration date

    <% @submissions.each do |submission| %>

        <%= submission.full_name %>
        <%= submission.age %>
        <%=  %>
        <%=  %>
        <%= submission.created_at %>
        <%= link_to 'Show', submission %>
        <%= link_to 'Destroy', submission, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= render 'layouts/header.html.erb' %>

All submissions

      Full name
      Age
      Average rate
      Rates count
      Registration date

    <% @submissions.each do |submission| %>

        <%= submission.full_name %>
        <%= submission.age %>
        <%= %>
        <%= submission.rates.count %>
        <%= submission.created_at %>
        <%= link_to 'Show', submission %>
        <%= link_to 'Destroy', submission, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

Add rates count to submissions index view


description: Admin project level access control. Applies to resources within a specific project.
context:
  project: '.*' # all projects
for:
  resource:
    - equals:
        kind: job
      allow: [create] # allow create jobs
    - equals:
        kind: node
      allow: [read,create,update,refresh] # allow refresh node sources
    - equals:
        kind: event
      allow: [read,create] # allow read/create events
  adhoc:
    - allow: [read,run,runAs,kill,killAs] # allow running/killing adhoc jobs
  job:
    - allow: [create,read,update,delete,run,runAs,kill,killAs] # allow create/read/write/delete/run/kill of all jobs
  node:
    - allow: [read,run] # allow read/run for nodes
by:
  group: admin

---

description: Admin Application level access control, applies to creating/deleting projects, admin of user profiles, viewing projects and reading system information.
context:
  application: 'rundeck'
for:
  resource:
    - equals:
        kind: project
      allow: [create] # allow create of projects
    - equals:
        kind: system
      allow: [read] # allow read of system info
    - equals:
        kind: user
      allow: [admin] # allow modify user profiles
  project:
    - match:
        name: '.*'
      allow: [read,import,export,configure,delete] # allow full access of all projects or use 'admin'
  storage:
    - allow: [read,create,update,delete] # allow access for /ssh-key/* storage content
by:
  group: admin

description: Admin, all access.
context:
  project: '.*' # all projects
for:
  resource:
    - allow: '*' # allow read/create all kinds
  adhoc:
    - allow: '*' # allow read/running/killing adhoc jobs
  job:
    - allow: '*' # allow read/write/delete/run/kill of all jobs
  node:
    - allow: '*' # allow read/run for all nodes
by:
  group: admin

---

description: Admin, all access.
context:
  application: 'rundeck'
for:
  resource:
    - allow: '*' # allow create of projects
  project:
    - allow: '*' # allow view/admin of all projects
by:
  group: admin

Allow admin access to everything

Allow admin access to everything


Category: <%= @category.category %>

Articles:

<% @articles.each do |article| %>

<%= article.title %>

<%= article.text %>

Posted by <%= article.username %>

      <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>)
      <% if user_signed_in? && article.username == current_user.username %>
          | <%= link_to 'Edit', edit_article_path(article) %>
          | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %>
      <% end %>

<% end %>

Category: <%= @category.category %>

Articles:

<% @articles.each do |article| %>

<%= article.title %>

<%= simple_format(article.text) %>

Posted by <%= article.username %>

      <%= link_to 'Comments', article_path(article) %> (<%= article.comments.count %>)
      <% if user_signed_in? && article.username == current_user.username %>
          | <%= link_to 'Edit', edit_article_path(article) %>
          | <%= link_to 'Delete', article_path(article), method: :delete, data: {confirm: 'Are you sure?'} %>
      <% end %>

<% end %>

Add simple_format for articles to categories


<!DOCTYPE html>

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

<%= render 'layouts/header' %>

<%= yield %>

<%= render 'layouts/footer' %>

<!DOCTYPE html>
<html>
<head>
  <title>Hydea</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>
<body>
<%= render 'layouts/header' %>

<%= yield %>

<%= render 'layouts/footer' %>
</body>
</html>

Remove redundant navbar code from application layout


<a href="<%= courses_path %>" class="menu-item-title">
  <%= @current_user.menu_data[:group_memberships_count].zero? ? t('links.courses', "Courses") : t('links.courses_and_groups', "Courses & Groups") -%>

      <%= render(:partial => "shared/menu_courses", :locals => menu_courses_locals) %>
      <%= render(:partial => "shared/menu_section", :locals => menu_groups_locals) %>
      <%= render(:partial => "shared/menu_section", :locals => menu_accounts_locals) %>

<a href="<%= dashboard_path %>" class="menu-item-title">
  <%= @current_user.menu_data[:group_memberships_count].zero? ? t('links.courses', "Courses") : t('links.courses_and_groups', "Courses & Groups") -%>

      <%= render(:partial => "shared/menu_courses", :locals => menu_courses_locals) %>
      <%= render(:partial => "shared/menu_section", :locals => menu_groups_locals) %>
      <%= render(:partial => "shared/menu_section", :locals => menu_accounts_locals) %>

Revert "update behavior of "courses" link in main navigation."

we're going to readdress this when we redo the dashboard. refs #10453

This reverts commit f24d71c6ee0f614fc0d92414d9e5162f3a58144f.

Change-Id: I5002b187aecf9a35154804564a5df463d50e073e
Reviewed-on: https://gerrit.instructure.com/13920
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Reviewed-by: Joe Tanner <16a9a54ddf4259952e3c118c763138e83693d7fd@instructure.com>


Update homedir for user run template

Update homedir for user run template


  <% if current_hacker %>
    <%= link_to 'LOG OUT', signout_path, method: :delete %>
    <img src="http://www.gravatar.com/avatar/<%= md5 current_hacker.email %>" />
    <%= link_to 'Acquirements', acquirements_path %>
    <%= link_to 'Skills', skills_path %>
    <%= link_to 'Seniorities', seniorities_path %>
  <% else %>
    <%= form_tag login_path do |f| %>
      <%= text_field_tag :email %>
      <%= password_field_tag :password %>
      Forgot your password?
      <%= submit_tag 'LOG IN' %>
    <% end %>
  <% end %>

  <% flash.each do |name, msg| %>
    <%= content_tag :div, msg, class: name %>
  <% end %>

  <% if current_hacker %>
    <%= link_to 'LOG OUT', signout_path, method: :delete %>
    <img src="http://www.gravatar.com/avatar/<%= md5 current_hacker.email %>" />
    <%= link_to 'Acquirements', acquirements_path %>
    <%= link_to 'Skills', skills_path %>
    <%= link_to 'Seniorities', seniorities_path %>
  <% else %>
    <%= form_tag login_path do |f| %>
      <%= text_field_tag :email, nil, placeholder: 'Email' %>
      <%= password_field_tag :password, nil, placeholder: 'Password' %>
      Forgot your password?
      <%= submit_tag 'LOG IN' %>
    <% end %>
  <% end %>

Add flash message to the login page.

Add flash message to the login page.


      <button type="button"
              class="navbar-toggle collapsed"
              data-toggle="collapse"
              data-target="#navbar-links">
        Toggle navigation

      </button>

      <%= link_to dashboard_path, class: "navbar-brand" do %>
        <%= image_tag "logo.png" %>
      <% end %>

        <% if user_signed_in? %>
          <%= link_to "Sign out", destroy_user_session_path, method: :delete %>
        <% else %>
          <%= link_to "Sign in", new_session_path(:user) %>
        <% end %>

          <%= link_to "Privacy", page_path("privacy") %>

Add link to privacy policy in header

Add link to privacy policy in header


<!DOCTYPE html>
<html>
<head>
  <title>Helpful</title>
  <%= stylesheet_link_tag "application", media: "all" %>
  <%= stylesheet_link_tag "http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render '/layouts/flash' %>
  <%= yield %>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Helpful</title>
  <%= stylesheet_link_tag "application", media: "all" %>
  <%= stylesheet_link_tag "http://fonts.googleapis.com/css?family=Roboto+Slab:700|Open+Sans:300italic,400italic,400,700,300" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
  <%= render '/layouts/flash' %>
  <%= yield %>
</body>
</html>

Embed Roboto Slab from Google Fonts

Embed Roboto Slab from Google Fonts


<!DOCTYPE html>

    <title>Affinity</title>
    <%= csrf_meta_tags %>

    <%= stylesheet_link_tag 'application', media: 'all' %>
    <%= javascript_include_tag 'application' %>

    <% if notice then %>

      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        ×
      </button>
      <%= notice %>

    <% end %>
    <% if alert then %>

      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        ×
      </button>
      <%= alert %>

    <% end %>
    <%= yield %>

Fix flash rails side flash message style.


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

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

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

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

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

  <% end %>

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

<%= hint %>

    <% end %>
  <% end %>

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

_('Searches')

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

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

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

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

  <% end %>

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

<%= hint %>

    <% end %>
  <% end %>

Add title for search page header

Add title for search page header


<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%= render partial: 'layouts/style' %>

      <%= yield %>

        <%= link_to root_url do %>
          <%= image_tag '/images/logo_color_flattened.svg', alt: 'Circular Work' %>
        <% end %>

          <%= yield :footer %>

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%= render partial: 'layouts/style' %>

      <%= yield %>

        <%= link_to root_url do %>
          <%= image_tag asset_url('/images/logo_color_flattened.svg'), alt: 'Circular Work' %>
        <% end %>

          <%= yield :footer %>

Use url for email image

Use url for email image


<!DOCTYPE html>
<html lang="<%= I18n.locale %>">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <%= display_meta_tags site: [site_name, 'Gobierto'].join(' · '), reverse: true, separator: '·' %>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
  <% if Rails.env.production? %>
    <%= render 'layouts/analytics_header_site' %>
  <% end %>

    <%= image_tag 'Gobierto-Avatar@2x.png' %>

      <%= render "gobierto_admin/shared/flash_messages" %>
      <%= yield %>

<% if Rails.env.production? %>
  <%= render 'layouts/analytics_footer_site' %>
<% end %>

<!DOCTYPE html>
<html lang="<%= I18n.locale %>">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <%= display_meta_tags site: [site_name, 'Gobierto'].join(' · '), reverse: true, separator: '·' %>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>

  <%= javascript_packs_with_chunks_tag 'admin', 'data-turbolinks-track': true %>
  <%= stylesheet_packs_with_chunks_tag 'admin', 'data-turbolinks-track': true %>

  <%= csrf_meta_tags %>
  <% if Rails.env.production? %>
    <%= render 'layouts/analytics_header_site' %>
  <% end %>

    <%= image_tag 'Gobierto-Avatar@2x.png' %>

      <%= render "gobierto_admin/shared/flash_messages" %>
      <%= yield %>

<% if Rails.env.production? %>
  <%= render 'layouts/analytics_footer_site' %>
<% end %>

Add chunks to different layout

Add chunks to different layout


---
layout: mobile_layout
---

<div id="location" title="<%= place.title %>" class="panel">
  <fieldset>

<%= place.title %>

    <% if place.website %>

<a target="_blank" href="<%= place.website %>"><%= place.website %>

    <% end %>
    <% if place.address %>

<%= place.address %>

    <% end %>
    <% if place.phone %>

Phone: <%= place.phone %>

    <% end %>
  </fieldset>
  <% if place.description %>
  <fieldset>

<%= place.description %>

  </fieldset>
  <% end %>

---
layout: mobile_layout
---

<div id="location" title="<%= place.title %>" class="panel">
  <fieldset>

<%= place.title %>

    <% if place.website %>

<a target="_blank" href="<%= place.website %>"><%= place.website %>

    <% end %>
    <% if place.address %>

<%= place.address %>

    <% end %>
    <% if place.phone %>

Phone: <a href="tel:+1-<%= place.phone %>"><%= place.phone %>

    <% end %>
  </fieldset>
  <% if place.description %>
  <fieldset>

<%= place.description %>

  </fieldset>
  <% end %>

Add tel: linking for mobile site

Add tel: linking for mobile site


<% if @album.images.first %>

    <a href='<%= album_path(@album) %>'>

<%= @album.images.count %>

      <%= image_tag(@album.images.first.location, :type => "fetch", :width => 300, :height => 300, :crop => :thumb) %>

<%= @album.title %>

  <% else %>

<%= link_to "#{@album.title} #{@album.images.count} images", album_path(@album) %>

<% end %>

<% if @album.images.first %>

    <a href='<%= album_path(@album) %>'>

<%= @album.images.count %>

      <%= image_tag(@album.images.first.location, :type => "fetch", :width => 500, :height => 500, :crop => :thumb) %>

<%= @album.title %>

  <% else %>

<%= link_to "#{@album.title} #{@album.images.count} images", album_path(@album) %>

<% end %>

Fix issue with images being too small at large screen sizes


  Please:

      Tweet

      to help publicize cyber-dojo, make suggestions, or report errors

      consider making a donation

      if you are using https://cyber-dojo.org commercially,
      buy a licence

  Please:

      Tweet

      to help publicize cyber-dojo

    email suggestions or error reports

      consider making a donation

      if you are using https://cyber-dojo.org commercially,
      buy a licence

Add email feedback/errors entry to welcome dialog


<!-- Start of Tree Background -->
    <div class="tree-back">
      <%= form.error_messages %>

      <%= form.inputs do -%>
        <%= form.input :title %>

        <%= form.label :publication_date %>
        <%= form.date_select :publication_date %>
        <%= form.input :citation %>
        <%= form.label :abstract %>
        <%= form.text_area :abstract %>
        <%= form.input :creative_commons, :as         => :select,
                                          :label      => "License",
                                          :collection => Licenses::CC_LICENSES %>
      <% end %>
  </div>
<!-- End of Tree Background -->

<!-- Start of Tree Background -->
    <div class="tree-back">
      <%= form.error_messages %>

      <%= form.inputs do -%>
        <%= form.input :title %>

        <%= form.label :publication_date %>
        <%= form.date_select :publication_date %>
        <%= form.input :citation %>
        <%= form.label :abstract %>
        <%= form.text_area :abstract %>
        <%= form.input :creative_commons, :as            => :select,
                                          :label         => "License",
                                          :include_blank => false,
                                          :collection    => Licenses::CC_LICENSES %>
      <% end %>
  </div>
<!-- End of Tree Background -->

Remove blank form license option

Remove blank form license option


<%= link_to forum.title, forum %>

    <%= forum.description %>

  <menu>
    <%= link_to "Post a new topic.", new_forum_topic_path(@forum) -%>
    <% if @topic %>
      <%= link_to "Back to Topics", forum_path(@forum) %>
    <% end %>
  </menu>

<%= link_to forum.title, forum %>

    <%= forum.description %>

  <menu>
    <%= link_to t('forem.topic.links.post'), new_forum_topic_path(@forum) -%>
    <% if @topic %>
      <%= link_to t('forem.topic.links.back_to_topics'), forum_path(@forum) %>
    <% end %>
  </menu>

[i18n] Switch to translation for some static text.


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

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

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

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

<% else %>

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

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

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

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

  $children.append (rendered);

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

<% end %>

Fix for site-tree node creation.

Fix for site-tree node creation.


<%= content_for :body do %>

                <%= render 'flash_messages' %>

                    <%= yield %>

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

<%= content_for :body do %>

                    <%= yield %>

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

Remove redundant header in text pages

Remove redundant header in text pages


Extract Recipes from your Plan!

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

		<%= f.label :plan_id, "Meal Plan Name" %>
		<%= f.select :plan_id, options_from_collection_for_select(@plans, 'id', 'plan_name') %>

		<%= f.submit "Unbox!", {class: "btn btn-default"} %>

<% end %>

Add form for creating new recipe objects through API call


<% @title = "Stats" %>
<% @subtitle = "Since 2009" %>

    Total Gems
    <%= @number_of_gems %>

    Total Users
    <%= @number_of_users %>

    Total Downloads
    <%= @number_of_downloads %>

<%= most_downloaded_chart(@most_downloaded) %>

<% @title = "Stats" %>
<% @subtitle = "Since 2009" %>

    Total Gems
    <%= number_with_delimiter @number_of_gems %>

    Total Users
    <%= number_with_delimiter @number_of_users %>

    Total Downloads
    <%= number_with_delimiter @number_of_downloads %>

<%= most_downloaded_chart(@most_downloaded) %>

Use number_with_delimiter when printing stats

This commit improves the view:

![before](https://cloud.githubusercontent.com/assets/10076/5132312/3c32986a-70b0-11e4-88d6-edd72b5ecf78.png)

making it look like:

![after](https://cloud.githubusercontent.com/assets/10076/5132310/3c1df9a0-70b0-11e4-9763-f19b06538534.png)


<% if @movie_data == nil%>
  <% @movie_data.each do |movie| %>
    <%= link_to movies_path(movie_id: movie['id']), method: 'post', remote: true do %>
      <div data-movie-title='<%= movie['title'] %>' class="movie-card">
        <% if movie['poster_path'] %>
          <% @movie_post_url = "http://image.tmdb.org/t/p/w185#{movie['poster_path']}" %>
        <% else %>
          <% @movie_post_url = "https://s1.yimg.com/os/mit/media/m/entity/images/movie_placeholder-e0ca244.png" %>
        <% end %>

<%= image_tag @movie_post_url %>

<%= movie['title'] %>

<%= movie['release_date'][0..3] %>

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

THAT'S NOT A MOVIE!

<% end %>

Add error message if user searches for not-a-movie.


daemonize yes

pidfile /var/run/redis/sentinel.pid

logfile /var/log/redis/sentinel.log
loglevel <%= @sentinel_loglevel %>

port <%= @sentinel_port -%>

<% sentinel_monitors.sort.each do |name, rule| %>
sentinel monitor <%= name -%> <%= rule['master-host'] -%>  <%= rule['master-port'] -%> <%= rule['quorum'] %>
<% rule.each do |param, value| %><% if param != "master-host" %><% if param != "master-port" %><% if param != "quorum" %>sentinel <%= param -%> <%= name -%> <%= value -%><% end %><% end %><% end %><% end %>
<% end %>

daemonize yes

pidfile /var/run/redis/sentinel.pid

logfile /var/log/redis/sentinel.log
loglevel <%= @sentinel_loglevel %>

port <%= @sentinel_port -%>
maxclients 65000

<% sentinel_monitors.sort.each do |name, rule| %>
sentinel monitor <%= name -%> <%= rule['master-host'] -%>  <%= rule['master-port'] -%> <%= rule['quorum'] %>
<% rule.each do |param, value| %><% if param != "master-host" %><% if param != "master-port" %><% if param != "quorum" %>sentinel <%= param -%> <%= name -%> <%= value -%><% end %><% end %><% end %><% end %>
<% end %>

Set Sentinel's maxclients to 65000

Set Sentinel's maxclients to 65000


<%= javascript_include_tag "upload_selection" %>
<%
    new_version ||= false
%>
 <% resource ||=nil %>

<%= folding_panel('Upload', false) do %>
    <% if !resource.nil? && resource.respond_to?(:content_blobs) %>
        <%= render :partial=>"assets/upload",:locals=>{:new_version=>new_version,:batch=>true, :with_image_file=>resource.is_a?(Model)} -%>
    <% else %>
        <%= render :partial=>"assets/upload",:locals=>{:new_version=>new_version} -%>
    <% end %>
<% end %>

<%= javascript_include_tag "upload_selection" %>
<%
    new_version ||= false
%>
 <% resource ||=nil %>

<%= panel('Upload') do %>
    <% if !resource.nil? && resource.respond_to?(:content_blobs) %>
        <%= render :partial=>"assets/upload",:locals=>{:new_version=>new_version,:batch=>true, :with_image_file=>resource.is_a?(Model)} -%>
    <% else %>
        <%= render :partial=>"assets/upload",:locals=>{:new_version=>new_version} -%>
    <% end %>
<% end %>

Make upload box non-folding as it is mandatory


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

      <%= t('.forum') %>
      <%= t('.topics') %>
      <%= t('.posts') %>

    <% @forums.each do |forum| %>
      <tr class="forum <%= cycle("odd", "even") %>">

          <%= link_to forum.title, forum_path(forum) %>

<%= forum.description %>

          <% if forum.last_post %>

              <%= t('.last_post') %>: <%= link_to(forum.last_post.topic, forum_topic_path(forum, forum.last_post.topic)) -%> by <%= forum.last_post.user %> <%= t('time_ago_in_words', :time => time_ago_in_words(forum.last_post.created_at)) -%>

          <% end %>

        <%= forum.topics.count %>
        <%= forum.posts.count %>

    <% end %>

<% if forem_admin? %>
  <%= link_to "Admin Area", admin_root_path %>
<% end %>

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

      <%= t('.forum') %>
      <%= t('.topics') %>
      <%= t('.posts') %>

    <% @forums.each do |forum| %>
      <tr class="forum <%= cycle("odd", "even") %>">

          <%= link_to forum.title, forum_path(forum), :class => "title" %>

<%= forum.description %>

          <% if forum.last_post %>

              <%= t('.last_post') %>: <%= link_to(forum.last_post.topic, forum_topic_path(forum, forum.last_post.topic)) -%> by <%= forum.last_post.user %> <%= t('time_ago_in_words', :time => time_ago_in_words(forum.last_post.created_at)) -%>

          <% end %>

        <%= forum.topics.count %>
        <%= forum.posts.count %>

    <% end %>

<% if forem_admin? %>
  <%= link_to "Admin Area", admin_root_path %>
<% end %>

Add class for forum title in forums/index


    <%= link_to image_tag(photo.file.url(:small)), photo, class: 'image' %>

        <%= photo.footer %>

        © <%= link_to photo.copyright, photo.source %>

    <%= link_to image_tag(photo.file.url(:small)), photo, class: 'image' %>

        <%= link_to photo.footer, photo %>

        © <%= link_to photo.copyright, photo.source %>

Make photo footer a link

Make photo footer a link


Update Project Description

  <% form_for(@project, :builder => YogoFormBuilder) do |f| %>

        <%= f.label(:name, "Project Name:") %>

      <%= @project.name %>

     <%= f.check_box(:is_public, :label => 'Public ?') %>
     <%= f.text_area(:description, :label => "Project Description: ") %>

      <%= f.submit('Update', :class => 'button-link') %>
      <%= link_to('Cancel', projects_path, :class => 'cancel') %>

  <% end %>

Add a content title to the project edit page


  		<%= render 'shared/navbar2_landing' %>

    <svg><use xlink:href="#shape-share"></use></svg>
    <% if content_for?(:headerMobile) %>
      <%= yield :headerMobile %>
    <% end %>

<%= render 'shared/js_config' %>

Check if it is really the production site


Add gender tracking to Google Analytics

Add gender tracking to Google Analytics


Partials in document

ERB

<%= partial "test/erb", :locals => {:value => "value"} %>

MD

<%= partial "test/markdown" %>

Mockup

<%= partial "test/mockup" %>

Partials in document

ERB

<%= partial "test/erb", :locals => {:value => "value"} %>

MD

<%= partial "test/markdown" %>

Mockup

<%= partial "test/mockup", :locals => {:value => "value"} %>

Test rendering of old style partials with locals


<%= link_to (link.finished_at || 'Import in progress'),
  local_government_area_detail_path(
    link.local_government_area, link
  ) %>

<%= link_to (link.finished_at.to_formatted_s(:short) || 'Import in progress'),
  local_government_area_detail_path(
    link.local_government_area, link
  ) %>

Format timestamp display in import list

Format timestamp display in import list


<% service_response = holding.service_response %>
<% if current_user %>
  <%- # Link for "Request" action with class "ajax_window" for unobtrusive JS. -%>
  <%= link_to("Request", new_holding_request_url(service_response),
    target: "_blank", class: "btn btn-primary request-link ajax_window") %>
<% else %>
  <%- # Link to login screen -%>
  <strong>
    <%= link_to("Login to Request",
      login_path({return_url: url_for_request(service_response.request)}),
      target: "_blank", class: "request-login-link") %>
  </strong>
<% end %>

<% service_response = holding.service_response %>
<% if current_user %>
  <%- # Link for "Request" action with class "ajax_window" for unobtrusive JS. -%>
  <%= link_to("Request", new_holding_request_url(service_response),
    target: "_blank", class: "btn btn-primary request-link ajax_window") %>
<% else %>
  <%- # Link to login screen -%>
  <strong>
    <%= link_to("Login to Request",
      login_url({return_url: url_for_request(service_response.request)}),
      target: "_blank", class: "request-login-link") %>
  </strong>
<% end %>

Use the login_url named url method since the login_path link doesn't seem to work


<% content_for :body_classes do %>search<% end %>

<main id="content" role="main" class="group ancillary search no-results-term">
  <%= render partial: 'form' %>
</main>

<% content_for :title, "Search - GOV.UK" %>

<% content_for :body_classes, "search" %>
<% content_for :title, "Search - GOV.UK" %>

<main id="content" role="main" class="search no-results-term">
  <%= render partial: 'form' %>
</main>

Remove unused classes and tidy content_for

The classes were to add some styling to previous design elements which
have been removed from this page.

Tidy the content_for tags up so they are clearer and together.


<%
  extra_class ||= ""
  extra_class << " item-#{edition_counter}" if defined?(edition_counter)
  image_size ||= :s300
  show_meta ||= false
%>
<%= content_tag_for(:article, edition, nil, class: "#{edition_organisation_class(edition)} #{extra_class.strip}") do %>

      <%= link_to edition.image_tag(image_size), public_document_path(edition), title: "Read the #{edition.title} article", class: 'img'%>

      <% if show_meta %>

<%= absolute_date(edition.public_timestamp) %> — <%= edition.display_type %>

      <% end %>

<%= link_to edition.title, public_document_path(edition) %>

      <% unless edition.summary.blank? %>

<%= truncate(edition.summary, length: 150, separator: ' ') %>

      <% end %>

<% end %>

<%
  extra_class ||= ""
  extra_classes =
    if defined?(edition_counter)
      extra_class + " item-#{edition_counter}"
    else
      extra_class
    end
  image_size ||= :s300
  show_meta ||= false
%>
<%= content_tag_for(:article, edition, nil, class: "#{edition_organisation_class(edition)} #{extra_classes.strip}") do %>

      <%= link_to edition.image_tag(image_size), public_document_path(edition), title: "Read the #{edition.title} article", class: 'img'%>

      <% if show_meta %>

<%= absolute_date(edition.public_timestamp) %> — <%= edition.display_type %>

      <% end %>

<%= link_to edition.title, public_document_path(edition) %>

      <% unless edition.summary.blank? %>

<%= truncate(edition.summary, length: 150, separator: ' ') %>

      <% end %>

<% end %>

Fix featured_news partial so we don't keep adding to extra_class


CONFIG = {
    'mode': 'django',
    'working_dir': '/opt/graphite/webapp/graphite',
    'user': 'www-data',
    'group': 'www-data',
    'args': (
	'--timeout=<%= scope.lookupvar('graphite::gunicorn_arg_timeout') %>',
        '--bind=unix:/var/run/graphite.sock',
	'--workers=<%= scope.lookupvar('graphite::gunicorn_workers') %>',
    ),
}

CONFIG = {
    'mode': 'django',
    'working_dir': '/opt/graphite/webapp/graphite',
    'user': '<%= scope.lookupvar('graphite::gr_web_user') %>',
    'group': '<%= scope.lookupvar('graphite::gr_web_group') %>',
    'args': (
	'--timeout=<%= scope.lookupvar('graphite::gunicorn_arg_timeout') %>',
        '--bind=unix:/var/run/graphite.sock',
	'--workers=<%= scope.lookupvar('graphite::gunicorn_workers') %>',
    ),
}

Use gr_web_user / gr_web_group variables in gunicorn template


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">

    <%= wicked_pdf_stylesheet_link_tag "pdf" %>
    <!-- have to load from remote CDN for icons to load under wkhtmltopdf -->
    <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %>
    <%= wicked_pdf_javascript_include_tag "application" %>
  </head>
  <body>
    <div class="container">
      <%= yield %>
    </div>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" type="text/css">

    <%= wicked_pdf_stylesheet_link_tag "pdf" %>
    <!-- have to load from remote CDN for icons to load under wkhtmltopdf -->
    <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %>
    <%= wicked_pdf_javascript_include_tag "application" %>
  </head>
  <body>
    <div class="container">
      <%= yield %>
    </div>
  </body>
</html>

Include Lora font in PDF layout

Include Lora font in PDF layout

Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>


<%= notice %>

  Name:
  <%= @subject.name %>

  Neighborhood:
  <%= @subject.neighborhood_id %>

  Type:
  <%= @subject.type %>

<%= link_to 'Edit', edit_subject_path(@subject) %> |
<%= link_to 'Back', subjects_path %>

<%= notice %>

  Name:
  <%= @subject.name %>

<% if @subject.neighborhood_id != nil %>

    Neighborhood:
    <%= @subject.neighborhood.name %>

<% end %>

  Type:
  <%= @subject.type %>

<%= link_to 'Edit', edit_subject_path(@subject) %> |
<%= link_to 'Back', subjects_path %>

Modify show view to only show neighborhood if it has a neighborhood (ie, is a Property, should maybe want to use that explicitly)


Welcome to Global Host

Friends in far places

        <%= render '/sessions/form' %>

        <%= link_to("Register", new_user_path, class:"waves-effect waves-light btn")%>

Welcome to Global Host

Find friends in far places

        <%= render '/sessions/form' %>

          Not a user?

        <%= link_to("Register", new_user_path)%>

Make register button less proiment

Make register button less proiment


  <% (year_range.begin..year_range.end).reverse_each do |year| %>
    <%= link_to year, params.permit(:anchor).merge(anchor: year), class: %w(btn btn-theme) %>
  <% end %>

Allow wrapping on StephenVlog Days Year Picker


ᕙ(๑ ⚈ै‿ ⚈ै๑)ᕗ

Daum Cafe Rankings

Last updated: <%=@top.first.created_at%>

<%= will_paginate @top %>

<% @top.each do |cafe| %>

    <a href="<%=cafe.url%>"><%=cafe.title%>
    Members: <%=cafe.score.to_i.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse%>

<% end %>
<%= will_paginate @top %>

ᕙ(๑ ⚈ै‿ ⚈ै๑)ᕗ

Daum Cafe Rankings

Last updated: <%=@top.first.updated_at%>

<%= will_paginate @top %>

<% @top.each do |cafe| %>

    <a href="<%=cafe.url%>"><%=cafe.title%>
    Members: <%=cafe.score.to_i.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse%>

<% end %>
<%= will_paginate @top %>

Change update date to updated_at value

Change update date to updated_at value


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

Create partial for item form

Create partial for item form


<% ws_count = 0 %>
<% tree_headings = [] %>
<% TreeArrangement.menu_query.each do |menu_item| %>
  <% ws_count += 1 %>
  <% unless tree_headings.include?(menu_item.label) %>

        <%= menu_item.label %>

    <% tree_headings << menu_item.label %>
  <% end %>

    <%
      icon_check_class =
        if session["workspace"].present? &&
           menu_item.workspace_id == session["workspace"]["id"]
            ""
        else
          "hidden"
        end
    %>

      <%= link_to("#{icon('cirle-o')} #{menu_item.workspace_title} #{fa_icon 'check', class: icon_check_class}".html_safe,
                  toggle_current_workspace_path(id: menu_item.workspace_id),
                  { remote: true,
                    method: "post",
                    title: 'Choose current workspace' }) %>

<% end %>
<% if ws_count == 0 %>

      [No workspaces - create one in the Tree Editor.]

<% end %>

<% ws_count = 0 %>
<% tree_headings = [] %>
<% TreeArrangement.menu_query.each do |menu_item| %>
  <% ws_count += 1 %>
  <% unless tree_headings.include?(menu_item.label) %>

        <%= menu_item.label %>

    <% tree_headings << menu_item.label %>
  <% end %>

    <%
      icon_check_class =
        if session["workspace"].present? &&
           menu_item.workspace_id == session["workspace"]["id"]
            ""
        else
          "hidden"
        end
    %>

      <%= link_to("#{icon('cirle-o')} #{menu_item.workspace_title} #{fa_icon 'check', class: icon_check_class}".html_safe,
                  toggle_current_workspace_path(id: menu_item.workspace_id),
                  { remote: true,
                    method: "post",
                    title: 'Choose current workspace' }) %>

<% end %>
<% if ws_count == 0 %>

      [No workspaces - create one in the <%= link_to "Tree Editor".html_safe, Rails.configuration.tree_editor_url, title:'link', class: 'blue' %>.]

<% end %>

Add link to tree editor on tree workspace menu.


  <details <%= 'open' unless collapsed %>>

<%= term.header %>

      <%= term.content_html %>

Add class for terms title

Add class for terms title


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%= stylesheet_link_tag :flutie %>
    <title>Flutie v1</title>

    <style type="text/css">
    /* These are styles to make the page look nice */

    body { background-color: #dadada;}
    .content {
      background: #fff;
      padding: 40px;
      margin: 40px auto;
      width: 880px;
      -moz-border-radius: 24px;
      -webkit-border-radius: 24px;
    }
    </style>

  </head>

  <body>
    <div class="content">
      <%= yield %>
    </div>
  </body>
</html>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <%= stylesheet_link_tag :flutie %>
    <title>Flutie v1</title>

    <style type="text/css">
    /* These are styles to make the page look nice */

    body { background-color: #dadada;}
    .content {
      background: #fff;
      padding: 40px;
      margin: 40px auto;
      width: 880px;
      -moz-border-radius: 24px;
      -webkit-border-radius: 24px;
    }
    </style>

  </head>

  <body>
    <div class="content">
      <%= yield %>
    </div>
  </body>
</html>

Use HTML5 doctype on styleguide

Use HTML5 doctype on styleguide


<%= form_for :user, :url => spree.user_session_path do |f| %>

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

      <%= f.email_field :email, :class => 'title' %>

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

      <%= f.password_field :password, :class => 'title' %>

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

<%= f.submit t(:login), :class => 'button primary' %>

<% end %>

<%= form_for :user, :url => spree.user_session_path do |f| %>

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

      <%= f.email_field :email, :class => 'title', :tabindex => 1 %>

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

      <%= f.password_field :password, :class => 'title', :tabindex => 2 %>

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

<%= f.submit t(:login), :class => 'button primary' %>

<% end %>

Set tabindexes on email + password fields for login form

Allows people to view this page and hit tab to instantly go to the email field


Double H Ranch Twitter

  <%= render 'social/twitter' %>

Double H Ranch Facebook

  <%= render 'social/facebook' %>

<%= link_to "Double H Ranch Twitter", "https://twitter.com/DoubleHRanch", target: "_blank" %>

  <%= render 'social/twitter' %>

<%= link_to "Double H Ranch Facebook", "https://www.facebook.com/DoubleHRanchCamp/", target: "_blank" %>

  <%= render 'social/facebook' %>

Add links to fb and twitter header text

Add links to fb and twitter header text


  Name:

  <%= link_to "#{order.user.name}", edit_user_path(order.user) %>

  Email:

  <%= mail_to "#{order.user.email}" %>

  Primary Phone:

  <%= order.user.primary_number %>

  Name:

  <%= link_to "#{order.user.name}", edit_user_path(order.user) %>

  Email:

  <%= mail_to "#{order.user.email}" %>

  <%= t :user_primary_number %>:

  <%= order.user.primary_number %>

Use localization for edit order user priumary phone number name


<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: "<%= request.content %>"
    <%= time_ago_in_words(request.created_at) %> ago.

  <% if request.responder != nil %>

<%= link_to request.responder.first_name, user_path(request.responder) %> has responded to the request!

  <% end %>
  <% if request.is_fulfilled %>

 <%= link_to request.responder.first_name, user_path(request.responder) %> has fulfilled <%= link_to request.requester.first_name, user_path(request.requester) %>'s request!

  <% end %>

  <% if !request.is_fulfilled %>
    <% if request.requester == current_user && request.responder == nil %>
      <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
    <% elsif request.responder == nil && current_user != request.requester %>
      <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
    <% elsif request.responder != nil && current_user == request.requester %>
      <%= button_to 'Request fulfilled!', request, class: 'button', method: 'patch' %>
    <% end %>

    <% unless request.responder.nil? %>
      <%= link_to "Initiate Chat", request_messages_path(request) %>
    <% end %>
  <% end %>

<li class="request" data-id="<%= request.id %>">

    <%= request.requester.first_name %> said: "<%= request.content %>"
    <%= time_ago_in_words(request.created_at) %> ago.

  <% if request.responder != nil %>

<%= link_to request.responder.first_name, user_path(request.responder) %> has responded to the request!

  <% end %>
  <% if request.is_fulfilled %>

 <%= link_to request.responder.first_name, user_path(request.responder) %> has fulfilled <%= link_to request.requester.first_name, user_path(request.requester) %>'s request!

  <% end %>

  <% if !request.is_fulfilled %>
    <% if request.requester == current_user && request.responder == nil %>
      <%= button_to "Cancel Request", request, class: 'button', method: 'delete' %>
    <% elsif request.responder == nil && current_user != request.requester %>
      <%= button_to 'Be a neighbor!', request, class: 'button', method: 'patch' %>
    <% elsif request.responder != nil && current_user == request.requester %>
      <%= button_to 'Request fulfilled!', request, class: 'button', method: 'patch' %>
    <% end %>

    <% unless request.responder.nil? %>
      <%= link_to "Initiate Chat", request_messages_path(request, anchor: 'bottom') %>
    <% end %>
  <% end %>

Change link to anchor to bottom of chat page


Lista de projetos

    Título
    Template

    Textos

  <% @projects.each do |project| %>

      <%= project.book.title %>
      <%= project.book.template.name %>
      <%= book_status_label(project.book) %>
      <%= raw project.book.texts.size %>

  <% end %>

Lista de projetos

    Título
    Template

    Textos

  <% if @project %>
    <% @projects.each do |project| %>

        <%= project.book.title %>
        <%= project.book.template.name %>
        <%= book_status_label(project.book) %>
        <%= raw project.book.texts.size %>

    <% end %>
  <% end %>

Fix admin view to allow empty projects

Fix admin view to allow empty projects


<%= link_to @update.user.name, user_path(@update.user) %> says:

<%= @update.content %>

<%= @update.created_at %>

<%= @update.words %> new words

<%= @update.hours %> hours worked

For project: <%= link_to @update.project.title, project_path(@update.project) %>

Comments

<%= render @update.comments.all %>

Add New Comment

<%= form_for [@update.project, @update, @comment] do |f| %>
  <%= f.text_area :content, class: "form-control" %>
  <%= f.submit %>
<% end %>

<%= link_to @update.user.name, user_path(@update.user) %> says:

<%= @update.content %>

<%= @update.created_at %>

<%= @update.words %> new words

<%= @update.hours %> hours worked

For project: <%= link_to @update.project.title, project_path(@update.project) %>

Comments

<%= render @update.comments.all %>

Add New Comment

<%= form_for [@update.project, @update, @comment] do |f| %>
  <%= f.text_area :content, class: "form-control" %>

  <%= f.submit "Add Comment", class: "btn btn-primary" %>
<% end %>

Adjust button formatting and text

Adjust button formatting and text


<%= _('Write your response as plain text. Only send PDF documents as a last resort. Government guidelines make it clear that PDF is not an acceptable format for you to use in the delivery of government information.') %>
<%= help_officers_url(:anchor => "pdf") %>

<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
<%= help_officers_url %>

<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>

<%= _('Write your response as plain text. Only send PDF documents as a last resort. Government guidelines make it clear that PDF is not an acceptable format for you to use in the delivery of government information.') %>
<%= help_officers_url(:anchor => "pdf") %>

<%= _('This request is being made by an individual using the Right to Know website. The unique email address provided by the service for this request satisfies s.15(2)(c) of the Freedom of Information Act.')%>

<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%>
<%= help_officers_url %>

<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%>

Add notice that this the email is valid under s.15(2)(c) of the FOI act.

See discussion issues https://github.com/openaustralia/righttoknow/issues/314


<%= f.label t("fb_app_plugin.views.myprofile.catalogs.profiles_chooser_label") %>
<%= f.text_field :profile_ids, placeholder: t('fb_app_plugin.views.page_tab.profiles.placeholder') %>

<%= javascript_tag do %>
  jQuery(document).ready(function() {
    open_graph.autocomplete.init(
      <%= url_for(controller: :fb_app_plugin_page_tab, action: :enterprise_search).to_json %>,
      '#page-tab-<%= page_tab.id || 'new' %> #config-type-profiles #page_tab_profile_ids',
      <%= page_tab.profiles.map{ |p| {value: p.id, label: render('open_graph_plugin_myprofile/ac_profile', profile: p), } }.to_json %>
    )
  })
<% end %>

Add labels for catalog settings 3

Add labels for catalog settings 3


			Please send feedback or ideas for this case management app to DCAF.CMapp@gmail.com

	DC Abortion Fund --  202-452-7464

	National Abortion Federation --  800-772-9100

	onlinefaxes.com

Create Footer partial for layouts/application


<%= notice %>

Listing Questions

      Title
      Content

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

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

    <% end %>

<%= link_to 'New Question', new_question_path %>

Remove new question link from questions show page


Need help? Live chat with our specialists

Make the webchat link rel=external

Make the webchat link rel=external

This causes it to get the little up-right arrow design.


<%= form_with(model: resource, url: session_path(resource_name), local: true,
              skip_enforcing_utf8: true, class: 'login-form',
              html: { novalidate: true }) do |f| %>

    <%= f.label :username, t('user_sessions.new.username') %>
    <%= f.email_field :username, id: 'user_username',
      'aria-label': t('user_sessions.new.username'), autofocus: true, autocomplete: 'off' %>

    <%= f.label :password, t('user_sessions.new.password') %>
    <%= f.password_field :password, id: 'user_password',
      'aria-label': t('user_sessions.new.password'), autocomplete: 'off' %>

  <%= f.submit t('user_sessions.new.submit'), class: 'submit' %>
<% end %>

<%= form_with(model: resource, url: session_path(resource_name), local: true,
              class: 'login-form', html: { novalidate: true }) do |f| %>

    <%= f.label :username, t('user_sessions.new.username') %>
    <%= f.email_field :username, id: 'user_username',
      'aria-label': t('user_sessions.new.username'), autofocus: true, autocomplete: 'off' %>

    <%= f.label :password, t('user_sessions.new.password') %>
    <%= f.password_field :password, id: 'user_password',
      'aria-label': t('user_sessions.new.password'), autocomplete: 'off' %>

  <%= f.submit t('user_sessions.new.submit'), class: 'submit' %>
<% end %>

Revert "Do not use UTF-8 enforcer in login form"

This reverts commit 9ad8be4a3e64ff8bd9c7c538ea3cb6dbbc3bd6b7.


		<% if !current_page?(root_url) %>
			<%= nav_item 'Share', '/assets/axe_white.svg', links_path(anchor: 'suggest') %>
			<%= nav_item 'Write', "/assets/book_white.svg", links_path(anchor: 'articles', write: true) %>
			<%= nav_item 'Preview', "/assets/upvote.svg", contents_path, :class => "upvote-nav"  %>
		<% end %>

<% if current_user.try(:admin?) %>

Admin:

			<%= nav_item 'Previous Posts', nil, admin_posts_path %>
			<%= nav_item 'Notices', nil, admin_notices_path %>

<% end %>

		<% if !current_page?(root_url) %>
			<%= nav_item 'Preview', "/assets/upvote.svg", contents_path, :class => "upvote-nav"  %>
			<%= nav_item 'Write', "/assets/book_white.svg", links_path(anchor: 'articles', write: true) %>
			<%= nav_item 'Share', '/assets/axe_white.svg', links_path(anchor: 'suggest') %>
		<% end %>

<% if current_user.try(:admin?) %>

Admin:

			<%= nav_item 'Previous Posts', nil, admin_posts_path %>
			<%= nav_item 'Notices', nil, admin_notices_path %>

<% end %>

Make header nav in same order as home page


      <%= link_to root_path do %>
        <%= image_tag "logo.png", :id => "header_logo" %>
      <% end %>

        What are you looking for?

      <%= form_tag root_path, :method => :get, :class => "form-inline" do %>
        <%= select_tag "category", options_for_select({ "all types" => nil }.merge(Organization.category_options),
                        params[:category]), :class => "span5" %>
        <%= text_field_tag "zipcode", params[:zipcode], :placeholder => "Enter Zipcode", :class => "span4" %>
        <%= submit_tag "Search", :class => "btn btn-primary" %>
      <% end %>

      <%= link_to root_path do %>
        <%= image_tag "logo.png", :id => "header_logo" %>
      <% end %>

        What are you looking for?

      <%= form_tag organizations_path, :method => :get, :class => "form-inline" do %>
        <%= select_tag "category", options_for_select({ "all types" => nil }.merge(Organization.category_options),
                        params[:category]), :class => "span5" %>
        <%= text_field_tag "zipcode", params[:zipcode], :placeholder => "Enter Zipcode", :class => "span4" %>
        <%= submit_tag "Search", :class => "btn btn-primary" %>
      <% end %>

Make it so that the search bar points to the organizations_path instead of the root_path


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= controller.controller_name.to_s.titlecase %>: <%= controller.action_name.to_s.titlecase %></title>
  <%= javascript_include_tag :defaults %>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag "forms" %>
  <%= stylesheet_link_tag "autocomplete" %>

<%= @content_title %>

<%= flash[:notice] %>

<%= yield %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= controller.controller_name.to_s.titlecase %>: <%= controller.action_name.to_s.titlecase %></title>
  <%= javascript_include_tag :defaults %>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag "forms" %>
  <%= stylesheet_link_tag "autocomplete" %>

<% if current_user %>
  <%= link_to "#{current_user.name}", user_path(current_user)  %> |
  <%= link_to "logout", logout_path, :method => :delete %>
<% else %>
  <%= link_to "login", login_path %> |
  <%= link_to "signup", signup_path %>
<% end %>

<%= @content_title %>

<%= flash[:notice] %>

<%= yield %>

Add global login/signup or current user/logout links


<% provide(:title, "Nach Anmeldung suchen") %>

Hier kannst du den Änderungscode eingeben, den du bei der Anmeldung per E-Mail erhalten hast, um eine bereits versendete Anmeldung zu bearbeiten.

<%= form_tag signup_search_path, class: "form-search" do %>
  <%= text_field_tag :tracing_code, nil, :class => "search-query", autofocus: true %>
  <%= submit_tag "Suchen", class: "btn" %>
<% end %>

Bitte beachte, dass Änderungen nur bis zum Anmeldeschluss deines Wettbewerbs möglich sind. Bis dahin muss dein Vorspielprogramm vollständig angemeldet sein!

<% provide(:title, "Nach Anmeldung suchen") %>

Hier kannst du den Änderungscode eingeben, den du bei der Anmeldung per E-Mail erhalten hast, um eine bereits versendete Anmeldung zu bearbeiten.

Zum Landeswettbewerb weitergeleitete Teilnehmer erhalten Anfang Februar eine zweite E-Mail mit einem neuen Änderungscode, mit dem sie ihr Programm für den Landeswettbewerb ändern können.

<%= form_tag signup_search_path, class: "form-search" do %>
  <%= text_field_tag :tracing_code, nil, :class => "search-query", autofocus: true %>
  <%= submit_tag "Suchen", class: "btn" %>
<% end %>

Bitte beachte, dass Änderungen nur bis zum Anmeldeschluss des jeweiligen Wettbewerbs möglich sind. Bis dahin muss dein Vorspielprogramm vollständig angemeldet sein!

Clarify instructions on public performance search page


<%= t("shared.outline.searcher") %>

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

      <%= t("#{i18n_namespace}.title") %>
      <input type="text" name="search" placeholder='<%= t("#{i18n_namespace}.placeholder") %>' class="input-group-field" value="<%= params[:search] %>" id="search_text">

        <button type="submit" class="button" title="<%= t("#{i18n_namespace}.button") %>">
          <%= t("#{i18n_namespace}.button") %>

        </button>

  <% end %>

<%= t("shared.outline.searcher") %>

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

        <%= t("#{i18n_namespace}.title") %>
        <input type="text" name="search" placeholder="<%= t("#{i18n_namespace}.placeholder") %>"
                                         class="input-group-field"
                                         value="<%= params[:search] %>" id="search_text">

        <button type="submit" class="button" title="<%= t("#{i18n_namespace}.button") %>">
          <%= t("#{i18n_namespace}.button") %>

        </button>

  <% end %>

Change label for search text

Change label for search text

Label wraps input field to prevent error on missing label (hidden by CSS).


############# config ##################
#
set base_path    /var/spool/repo-mirror
#
set mirror_path  /var/spool/repo-mirror
set skel_path    /var/spool/apt-mirror/skel
set var_path     /var/spool/apt-mirror/var
set cleanscript  /var/spool/apt-mirror/var/clean.sh
set defaultarch  <%= node['multi_repo']['mirrors']['ubuntu_arch'].first %>
set postmirror_script /var/spool/apt-mirror/var/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

<% node['multi_repo']['mirrors']['ubuntu_releases'].each do |release| %>
<% node['multi_repo']['mirrors']['ubuntu_arch'].each do |arch| %>
deb-<%= arch %> <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %> <%= release %> main <%= node['multi_repo']['mirrors']['ubuntu_components'] %>
<% node['multi_repo']['mirrors']['ubuntu_release_updates'].each do |update| %>
deb-<%= arch %> <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %> <%= release %>-<%= update %><%= node['multi_repo']['mirrors']['ubuntu_components'] %>

<% end %>

<% end %>
<% end %>

clean <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %>

############# config ##################
#
set base_path    /var/spool/repo-mirror
#
set mirror_path  /var/spool/repo-mirror
set skel_path    /var/spool/apt-mirror/skel
set var_path     /var/spool/apt-mirror/var
set cleanscript  /var/spool/apt-mirror/var/clean.sh
set defaultarch  <%= node['multi_repo']['mirrors']['ubuntu_arch'].first %>
set postmirror_script /var/spool/apt-mirror/var/postmirror.sh
# set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############

<% node['multi_repo']['mirrors']['ubuntu_releases'].each do |release| %>
<% node['multi_repo']['mirrors']['ubuntu_arch'].each do |arch| %>
deb-<%= arch %> <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %> <%= release %> main <%= node['multi_repo']['mirrors']['ubuntu_components'].join(" ") %>
<% node['multi_repo']['mirrors']['ubuntu_release_updates'].each do |update| %>
deb-<%= arch %> <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %> <%= release %>-<%= update %><%= node['multi_repo']['mirrors']['ubuntu_components'].join(" ") %>

<% end %>

<% end %>
<% end %>

clean <%= node['multi_repo']['mirrors']['ubuntu_mirror_source'] %>

Write out spaces between the components to mirror


<!DOCTYPE html>

  <%= favicon_link_tag 'favicon.ico', id: "favicon" %>
  <title>LiarsDiceServer</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

  <% if notice %>
<%= notice %>
<% end %>
  <% if alert %>
<%= alert %>
<% end %>

<%= yield %>
<%= yield :javascripts %>

<!DOCTYPE html>

  <%= favicon_link_tag 'favicon.ico?v=1', id: "favicon" %>
  <title>LiarsDiceServer</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>

  <% if notice %>
<%= notice %>
<% end %>
  <% if alert %>
<%= alert %>
<% end %>

<%= yield %>
<%= yield :javascripts %>

Add query params to favicon to prevent Chrome from caching it.


<%= form_tag() do %>

      <% all_columns.each do |column| %>
        <%= label_tag(column, column.to_s.humanize) -%>
      <% end %>

      <%
         all_columns.each do |column|
           html_opts = selected_columns.member?(column) ? { checked: 'checked' } : nil
      %>
        <%= check_box_tag(column, true, html_opts) -%>
      <% end %>

      <td colspan="<%= all_columns.length - 2 -%>">
      <%= link_to(t('helpers.cancel'), projects_path, class: 'btn btn-primary') -%>
      <%= submit_tag(t('helpers.save'), class: 'btn btn-primary') -%>

<% end %>

<%= form_tag() do %>

      <% all_columns.each do |column| %>
        <%= label_tag(column, column.to_s.humanize) -%>
      <% end %>

      <%
         all_columns.each do |column|
           html_opts = selected_columns.member?(column) ? { checked: 'checked' } : nil
      %>
        <%= check_box_tag(column, true, html_opts) -%>
      <% end %>

      <%= submit_tag(t('helpers.save'), class: 'btn btn-primary') -%>
      <%= link_to(t('helpers.cancel'), projects_path, class: 'btn btn-primary') -%>

<% end %>

Move configure buttons to the left to match button position on other table


    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Timeliner</title>

   <%= javascript_pack_tag 'iiif-timeliner' %>
   <%= stylesheet_pack_tag 'iiif-timeliner' %>

Add missing stylesheet pack tag

Add missing stylesheet pack tag

Without this the CSS doesn't get included in production mode.


---
title:  Pivotal GemFire Pulse System Requirements
---

Verify that your system meets the installation and runtime requirements for GemFire Pulse.

The GemFire Pulse Web application has been tested for compatibility with the following Web browsers. GemFire Pulse may work with other operating systems and browsers upon which it has not been tested:

-   Internet Explorer 9.0.8112.16421
-   Safari 5.1.7 for Windows
-   Google Chrome 22.0.1229.79 m
-   Mozilla Firefox 16.0.1

GemFire Pulse has been tested for standalone deployment on Tomcat and Jetty.

---
title:  Pivotal GemFire Pulse System Requirements
---

Verify that your system meets the installation and runtime requirements for GemFire Pulse.

The GemFire Pulse Web application has been tested for compatibility with the following Web browsers:

-   Internet Explorer 9.0.8112.16421
-   Safari 5.1.7 for Windows
-   Google Chrome 22.0.1229.79 m
-   Mozilla Firefox 16.0.1

GemFire Pulse has been tested for standalone deployment on Tomcat and Jetty.
GemFire Pulse may work with other operating systems and browsers upon which it has not been tested.

Correct wording that implies we give a list of web browsers not supported, instead of ones that are supported.


<%= semantic_form_for @resource, :url => admin_edition_path(@resource), :as => :edition do |f| %>
  <%= f.inputs do %>
    <%= render :partial => 'admin/shared/title_etc', :locals => {:f => f} %>
    <%= render :partial => 'admin/shared/video', :locals => {:f => f} %>
  <% end %>

Govspeak help

        <%= render "../shared/govspeak_help" %>

<% end %>

<% content_for :extra_javascript, javascript_include_tag('application', 'form-tools', 'jquery.mustache.js') %>

<%= semantic_form_for @resource, :url => admin_edition_path(@resource), :as => :edition do |f| %>
  <%= f.inputs do %>
    <%= render :partial => 'admin/shared/title_etc', :locals => {:f => f} %>
    <%= render :partial => 'admin/shared/video', :locals => {:f => f} %>
  <% end %>
<% end %>

Remove some cruft from the Video edit form.


#!/bin/bash

set -e -x

echo "Installing nfs server"

apt-get update
apt-get --assume-yes install nfs-kernel-server

mkdir -p /export/users
mkdir -p /export2/certs
chmod 777 /export
chmod 777 /export2
chmod 777 /export/users
chmod 777 /export2/certs

cat << EOF > /etc/exports
/export        10.0.0.0/8(rw,fsid=0,no_subtree_check,async)
/export/users  10.0.0.0/8(rw,nohide,no_subtree_check,async)
/export2       10.0.0.0/8(rw,fsid=1,no_subtree_check,async,insecure)
/export2/certs 10.0.0.0/8(rw,nohide,no_subtree_check,async,insecure)
EOF

exit 0

#!/bin/bash

set -e -x

echo "Installing nfs server"

apt-get update
apt-get --assume-yes install nfs-kernel-server

mkdir -p /export/users
mkdir -p /export/vol1
mkdir -p /export/vol2
mkdir -p /export/vol3
mkdir -p /export2/certs

chmod 777 /export
chmod 777 /export2
chmod 777 /export/users
chmod 777 /export/vol1
chmod 777 /export/vol2
chmod 777 /export/vol3
chmod 777 /export2/certs

cat << EOF > /etc/exports
/export        10.0.0.0/8(rw,fsid=0,no_subtree_check,async)
/export/users  10.0.0.0/8(rw,nohide,no_subtree_check,async)
/export/vol1   10.0.0.0/8(rw,nohide,no_subtree_check,async)
/export/vol2   10.0.0.0/8(rw,nohide,no_subtree_check,async)
/export/vol3   10.0.0.0/8(rw,nohide,no_subtree_check,async)
/export2       10.0.0.0/8(rw,fsid=1,no_subtree_check,async,insecure)
/export2/certs 10.0.0.0/8(rw,nohide,no_subtree_check,async,insecure)
EOF

exit 0

Add a few test volumes

Add a few test volumes


<% content_for :page_heading do %>

<%= t(".sidebar") %>

<% end %>

  <button type="button" class="close" data-dismiss="alert">×Close</button>

<%= t(".explain_how_its_works") %>

<%= t(".download_more_plugins") %>

<%= form_tag(url_for(:action=>'publish'), :method => :post, :class => 'spinner') do %>

    <%= link_to(t(".cancel"), {action: 'index'}) %>
    <%= t(".or") %>
    <%= submit_tag(t('.publish_changes'), class: 'btn btn-success') %>

<% end %>

<%= render partial: 'config' %>

<%= form_tag(url_for(:action=>'publish'), :method => :post, :class => 'spinner') do %>

    <%= link_to(t(".cancel"), {action: 'index'}) %>
    <%= t(".or") %>
    <%= submit_tag(t('.publish_changes'), class: 'btn btn-success') %>

<% end %>

<% content_for :page_heading do %>

<%= t(".sidebar") %>

<% end %>

  <button type="button" class="close" data-dismiss="alert">×Close</button>

<%= t(".explain_how_its_works") %>

<%= t(".download_more_plugins") %>

<%= form_tag(url_for(action: 'publish'), method: :put, class: 'spinner') do %>

    <%= link_to(t(".cancel"), {action: 'index'}) %>
    <%= t(".or") %>
    <%= submit_tag(t('.publish_changes'), class: 'btn btn-success') %>

<% end %>

<%= render partial: 'config' %>

<%= form_tag(url_for(action: 'publish'), method: :put, class: 'spinner') do %>

    <%= link_to(t(".cancel"), {action: 'index'}) %>
    <%= t(".or") %>
    <%= submit_tag(t('.publish_changes'), class: 'btn btn-success') %>

<% end %>

Use put method for sidebar publish action


<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= content_for?(:title) ? yield(:title) : "Vagrant" %></title>
    <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Vagrant" %>">
    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
  </head>
  <body>
    <header>
      <%= render 'layouts/navigation' %>
    </header>
    <main role="main">
       <%= render 'layouts/messages' %>
       <%= yield %>
    </main>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= content_for?(:title) ? yield(:title) : "Monologue" %></title>
    <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Monologue" %>">
    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
  </head>
  <body>
    <header>
      <%= render 'layouts/navigation' %>
    </header>
    <main role="main">
       <%= render 'layouts/messages' %>
       <%= yield %>
    </main>
  </body>
</html>

Set page title to app name

Set page title to app name


<!DOCTYPE html>

  <% if content_for?(:meta) %>
    <%= yield(:meta) -%>
  <% else %>
    <title>Helpful</title>
  <% end %>
  <%= stylesheet_link_tag "application", media: "all" %>
  <%= stylesheet_link_tag "//fonts.googleapis.com/css?family=Droid+Serif:400,700|Lato:300,400,400italic,700" %>
  <%= javascript_include_tag "https://checkout.stripe.com/checkout.js" %>
  <%= javascript_include_tag "application" %>
  <%= javascript_include_tag "//d3dy5gmtp8yhk7.cloudfront.net/2.1/pusher.min.js" %>
  <%= csrf_meta_tags %>
  <meta name="pusher-key" content="<%= Pusher.key %>">
  <meta name="stripe-token" content="<%= ENV['STRIPE_PUBLISHABLE_KEY'] %>">

  <% if @account %>
    <input type="hidden" name="account-slug" value="<%= @account.slug %>">
  <% end %>

  <% if @conversation %>
    <input type="hidden" name="conversation-number" value="<%= @conversation.number %>">
  <% end %>
  <%= yield %>

        Copyright © 2014, Assembly Made, Inc. All rights reserved.

<!DOCTYPE html>
<html>
<head>
  <% if content_for?(:meta) %>
    <%= yield(:meta) -%>
  <% else %>
    <title>Helpful</title>
  <% end %>
  <%= stylesheet_link_tag "application", media: "all" %>
  <%= stylesheet_link_tag "//fonts.googleapis.com/css?family=Droid+Serif:400,700|Lato:300,400,400italic,700" %>
  <%= javascript_include_tag "https://checkout.stripe.com/checkout.js" %>
  <%= javascript_include_tag "application" %>
  <%= javascript_include_tag "//d3dy5gmtp8yhk7.cloudfront.net/2.1/pusher.min.js" %>
  <%= csrf_meta_tags %>
  <meta name="pusher-key" content="<%= Pusher.key %>">
  <meta name="stripe-token" content="<%= ENV['STRIPE_PUBLISHABLE_KEY'] %>">
</head>
<body>
  <% if @account %>
    <input type="hidden" name="account-slug" value="<%= @account.slug %>">
  <% end %>

  <% if @conversation %>
    <input type="hidden" name="conversation-number" value="<%= @conversation.number %>">
  <% end %>

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

Remove footer for now since it's broken

Remove footer for now since it's broken


Institution

    <%= collection_select('users',:institution_id, Institution.all, :id, :name) %>

Institution

    <%= collection_select('user',:institution_id, Institution.all, :id, :name) %>

Fix saving institution in user-profile pages (one letter fix lol)


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

<%= node[:web][:log_directory] %>/*.log {
  daily
  missingok
  rotate 7
  compress
  delaycompress
  notifempty
  create 0660 rails rails
  sharedscripts
  postrotate
<% if File.directory?("#{node[:web][:base_directory]}/rails") -%>
    /bin/touch <%= node[:web][:base_directory] %>/rails/tmp/restart.txt
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%>
    /usr/bin/service gpx-import rotated
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
    /usr/bin/service cgimap reload
<% end -%>
  endscript
}

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

<%= node[:web][:log_directory] %>/*.log {
  daily
  missingok
  rotate 7
  compress
  delaycompress
  notifempty
  create 0660 rails rails
  sharedscripts
  postrotate
<% if File.directory?("#{node[:web][:base_directory]}/rails") -%>
    /bin/touch <%= node[:web][:base_directory] %>/rails/tmp/restart.txt
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%>
    /usr/bin/service gpx-import rotated
<% end -%>
<% if File.directory?("#{node[:web][:base_directory]}/cgimap") -%>
    /usr/bin/service cgimap reload
    /usr/bin/rsync <%= node[:web][:log_directory] %>/cgimap.log.2.gz ironbelly::logs/www.openstreetmap.org/cgimap-<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz
<% end -%>
  endscript
}

Archive cgimap logs to ironbelly.

Archive cgimap logs to ironbelly.


  <% list.attachments.each do |attachment| %>

<%= link_to attachment.title,
      attachment.file.to_s,
      download: File.basename(attachment.file.to_s) %>

    <% if attachment.description.present? %>

        <%= simple_format attachment.description %>

    <% end %>
  <% end %>

Change class from 'attachment' to 'attachments'

... because there's several now.


---
- job:
    name: Run_Whitehall_Data_Migrations
    display-name: Run_Whitehall_Data_Migrations
    project-type: freestyle
    description: "This job SSHes to whitehall-backend-2.backend.<%= @environment -%> and runs 'cd /var/apps/whitehall ; RAILS_ENV=production       bundle exec rake db:data:migrate'"
    builders:
        - shell: |
            "ssh deploy@whitehall-backend-2.backend.<%= @environment -%> 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake db:data:migrate'"
    wrappers:
        - ansicolor:
            colormap: xterm

---
- job:
    name: Run_Whitehall_Data_Migrations
    display-name: Run_Whitehall_Data_Migrations
    project-type: freestyle
    description: "This job SSHes to whitehall-backend-2.backend.<%= @environment -%> and runs 'cd /var/apps/whitehall ; RAILS_ENV=production       bundle exec rake db:data:migrate'"
    builders:
        - shell: |
            ssh deploy@whitehall-backend-2.backend.<%= @environment -%> 'cd /var/apps/whitehall ; govuk_setenv whitehall bundle exec rake db:data:migrate'
    wrappers:
        - ansicolor:
            colormap: xterm

Remove quotes from shell command in Jenkins job

This was preventing the command from being executed.


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

PATH=/usr/local/bin:$PATH

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"

if [ -e $PIDFILE ]; then
  echo -n "Hot Restarting $APPNAME"
  kill -USR1 $(cat $PIDFILE) && success || failure
else
  echo "$APPNAME isn't running.."
  $PUMA_DIR/puma_start.sh
fi

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

function worker_pids() {
  # Get The child pids of the puma master process
  ps -ef|awk '$3=='$1' {print $2}'
}
function workers_new() {
  # Check for nonexistance of old worker pids    Check to ensure the same number of workers are running
  return $(! ps -p $(echo "$1") > /dev/null) && [ "$(printf "%s\n" $1 | wc -l)" -eq "$(worker_pids $2 | wc -l)" ]
}

PATH=/usr/local/bin:$PATH

APPNAME="<%= @name %>"
APP_DIR="<%= @directory %>"

PUMA_DIR="$APP_DIR/shared/puma"
PIDFILE="$APP_DIR/shared/pids/$APPNAME.pid"
PID=$(cat $PIDFILE)
RUNNING_WORKER_PIDS=$(worker_pids $PID)
TIMEOUT=<%= @restart_timeout %>
TIME=0

if ps -p $PID > /dev/null; then
  echo "Hot Restarting $APPNAME"
  kill -USR1 $PID
  until workers_new $RUNNING_WORKER_PIDS $PID || [ "$TIME" -eq  "$TIMEOUT" ]; do
    sleep 1
    TIME=$((TIME+1))
  done

  [ "$TIME" -ne "$TIMEOUT" ] && success || failure
else
  echo "$APPNAME isn't running.."
  $PUMA_DIR/puma_start.sh
fi

Rewrite puma restart script to wait for the entire restart process to ensure that the app is properly restarting


[Unit]
Description=<%= node['moombot']['name'].capitalize %> Daemon

[Service]
User=<%= node['moombot']['name'] %>
PIDFile=<%= node['moombot']['home'] %>/<%= node['moombot']['name'] %>.pid
ExecStart=ruby <%= node['moombot']['home'] %>/daemon start
ExecStop=ruby <%= node['moombot']['home'] %>/daemon stop

[Install]
WantedBy=multi-user.target

[Unit]
Description=<%= node['moombot']['name'].capitalize %> Daemon

[Service]
User=<%= node['moombot']['name'] %>
PIDFile=<%= node['moombot']['home'] %>/<%= node['moombot']['name'] %>.pid
ExecStart=/usr/bin/env ruby <%= node['moombot']['home'] %>/daemon start
ExecStop=/usr/bin/env ruby <%= node['moombot']['home'] %>/daemon stop

[Install]
WantedBy=multi-user.target

Use absolute path for systemd service

Use absolute path for systemd service


      partial :: <%= link_to 'Conf', '/' %>
      → <%= link_to 'Legal', '/legal' %>
      → <%= link_to 'Conduct', 'http://berlincodeofconduct.org/' %>

      partial :: <%= link_to 'Conf', '/' %>
      → <%= link_to 'Legal', '/legal' %>
      → <%= link_to 'Conduct', 'http://berlincodeofconduct.org' %>
      → <%= link_to 'Contact', 'partialconf@gmail.com' %>

Add a contact link in the footer

Add a contact link in the footer


#!/bin/bash
#
# /etc/rc.d/init.d/procps
# chkconfig: 2345 95 05
# description: procps compatible apply_sysctl
#
# this was installed by the sysctl cookbook
# https://supermarket.chef.io/cookbooks/sysctl

# Source function library.
. /etc/rc.d/init.d/functions

case "$1" in
    start)
        apply_sysctl
    ;;
    stop)
    ;;
    restart)
        apply_sysctl
    ;;
    reload)
        apply_sysctl
    ;;
    *)
        echo "Usage: procps [start|stop|reload]"
        exit 1
    ;;
esac

#!/bin/bash
#
# /etc/rc.d/init.d/procps
# chkconfig: 2345 95 05
# description: procps compatible apply_sysctl
#
# this was installed by the sysctl cookbook
# https://supermarket.chef.io/cookbooks/sysctl

# Source function library.
. /etc/rc.d/init.d/functions

<% if platform?('rhel') && node['platform_version'].to_f < 6 -%>
# Apply sysctl settings, including files in /etc/sysctl.d
apply_sysctl() {
    sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
    for file in /etc/sysctl.d/* ; do
        is_ignored_file "$file" && continue
        test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
    done
}
<% end -%>

case "$1" in
    start)
        apply_sysctl
    ;;
    stop)
    ;;
    restart)
        apply_sysctl
    ;;
    reload)
        apply_sysctl
    ;;
    *)
        echo "Usage: procps [start|stop|reload]"
        exit 1
    ;;
esac

Support for RHEL and Centos 5

Support for RHEL and Centos 5

Try to apply comment reviews from svanzoest-cookbooks/sysctl#26


<% if params.key?("error") %>

    <%= params["error"] %>

<% end %>

Add Feature

    <form action="<%= script_name %>/features" method="post">
      <%== csrf_input_tag %>
      <input type="text" name="value" placeholder="ie: admins, orgs_next, etc.">
      <input type="submit" value="Add Feature" class="btn">
    </form>

<% if params.key?("error") %>

    <%= params["error"] %>

<% end %>

Add Feature

    <form action="<%= script_name %>/features" method="post">
      <%== csrf_input_tag %>
      <input type="text" name="value" size="30" placeholder="ie: search, new_pricing, etc.">
      <input type="submit" value="Add Feature" class="btn">
    </form>

      Recommended naming conventions: lower case, snake case, underscores over dashes.
      Good: foo_bar, foo.
      Bad: FooBar, Foo Bar, foo bar, foo-bar.

Add naming help to add new feature in UI


    <%= form.label :title %>

      <%= form.text_field :title, required: true, class: 'span10', required: 'required' %>

    <%= form.label :text %>

      <%= form.text_area :text , label: false, required: false, class: 'text_area span10 html-editor' %>

<% if reply_to %>
<%= form.hidden_field :parent_id, value: reply_to.id %>
<% end %>
<%= render :partial => 'layouts/html_editor' %>

Allow students to upload images in their forum posts.


 <%= comment.user ? comment.user.name : 'Default' %>

<%= comment.body %>

  <% if comment.user.id == session[:current_user] %>
    <%= link_to 'Edit', edit_comment_path(comment) %>
    <%= link_to 'Delete', comment, method: :delete, data: {confirm: "You sure bub?" } %>
  <% end %>

  <button data-id="<%comment.id%>" class="upvote">UpVote</button>

Prepare upvote button for ajax call.

Prepare upvote button for ajax call.


  <%= form_for [object.user, object], remote: true do |f| %>

      <% if button_name == 'Save' %>
        <%= object.item.name %>
      <% else %>
        <%= f.collection_select :item_id, Item.all, :id, :name_with_descr_price, {}, class: 'form-control' %>
      <% end %>

    <%= f.number_field :count, class: 'form-control' %>

    <%= f.submit button_name, class: 'btn btn-sm btn-primary' %>
    <%= javascript_tag do %>
      var id = "#<% if button_name == 'Save' %>edit_<% end %><%= dom_id(f.object) %>";
      var inputs = $(id).parent().find('input');
      $(id).parent().find('input[type="submit"]').on('click', function(e) {
        e.preventDefault();
        $(id).append(inputs.clone());
        $(id).append('<input type="hidden" name="_method" value="<%= action %>">');
        $(id).submit();
      });
    <% end %>
  <% end %>

  <%= form_for [object.user, object], remote: true do |f| %>

      <% if button_name == 'Save' %>
        <%= object.item.name %>
      <% else %>
        <%= f.collection_select :item_id, Item.all, :id, :name_with_descr_price, {}, class: 'form-control' %>
      <% end %>

    <%= f.number_field :count, class: 'form-control' %>

    <%= f.submit button_name, class: 'btn btn-sm btn-primary' %>
    <%= javascript_tag do %>
      var id = "#<% if button_name == 'Save' %>edit_<% end %><%= dom_id(f.object) %>";
      var inputs = $(id).parent().find('input');
      var select = $(id).parent().find('select');

      $(id).parent().find('input[type="submit"]').on('click', function(e) {
        e.preventDefault();
        $(id).append(inputs.clone());
        $(id).append("<input type'hidden' name='reservation[item_id]' value='" + select.val() + "'>");
        $(id).append('<input type="hidden" name="_method" value="<%= action %>">');
        $(id).submit();
      });
    <% end %>
  <% end %>

Fix reservation adding for turbolinks

Fix reservation adding for turbolinks


<%= link_to 'Dashboard', '/dashboard' %>

<%= link_to @device.name, @device %>

Edit

Edit Device

      <%= render 'form' %>

Add breadcrumb to device edit page.

Add breadcrumb to device edit page.


Housing Locations

You can apply to live at these places

    Name
    Location

<% @housing_forms.each do |housing_form| %>

    <%= housing_form.name %>
    <%= housing_form.location %>
    <%= link_to 'Show', housing_form %>
    <%= link_to 'Download', download_housing_form_path(housing_form) %>
    <%= link_to 'Edit', edit_housing_form_path(housing_form) %>
    <%= link_to 'Delete', housing_form, method: :delete, data: { confirm: 'Are you sure?' } %>

<% end %>

<%= link_to 'Add a housing form', new_housing_form_path, class: "btn btn-lg btn-default" %>

Fix table heading divider length

Fix table heading divider length


<!DOCTYPE html>

  <title><%= t(:site_title) %></title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= csrf_meta_tags %>

    <% if content_for?(:title) %>

<%= yield :title %>

    <% end %>

    <%= yield :hero %>

          <%= yield %>

  <%= yield :extra_javascript %>

Load extra javascript in before closing body


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

<%= yield %>

</body>
</html>

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

<%= yield %>

</body>
</html>

Add javascript and stylesheet back into app layout


<%= notice %>

Visual Groups

      Name
      Reviewed

    <% @visual_groups.each do |visual_group| %>

        <%= visual_group.group_name.text_name %>
        <%= visual_group.reviewed %>
        <%= link_to 'Show', visual_group %>
        <%= link_to 'Edit', edit_visual_group_path(visual_group) %>
        <%= link_to 'Destroy', visual_group, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= link_to 'New Visual Group', new_visual_group_path %>

<%= notice %>

Visual Groups

      Name
      Reviewed

    <% @visual_groups.each do |visual_group| %>

        <%= visual_group.group_name&.text_name %>
        <%= visual_group.reviewed %>
        <%= link_to 'Show', visual_group %>
        <%= link_to 'Edit', edit_visual_group_path(visual_group) %>
        <%= link_to 'Destroy', visual_group, method: :delete, data: { confirm: 'Are you sure?' } %>

    <% end %>

<%= link_to 'New Visual Group', new_visual_group_path %>

Allow for VisualGroups with nil group_names


Hey <%= @user.username %>,

We designed  Tips on Rails to be a one-stop shop for increasing your knowledge about Ruby on Rails. It’s our focus to create a unique environment where Rails developers can share their tips about everything Rails. It's built for you and run by you. We hope that with your help we can build a library of detailed tips about every aspect of Rails development.

To get the most out of Tips on Rails, dive right in and start <%= link_to 'adding tips', new_tip_url %>. If you feel like you’ve got nothing to offer at this time, check out <%= link_to "other Rails developers' tips", tips_url %> and bookmark them! You’ll find something to spark your interest for sure.

       <%= link_to "Where's this lead?", new_tip_url, class: 'btn-primary' %>

You have tips. We have tips. Let's put them on Rails.

      — Tips on Rails Team

Hey <%= @user.username %>,

We designed  Tips on Rails to be a one-stop shop for increasing your knowledge about Ruby on Rails. It’s our focus to create a unique environment where Rails developers can share their tips about everything Rails. It's built for you and run by you. We hope that with your help we can build a library of detailed tips about every aspect of Rails development.

To get the most out of Tips on Rails, dive right in and start <%= link_to 'adding tips', new_tip_url %>. If you feel like you’ve got nothing to offer at this time, check out <%= link_to "other Rails developers' tips", tips_url %> and bookmark them! You’ll find something to spark your interest for sure.

You have tips. We have tips. Let's put them on Rails.

      — Tips on Rails Team

Remove the unneeded button from welcome email