// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Improve titles for consistency, so that each title explains correctly what each
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Improve titles for consistency, so that each title explains correctly what each
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Fejl',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Fehler',
'label.template' => 'Template',
'label.attachments' => 'Attachments',
'label.files' => 'Files',
+'label.image' => 'Image',
// Form titles.
'title.error' => 'Error',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Improve titles for consistency, so that each title explains correctly what each
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'خطا',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Virhe',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Erreur',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Σφάλμα',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'שגיאה',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Improve titles for consistency, so that each title explains correctly what each
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// TODO: translate the following.
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Fout',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Błąd',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Erro',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Improve titles for consistency, so that each title explains correctly what each
'label.template' => 'Шаблон',
'label.attachments' => 'Приложения',
'label.files' => 'Файлы',
+'label.image' => 'Изображение',
// Form titles.
'title.error' => 'Ошибка',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Chyba',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
'title.error' => 'Greška',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Rubriker för formulär
'title.error' => 'Fel',
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// Form titles.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
// 'label.template' => 'Template',
// 'label.attachments' => 'Attachments',
// 'label.files' => 'Files',
+// 'label.image' => 'Image',
// Form titles.
// TODO: Translate the following.
--- /dev/null
+<script>
+ function chLocation(newLocation) { document.location = newLocation; }
+</script>
+
+<table cellspacing="0" cellpadding="7" border="0" width="720">
+ <tr>
+ <td valign="top">
+{if $user->can('manage_projects')}
+ <table cellspacing="1" cellpadding="3" border="0" width="100%">
+ {if $inactive_projects}
+ <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.active_projects}</td></tr>
+ {/if}
+ <tr>
+ <td width="35%" class="tableHeader">{$i18n.label.image}</td>
+ <td width="35%" class="tableHeader">{$i18n.label.description}</td>
+ {if $show_files}
+ <td class="tableHeader">{$i18n.label.files}</td>
+ {/if}
+ <td class="tableHeader">{$i18n.label.edit}</td>
+ <td class="tableHeader">{$i18n.label.delete}</td>
+ </tr>
+ {if $active_projects}
+ {foreach $active_projects as $project}
+ <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+ <td>{$project.name|escape}</td>
+ <td>{$project.description|escape}</td>
+ {if $show_files}
+ <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+ {/if}
+ <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
+ <td><a href="project_delete.php?id={$project.id}">{$i18n.label.delete}</a></td>
+ </tr>
+ {/foreach}
+ {/if}
+ </table>
+
+ <table width="100%">
+ <tr>
+ <td align="center"><br>
+ <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
+ </td>
+ </tr>
+ </table>
+
+ {if $inactive_projects}
+ <table cellspacing="1" cellpadding="3" border="0" width="100%">
+ <tr><td class="sectionHeaderNoBorder">{$i18n.form.projects.inactive_projects}</td></tr>
+ <tr>
+ <td width="35%" class="tableHeader">{$i18n.label.thing_name}</td>
+ <td width="35%" class="tableHeader">{$i18n.label.description}</td>
+ {if $show_files}
+ <td class="tableHeader">{$i18n.label.files}</td>
+ {/if}
+ <td class="tableHeader">{$i18n.label.edit}</td>
+ <td class="tableHeader">{$i18n.label.delete}</td>
+ </tr>
+ {foreach $inactive_projects as $project}
+ <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+ <td>{$project.name|escape}</td>
+ <td>{$project.description|escape}</td>
+ {if $show_files}
+ <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+ {/if}
+ <td><a href="project_edit.php?id={$project.id}">{$i18n.label.edit}</a></td>
+ <td><a href="project_delete.php?id={$project.id}">{$i18n.label.delete}</a></td>
+ </tr>
+ {/foreach}
+ </table>
+
+ <table width="100%">
+ <tr>
+ <td align="center"><br>
+ <form><input type="button" onclick="chLocation('project_add.php');" value="{$i18n.button.add}"></form>
+ </td>
+ </tr>
+ </table>
+ {/if}
+{else}
+ <table cellspacing="1" cellpadding="3" border="0" width="100%">
+ <tr>
+ <td class="tableHeader">{$i18n.label.thing_name}</td>
+ <td class="tableHeader">{$i18n.label.description}</td>
+ {if $show_files}
+ <td class="tableHeader">{$i18n.label.files}</td>
+ {/if}
+ </tr>
+ {if $active_projects}
+ {foreach $active_projects as $project}
+ <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
+ <td>{$project.name|escape}</td>
+ <td>{$project.description|escape}</td>
+ {if $show_files}
+ <td><a href="project_files.php?id={$project.id}">{$i18n.label.view}</a></td>
+ {/if}
+ </tr>
+ {/foreach}
+ {/if}
+ </table>
+{/if}
+ </td>
+ </tr>
+</table>
// +----------------------------------------------------------------------+
require_once('initialize.php');
-import('form.Form');
-import('ttGroupHelper');
+import('ttProjectHelper');
// Access checks.
if (!(ttAccessAllowed('view_own_projects') || ttAccessAllowed('manage_projects'))) {
header('Location: feature_disabled.php');
exit();
}
+$cl_project_id = (int)$request->getParameter('id');
+$project = ttProjectHelper::get($cl_project_id);
+if (!$project) {
+ header('Location: access_denied.php');
+ exit();
+}
// End of access checks.
-if($user->can('manage_projects')) {
- $active_projects = ttGroupHelper::getActiveProjects();
- $inactive_projects = ttGroupHelper::getInactiveProjects();
-} else
- $active_projects = $user->getAssignedProjects();
+$files = null;
+// $files = ttAttachmentHelper::getProjectFiles();
-$smarty->assign('active_projects', $active_projects);
-$smarty->assign('inactive_projects', $inactive_projects);
-$smarty->assign('show_files', $user->isPluginEnabled('at'));
+$smarty->assign('files', $files);
$smarty->assign('title', $i18n->get('title.project_files'));
-$smarty->assign('content_page_name', 'projects.tpl');
+$smarty->assign('content_page_name', 'project_files.tpl');
$smarty->display('index.tpl');
// +----------------------------------------------------------------------+
require_once('initialize.php');
-import('form.Form');
import('ttGroupHelper');
// Access checks.