This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>Favorite Activities</h2> | |
<ul> | |
<% User.find(current_user.id).activities.each do |a| %> | |
<li><%= a.name %> | |
<%= form_for @user, :url => removefavorite_path do |f| %> | |
<%= f.hidden_field :activity_id, :value => a.id %> | |
<%= f.submit('Remove') %> | |
<% end %> | |
</li> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Event < ActiveRecord::Base | |
attr_accessible :needed, :start, :location, :league, :skill_level, :field_type, :organizer, :note, :status | |
has_and_belongs_to_many :users | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="soloGameSummary"> | |
<div class="game-summary"> | |
{{#if organizing}} | |
<strong class="text-{{#if past startsAt}}muted{{else}}info{{/if}}"> | |
{{participle startsAt past='Organized' present='Organizing'}} | |
</strong> | |
{{else}} | |
{{#if playing}} | |
<strong class="text-{{#if past startsAt}}muted{{else}}info{{/if}}"> | |
{{participle startsAt past='Played' present='Playing'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint multistr:true */ | |
var text = "Stewart containing some text for Stewart written and developed by Stewart"; | |
var myName = "Stewart"; | |
var hits = []; | |
/* assign the value of 0 to i and continue to the loop while i is less than the length of the variable 'text', and add 1 to i after executing the code block */ | |
for (i = 0; i < text.length + 1; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="favoriteGames"> | |
<header class="bar bar-nav"> | |
<i class="icon-cancel pull-left header"> | |
</i> | |
<button class="btn btn-link btn-nav pull-left header cancel-improve" id="cancelImprove"> | |
Cancel | |
</button> | |
<h1 class="title header">Favorite games</h1> | |
</header> | |
<div class="content"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if is_tutor or is_superuser %} | |
<span id="phrasebank-tooltip" class="open-phrasebank insert" | |
data-title="Easily insert saved phrases. Use presets or create custom phrases to quickly answer student questions." | |
data-placement="right" | |
data-name="lesson-help-bubble-chat" | |
data-trigger="manual"></span> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toggle: function() { | |
if (this.isExpanded()) { | |
this.minimize(); | |
if (show === true) { | |
this.isVisible = true; | |
$("#phrasebank-tooltip").tooltip("show"); | |
} else { | |
this.isVisible = false; | |
$("#phrasebank-tooltip").tooltip("hide"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="written-lesson-modal hidden"> | |
<div class="modal-header"> | |
<h3>Request a Written Lesson</h3> | |
</div> | |
<div class="modal-body"> | |
<form id="new-proposal" class="proposal-form form-horizontal" method="POST" action=""> | |
{% load tags %} | |
{% csrf_token %} | |
{% if is_parent or is_tutor %} | |
<div class="control-group"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before | |
var ExplanationReviewForm = Backbone.View.extend({ | |
ENDPOINTS: {}, | |
$form: null, | |
submitted: false, | |
positiveReview: false, | |
events: { | |
'click .thumbs-up': 'submitPositiveReview', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var VenuesView = Backbone.View.extend({ | |
tagName: "ul", | |
id: "venues", | |
initialize: function(options){ | |
this.bus = options.bus; | |
}, | |
render: function(){ |
OlderNewer