Chainquery integration #49

Merged
marcdeb1 merged 44 commits from chainquery into master 2019-02-13 19:01:13 +01:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit a09a0148c2 - Show all commits

View file

@ -171,8 +171,7 @@ class MainController extends AppController {
$this->set('currentPage', $page); $this->set('currentPage', $page);
$this->set('claims', $claims); $this->set('claims', $claims);
} else { } else {
$claim = $this->Claims->find()->select($this->Claims)->select(['publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_id' => $id])->order(['Claims.created_at' => 'DESC'])->first(); $claim = $this->Claims->find()->select($this->Claims)->select(['Claims__publisher' => 'C.name'])->leftJoin(['C' => 'claim'], ['C.claim_id = Claims.publisher_id'])->where(['Claims.claim_id' => $id])->order(['Claims.created_at' => 'DESC'])->first();
if (!$claim) { if (!$claim) {
return $this->redirect('/'); return $this->redirect('/');
} }

View file

@ -75,7 +75,7 @@ if (strlen(trim($desc)) == 0) {
</div> </div>
<div class="content"> <div class="content">
<?php if ($claim->claim_type == 2): ?> <?php if ($claim->claim_type == 1): ?>
<div class="label">Published By</div> <div class="label">Published By</div>
<div class="value"> <div class="value">
<?php if (isset($claim->publisher)): ?> <?php if (isset($claim->publisher)): ?>
@ -92,7 +92,7 @@ if (strlen(trim($desc)) == 0) {
<div class="label">Transaction ID</div> <div class="label">Transaction ID</div>
<div class="value"><a href="/tx/<?php echo $claim->transaction_hash_id ?>#output-<?php echo $claim->vout ?>"><?php echo $claim->transaction_hash_id ?></a></div> <div class="value"><a href="/tx/<?php echo $claim->transaction_hash_id ?>#output-<?php echo $claim->vout ?>"><?php echo $claim->transaction_hash_id ?></a></div>
<?php if ($claim->claim_type == 2): ?> <?php if ($claim->claim_type == 1): ?>
<div class="label half-width">Cost</div> <div class="label half-width">Cost</div>
<div class="label half-width">Safe for Work</div> <div class="label half-width">Safe for Work</div>
@ -120,8 +120,10 @@ if (strlen(trim($desc)) == 0) {
<div class="value half-width"><?php echo strlen(trim($claim->author)) > 0 ? $claim->author : '<em>Unspecified</em>' ?></div> <div class="value half-width"><?php echo strlen(trim($claim->author)) > 0 ? $claim->author : '<em>Unspecified</em>' ?></div>
<div class="value half-width"><?php echo strlen(trim($claim->content_type)) > 0 ? $claim->content_type : '<em>Unspecified</em>' ?></div> <div class="value half-width"><?php echo strlen(trim($claim->content_type)) > 0 ? $claim->content_type : '<em>Unspecified</em>' ?></div>
<!--
<div class="label half-width">License</div> <div class="label half-width">License</div>
<div class="label half-width">Language</div> -->
<div class="label">Language</div>
<!-- <!--
<div class="value half-width"<?php if(strlen(trim($claim->license)) > 0): ?> title="<?php echo $claim->license ?>"<?php endif; ?>> <div class="value half-width"<?php if(strlen(trim($claim->license)) > 0): ?> title="<?php echo $claim->license ?>"<?php endif; ?>>