Show current branch in snip single
Reset branch automatically if trying to commit detached
This commit is contained in:
@ -35,10 +35,11 @@ class SnipController extends AbstractController
|
||||
public function single(Snip $snip): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(SnipVoter::VIEW, $snip);
|
||||
|
||||
$snipService = $this->snipServiceFactory->create($snip);
|
||||
return $this->render('snip/single.html.twig', [
|
||||
'snip' => $snip,
|
||||
'content' => $this->snipServiceFactory->create($snip)->get(),
|
||||
'content' => $snipService->get(),
|
||||
'branch' => $snipService->getRepo()->getCurrentBranchName(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user