Skip to content

Commit

Permalink
[refs #415] Adds default text for empty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
vrocha committed May 30, 2017
1 parent 35835ed commit 4bb75fe
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions frontend/app/templates/details-new.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ <h1>{{ school.name }}</h1>

<div class="col-md-6">
<h2>Contact &amp; Hours</h2>
<p><strong>Address:</strong> {{ school.address }}</p>
<p><strong>Phone:</strong> {{ school.profile.phone_number }}</p>
<p><strong>Address:</strong> {{ school.address || "Data not provided" }}</p>
<p><strong>Phone:</strong> {{ school.profile.phone_number || "Data not provided" }}</p>
<p><strong>Website:</strong> <a class="force-line-break" href="{{ school.profile.website_url | uri }}">{{ school.profile.website_url | uri }}</a></p>
<p><strong>School Day: </strong> {{ school.profile.school_hours }}</p>
<p><strong>Before Care:</strong> {{ school.profile.before_care_hours }}</p>
<p><strong>After Care:</strong> {{ school.profile.after_care_hours }}</p>
<p><strong>School Day: </strong> {{ school.profile.school_hours || "Data not provided" }}</p>
<p><strong>Before Care:</strong> {{ school.profile.before_care_hours || "Data not provided" }}</p>
<p><strong>After Care:</strong> {{ school.profile.after_care_hours || "Data not provided" }}</p>
</div>
<div class="col-md-6">
<h2>School Information</h2>
<p><strong>Principal:</strong> {{ school.profile.principal_name }} (since {{ school.profile.principal_start_year }})</p>
<p><strong>Year open:</strong> {{ school.profile.year_opened }}</p>
<p><strong>Theme:</strong> {{ school.profile.theme }}</p>
<p><strong>Principal:</strong> {{ school.profile.principal_name || "Data not provided" }} (since {{ school.profile.principal_start_year }})</p>
<p><strong>Year open:</strong> {{ school.profile.year_opened || "Data not provided" }}</p>
<p><strong>Theme:</strong> {{ school.profile.theme || "Data not provided" }}</p>
<p><strong>Uniform:</strong> {{ school.profile.uniform_required | true_false }}</p>

</div>
Expand All @@ -58,17 +58,19 @@ <h2>Admission Policy</h2>
<div class="article-content">
<p>{{ school.profile.admissions_policy_type }}</p>
<p><strong>Lottery Priorities</strong>:</p>
<ol>
<ol ng-if="school.profile.lottery_priority_1 || school.profile.lottery_priority_2 || school.profile.lottery_priority_3 || school.profile.lottery_priority_4 || school.profile.lottery_priority_5">
<li data-ng-show="school.profile.lottery_priority_1">{{ school.profile.lottery_priority_1 }}</li>
<li data-ng-show="school.profile.lottery_priority_2">{{ school.profile.lottery_priority_2 }}</li>
<li data-ng-show="school.profile.lottery_priority_3">{{ school.profile.lottery_priority_3 }}</li>
<li data-ng-show="school.profile.lottery_priority_4">{{ school.profile.lottery_priority_4 }}</li>
<li data-ng-show="school.profile.lottery_priority_5">{{ school.profile.lottery_priority_5 }}</li>
</ol>
<p ng-if="!(school.profile.lottery_priority_1 || school.profile.lottery_priority_2 || school.profile.lottery_priority_3 || school.profile.lottery_priority_4 || school.profile.lottery_priority_5)">Data not provided</p>
<p><strong>Acceptance rate</strong></p>
<p><label class="label label-danger">Coming Soon</label></p>
<p><strong>Deadline</strong></p>
<p>{{ school.profile.lottery_deadline | date:format:'MMMM d, y' }}</p>
<p ng-if="school.profile.lottery_deadline">{{ school.profile.lottery_deadline | date:format:'MMMM d, y' }}</p>
<p ng-if="!school.profile.lottery_deadline">Data not provided</p>
<p><strong>Applying to School</strong></p>
<a class="btn btn-success" href="{{ school.profile.learn_more_link | uri }}">Learn more</a>
<p><strong>Feeder School Status</strong></p>
Expand All @@ -82,12 +84,14 @@ <h2>Admission Policy</h2>
<h2>School Services</h2>
<div class="article-content">
<p>This school provides the following services to students:</p>
<p><strong>Transportation: </strong> <span title="Transportation provided">{{ school.profile.transportation_display }} <span ng-bind-html="school.profile.transportation_explanation | linky"></span></span></p>
<p><strong>Lunch: </strong><span title="Lunch provided">{{ school.profile.lunch_served_display }}</span> {{ school.profile.lunch_free_and_reduced }} <span ng-bind-html="school.profile.lunch_explanation | linky"></span></p>
<p><strong>Breakfast: </strong><span title="Breakfast provided">{{ school.profile.breakfast_served_display }}</span> {{ school.profile.breakfast_free_and_reduced }} <span ng-bind-html="school.profile.breakfast_explanation | linky"></span></p>
<p><strong>Extended care: </strong><span title="extended care provided">{{ extendedCare(school.profile) }}</span></p>
<p><strong>Extended care cost: </strong>{{ school.profile.extended_care_cost }}</p>
<p><strong>Extended care financial assistance: </strong> <span ng-bind-html="school.profile.extended_care_financial_assistance | linky"></span></p>
<p><strong>Transportation: </strong> <span title="Transportation provided">{{ school.profile.transportation_display || "Data not provided" }} <span ng-bind-html="school.profile.transportation_explanation | linky"></span></span></p>
<p><strong>Lunch: </strong><span title="Lunch provided">{{ school.profile.lunch_served_display || "Data not provided" }}</span> {{ school.profile.lunch_free_and_reduced || "Data not provided" }} <span ng-bind-html="school.profile.lunch_explanation | linky"></span></p>
<p><strong>Breakfast: </strong><span title="Breakfast provided">{{ school.profile.breakfast_served_display || "Data not provided" }}</span> {{ school.profile.breakfast_free_and_reduced || "Data not provided" }} <span ng-bind-html="school.profile.breakfast_explanation | linky"></span></p>
<p><strong>Extended care: </strong><span title="extended care provided">{{ extendedCare(school.profile) || "Data not provided" }}</span></p>
<p><strong>Extended care cost: </strong>{{ school.profile.extended_care_cost || "Data not provided" }}</p>
<p><strong>Extended care financial assistance: </strong>
<span ng-bind-html="school.profile.extended_care_financial_assistance | linky" ng-if="school.profile.extended_care_financial_assistance"></span>
<span ng-if="!school.profile.extended_care_financial_assistance">Data not provided</span></p>

</div>
</article>
Expand Down Expand Up @@ -183,22 +187,25 @@ <h2>Teacher Satisfaction</h2>
<h2>Targeted Academic Offerings</h2>
<div class="article-content">
<p>Staff and additional resources provided for:</p>
<p><strong>Our Theme: </strong> {{ school.profile.other_academic }}</p>
<p><strong>Our Theme: </strong> {{ school.profile.other_academic || "Data not provided" }}</p>
<p><strong>English Language Learners: </strong><span ng-bind-html=" school.profile.english_language_learner | linky"></span></p>
<p><strong>Special Education (Exceptional Children): </strong> <span ng-bind-html=" school.profile.special_education | linky"></span></p>
<p><strong>Academically & Intellectually Gifted: </strong> {{ school.profile.gifted_education }}</p>
<p><strong>Special Education (Exceptional Children): </strong>
<span ng-bind-html=" school.profile.special_education | linky" ng-if="school.profile.special_education"></span>
<span ng-if="!school.profile.special_education">Data not provided</span>
</p>
<p><strong>Academically & Intellectually Gifted: </strong> {{ school.profile.gifted_education || "Data not provided" }}</p>
</div>
</article>
</div>
<div class="col-md-6">
<article>
<h2>Extracurricular Offerings</h2>
<div class="article-content">
<p><strong>Academic: </strong> {{ school.profile.academic }}</p>
<p><strong>Arts: </strong> {{ school.profile.arts }}</p>
<p><strong>Sports: </strong> {{ school.profile.sports }}</p>
<p><strong>Service & leadership: </strong> {{ school.profile.service_leadership }}</p>
<p><strong>Other: </strong> {{ school.profile.other }}</p>
<p><strong>Academic: </strong> {{ school.profile.academic || "Data not provided" }}</p>
<p><strong>Arts: </strong> {{ school.profile.arts || "Data not provided" }}</p>
<p><strong>Sports: </strong> {{ school.profile.sports || "Data not provided" }}</p>
<p><strong>Service & leadership: </strong> {{ school.profile.service_leadership || "Data not provided" }}</p>
<p><strong>Other: </strong> {{ school.profile.other || "Data not provided" }}</p>
</div>
</article>
</div>
Expand Down

0 comments on commit 4bb75fe

Please sign in to comment.