srchub

srchub Commit Details


Date:2014-04-04 23:54:03 (10 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:dd56d8f29f259afd5bf2e72b3b4e66357388cd07
Parents: 0d6b904cd6444ae8404c0835f34abf069ba3517f
Message:Adding RSS icons to make it more obvious on how to subscribe to feeds issue 32 Adding ability to download project information issue 35

Changes:

File differences

indefero/src/IDF/Views/Project.php
325325
326326
327327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
328375
329376
330377
$request);
}
public $backup_precond = array('IDF_Precondition::projectOwner');
public function backup($request, $match)
{
$prj = $request->project;
$to_json = array();
$to_json["IDF_Project"] = Pluf_Test_Fixture::prepare(Pluf::factory("IDF_Project")->getOne(array("filter" => "id=" . $prj->id)));
$to_json["IDF_Issue"] = array();
$to_json["IDF_Upload"] = array();
$to_json["IDF_Wiki_Page"] = array();
foreach(Pluf::factory("IDF_Issue")->getList(array("filter"=>"project=".$prj->id)) as $item)
{
$tmp = array();
$tmp = Pluf_Test_Fixture::dump($item, false);
$tmp = $tmp[0];
$tmp["comments"] = array();
foreach($item->get_comments_list() as $item2)
$tmp["comments"][] = Pluf_Test_Fixture::dump($item2, false)[0];
$to_json["IDF_Issue"][] = $tmp;
}
foreach(Pluf::factory("IDF_Upload")->getList(array("filter"=>"project=".$prj->id)) as $item)
{
$path = $item->getFullPath();
$file = file_get_contents($path);
$tmp = Pluf_Test_Fixture::dump($item, false);
$tmp[0]["file_encoded"] = base64_encode($file);
$to_json["IDF_Upload"][] = $tmp[0];
}
foreach(Pluf::factory("IDF_Wiki_Page")->getList(array("filter"=>"project=".$prj->id)) as $item)
{
$tmp = Pluf_Test_Fixture::dump($item, false)[0];
$tmp["WikiPageRevs"] = array();
foreach($item->get_revisions_list() as $item2)
$tmp["WikiPageRevs"][] = Pluf_Test_Fixture::dump($item2, false)[0];
$to_json["IDF_Wiki_Page"][] = $tmp;
}
$render = new Pluf_HTTP_Response(json_encode($to_json), "application/json");
$render->headers['Content-Disposition'] = 'attachment; filename="backup-' . $prj->name . '-' . date("YmdGis") . '.json"';
return $render;
}
/**
* Administrate the issue tracking of a project.
*/
indefero/src/IDF/templates/idf/admin/summary.html
100100
101101
102102
103
104
105
106
103107
<p>The description of the project can be improved using the <a href="{$url}">Markdown syntax</a>.</p>
{/blocktrans}
</div>
<div class="issue-submit-info">
<p><strong>Download Project</strong></p>
<p>A copy of the project can be downloaded here: <a href="{url 'IDF_Views_Project::backup', array($project.shortname)}">Download</a></p>
</div>
{/block}
indefero/src/IDF/templates/idf/project/home.html
33
44
55
6
6
77
88
99
{block tabhome} class="active"{/block}
{block subtabs}
<div id="sub-tabs">
<a href="{url 'IDF_Views_Project::home', array($project.shortname)}" class="active">{trans 'Welcome'}</a> | <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, 'all')}">{trans 'Latest Updates'}</a></strong>{superblock}
<a href="{url 'IDF_Views_Project::home', array($project.shortname)}" class="active">{trans 'Welcome'}</a> | <a href="{url 'IDF_Views_Project::timelineFeed', array($project.shortname, 'all')}"><img src="{media '/idf/img/feediconorig.png'}" alt="{trans 'RSS'}" /></a> <strong><a href="{url 'IDF_Views_Project::timeline', array($project.shortname, 'all')}">{trans 'Latest Updates'}</a></strong>{superblock}
</div>
{/block}
{block body}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.07050s using 16 queries.