Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" class="no-js lt-ie10 lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" class="no-js lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="no-js lt-ie10"> <![endif]-->
<!--[if gt IE 9]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="https://lh4.googleusercontent.com/-h55ZW-Tr4dQ/Uzx9rhyMs5I/AAAAAAAAAYU/aQShXhyKH_k/w426-h358/favicon-6.ico">
<meta charset="utf-8">
namespace :brake do
desc "Run a task on a remote server."
# run like: cap brake:invoke task=a_certain_task
task :invoke do
run("cd #{deploy_to}/current; /usr/bin/env bundle exec rake #{ENV['task']} RAILS_ENV=production")
end
end
require 'csv'
csv_file_path = 'db/process.csv'
@page = Alchemy::Page.find_by_name('process')
CSV.foreach(csv_file_path) do |row|
process = @page.elements.create_from_scratch(:name => 'process_list')
headline = process.contents.where(:name => 'headline').first.essence
headline.body = row[0]
<div class="content">
<div class="opening">
<p>
<%= render_elements %>
</p>
</div>
<% Team.order("position asc").all.in_groups_of(2, false) do |teams| %>
<div id="team_row">
<% teams.each do |member| %>
<div class="<%= cycle('teamodd', 'teameven') %>">
update: (e, ui) ->
item_id = ui.item.data('item_id')
position = ui.item.index()
$.ajax(
type: 'POST'
url: $(this).data('update_url')
dataType: 'json'
# the :thing hash gets passed to @thing.attributes
# row_order is the default column name expected in ranked-model
jQuery ->
$('#team_list').sortable(
axis: 'y'
items: '.item'
handle: '.handle'
update: ->
alert('updated!')
);
<div class="content">
<div class="opening">
<p>
Here at Rails Dog we believe that the success of any organization is largely determined by the quality of the people you have running it. That's why we have taken great care in building our team. In addition to having a strong technical background, we believe our programmers should also know a little something about business. Each member of our "pack" knows how to deliver outstanding customer service. We understand that you are putting your business on the line when making a major technology investment and we take the responsibility seriously.
</div>
<% Team.all.in_groups_of(2, false) do |teams| %>
<div id="team_row">
<% teams.each do |member| %>
<div class="<%= cycle('teamodd', 'teameven') %>">
<div class="piclink">
<tr class="<%= cycle('even', 'odd') %>">
<td class="login"><%= team.name %></td>
<td class="name"><%= team.bio -%></td>
<td class="name"><%= team.linkedin -%></td>
<td class="name"><%= team.github -%></td>
<td class="tools">
<%- permitted_to?(:destroy, :admin_teams) do -%>
<%= link_to_confirmation_window(
'',
_t("confirm_to_delete_team"),
#Mild score
score = "breathlessness=6&cough=0&nasal_congestion=0&peak_flow_measurement=699&sore_throat=0&sputum_color=0&sputum_consistency=0&sputum_quantity=0&status=0&temp_over_100=0&wheeze=0"
report(score, 34)
#Moderate score
score = "breathlessness=6&cough=0&nasal_congestion=0&peak_flow_measurement=66&sore_throat=0&sputum_color=0&sputum_consistency=0&sputum_quantity=0&status=0&temp_over_100=0&wheeze=0"
report(score, 34)
#Severe score
score = "breathlessness=10&cough=1&nasal_congestion=1&peak_flow_measurement=66&sore_throat=1&sputum_color=3&sputum_consistency=2&sputum_quantity=2&status=0&temp_over_100=1&wheeze=1"
#Mild score
score = "breathlessness=6&cough=0&nasal_congestion=0&peak_flow_measurement=699&sore_throat=0&sputum_color=0&sputum_consistency=0&sputum_quantity=0&status=0&temp_over_100=0&wheeze=0"
report(score, 34)
#Moderate score
score = "breathlessness=6&cough=0&nasal_congestion=0&peak_flow_measurement=66&sore_throat=0&sputum_color=0&sputum_consistency=0&sputum_quantity=0&status=0&temp_over_100=0&wheeze=0"
report(score, 34)
#Severe score
score = "breathlessness=10&cough=1&nasal_congestion=1&peak_flow_measurement=66&sore_throat=1&sputum_color=3&sputum_consistency=2&sputum_quantity=2&status=0&temp_over_100=1&wheeze=1"