git.cweiske.de
/
phorkie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
347d191
)
use getTitle method
author
Christian Weiske
<cweiske@cweiske.de>
Mon, 7 May 2012 21:07:30 +0000
(23:07 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Mon, 7 May 2012 21:07:30 +0000
(23:07 +0200)
data/templates/delete.htm
patch
|
blob
|
history
data/templates/display-head.htm
patch
|
blob
|
history
data/templates/display.htm
patch
|
blob
|
history
data/templates/repo-sidebar-list.htm
patch
|
blob
|
history
data/templates/revision-head.htm
patch
|
blob
|
history
data/templates/revision.htm
patch
|
blob
|
history
data/templates/tool.htm
patch
|
blob
|
history
src/phorkie/Repository.php
patch
|
blob
|
history
diff --git
a/data/templates/delete.htm
b/data/templates/delete.htm
index ff27220dea654e36d0c2642d951fa38b81846186..8c0fc61f06011cf7cb5c15c4f32d898c727e9098 100644
(file)
--- a/
data/templates/delete.htm
+++ b/
data/templates/delete.htm
@@
-7,10
+7,10
@@
Confirm deletion of repository #{{repo.id}}
<h1>Delete paste #{{repo.id}}?</h1>
<div class="well" style="margin-top: 5ex;">
<p>
<h1>Delete paste #{{repo.id}}?</h1>
<div class="well" style="margin-top: 5ex;">
<p>
- Do you really want to delete the follo
ing paste #{{repo.id}}
?
+ Do you really want to delete the follo
wing paste
?
</p>
<p>
</p>
<p>
- <strong>{{repo.get
Description
}}</strong>
+ <strong>{{repo.get
Title
}}</strong>
</p>
<div class="row-fluid" style="margin-top: 5ex;">
</p>
<div class="row-fluid" style="margin-top: 5ex;">
diff --git
a/data/templates/display-head.htm
b/data/templates/display-head.htm
index 365b094b80a7ed254ed5dd5bff3828bb3cc2c078..082ecff0d757af26a0fd4acd5aab9803d89fc315 100644
(file)
--- a/
data/templates/display-head.htm
+++ b/
data/templates/display-head.htm
@@
-1,11
+1,9
@@
-<h1>{{repo.get
Description
}}</h1>
+<h1>{{repo.get
Title
}}</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="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>
<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>
diff --git
a/data/templates/display.htm
b/data/templates/display.htm
index 847a8ea9b6d0fd8c9ee68d6e95ae32d76f87a4ca..6d84c463a510613ec3ea9554adc15d316ff667ca 100644
(file)
--- a/
data/templates/display.htm
+++ b/
data/templates/display.htm
@@
-1,10
+1,6
@@
{% extends "base.htm" %}
{% block title %}
{% extends "base.htm" %}
{% block title %}
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ {{repo.getTitle}}
{% endblock %}
{% block content %}
{% endblock %}
{% block content %}
diff --git
a/data/templates/repo-sidebar-list.htm
b/data/templates/repo-sidebar-list.htm
index c20e8b6710c8eb9aed820290c5b14c51c9cc2851..568656ee6290c264ce3041bcc303dd5ec87b6437 100644
(file)
--- a/
data/templates/repo-sidebar-list.htm
+++ b/
data/templates/repo-sidebar-list.htm
@@
-1,7
+1,6
@@
<li>
<a href="{{repo.getLink('display')}}">
<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>
</a><br/>
<span title="{{repo.crdate|date('c')}}">{{dh.get(repo.crdate)}}</span>
</li>
diff --git
a/data/templates/revision-head.htm
b/data/templates/revision-head.htm
index 3f31dd98353a0c88b0fe167d4092054d2615cfdb..132a68feb93bdcdd5993709b8e6e05354d86c4ff 100644
(file)
--- a/
data/templates/revision-head.htm
+++ b/
data/templates/revision-head.htm
@@
-1,4
+1,4
@@
-<h1>{{repo.get
Description
}}</h1>
+<h1>{{repo.get
Title
}}</h1>
<div class="row repo-info">
<div class="span2">
<a class="btn btn-primary" href="{{repo.getLink('display')}}">
<div class="row repo-info">
<div class="span2">
<a class="btn btn-primary" href="{{repo.getLink('display')}}">
@@
-6,9
+6,6
@@
</a>
</div>
<div class="span5" style="text-align: center">
</a>
</div>
<div class="span5" style="text-align: center">
- <h3>
- Paste #{{repo.id}}
- </h3>
<p>
revision <strong>{{repo.hash}}</strong>
</p>
<p>
revision <strong>{{repo.hash}}</strong>
</p>
diff --git
a/data/templates/revision.htm
b/data/templates/revision.htm
index f4da363b2b8835aa1f254022140e578a591f5eca..cd62e6c45fc736dff2bf6a3d3ffc386a2df45969 100644
(file)
--- a/
data/templates/revision.htm
+++ b/
data/templates/revision.htm
@@
-1,10
+1,6
@@
{% extends "base.htm" %}
{% block title %}
{% extends "base.htm" %}
{% block title %}
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ {{repo.getTitle}}
- revision {{repo.hash}}
{% endblock %}
- revision {{repo.hash}}
{% endblock %}
diff --git
a/data/templates/tool.htm
b/data/templates/tool.htm
index 07a29b48dda71d0c71cccc70ef86359d7a19884f..74533c7a2e8de0898433674e9bff44fc67cbaf3a 100644
(file)
--- a/
data/templates/tool.htm
+++ b/
data/templates/tool.htm
@@
-1,23
+1,15
@@
{% extends "base.htm" %}
{% block title %}
{% extends "base.htm" %}
{% block title %}
- Tool results:
- {%if repo.getDescription %}
- {{repo.getDescription}}
- {%else%}
- {{repo.id}}
- {%endif%}
+ Tool results: {{repo.getTitle}}
{% endblock %}
{% block content %}
{% endblock %}
{% block content %}
-<h1>Tool results: {{repo.get
Description
}}</h1>
+<h1>Tool results: {{repo.get
Title
}}</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="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 %}
</div>
{% for line in toolres.annotations.general %}
diff --git
a/src/phorkie/Repository.php
b/src/phorkie/Repository.php
index c854cf167186455fc77049914b2c32212be936de..a57239ef8097c1f014c1e880e41d593260694702 100644
(file)
--- a/
src/phorkie/Repository.php
+++ b/
src/phorkie/Repository.php
@@
-180,6
+180,16
@@
class Repository
&& Tools::recursiveDelete($this->gitDir);
}
&& 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')) {
public function getDescription()
{
if (!is_readable($this->gitDir . '/description')) {