Indefero

Indefero Commit Details


Date:2011-11-01 18:15:33 (13 years 1 month ago)
Author:Thomas Keller
Branch:develop, release-1.3
Commit:c71ed2cecb99da1486af46e7da0cf081c6164600
Parents: 34fbf6ec5f929ce0702de4ea3b61daf556d1030f
Message:Start with the archive upload functionality (sponsored by Scilab); add a new view and plain form to upload an archive; rename the internal URLs, handlers and templates from submit to create for single downloads and also add a help section about the new format as well as a detailed FAQ entry. Archive files get a bigger upload limit (default: 20MB).

Next up: archive uploading, validation and processing.
Changes:

File differences

src/IDF/Form/UploadArchive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008-2011 CĂ©ondo Ltd and contributors.
#
# InDefero is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# InDefero is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
/**
* Upload and process an archive file.
*
*/
class IDF_Form_UploadArchive extends Pluf_Form
{
public $user = null;
public $project = null;
public function initFields($extra=array())
{
$this->user = $extra['user'];
$this->project = $extra['project'];
$this->fields['archive'] = new Pluf_Form_Field_File(
array('required' => true,
'label' => __('Archive file'),
'initial' => '',
'max_size' => Pluf::f('max_upload_archive_size', 20971520),
));
}
public function clean_archive()
{
$extra = strtolower(implode('|', explode(' ', Pluf::f('idf_extra_upload_ext'))));
if (strlen($extra)) $extra .= '|';
if (!preg_match('/\.('.$extra.'png|jpg|jpeg|gif|bmp|psd|tif|aiff|asf|avi|bz2|css|doc|eps|gz|jar|mdtext|mid|mov|mp3|mpg|ogg|pdf|ppt|ps|qt|ra|ram|rm|rtf|sdd|sdw|sit|sxi|sxw|swf|tgz|txt|wav|xls|xml|war|wmv|zip)$/i', $this->cleaned_data['file'])) {
@unlink(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file']);
throw new Pluf_Form_Invalid(__('For security reasons, you cannot upload a file with this extension.'));
}
return $this->cleaned_data['file'];
}
/**
* Validate the interconnection in the form.
*/
public function clean()
{
$conf = new IDF_Conf();
$conf->setProject($this->project);
$onemax = array();
foreach (explode(',', $conf->getVal('labels_download_one_max', IDF_Form_UploadConf::init_one_max)) as $class) {
if (trim($class) != '') {
$onemax[] = mb_strtolower(trim($class));
}
}
$count = array();
for ($i=1;$i<7;$i++) {
$this->cleaned_data['label'.$i] = trim($this->cleaned_data['label'.$i]);
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
list($class, $name) = array(mb_strtolower(trim($class)),
trim($name));
} else {
$class = 'other';
$name = $this->cleaned_data['label'.$i];
}
if (!isset($count[$class])) $count[$class] = 1;
else $count[$class] += 1;
if (in_array($class, $onemax) and $count[$class] > 1) {
if (!isset($this->errors['label'.$i])) $this->errors['label'.$i] = array();
$this->errors['label'.$i][] = sprintf(__('You cannot provide more than label from the %s class to an issue.'), $class);
throw new Pluf_Form_Invalid(__('You provided an invalid label.'));
}
}
return $this->cleaned_data;
}
/**
* If we have uploaded a file, but the form failed remove it.
*
*/
function failed()
{
if (!empty($this->cleaned_data['file'])
and file_exists(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file'])) {
@unlink(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file']);
}
}
/**
* Save the model in the database.
*
* @param bool Commit in the database or not. If not, the object
* is returned but not saved in the database.
* @return Object Model with data set from the form.
*/
function save($commit=true)
{
if (!$this->isValid()) {
throw new Exception(__('Cannot save the model from an invalid form.'));
}
// Add a tag for each label
$tags = array();
for ($i=1;$i<7;$i++) {
if (strlen($this->cleaned_data['label'.$i]) > 0) {
if (strpos($this->cleaned_data['label'.$i], ':') !== false) {
list($class, $name) = explode(':', $this->cleaned_data['label'.$i], 2);
list($class, $name) = array(trim($class), trim($name));
} else {
$class = 'Other';
$name = trim($this->cleaned_data['label'.$i]);
}
$tags[] = IDF_Tag::add($name, $this->project, $class);
}
}
// Create the upload
$upload = new IDF_Upload();
$upload->project = $this->project;
$upload->submitter = $this->user;
$upload->summary = trim($this->cleaned_data['summary']);
$upload->changelog = trim($this->cleaned_data['changelog']);
$upload->file = $this->cleaned_data['file'];
$upload->filesize = filesize(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file']);
$upload->downloads = 0;
$upload->create();
foreach ($tags as $tag) {
$upload->setAssoc($tag);
}
// Send the notification
$upload->notify($this->project->getConf());
/**
* [signal]
*
* IDF_Upload::create
*
* [sender]
*
* IDF_Form_Upload
*
* [description]
*
* This signal allows an application to perform a set of tasks
* just after the upload of a file and after the notification run.
*
* [parameters]
*
* array('upload' => $upload);
*
*/
$params = array('upload' => $upload);
Pluf_Signal::send('IDF_Upload::create', 'IDF_Form_Upload',
$params);
return $upload;
}
}
src/IDF/Views.php
293293
294294
295295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
296312
297313
298314
}
/**
* Download archive FAQ.
*/
public function faqArchiveFormat($request, $match)
{
$title = __('InDefero Upload Archive Format');
$projects = self::getProjects($request->user);
return Pluf_Shortcuts_RenderToResponse('idf/faq-archive-format.html',
array(
'page_title' => $title,
'projects' => $projects,
),
$request);
}
/**
* API FAQ.
*/
public function faqApi($request, $match)
src/IDF/Views/Download.php
224224
225225
226226
227
227
228228
229
229
230230
231
231
232232
233233
234234
......
250250
251251
252252
253
253
254254
255255
256256
......
260260
261261
262262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
263296
264297
265298
}
/**
* Submit a new file for download.
* Create a new file for download.
*/
public $submit_precond = array('IDF_Precondition::accessDownloads',
public $create_precond = array('IDF_Precondition::accessDownloads',
'IDF_Precondition::projectMemberOrOwner');
public function submit($request, $match)
public function create($request, $match)
{
$prj = $request->project;
$title = __('New Download');
array('project' => $prj,
'user' => $request->user));
}
return Pluf_Shortcuts_RenderToResponse('idf/downloads/submit.html',
return Pluf_Shortcuts_RenderToResponse('idf/downloads/create.html',
array(
'auto_labels' => self::autoCompleteArrays($prj),
'page_title' => $title,
}
/**
* Create new downloads from an uploaded archive.
*/
public $createFromArchive_precond = array('IDF_Precondition::accessDownloads',
'IDF_Precondition::projectMemberOrOwner');
public function createFromArchive($request, $match)
{
$prj = $request->project;
$title = __('New Downloads from Archive');
if ($request->method == 'POST') {
$form = new IDF_Form_UploadArchive(array_merge($request->POST, $request->FILES),
array('project' => $prj,
'user' => $request->user));
if ($form->isValid()) {
$upload = $form->save();
$request->user->setMessage(__('The archive has been uploaded and processed.'));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Download::index',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
$form = new IDF_Form_UploadArchive(null,
array('project' => $prj,
'user' => $request->user));
}
return Pluf_Shortcuts_RenderToResponse('idf/downloads/createFromArchive.html',
array(
'page_title' => $title,
'form' => $form,
),
$request);
}
/**
* Create the autocomplete arrays for the little AJAX stuff.
*/
public static function autoCompleteArrays($project)
src/IDF/conf/idf.php-dist
495495
496496
497497
498
499
500
501
502
498503
499504
500505
# always have precedence.
# $cfg['max_upload_size'] = 2097152; // Size in bytes
# If a download archive is uploaded, the size of the archive is limited to 20MB.
# The php.ini upload_max_filesize and post_max_size configuration setting will
# always have precedence.
# $cfg['max_upload_archive_size'] = 20971520; // Size in bytes
# Older versions of Indefero submitted a POST request to a configured
# post-commit web hook when new revisions arrived, whereas a PUT request
# would have been more appropriate. Also, the payload's HMAC digest was
src/IDF/conf/urls.php
304304
305305
306306
307
308
309
310
311
307312
308313
309314
......
332337
333338
334339
335
340
341
342
343
344
345
336346
337347
338348
// ---------- Downloads ------------------------------------
$ctl[] = array('regex' => '#^/help/archive-format/$#',
'base' => $base,
'model' => 'IDF_Views',
'method' => 'faqArchiveFormat');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
'method' => 'submit');
'method' => 'create');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/create/archive/$#',
'base' => $base,
'model' => 'IDF_Views_Download',
'method' => 'createFromArchive');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/downloads/(\d+)/delete/$#',
'base' => $base,
src/IDF/templates/idf/downloads/base.html
22
33
44
5
5
6
7
8
9
610
711
{block tabdownloads} class="active"{/block}
{block subtabs}
<div id="sub-tabs">
<a {if $inDownloads}class="active" {/if}href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'Downloads'}</a> {if $isOwner or $isMember}| <a {if $inSubmit}class="active" {/if}href="{url 'IDF_Views_Download::submit', array($project.shortname)}">{trans 'New Download'}</a> {/if}
<a {if $inDownloads}class="active" {/if}href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'Downloads'}</a>
{if $isOwner or $isMember}
| <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Download::create', array($project.shortname)}">{trans 'New Download'}</a>
| <a {if $inCreateFromArchive}class="active" {/if}href="{url 'IDF_Views_Download::createFromArchive', array($project.shortname)}">{trans 'Upload Archive'}</a>
{/if}
</div>
{/block}
src/IDF/templates/idf/downloads/create.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{extends "idf/downloads/base.html"}
{block docclass}yui-t3{assign $inCreate=true}{/block}
{block body}
{if $form.errors}
<div class="px-message-error">
<p>{trans 'The form contains some errors. Please correct them to submit the file.'}</p>
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
</div>
{/if}
<form method="post" enctype="multipart/form-data" action=".">
<table class="form" summary="">
<tr>
<th><strong>{$form.f.summary.labelTag}:</strong></th>
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
{$form.f.summary|unsafe}
</td>
</tr>
<tr>
<th>{$form.f.changelog.labelTag}:</th>
<td>{if $form.f.changelog.errors}{$form.f.changelog.fieldErrors}{/if}
{$form.f.changelog|unsafe}
</td>
</tr>
<tr>
<th><strong>{$form.f.file.labelTag}:</strong></th>
<td>{if $form.f.file.errors}{$form.f.file.fieldErrors}{/if}
{$form.f.file|unsafe}
</td>
</tr>
<tr>
<th>{$form.f.label1.labelTag}:</th>
<td>
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}<br />
{if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe}
{if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe}
{if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="{trans 'Submit File'}" name="submit" /> | <a href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'Cancel'}</a>
</td>
</tr>
</table>
</form>
{/block}
{block context}
<div class="issue-submit-info">
<h2>{trans 'Instructions'}</h2>
<p>{blocktrans}Each file must have a distinct name and file contents
cannot be changed, so be sure to include release numbers in each file
name.{/blocktrans}</p>
{assign $url = 'http://daringfireball.net/projects/markdown/syntax'}
<p>{blocktrans}You can use the <a href="{$url}">Markdown syntax</a> for the description.{/blocktrans}</p>
</div>
{/block}
{block javascript}
<script type="text/javascript">
document.getElementById('id_summary').focus()
</script>
{include 'idf/downloads/js-autocomplete.html'}{/block}
src/IDF/templates/idf/downloads/createFromArchive.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{extends "idf/downloads/base.html"}
{block docclass}yui-t3{assign $inCreateFromArchive=true}{/block}
{block body}
{if $form.errors}
<div class="px-message-error">
<p>{trans 'The form contains some errors. Please correct them to submit the archive.'}</p>
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
</div>
{/if}
<form method="post" enctype="multipart/form-data" action=".">
<table class="form" summary="">
<tr>
<th><strong>{$form.f.archive.labelTag}:</strong></th>
<td>{if $form.f.archive.errors}{$form.f.archive.fieldErrors}{/if}
{$form.f.archive|unsafe}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="{trans 'Submit Archive'}" name="submit" /> | <a href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'Cancel'}</a>
</td>
</tr>
</table>
</form>
{/block}
{block context}
<div class="issue-submit-info">
<h2>{trans 'Instructions'}</h2>
<p>{blocktrans}The archive must include a <code>manifest.xml</code> file with meta information about the
files to process inside the archive. All processed files must be unique or replace existing files explicitely.{/blocktrans}</p>
{aurl 'url', 'IDF_Views::faqArchiveFormat'}
<p>{blocktrans}You can learn more about the archive format <a href="{$url}">here</a>.{/blocktrans}</p>
</div>
{/block}
src/IDF/templates/idf/downloads/index.html
33
44
55
6
6
77
88
99
{block body}
{$downloads.render}
{if $isOwner or $isMember}
{aurl 'url', 'IDF_Views_Download::submit', array($project.shortname)}
{aurl 'url', 'IDF_Views_Download::create', array($project.shortname)}
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Download'}</a></p>{/if}
{/block}
src/IDF/templates/idf/downloads/submit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{extends "idf/downloads/base.html"}
{block docclass}yui-t3{assign $inSubmit=true}{/block}
{block body}
{if $form.errors}
<div class="px-message-error">
<p>{trans 'The form contains some errors. Please correct them to submit the file.'}</p>
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
</div>
{/if}
<form method="post" enctype="multipart/form-data" action=".">
<table class="form" summary="">
<tr>
<th><strong>{$form.f.summary.labelTag}:</strong></th>
<td>{if $form.f.summary.errors}{$form.f.summary.fieldErrors}{/if}
{$form.f.summary|unsafe}
</td>
</tr>
<tr>
<th>{$form.f.changelog.labelTag}:</th>
<td>{if $form.f.changelog.errors}{$form.f.changelog.fieldErrors}{/if}
{$form.f.changelog|unsafe}
</td>
</tr>
<tr>
<th><strong>{$form.f.file.labelTag}:</strong></th>
<td>{if $form.f.file.errors}{$form.f.file.fieldErrors}{/if}
{$form.f.file|unsafe}
</td>
</tr>
<tr>
<th>{$form.f.label1.labelTag}:</th>
<td>
{if $form.f.label1.errors}{$form.f.label1.fieldErrors}{/if}{$form.f.label1|unsafe}
{if $form.f.label2.errors}{$form.f.label2.fieldErrors}{/if}{$form.f.label2|unsafe}
{if $form.f.label3.errors}{$form.f.label3.fieldErrors}{/if}{$form.f.label3|unsafe}<br />
{if $form.f.label4.errors}{$form.f.label4.fieldErrors}{/if}{$form.f.label4|unsafe}
{if $form.f.label5.errors}{$form.f.label5.fieldErrors}{/if}{$form.f.label5|unsafe}
{if $form.f.label6.errors}{$form.f.label6.fieldErrors}{/if}{$form.f.label6|unsafe}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="{trans 'Submit File'}" name="submit" /> | <a href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'Cancel'}</a>
</td>
</tr>
</table>
</form>
{/block}
{block context}
<div class="issue-submit-info">
<h2>{trans 'Instructions'}</h2>
<p>{blocktrans}Each file must have a distinct name and file contents
cannot be changed, so be sure to include release numbers in each file
name.{/blocktrans}</p>
{assign $url = 'http://daringfireball.net/projects/markdown/syntax'}
<p>{blocktrans}You can use the <a href="{$url}">Markdown syntax</a> for the description.{/blocktrans}</p>
</div>
{/block}
{block javascript}
<script type="text/javascript">
document.getElementById('id_summary').focus()
</script>
{include 'idf/downloads/js-autocomplete.html'}{/block}
src/IDF/templates/idf/faq-archive-format.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{extends "idf/base-simple.html"}
{block docclass}yui-t3{/block}
{block body}
<p>At the moment, this documentation is only available in English.</p>
<ul>
<li><a href="#q-motivation">Motivation</a></li>
<li><a href="#q-manifest">The manifest format</a></li>
</ul>
<h2 id="q-motivation">Motivation</h2>
<p>
Adding multiple, individual downloads to a project for a release can be a tedious task if
one has to select each file manually, and then has to fill in the summary and correct labels
for each of these downloads individually.
</p>
<p>
InDefero therefor supports the upload of "archives" that contain multiple downloadable
files. These archives are standard PKZIP files with only one special property - they
contain an additional manifest file which describes the files that should be published.
</p>
<p>
Once such an archive has been uploaded and validated by InDefero, its files are extracted
and individual downloads are created for each of them. If the archive contains files
that should deprecate existing downloads, then InDefero takes care of this as well -
automatically.
</p>
<p>
An archive file and its manifest file can easily be compiled, either by hand with the help
of a text editor, or through an automated build system with the help of your build tool of
choice, such as Apache Ant.
</p>
<h2 id="q-manifest">The manifest format</h2>
<p>
The manifest is an XML file that follows a simple syntax. As it is always easier to look
at an example, here you have one:
</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;manifest>
&lt;file>
&lt;name>foo-1.2.tar.gz&lt;/name>
&lt;summary>Tarball&lt;/summary>
&lt;replaces>foo-1.1.tar.gz&lt;/replaces>
&lt;tags>
&lt;tag>Type:Archive&lt;/tag>
&lt;/tags>
&lt;/file>
&lt;file>
&lt;name>foo-1.2-installer.exe&lt;/name>
&lt;summary>Windows MSI Installer&lt;/summary>
&lt;description>This installer needs Windows XP SP2 or later.&lt;/description>
&lt;tags>
&lt;tag>Type:Installer&lt;/tag>
&lt;tag>OpSys:Windows&lt;/tag>
&lt;/tags>
&lt;/file>
&lt;/manifest>
</pre>
<p>
This is the DTD for the format:
</p>
<pre>
&lt;!DOCTYPE manifest [
&lt;!ELEMENT manifest (file+)>
&lt;!ELEMENT file (name,summary,replaces?,description?,tags?)>
&lt;!ELEMENT name (#PCDATA)>
&lt;!ELEMENT summary (#PCDATA)>
&lt;!ELEMENT replaces (#PCDATA)>
&lt;!ELEMENT description (#PCDATA)>
&lt;!ELEMENT tags (tag+)>
&lt;!ELEMENT tag (#PCDATA)>
]>
</pre>
<p>
The format is more or less self-explaining, all fields map to properties of a single download.
One special element has been introduced though, <code>replaces</code>. If this optional element
is given, InDefero looks for a file with that name in the project and deprecates it by attaching
the label <code>Other:Deprecated</code> to it. If no such file is found, the element is simply
ignored.
</p>
{/block}
{block context}
<p>{trans 'Here we are, just to help you.'}</p>
<h2>{trans 'Projects'}</h2>
<ul>{foreach $projects as $p}
<li><a href="{url 'IDF_Views_Project::home', array($p.shortname)}">{$p}</a></li>
{/foreach}</ul>
{/block}
src/IDF/templates/idf/faq.html
55
66
77
8
89
910
1011
......
4849
4950
5051
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
5167
5268
53
69
70
5471
55
72
5673
5774
5875
<li><a href="#q-keyboard">{trans 'What are the keyboard shortcuts?'}</a></li>
<li><a href="#q-duplicate">{trans 'How to mark an issue as duplicate?'}</a></li>
<li><a href="#q-mugshot">{trans 'How can I display my head next to my comments?'}</a></li>
<li><a href="#q-archive-format">{trans 'What is this "Upload Archive" functionality about?'}</a></li>
<li><a href="#q-api">{trans 'What is the API and how is it used?'}</a></li>
</ul>
<p>{blocktrans}You need to create an account on <a href="http://en.gravatar.com/">Gravatar</a>, this takes about 5 minutes and is free.{/blocktrans}</p>
<h2 id="q-archive-format">{trans 'What is this "Upload Archive" functionality about?'}</h2>
{blocktrans}<p>If you have to publish many files at once for a new release, it is a very tedious task
to upload them one after another and enter meta information like a summary, a description or additional
labels for each of them.</p>
<p>InDefero therefor supports a special archive format that is basically a standard zip file which comes with
some meta information. These meta information are kept in a special manifest file, which is distinctly kept from
the rest of the files in the archive that should be published.</p>
<p>Once this archive has been uploaded, InDefero reads in the meta information, unpacks the other files from
the archive and creates new individual downloads for each of them.</p>{/blocktrans}
{aurl 'url', 'IDF_Views::faqArchiveFormat'}
<p>{blocktrans}<a href="{$url}">Learn more about the archive format</a>.{/blocktrans}</p>
<h2 id="q-api">{trans 'What is the API and how is it used?'}</h2>
<p>{blocktrans}The API (Application Programming Interface) is used to interact with InDefero with another program. For example, this can be used to create a desktop program to submit new tickets easily.{/blocktrans}</p>{aurl 'url', 'IDF_Views::faqApi'}
<p>{blocktrans}The API (Application Programming Interface) is used to interact with InDefero with another program. For example, this can be used to create a desktop program to submit new tickets easily.{/blocktrans}</p>
{aurl 'url', 'IDF_Views::faqApi'}
<p>{blocktrans}<a href="{$url}">Learn more about the API</a>.{/blocktrans}</p>
{/block}
{block context}
<p>{trans 'Here we are, just to help you.'}</p>

Archive Download the corresponding diff file

Page rendered in 0.12540s using 13 queries.