39 lines
2.1 KiB
PHP
39 lines
2.1 KiB
PHP
<?php
|
|
//SQ_Debug::dump($view->post);
|
|
$edit_link = false;
|
|
|
|
if (isset($view->post->ID)) {
|
|
if ($view->post->post_type <> 'profile') {
|
|
$edit_link = get_edit_post_link($view->post->ID, false);
|
|
}
|
|
|
|
} elseif ($view->post->term_id) {
|
|
$term = get_term_by('term_id', $view->post->term_id, $view->post->taxonomy);
|
|
if (!is_wp_error($term)) {
|
|
$edit_link = get_edit_term_link($term->term_id, $view->post->taxonomy);
|
|
}
|
|
}
|
|
|
|
if ($view->post instanceof SQ_Models_Domain_Post) { ?>
|
|
<td style="max-width: 380px;">
|
|
<div class="col-sm-12 px-0 mx-0 font-weight-bold"><?php echo $view->post->sq->title ?><?php echo(($view->post->post_status <> 'publish' && $view->post->post_status <> 'inherit' && $view->post->post_status <> '') ? ' <spam style="font-weight: normal">(' . $view->post->post_status . ')</spam>' : '') ?>
|
|
<?php if ($edit_link) { ?>
|
|
<a href="<?php echo $edit_link ?>" target="_blank">
|
|
<i class="fa fa-edit" style="font-size: 11px"></i>
|
|
</a>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="small "><?php echo '<a href="' . $view->post->url . '" title="' . esc_attr(sprintf(__('View “%s”'), $view->post->post_title)) . '" class="text-link" rel="permalink" target="_blank">' . $view->post->url . '</a>' ?></div>
|
|
</td>
|
|
<?php
|
|
$categories = apply_filters('sq_assistant_categories_page', $view->post->hash);
|
|
if (!empty($categories)) {
|
|
foreach ($categories as $name => $category) {
|
|
?>
|
|
<td style="min-width: 110px; ">
|
|
<div class="sq_show_snippet <?php echo(($category->value === false) ? 'sq_circle_label' : '') ?>" data-id="<?php echo $view->post->hash ?>" data-category="<?php echo $name ?>" style="cursor: pointer; <?php echo(($category->value === false) ? 'background-color' : 'color') ?>: <?php echo $category->color ?>;" title="<?php echo $category->title ?>"><?php echo(($category->value !== false) ? $category->value : '') ?></div>
|
|
</td>
|
|
<?php
|
|
}
|
|
} ?>
|
|
<?php } ?>
|