Skip to content
Permalink
674589657f
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (26 sloc) 778 Bytes
app.controller('CompetitionCtrl', ['$scope', function ($scope) {
$scope.page.title = 'Competitions';
$scope.page.id = 'comps';
$scope.page.blackNav = true;
}]);
/* if timeToView | timeToVote
Show DOM image grid. Load with images
if timeToVote
Add vote buttons
vote onClick: fill(heartUI). Add {username: true} to photo/votes
firebase/comps/Time/votes {
myUsername { -- rule: limit count here to 5
userID-I-VotedFor: true
}
}
if timeToEnter
Show enter DOM
upload onSubmit, add pic to firebase storage && firebase/competitions/Time/photos
firebase/comps/Time/photos {
myUsername {
photoURL: firebaseStorageurl.com/asdf -- write rule, only write to your id
}
}
if id-not-found in firebaseObject
Show DOM template: "Sorry, no competition with that name"
*/