-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a menu structure in the side bar by category. And brings the formatting into twfy from parlparse.
- Loading branch information
Showing
4 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
www/includes/easyparliament/templates/html/mp/_register_entry.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php /** @var MySociety\TheyWorkForYou\DataClass\Regmem\InfoEntry $entry */ ?> | ||
|
||
<div class="interest-item" id="<?= $entry->comparable_id ?>"> | ||
|
||
<?php if (!$entry->details->isEmpty()): ?> | ||
<?php print_r($entry->details) ?> | ||
|
||
<?php if ($entry->content): ?> | ||
<?php if ($entry->info_type == "subentry"): ?> | ||
<h6 class="interest-summary"><?= htmlspecialchars($entry->content) ?></h6> | ||
<?php else: ?> | ||
<h4 class="interest-summary"><?= htmlspecialchars($entry->content) ?></h4> | ||
<?php endif; ?> | ||
|
||
<?php endif; ?> | ||
<ul class="interest-details-list"> | ||
<?php foreach ($entry->details as $detail): ?> | ||
<?php include '_register_field.php'; ?> | ||
<?php endforeach; ?> | ||
<?php if ($entry->date_registered): ?> | ||
<li class="registration-date">Registration Date: <?= htmlspecialchars($entry->date_registered) ?></li> | ||
<?php endif; ?> | ||
<?php if ($entry->date_published): ?> | ||
<li class="published-date">Published Date: <?= htmlspecialchars($entry->date_published) ?></li> | ||
<?php endif; ?> | ||
<?php if ($entry->date_updated): ?> | ||
<li class="last-updated-date">Last Updated Date: <?= htmlspecialchars($entry->date_updated) ?></li> | ||
<?php endif; ?> | ||
</ul> | ||
<?php endif; ?> | ||
|
||
</ul> | ||
<?php if (!$entry->sub_entries->isEmpty()): ?> | ||
<h5 class="child-item-header">Specific work or payments</h5> | ||
<div class="interest-child-items" id="parent-<?= $entry->comparable_id ?>"> | ||
<?php foreach ($entry->sub_entries as $subentry): ?> | ||
<?php $parent_entry = $entry; ?> | ||
<?php $entry = $subentry; ?> | ||
<?php include '_register_entry.php'; ?> | ||
<?php $entry = $parent_entry; ?> | ||
<?php endforeach; ?> | ||
</div> | ||
<?php endif; ?> | ||
|
||
</div> |
18 changes: 18 additions & 0 deletions
18
www/includes/easyparliament/templates/html/mp/_register_field.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php /** @var MySociety\TheyWorkForYou\DataClass\Regmem\Detail $detail */ ?> | ||
|
||
<li class="interest-detail"> | ||
<span class="interest-detail-name"><?= $detail->display_as ?>: </span> | ||
<?php if ($detail->type == "container"): ?> | ||
<ul class="interest-detail-values-groups"> | ||
<?php $upper_detail = $detail; ?> | ||
<?php foreach ($detail->sub_details() as $detail): ?> | ||
<?php include '_register_field.php'; ?> | ||
<?php endforeach; ?> | ||
<?php $detail = $upper_detail; ?> | ||
</ul> | ||
<?php else : ?> | ||
<?php if ($detail->value): ?> | ||
<span class="interest-detail-value"><?= htmlspecialchars($detail->value) ?></span> | ||
<?php endif; ?> | ||
<?php endif; ?> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters