diff --git a/src/IDF/Form/WikiCreate.php b/src/IDF/Form/WikiCreate.php index e7c90a1..7dbf27e 100644 --- a/src/IDF/Form/WikiCreate.php +++ b/src/IDF/Form/WikiCreate.php @@ -80,7 +80,7 @@ Add your content here. Format your content with: 'initial' => $initial, 'widget' => 'Pluf_Form_Widget_TextareaInput', 'widget_attrs' => array( - 'cols' => 58, + 'cols' => 68, 'rows' => 26, ), )); diff --git a/src/IDF/Form/WikiUpdate.php b/src/IDF/Form/WikiUpdate.php index 12214ce..06b2c4b 100644 --- a/src/IDF/Form/WikiUpdate.php +++ b/src/IDF/Form/WikiUpdate.php @@ -73,7 +73,7 @@ class IDF_Form_WikiUpdate extends Pluf_Form 'initial' => $rev->content, 'widget' => 'Pluf_Form_Widget_TextareaInput', 'widget_attrs' => array( - 'cols' => 58, + 'cols' => 68, 'rows' => 26, ), )); diff --git a/src/IDF/Project.php b/src/IDF/Project.php index 923cdf9..005eff6 100644 --- a/src/IDF/Project.php +++ b/src/IDF/Project.php @@ -62,6 +62,14 @@ class IDF_Project extends Pluf_Model 'help_text' => __('Used in the url to access the project, must be short with only letters and numbers.'), 'unique' => true, ), + 'shortdesc' => + array( + 'type' => 'Pluf_DB_Field_Varchar', + 'blank' => false, + 'size' => 255, + 'verbose' => __('short description'), + 'help_text' => __('A one line description of the project.'), + ), 'description' => array( 'type' => 'Pluf_DB_Field_Text', diff --git a/src/IDF/Views/Project.php b/src/IDF/Views/Project.php index def39a9..3d113cf 100644 --- a/src/IDF/Views/Project.php +++ b/src/IDF/Views/Project.php @@ -134,7 +134,8 @@ class IDF_Views_Project { $prj = $request->project; $title = sprintf(__('%s Project Summary'), (string) $prj); - $form_fields = array('fields'=> array('name', 'description')); + $form_fields = array('fields'=> array('name', 'shortdesc', + 'description')); if ($request->method == 'POST') { $form = Pluf_Shortcuts_GetFormForModel($prj, $request->POST, $form_fields); @@ -149,6 +150,9 @@ class IDF_Views_Project $form = Pluf_Shortcuts_GetFormForModel($prj, $prj->getData(), $form_fields); } + $form->fields['description']->widget->attrs['cols'] = 68; + $form->fields['description']->widget->attrs['rows'] = 26; + $form->fields['shortdesc']->widget->attrs['size'] = 67; return Pluf_Shortcuts_RenderToResponse('idf/admin/summary.html', array( 'page_title' => $title, diff --git a/src/IDF/templates/idf/admin/summary.html b/src/IDF/templates/idf/admin/summary.html index 35e7517..8ee1d71 100644 --- a/src/IDF/templates/idf/admin/summary.html +++ b/src/IDF/templates/idf/admin/summary.html @@ -18,6 +18,13 @@
{trans 'No projects managed with InDefero were found.'}
-{if $user.administrator}{blocktrans}Create a new project.{/blocktrans}
{/if} +{if $isAdmin} +{aurl 'url', 'IDF_Views_Admin::projectCreate'} +{/if} {else} {/if} {/block}