-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtask-details.php
46 lines (36 loc) · 1.43 KB
/
task-details.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* Task details
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2024 Pronamic
* @license GPL-2.0-or-later
* @package Pronamic\Orbis\Tasks
*/
namespace Pronamic\Orbis\Tasks;
if ( ! \defined( 'ABSPATH' ) ) {
exit;
}
$task = Task::from_post( \get_post() );
?>
<div class="card mb-3">
<div class="card-header"><?php \esc_html_e( 'Task details', 'orbis-tasks' ); ?></div>
<div class="card-body">
<div class="content">
<dl>
<dt><?php \esc_html_e( 'Posted on', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( get_the_date() ); ?></dd>
<dt><?php \esc_html_e( 'Posted by', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( \get_the_author() ); ?></dd>
<dt><?php \esc_html_e( 'Assignee', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( null === $task->assignee_id ? '—' : \get_user_by( 'ID', $task->assignee_id )->display_name ); ?></dd>
<dt><?php \esc_html_e( 'Due at', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( null === $task->due_date ? '—' : $task->due_date->format( 'd-m-Y' ) ); ?></dd>
<dt><?php \esc_html_e( 'Time', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( null === $task->seconds ? '—' : \orbis_time( $task->seconds ) ); ?></dd>
<dt><?php \esc_html_e( 'Status', 'orbis-tasks' ); ?></dt>
<dd><?php echo \esc_html( $task->completed ? \__( 'Closed', 'orbis-tasks' ) : \__( 'Open', 'orbis-tasks' ) ); ?></dd>
</dl>
</div>
</div>
</div>