Skip to content

Commit 65ca7ab

Browse files
committed
Adding link to find issues on homepage
1 parent 1f356e9 commit 65ca7ab

File tree

4 files changed

+36
-9
lines changed

4 files changed

+36
-9
lines changed

app/Resources/views/base.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>{% block title %}Welcome!{% endblock %}</title>
6-
{% block stylesheets %}{% endblock %}
6+
{% block stylesheets %}
7+
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"/>
8+
{% endblock %}
79
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
810
</head>
911
<body>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% extends 'base.html.twig' %}
2+
3+
{% block body %}
4+
<div class="container">
5+
<div class="row">
6+
<div class="col-xs-6 col-xs-offset-3">
7+
<div class="text-center page-header">
8+
<div>
9+
<img src="https://pbs.twimg.com/media/B6dVMHzCYAASEhm.jpg" />
10+
</div>
11+
12+
<h1>Carson: The Issue Butler</h1>
13+
14+
<div>
15+
<a href="{{ needsReviewUrl }}" class="btn btn-primary">Find "Needs Review" issues and pull requests</a>
16+
</div>
17+
18+
</div>
19+
</div>
20+
</div>
21+
</div>
22+
{% endblock %}

app/Resources/views/default/index.html.twig

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/AppBundle/Controller/DefaultController.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@
22

33
namespace AppBundle\Controller;
44

5-
use Symfony\Component\HttpFoundation\Response;
5+
use AppBundle\GitHub\StatusManager;
6+
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
67
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
78

8-
class DefaultController
9+
class DefaultController extends Controller
910
{
1011
/**
1112
* @Route("/")
1213
*/
1314
public function homepageAction()
1415
{
15-
return new Response('<img src="https://pbs.twimg.com/media/B6dVMHzCYAASEhm.jpg" />');
16+
return $this->render('default/homepage.html.twig', [
17+
'needsReviewUrl' => sprintf(
18+
'https://github.com/%s/%s/labels/%s',
19+
$this->container->getParameter('repository_username'),
20+
$this->container->getParameter('repository_name'),
21+
urlencode(StatusManager::getLabelForStatus(StatusManager::STATUS_NEEDS_REVIEW))
22+
)
23+
]);
1624
}
1725
}

0 commit comments

Comments
 (0)