Commit 4b7b8d4a authored by Tilman Kranz's avatar Tilman Kranz
Browse files

project_header formatting

parent 95fa3719
......@@ -28,6 +28,14 @@ class LinuxfooGitlab {
'</span>';
}
static function project_header($atts, $project) {
return
'<span class="project_header">'.
__('Gitlab project', 'linuxfoo-gitlab').' '.
'<a href="'.$project->web_url.'">'.$project->name.'</a>'.
'</span>';
}
static function format_since($since) {
preg_match('/^([0-9]+)\s+(.*)$/', $since, $m);
$num = $m[1];
......@@ -243,12 +251,7 @@ class LinuxfooGitlab {
$out .= self::error('Project information not readable.');
}
else {
$out .=
'<span class="project_header">'.
__('Gitlab project', 'linuxfoo-gitlab').' '.
'<a href="'.$project->web_url.'">'.$project->name.'</a>'.
'</span>';
$out .= self::project_header($atts, $project);
$out .= self::commits_list($atts, $project_url);
$out .= self::releases_list($atts, $project_url);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment