Skip to content

Commit

Permalink
Merge branch 'master' of github.com:morbidick/loc3
Browse files Browse the repository at this point in the history
  • Loading branch information
morbidick committed Dec 11, 2014
2 parents d8fe994 + c5c1ecf commit 3ea17fe
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 10 deletions.
3 changes: 3 additions & 0 deletions client/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<ul class="nav navbar-nav">
{{> findNav}}
{{> scanNav}}
<li>
<a href="{{pathFor 'transportsPage'}}">Transport</a>
</li>
<li>
<a href="{{pathFor 'mapsPage'}}">Map</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion client/templates/pages/byId.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="findPageId">
{{> findId}}
{{> presentId}}
{{> presentId idStore="findById"}}
</template>

<template name="findById">
Expand Down
4 changes: 2 additions & 2 deletions client/templates/pages/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ Template.presentValue.events({
Template.presentId.helpers({
// Get a single doc from our db referred
"fromdb": function() {
var itemId, data;
itemId = Session.get("findById");
var itemId, data;
itemId = Session.get(this.idStore);
if (!itemId) {
return {found: false};
}
Expand Down
182 changes: 175 additions & 7 deletions client/templates/pages/relocate.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,190 @@
<div class="row">
<div class="col-sm-6">
{{> relocateScan}}
{{> relocateResult}}
{{> presentId idStore="relocateId"}}
</div>
<div class="col-sm-6">
{{> relocateForm}}
{{> relocateMode}}
</div>
</div>
</template>

<template name="relocateScan">
scan
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="scan" class="col-sm-3 control-label">Scan</label>
<div class="col-sm-9">
<input class="form-control" id="scan" placeholder="barcode">
</div>
</div>
</form>
</template>

<template name="relocateResult">
result
<template name="relocateMode">
<div class="btn-toolbar" role="toolbar" aria-label="relocate options">

<div class="btn-group" role="group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="relocationRadio1" id="radioWorld" autocomplete="off" value="world" checked> World
</label>

<label class="btn btn-primary">
<input type="radio" name="relocationRadio1" id="radioHalleH" autocomplete="off" value="halleh"> Halle H
</label>

<label class="btn btn-primary">
<input type="radio" name="relocationRadio1" id="radioCch" autocomplete="off" value="cch"> Congress
</label>

<label class="btn btn-primary">
<input type="radio" name="relocationRadio1" id="radioTransport" autocomplete="off" value="transport"> Transport
</label>
</div>

<div class="btn-group" role="group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="checkbox" name="relocateBulkOption" id="relocateBulkOption" autocomplete="off" value="bulk" checked> Bulk
</label>
<label class="btn btn-primary active">
<input type="checkbox" name="relocateStateOption" id="relocateStateOption" autocomplete="off" value="bulk" checked>State
</label>
<label class="btn btn-primary active">
<input type="checkbox" name="relocateAutolocationOption" id="relocateAutolocationOption" autocomplete="off" value="bulk" checked> Autolocation
</label>
</div>

</div>
<form class="form-horizontal" role="form">
{{#if modeIs "world"}}
{{> worldForm}}
{{/if}}
{{#if modeIs "halleh"}}
{{> hallehForm}}
{{/if}}
{{#if modeIs "cch"}}
{{> cchForm}}
{{/if}}
{{#if modeIs "transport"}}
{{> transportForm}}
{{/if}}
<div class="form-group">
<label for="relocateComment" class="col-sm-3 control-label">Comment</label>
<div class="col-sm-12">
<input class="form-control" id="relocateComment" placeholder="Comment">
</div>
</div>
</form>
</template>

<template name="worldForm">
<div class="form-group">
<label class="col-sm-4 control-label">Location</label>
<div class="col-sm-8">
<p class="form-control-static">World</p>
</div>
</div>
</template>

<template name="hallehForm">
<div class="form-group">
<label class="col-sm-4 control-label">Location</label>
<div class="col-sm-8">
<p class="form-control-static">Halle H</p>
</div>
</div>
{{> sublocationsHalleH}}
</template>

<template name="cchForm">
<div class="form-group">
<label class="col-sm-4 control-label">Location</label>
<div class="col-sm-8">
<p class="form-control-static">CCH</p>
</div>
</div>
</template>

<template name="relocateForm">
form
<template name="transportForm">
<div class="form-group">
<label class="col-sm-4 control-label">Location</label>
<div class="col-sm-8">
<p class="form-control-static">Transport</p>
</div>
</div>
</template>

<template name="sublocationsHalleH">
<div class="form-group">
<label type="text" for="relocationCustom" class="col-sm-4 control-label">Sublocation</label>
<div class="col-sm-4">
<div class="radio">
<label>
<input id="relocationCustom" name="relocationRadio2" value="custom" type="radio" checked> Custom
</label>
</div>
</div>
<div class="col-sm-4">
<div class="radio">
<label>
<input id="relocationNOC" name="relocationRadio2" value="noc" type="radio"> NOC
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-4">
<div class="radio">
<label>
<input id="relocationSeidenstrasse" name="relocationRadio2" value="seidenstrasse" type="radio"> Seidenstrasse
</label>
</div>
</div>
<div class="col-sm-4">
<div class="radio">
<label>
<input id="relocationLockdown" name="relocationRadio2" value="lockdown" type="radio"> Lockdown
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-4">
<div class="radio">
<label>
<input id="relocationClub" name="relocationRadio2" value="club" type="radio"> Club
</label>
</div>
</div>
<div class="col-sm-4">
<div class="radio">
<label>
<input id="relocationPA" name="relocationRadio2" value="pa" type="radio"> PA
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-4">
<div class="radio">
<label>
<input id="relocationFurniture" name="relocationRadio2" value="furniture" type="radio"> Furniture
</label>
</div>
</div>
<div class="col-sm-4">
<div class="radio">
<label>
<input id="relocationDividers" name="relocationRadio2" value="dividers" type="radio"> Dividers
</label>
</div>
</div>
</div>
{{#if sublocationIs "custom"}}
<div class="form-group">
<label for="customSublocation" class="col-sm-3 control-label">Custom</label>
<div class="col-sm-12">
<input class="form-control" id="customSublocation" placeholder="sublocation">
</div>
</div>
{{/if}}
</template>
2 changes: 2 additions & 0 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ Router.route('/scan/single', {name: 'singlePage'});
Router.route('/scan/bulk', {name: 'bulkPage'});
Router.route('/scan', {name: 'scanPage'});

Router.route('/transports', {name: 'transportsPage'});

Router.route('/maps', {name: 'mapsPage'});
4 changes: 4 additions & 0 deletions server/publications.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Meteor.publish('items', function() {
return Items.find();
});
Meteor.publish('transports', function() {
return Transports.find();
});

Meteor.publish("userData", function () {
if (this.userId) {
return Meteor.users.find({_id: this.userId},
Expand Down

0 comments on commit 3ea17fe

Please sign in to comment.