You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
the_sins_we_commit/app/views/angular_partial.html.erb

42 lines
1.7 KiB

<header ng-controller="HeaderController as header">
<h1>Greetings {{header.current_user.email}}, you are a glorious reprobate!</h1>
</header>
<main ng-controller="TransgressionsController as transgressionsCtrl">
<h2>This is How You've Pleased Me: Your Current Transgressions</h2>
<ul>
<li ng-repeat="transgression in transgressionsCtrl.current_user_transgressions">
Sin Type: {{transgression.sin_type}}
<br/>
Description: {{transgression.description}}
<h3>Show me what you got:</h3>
<ul>
<li ng-repeat="confession in transgression.confessions">
What happened: {{confession.description}}
<br/>
When: {{confession.occurred_at}}
</li>
</ul>
<h3>Add a confession (yum):</h3>
<form ng-submit="transgressionsCtrl.createConfession(transgression.id)">
<input type="text" ng-model="transgressionsCtrl.newConfessionDescription" placeholder="How did you please me?"/>
<br/>
<input type="text" ng-model="transgressionsCtrl.newConfessionDate" placeholder="When did it happen?"/>
<br/>
<input type="submit" value="YESSS!" />
<br/>
<br/>
</form>
</li>
</ul>
<h2>The Flesh is Weak: Admit Your Transgressions</h2>
<form ng-submit="transgressionsCtrl.createTransgression()">
<select ng-model="transgressionsCtrl.newTransgressionSinType">
<option ng-repeat="sinType in transgressionsCtrl.SIN_TYPES">{{sinType}}</option>
</select>
<input type="text" ng-model="transgressionsCtrl.newTransgressionDescription" placeholder="How Have You Pleased Me?"/>
<input type="submit" value="Feed Me Your Regrets" />
</form>
</main>