Merge pull request #470 from cisoun/master

Allow replacing GitList's title by another defined in config.ini
This commit is contained in:
Klaus Silveira
2014-11-14 11:07:11 -02:00
4 changed files with 4 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ repositories[] = '/home/git/repositories/' ; Path to your repositories
debug = false
cache = true
theme = "default"
title = ""
; If you need to specify custom filetypes for certain extensions, do this here
[filetypes]

View File

@@ -33,6 +33,7 @@ class Application extends SilexApplication
$this['debug'] = $config->get('app', 'debug');
$this['date.format'] = $config->get('date', 'format') ? $config->get('date', 'format') : 'd/m/Y H:i:s';
$this['theme'] = $config->get('app', 'theme') ? $config->get('app', 'theme') : 'default';
$this['title'] = $config->get('app', 'title') ? $config->get('app', 'title') : 'GitList';
$this['filetypes'] = $config->getSection('filetypes');
$this['binary_filetypes'] = $config->getSection('binary_filetypes');
$this['cache.archives'] = $this->getCachePath() . 'archives';

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
<title>{{ app.title }}{% if app.title %} - {% endif %}{% block title %}Welcome!{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ app.request.basepath }}/themes/{{ app.theme }}/css/style.css">
<link rel="shortcut icon" type="image/png" href="{{ app.request.basepath }}/themes/{{ app.theme }}/img/favicon.png" />
<!--[if lt IE 9]>

View File

@@ -6,7 +6,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="{{ path('homepage') }}">GitList</a>
<a class="brand" href="{{ path('homepage') }}">{{ app.title }}</a>
<div class="nav-collapse">
<ul class="nav pull-right">
<li><a href="http://gitlist.org/">About</a></li>