Skip to content

Commit

Permalink
improved pdf invoices archive link
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Oct 8, 2015
1 parent b39eb16 commit 5f0a2a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grid/PurseGridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function defaultColumns()
'value' => function ($model) {
$curr = date('Y-m-1');
$prev = date('Y-m-1', strtotime($curr) - 1000);
return Html::a(Yii::t('app', 'Archive'), ['@purse/invoice-archive', 'id' => $model->id], ['class' => 'btn btn-default btn-xs pull-right']).
return Html::a(FontIcon::i('fa-history fa-2x') . ' ' .Yii::t('app', 'Archive'), ['@purse/invoice-archive', 'id' => $model->id], ['class' => 'pull-right']).
self::pdfLink($model, $curr) . '   ' . self::pdfLink($model, $prev);
}
],
Expand All @@ -39,6 +39,6 @@ public static function defaultColumns()
public static function pdfLink($model, $month = 'now')
{
$date = strtotime($month);
return Html::a(FontIcon::i('fa-file-pdf-o fa-2x') . date(' M Y', $date), ['@purse/pdf-invoice', 'id' => $model->id, 'month' => date('Y-m-01', $date)], ['target' => '_blank']);
return Html::a(FontIcon::i('fa-file-pdf-o fa-2x') . date(' M Y', $date), ['@purse/pdf-invoice', 'id' => $model->id, 'month' => date('Y-m-01', $date)], ['target' => '_blank', 'class' => 'text-info']);
}
}

0 comments on commit 5f0a2a4

Please sign in to comment.