Prevent crashes with empty projects
[gitphp.git] / templates / blame.tpl
blob:a/templates/blame.tpl -> blob:b/templates/blame.tpl
--- a/templates/blame.tpl
+++ b/templates/blame.tpl
@@ -5,17 +5,16 @@
  *
  * Copyright (C) 2010 Christopher Han <xiphux@gmail.com>
  *}
-
- {include file='header.tpl'}
+{include file='header.tpl'}
 
  <div class="page_nav">
    {include file='nav.tpl' treecommit=$commit}
    <br />
-   <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blob_plain&h={$blob->GetHash()}&f={$blob->GetPath()}">{$resources->GetResource('plain')}</a> | 
+   <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob_plain&amp;h={$blob->GetHash()}&amp;f={$blob->GetPath()}">{t}plain{/t}</a> | 
    {if $commit->GetHash() != $head->GetHash()}
-     <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=blame&hb=HEAD&f={$blob->GetPath()}">{$resources->GetResource('HEAD')}</a>
+     <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blame&amp;hb=HEAD&amp;f={$blob->GetPath()}">{t}HEAD{/t}</a>
    {else}
-     {$resources->GetResource('HEAD')}
+     {t}HEAD{/t}
    {/if}
     | blame
    <br />
@@ -43,7 +42,7 @@
 	  <tr class="{$rowclass}">
 	    <td class="date">
 	      {if $blamecommit}
-	        <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&a=commit&h={$blamecommit->GetHash()}" title="{$blamecommit->GetTitle()}" class="commitTip">{$blamecommit->GetAuthorEpoch()|date_format:"%F %X"}</a>
+	        <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commit&amp;h={$blamecommit->GetHash()}" title="{$blamecommit->GetTitle()}" class="commitTip">{$blamecommit->GetAuthorEpoch()|date_format:"%Y-%m-%d %H:%M:%S"}</a>
 	      {/if}
 	    </td>
 	    <td class="author">

comments