Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
creecros committed Feb 16, 2023
1 parent 0ee1037 commit 00fd5cf
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getPluginAuthor()

public function getPluginVersion()
{
return '1.5.3';
return '1.5.4';
}

public function getPluginHomepage()
Expand Down
5 changes: 3 additions & 2 deletions Template/task/metasummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
<?php else: ?>
<details class="accordion-section" <?= empty($metadata) ? 'accordion-collapsed' : 'open' ?>>
<summary class="accordion-title">
<?= t('Custom Fields') ?>
<h3><?= t('Custom Fields') ?></h3>
</summary>
<div class="accordion-content">
<article class="markdown">
<?= $this->render('metaMagik:task/metatable', array(
'custom_fields' => $custom_fields,
'task' => $task,
'editable' => $edits
'editable' => $edits,
'printlayout' => (!isset($printlayout)) ? false : $printlayout
)) ?>
</article>
</div>
Expand Down
40 changes: 40 additions & 0 deletions Template/task/metatable.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
<?php if ($printlayout): ?>
<div class="task-summary-container color-<?= $task['color_id'] ?>" width="100%" style="padding-top:1px;vertical-align:top">
<?php for ($i = 1; $i <=4; $i++): ?>
<div class="column" width="30%">
<table style="padding:1px;vertical-align:top">


<?php foreach ($custom_fields as $custom_field): ?>
<?php if (!empty($this->task->taskMetadataModel->get($task['id'], $custom_field['human_name'], '')) && $custom_field['column_number'] == $i): ?>
<tr>
<td style="padding-top:10px;vertical-align:top"><strong><?= $custom_field['beauty_name'] ?>:</strong>
<?php if ($custom_field['data_type'] == 'textarea'): ?>
<?= $this->text->markdown($this->task->taskMetadataModel->get($task['id'], $custom_field['human_name'], '')) ?></td>
<?php elseif ($custom_field['data_type'] == 'number'): ?>
<?= $custom_field['options'].$this->task->taskMetadataModel->get($task['id'], $custom_field['human_name'], '') ?></td>
<?php elseif ($custom_field['data_type'] == 'date'): ?>
<?php $date = strtotime($this->task->taskMetadataModel->get($task['id'], $custom_field['human_name'], '')); ?>
<?= $this->dt->date($date) ?></td>
<?php else: ?>
<?= $this->task->taskMetadataModel->get($task['id'], $custom_field['human_name'], '') ?></td>
<?php endif ?>
</tr>
<?php endif ?>
<?php endforeach ?>
</table>
</div>
<?php endfor ?>
</div>
<style>
.column {
display:inline-table;
padding-left: 25px;
padding-right:65px;
padding-top:5px;
padding-bottom:5px;
vertical-align:top;
}
</style>
<?php else: ?>
<style>
.column {
float: left;
Expand Down Expand Up @@ -53,3 +92,4 @@ class="table-striped table-scrolling"
</div>
<?php endfor ?>
</div>
<?php endif ?>

0 comments on commit 00fd5cf

Please sign in to comment.