From dae6e4363d7a167ea6790ddc44a4835623a8d417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Sun, 15 Jul 2012 11:52:33 +0200 Subject: [PATCH] Replace explicit getter calls in twig templates by property access --- views/commit.twig | 26 +++++++++++++------------- views/commits.twig | 8 ++++---- views/rss.twig | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/views/commit.twig b/views/commit.twig index ad28ba7..8e7daf8 100644 --- a/views/commit.twig +++ b/views/commit.twig @@ -5,38 +5,38 @@ {% block title %}GitList{% endblock %} {% block content %} - {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.getHash}", path:''}]} %} + {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %}
- Browse code -

{{ commit.getMessage }}

+ Browse code +

{{ commit.message }}

- - {{ commit.getAuthor.getName }} authored in {{ commit.getDate | date('d/m/Y \\a\\t H:i:s') }}
Showing {{ commit.getChangedFiles }} changed files
+ + {{ commit.author.name }} authored in {{ commit.date | date('d/m/Y \\a\\t H:i:s') }}
Showing {{ commit.changedFiles }} changed files
- {% for diff in commit.getDiffs %} + {% for diff in commit.diffs %}
- +
- {% for line in diff.getLines %} - {{ line.getLine }} + {% for line in diff.lines %} + {{ line.line }} {% endfor %}
diff --git a/views/commits.twig b/views/commits.twig index 36e4faa..c4fdd03 100644 --- a/views/commits.twig +++ b/views/commits.twig @@ -17,11 +17,11 @@ {% for item in commit %} - + - View {{ item.getShortHash }} -

{{ item.getMessage }}

- {{ item.getAuthor.getName }} authored in {{ item.getDate | date('d/m/Y \\a\\t H:i:s') }} + View {{ item.shortHash }} +

{{ item.message }}

+ {{ item.author.name }} authored in {{ item.date | date('d/m/Y \\a\\t H:i:s') }} {% endfor %} diff --git a/views/rss.twig b/views/rss.twig index 1f8a222..aca671f 100644 --- a/views/rss.twig +++ b/views/rss.twig @@ -7,10 +7,10 @@ {% for commit in commits %} - {{ commit.getMessage }} - {{ commit.getAuthor.getName }} authored {{ commit.getShortHash }} in {{ commit.getDate | date('d/m/Y \\a\\t H:i:s') }} - {{ path('commit', {repo: repo, commit: commit.getShortHash}) }} - {{ commit.getDate | date('r') }} + {{ commit.message }} + {{ commit.author.name }} authored {{ commit.shortHash }} in {{ commit.date | date('d/m/Y \\a\\t H:i:s') }} + {{ path('commit', {repo: repo, commit: commit.shortHash}) }} + {{ commit.date | date('r') }} {% endfor %}