Indefero

Indefero Commit Details


Date:2011-04-01 07:17:56 (13 years 8 months ago)
Author:William MARTIN
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:9a93acd1a55e168061e2597577e5a0109cd6c738
Parents: 587aa11cdaec23f2b225a126c8b0e67dd5d9a1bb
Message:Update the admin template

Changes:

File differences

src/IDF/Views/Project.php
266266
267267
268268
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
269296
270297
271298
......
292319
293320
294321
322
295323
296324
297325
public function admin($request, $match)
{
$prj = $request->project;
$title = sprintf(__('%s Project Summary'), (string) $prj);
$extra = array('project' => $prj);
if ($request->method == 'POST') {
$form = new IDF_Form_ProjectConf(array_merge($request->POST,
$request->FILES),
$extra);
if ($form->isValid()) {
$form->save();
$request->user->setMessage(__('The project has been updated.'));
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Project::admin',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
}
} else {
$form = new IDF_Form_ProjectConf($prj->getData(), $extra);
}
return Pluf_Shortcuts_RenderToResponse('idf/admin/summary.html',
array(
'page_title' => $title,
'form' => $form,
'project' => $prj,
'upload_path' => Pluf::f('upload_path'),
),
$request);
/*
$prj = $request->project;
$title = sprintf(__('%s Project Summary'), (string) $prj);
$form_fields = array('fields'=> array('name', 'shortdesc',
'description'));
'form' => $form,
),
$request);
*/
}
/**
src/IDF/templates/idf/admin/summary.html
99
1010
1111
12
12
1313
1414
1515
......
3030
3131
3232
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
3357
3458
3559
{/if}
</div>
{/if}
<form method="post" action=".">
<form method="post" enctype="multipart/form-data" action=".">
<table class="form" summary="">
<tr>
<th><strong>{$form.f.name.labelTag}:</strong></th>
{$form.f.description|unsafe}
</td>
</tr>
<tr>
<th><strong>{trans 'Actual logo'}:</strong></th>
<td>
{if $project.logo}
<img src="{$upload_path}/{$project.logo}" alt="project logo" />
{else}
{trans 'Your project do not have a logo configured yet.'}
{/if}
</td>
</tr>
<tr>
<th><strong>{$form.f.logo.labelTag}:</strong></th>
<td>{if $form.f.logo.errors}{$form.f.logo.fieldErrors}{/if}
{$form.f.logo|unsafe}
</td>
</tr>
{if $project.logo}
<tr>
<th><strong>{$form.f.logo_remove.labelTag}:</strong></th>
<td>{if $form.f.logo_remove.errors}{$form.f.logo_remove.fieldErrors}{/if}
{$form.f.logo_remove|unsafe}
</td>
</tr>
{/if}
<tr><td>&nbsp;</td>
<td>
<input type="submit" name="submit" value="{trans 'Save Changes'}" />

Archive Download the corresponding diff file

Page rendered in 0.07823s using 13 queries.