diff --git a/src/IDF/Issue.php b/src/IDF/Issue.php
index ea3c27b..691cc4d 100644
--- a/src/IDF/Issue.php
+++ b/src/IDF/Issue.php
@@ -180,10 +180,9 @@ class IDF_Issue extends Pluf_Model
$out = '
'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
' | ';
- $submitter = $this->get_submitter();
+ $submitter = $this->get_submitter();
$ic = (in_array($this->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('Issue %3$d, %4$s'), $url, $ic, $this->id, Pluf_esc($this->summary)).' | ';
-
$out .= "\n".'
';
return Pluf_Template::markSafe($out);
diff --git a/src/IDF/Upload.php b/src/IDF/Upload.php
index 2b80c04..25715b7 100644
--- a/src/IDF/Upload.php
+++ b/src/IDF/Upload.php
@@ -141,8 +141,39 @@ class IDF_Upload extends Pluf_Model
}
}
+ function postSave($create=false)
+ {
+ if ($create) {
+ IDF_Timeline::insert($this, $this->get_project(),
+ $this->get_submitter(), $this->creation_dtime);
+ }
+ }
+
function getAbsoluteUrl($project)
{
return Pluf::f('url_media').'/upload/'.$project->shortname.'/files/'.$this->file;
}
+
+ /**
+ * Returns the timeline fragment for the file.
+ *
+ *
+ * @param Pluf_HTTP_Request
+ * @return Pluf_Template_SafeString
+ */
+ public function timelineFragment($request)
+ {
+ $url = Pluf_HTTP_URL_urlForView('IDF_Views_Download::view',
+ array($request->project->shortname,
+ $this->id));
+ $out = ''.
+ Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
+ ' | ';
+ $submitter = $this->get_submitter();
+ $out .= sprintf(__('Download %2$d, %3$s'), $url, $this->id, Pluf_esc($this->summary)).' | ';
+ $out .= '
';
+ $out .= "\n".'';
+ return Pluf_Template::markSafe($out);
+ }
}
\ No newline at end of file