message when no readme is found
This commit is contained in:
parent
75dab1970c
commit
0f97b514c6
@ -384,7 +384,7 @@ class Package extends ActiveRecord
|
||||
*/
|
||||
public function getReadmeHtml()
|
||||
{
|
||||
if ($this->readme_format && $this->readme) {
|
||||
if ($this->readme) {
|
||||
if ($this->readme_format == 'markdown') {
|
||||
$parser = new GithubMarkdown();
|
||||
return $parser->parse($this->readme);
|
||||
|
@ -18,6 +18,15 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<div class="col-lg-8">
|
||||
<?= $model->getReadmeHtml() ?>
|
||||
<?php
|
||||
if (!$model->readme) {
|
||||
echo Alert::widget([
|
||||
'options' => [
|
||||
'class' => 'alert-danger',
|
||||
],
|
||||
'closeButton' => false,
|
||||
'body' => 'This mod has no readme. If you are the owner please consider adding one.',
|
||||
]);
|
||||
}
|
||||
if ($model->readme_format == 'text') {
|
||||
echo Alert::widget([
|
||||
'options' => [
|
||||
|
Loading…
x
Reference in New Issue
Block a user