mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
moved the page variable to the templates (belongs to the view)
This commit is contained in:
@@ -7,7 +7,6 @@ $app->get('{repo}/blob/{branch}/{file}/', function($repo, $branch, $file) use($a
|
|||||||
$fileType = $app['utils']->getFileType($file);
|
$fileType = $app['utils']->getFileType($file);
|
||||||
|
|
||||||
return $app['twig']->render('file.twig', array(
|
return $app['twig']->render('file.twig', array(
|
||||||
'page' => 'files',
|
|
||||||
'file' => $file,
|
'file' => $file,
|
||||||
'fileType' => $fileType,
|
'fileType' => $fileType,
|
||||||
'blob' => $blob->output(),
|
'blob' => $blob->output(),
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ $app->get('{repo}/commits/{branch}', function($repo, $branch) use($app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $app['twig']->render('commits.twig', array(
|
return $app['twig']->render('commits.twig', array(
|
||||||
'page' => 'commits',
|
|
||||||
'pager' => $pager,
|
'pager' => $pager,
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'branch' => $branch,
|
'branch' => $branch,
|
||||||
@@ -37,7 +36,6 @@ $app->get('{repo}/commits/{branch}/{file}/', function($repo, $branch, $file) use
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $app['twig']->render('commits.twig', array(
|
return $app['twig']->render('commits.twig', array(
|
||||||
'page' => 'commits',
|
|
||||||
'pager' => $pager,
|
'pager' => $pager,
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'branch' => $branch,
|
'branch' => $branch,
|
||||||
@@ -54,7 +52,6 @@ $app->get('{repo}/commit/{commit}/', function($repo, $commit) use($app) {
|
|||||||
$commit = $repository->getCommit($commit);
|
$commit = $repository->getCommit($commit);
|
||||||
|
|
||||||
return $app['twig']->render('commit.twig', array(
|
return $app['twig']->render('commit.twig', array(
|
||||||
'page' => 'commits',
|
|
||||||
'branch' => 'master',
|
'branch' => 'master',
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'commit' => $commit,
|
'commit' => $commit,
|
||||||
@@ -68,7 +65,6 @@ $app->get('{repo}/blame/{branch}/{file}/', function($repo, $branch, $file) use($
|
|||||||
$blames = $repository->getBlame("$branch -- $file");
|
$blames = $repository->getBlame("$branch -- $file");
|
||||||
|
|
||||||
return $app['twig']->render('blame.twig', array(
|
return $app['twig']->render('blame.twig', array(
|
||||||
'page' => 'commits',
|
|
||||||
'file' => $file,
|
'file' => $file,
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'branch' => $branch,
|
'branch' => $branch,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ $app->get('{repo}/stats/{branch}', function($repo, $branch) use($app) {
|
|||||||
$authors = $repository->getAuthorStatistics();
|
$authors = $repository->getAuthorStatistics();
|
||||||
|
|
||||||
return $app['twig']->render('stats.twig', array(
|
return $app['twig']->render('stats.twig', array(
|
||||||
'page' => 'stats',
|
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'branch' => $branch,
|
'branch' => $branch,
|
||||||
'branches' => $repository->getBranches(),
|
'branches' => $repository->getBranches(),
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ $app->get('{repo}/tree/{branch}/{tree}/', $treeController = function($repo, $bra
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $app['twig']->render('tree.twig', array(
|
return $app['twig']->render('tree.twig', array(
|
||||||
'page' => 'files',
|
|
||||||
'files' => $files->output(),
|
'files' => $files->output(),
|
||||||
'repo' => $repo,
|
'repo' => $repo,
|
||||||
'branch' => $branch,
|
'branch' => $branch,
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'commits' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'commits' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'commits' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'files' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'stats' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% extends 'layout_page.twig' %}
|
{% extends 'layout_page.twig' %}
|
||||||
|
|
||||||
|
{% set page = 'files' %}
|
||||||
|
|
||||||
{% block title %}GitList{% endblock %}
|
{% block title %}GitList{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|||||||
Reference in New Issue
Block a user