<h1>Delete paste #{{repo.id}}?</h1>
<div class="well" style="margin-top: 5ex;">
<p>
- Do you really want to delete the folloing paste #{{repo.id}}?
+ Do you really want to delete the following paste?
</p>
<p>
- <strong>{{repo.getDescription}}</strong>
+ <strong>{{repo.getTitle}}</strong>
</p>
<div class="row-fluid" style="margin-top: 5ex;">
-<h1>{{repo.getDescription}}</h1>
+<h1>{{repo.getTitle}}</h1>
<div class="row repo-info">
<div class="span2">
<a class="btn" href="{{repo.getLink('edit')}}"><i class="icon-edit"></i> edit</a>
</div>
- <div class="span5" style="text-align: center">
- <h3>Paste #{{repo.id}}</h3>
- </div>
+ <div class="span5" style="text-align: center"> </div>
<div class="span2" style="text-align: right">
<form method="post" action="{{repo.getLink('fork')}}">
<button type="submit" class="btn"><i class="icon-share"></i> fork</button>
{% extends "base.htm" %}
{% block title %}
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ {{repo.getTitle}}
{% endblock %}
{% block content %}
<li>
<a href="{{repo.getLink('display')}}">
- {{repo.id}}
- {{repo.getDescription}}
+ {{repo.getTitle}}
</a><br/>
<span title="{{repo.crdate|date('c')}}">{{dh.get(repo.crdate)}}</span>
</li>
-<h1>{{repo.getDescription}}</h1>
+<h1>{{repo.getTitle}}</h1>
<div class="row repo-info">
<div class="span2">
<a class="btn btn-primary" href="{{repo.getLink('display')}}">
</a>
</div>
<div class="span5" style="text-align: center">
- <h3>
- Paste #{{repo.id}}
- </h3>
<p>
revision <strong>{{repo.hash}}</strong>
</p>
{% extends "base.htm" %}
{% block title %}
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ {{repo.getTitle}}
- revision {{repo.hash}}
{% endblock %}
{% extends "base.htm" %}
{% block title %}
- Tool results:
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ Tool results: {{repo.getTitle}}
{% endblock %}
{% block content %}
-<h1>Tool results: {{repo.getDescription}}</h1>
+<h1>Tool results: {{repo.getTitle}}</h1>
<div class="row-fluid repo-info">
<div class="span4">
<a class="btn" href="{{repo.getLink('edit')}}"><i class="icon-edit"></i> edit</a>
<a class="btn" href="{{repo.getLink('display')}}"><i class="icon-arrow-left"></i> back</a>
</div>
- <div class="span4" style="text-align: center">
- <h3>Paste #{{repo.id}}</h3>
- </div>
</div>
{% for line in toolres.annotations.general %}
&& Tools::recursiveDelete($this->gitDir);
}
+ public function getTitle()
+ {
+ $desc = $this->getDescription();
+ if (trim($desc) != '') {
+ return $desc;
+ }
+
+ return 'paste #' . $this->id;
+ }
+
public function getDescription()
{
if (!is_readable($this->gitDir . '/description')) {