Skip to content

Instantly share code, notes, and snippets.

Router.configure
layoutTemplate: 'layout'
notFoundTemplate: 'notFound'
loadingTemplate: 'loading'
onBeforeAction: (pause) ->
except = ['_login','logout']
route = this.route.name
# console.log 'Checking to see if we have a user.'
# console.log except.none(route)
# console.log this.route.name
@Media = new Meteor.Collection('media')
Media.allow
insert: (userId, doc) ->
return userId && (doc.user == userId)
update: (userId, doc, fields, modifier) ->
return userId == doc.user
remove: (userId, doc) ->
Package.describe({
summary: "Arrestreport Management for the !nservice App",
version: "0.1",
name: "ch-arrestreport"
});
Package.on_use(function (api) {
api.versionsFrom("[email protected]");
both = ['client', 'server'];
api.use('coffeescript');
meteor update
Figuring out the best package versions to use. This may take a moment.
This project is at the latest release which is compatible with your
current package constraints.
// server
Meteor.publish('pages', function () {
return Pages.find({});
});
Pages.allow({
update: function () {
return true;
}
});
if parent_id?
activityOfInterest = ActivityOfInterest.find().fetch()
data = []
for activity in activityOfInterest
doc = Activities.findOne({_id: activity.activity_id})
data.push(doc)
else
data = Activities.find({},{sort: {createdAt: 1}}).fetch()
return data
{{#each accordions}}
{{#accordionPanel}}
{{> UI.dynamic template=_template}}
{{/accordionPanel}}
{{/each}}
<template name='_listForm'>
{{#if UI.contentBlock}}
{{> UI.contentBlock}}
{{/if}}
{{#with data}}
<form id='{{_id}}_form' class="{{../css}}" name='{{../form.name}}' role='form'>
<div class='row'>
{{#each ../fields}}
{{#formField}}{{/formField}}
{{/each}}
<template name='_listForm'>
{{> UI.contentBlock}}
{{#with data}}
<form id='{{_id}}_form' class="{{../css}}" name='{{../form.name}}' role='form'>
<div class='row'>
{{#each ../fields}}
{{#formField}}{{/formField}}
{{/each}}
<input type='submit' value='Save' class='btn btn-success col-md-4 col-md-offset-1'>
<button class="close-form btn btn-danger col-md-4 col-md-offset-2">Cancel</button>
@digilord
digilord / gist:d9bfcb473cc3cef673f4
Created June 25, 2014 19:48
Block Helper Example
<template name='testing'>
{{#myOuterBlockHelper mydata='SOMETHING'}}
{{#myInnerBlockHelper1}}helper 1!{{/myInnerBlockHelper1}}
{{else}}
<h1> Some static Content </h1>
{{/myOuterBlockHelper}}