Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit bf76fa5

Browse files
committed
Merge pull request #346 from ins0/feature/composer
Feature: added composer to view
2 parents 1984e52 + 6b5a20c commit bf76fa5

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

module/ZfModule/src/ZfModule/View/Helper/ComposerView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ComposerView extends AbstractHelper
1616
public function __invoke($composerConf)
1717
{
1818
$vm = new ViewModel([
19-
'composerConf' => $composerConf,
19+
'composerConf' => json_decode($composerConf, true),
2020
]);
2121
$vm->setTemplate('zf-module/helper/composer-view.phtml');
2222

module/ZfModule/view/zf-module/index/view.phtml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,31 @@
88
<p class="well"><?php echo $this->escapeHtml($repository->description); ?></p>
99
<ul class="nav nav-tabs">
1010
<li class="active"><a href="#readme" data-toggle="tab">README</a></li>
11-
<li ><a href="#license" data-toggle="tab">LICENSE</a></li>
11+
<li><a href="#license" data-toggle="tab">LICENSE</a></li>
12+
<li><a href="#composer" data-toggle="tab">COMPOSER</a></li>
1213
</ul>
1314

1415
<div class="tab-content">
1516
<div class="tab-pane active" id="readme">
16-
<?php if($readme): ?>
17+
<?php if ($this->readme): ?>
1718
<?php echo $this->sanitizeHtml($this->readme); ?>
1819
<?php else: ?>
1920
No README file found for this Module
2021
<?php endif; ?>
2122
</div>
2223
<div class="tab-pane" id="license">
23-
<pre>
24-
<?php if ($this->license): ?>
25-
<?php echo $this->escapeHtml($this->license); ?>
26-
<?php else: ?>
27-
No license file found for this Module
28-
<?php endif; ?>
29-
</pre>
24+
<?php if ($this->license): ?>
25+
<pre><?php echo $this->escapeHtml($this->license); ?></pre>
26+
<?php else: ?>
27+
<pre>No license file found for this Module</pre>
28+
<?php endif; ?>
29+
</div>
30+
<div class="tab-pane" id="composer">
31+
<?php if ($this->composerConf): ?>
32+
<?php echo $this->composerView($this->composerConf); ?>
33+
<?php else: ?>
34+
<pre>No Composer file found for this Module</pre>
35+
<?php endif; ?>
3036
</div>
3137
</div>
3238
</div>

0 commit comments

Comments
 (0)