Added credits

This commit is contained in:
Graham Campbell
2016-05-29 18:14:40 +01:00
parent ab0ed775e1
commit c03f01ca44
10 changed files with 217 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
use CachetHQ\Cachet\GitHub\Release;
use CachetHQ\Cachet\Integrations\Releases;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\IncidentTemplate;
@@ -99,7 +99,7 @@ class ApiController extends Controller
*/
public function checkVersion()
{
$latest = app(Release::class)->latest();
$latest = app(Releases::class)->latest();
return Response::json([
'cachet_version' => CACHET_VERSION,

View File

@@ -82,6 +82,12 @@ class SettingsController extends Controller
'icon' => 'ion-stats-bars',
'active' => false,
],
'credits' => [
'title' => trans('dashboard.settings.credits.credits'),
'url' => route('dashboard.settings.credits'),
'icon' => 'ion-ios-list',
'active' => false,
],
'about' => [
'title' => CACHET_VERSION,
'url' => 'javascript: void(0);',
@@ -212,6 +218,30 @@ class SettingsController extends Controller
->withSubMenu($this->subMenu);
}
/**
* Show the credits view.
*
* @return \Illuminate\View\View
*/
public function showCreditsView()
{
$this->subMenu['credits']['active'] = true;
$credits = app(Credits::class)->latest();
$backers = $credits['backers'];
$contributors = $credits['contributors'];
shuffle($backers);
shuffle($contributors);
return View::make('dashboard.settings.credits')
->withPageTitle(trans('dashboard.settings.credits.credits').' - '.trans('dashboard.dashboard'))
->withBackers($backers)
->withContributors($contributors)
->withSubMenu($this->subMenu);
}
/**
* Updates the status page settings.
*