From 9f108dd1a969473375341d92a7b1252fa2cedc9a Mon Sep 17 00:00:00 2001 From: mszulecki Date: Thu, 14 Jun 2007 17:09:01 +0000 Subject: Initial import. git-svn-id: http://svn.sukimashita.com/repos/mailadmin/trunk@2 4281df72-ff29-0410-8fee-2d9ac0c5f5a7 --- .../mailadmin/template/templates/_edit_actions.php | 13 +++ .../mailadmin/template/templates/_edit_footer.php | 0 .../mailadmin/template/templates/_edit_form.php | 93 ++++++++++++++++++++++ .../mailadmin/template/templates/_edit_header.php | 0 .../template/templates/_edit_messages.php | 5 ++ .../mailadmin/template/templates/_filters.php | 36 +++++++++ .../mailadmin/template/templates/_list.php | 18 +++++ .../mailadmin/template/templates/_list_actions.php | 10 +++ .../mailadmin/template/templates/_list_footer.php | 0 .../mailadmin/template/templates/_list_header.php | 0 .../template/templates/_list_messages.php | 13 +++ .../template/templates/_list_td_actions.php | 5 ++ .../template/templates/_list_td_stacked.php | 16 ++++ .../template/templates/_list_td_tabular.php | 30 +++++++ .../template/templates/_list_th_stacked.php | 1 + .../template/templates/_list_th_tabular.php | 28 +++++++ .../mailadmin/template/templates/_pager.php | 13 +++ .../mailadmin/template/templates/editSuccess.php | 20 +++++ .../mailadmin/template/templates/listSuccess.php | 38 +++++++++ 19 files changed, 339 insertions(+) create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_actions.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_footer.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_form.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_header.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_messages.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_filters.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_actions.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_footer.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_header.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_messages.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_actions.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_stacked.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_tabular.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_stacked.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_tabular.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/_pager.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/editSuccess.php create mode 100644 data/generator/sfPropelAdmin/mailadmin/template/templates/listSuccess.php (limited to 'data/generator/sfPropelAdmin/mailadmin/template/templates') diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_actions.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_actions.php new file mode 100644 index 0000000..1d0d720 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_actions.php @@ -0,0 +1,13 @@ + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_footer.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_footer.php new file mode 100644 index 0000000..e69de29 diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_form.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_form.php new file mode 100644 index 0000000..47c385e --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_form.php @@ -0,0 +1,93 @@ +[?php echo form_tag('getModuleName() ?>/'.$sf_context->getActionName(), array( + 'id' => 'sf_admin_edit_form', + 'name' => 'sf_admin_edit_form', + 'multipart' => true, +getColumnCategories('edit.display') as $category): ?> +getColumns('edit.display', $category) as $name => $column): ?> +getParameterValue('edit.fields.'.$column->getName().'.type')): ?> + 'onsubmit' => 'double_list_submit(); return true;' + + + + +)) ?] + +getPrimaryKey() as $pk): ?> +[?php echo object_input_hidden_tag($getSingularName() ?>, 'getgetPhpName() ?>') ?] + + + +getColumnCategories('edit.display') as $category): ?> + +
+

[?php echo __('') ?]

+ + + +getParameterValue('edit.hide', array()) ?> +getColumns('edit.display', $category) as $name => $column): ?> +getName(), $hides)) continue ?> +isPrimaryKey()) continue ?> +getParameterValue('edit.fields.'.$column->getName().'.credentials') ?> + + [?php if ($sf_user->hasCredential()): ?] + +getParameterValue('edit.fields.'.$column->getName().'.only_for'); if($only_for): ?> +[?php if($sf_context->getActionName()==''): ?] + +
+ [?php echo label_for('getParameterValue("edit.fields.".$column->getName().".label_for", $this->getSingularName()."[".$column->getName()."]") ?>', __($labels['getSingularName() ?>{getName() ?>}']), 'isNotNull()): ?>class="required" ') ?] +
+ [?php if ($sf_request->hasError('getSingularName() ?>{getName() ?>}')): ?] + [?php echo form_error('getSingularName() ?>{getName() ?>}', array('class' => 'form-error-msg')) ?] + [?php endif; ?] + [?php $value = getColumnEditTag($column); ?>; echo $value ? $value : ' ' ?] + getHelp($column, 'edit') ?> +
+
+ + +[?php endif; ?] + + + + [?php endif; ?] + + + +
+ + +[?php include_partial('edit_actions', array('getSingularName() ?>' => $getSingularName() ?>)) ?] + + + + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_header.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_header.php new file mode 100644 index 0000000..e69de29 diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_messages.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_messages.php new file mode 100644 index 0000000..2306f05 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_edit_messages.php @@ -0,0 +1,5 @@ +[?php if ($sf_flash->has('notice')): ?] +
+

[?php echo __($sf_flash->get('notice')) ?]

+
+[?php endif; ?] diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_filters.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_filters.php new file mode 100644 index 0000000..76be382 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_filters.php @@ -0,0 +1,36 @@ +[?php use_helper('Object') ?] + +getParameterValue('list.filters')): ?> + + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list.php new file mode 100644 index 0000000..cc85625 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list.php @@ -0,0 +1,18 @@ + + +getParameterValue('list.object_actions')): ?> +[?php $c = 0; ?] +getParameterValue('list.object_actions') as $actionName => $params): ?> + addCredentialCondition('[?php $c++; ?]', $params) ?> + + + +[?php include_partial('list_th_getParameterValue('list.layout', 'tabular') ?>') ?] + +[?php $i = 1; foreach ($pager->getResults() as $getSingularName() ?>): $odd = fmod(++$i, 2) ?] + +[?php include_partial('list_td_actions', array('getSingularName() ?>' => $getSingularName() ?>)) ?] +[?php include_partial('list_td_getParameterValue('list.layout', 'tabular') ?>', array('getSingularName() ?>' => $getSingularName() ?>)) ?] + +[?php endforeach; ?] +
[?php echo __('Actions') ?]
diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_actions.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_actions.php new file mode 100644 index 0000000..a13263c --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_actions.php @@ -0,0 +1,10 @@ + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_footer.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_footer.php new file mode 100644 index 0000000..e69de29 diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_header.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_header.php new file mode 100644 index 0000000..e69de29 diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_messages.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_messages.php new file mode 100644 index 0000000..c2eb7c7 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_messages.php @@ -0,0 +1,13 @@ +[?php if ($sf_request->getError('delete')): ?] +
+

Could not delete the selected getSingularName()) ?>

+ +
+[?php endif; ?] +[?php if ($sf_flash->has('notice')): ?] +
+

[?php echo image_tag("information.gif","alt=[?]")?] [?php echo __($sf_flash->get('notice')) ?]

+
+[?php endif; ?] diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_actions.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_actions.php new file mode 100644 index 0000000..fcaca78 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_actions.php @@ -0,0 +1,5 @@ +getParameterValue('list.object_actions')): ?> +getParameterValue('list.object_actions') as $actionName => $params): ?> + addCredentialCondition("", $params) ?> + + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_stacked.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_stacked.php new file mode 100644 index 0000000..0d9e274 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_stacked.php @@ -0,0 +1,16 @@ + +getParameterValue('list.params')): ?> + getI18NString('list.params') ?> + +getParameterValue('list.hide', array()) ?> +getColumns('list.display') as $column): ?> +getName(), $hides)) continue ?> + isLink()): ?> + [?php echo link_to(getColumnListTag($column) ?> ? getColumnListTag($column) ?> : __('-'), 'getModuleName() ?>/edit?getPrimaryKeyUrlParams() ?>) ?] + + [?php echo getColumnListTag($column) ?> ?] + + - + + + \ No newline at end of file diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_tabular.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_tabular.php new file mode 100644 index 0000000..e4e50bb --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_td_tabular.php @@ -0,0 +1,30 @@ +getParameterValue('list.hide', array()) ?> +getColumns('list.display') as $column): ?> +getName(), $hs)) continue ?> +getParameterValue('list.fields.'.$column->getName().'.credentials') ?> + + [?php if ($sf_user->hasCredential()): ?] + + getParameterValue('list.fields.'.$column->getName().'.params'); + $user_params = is_array($user_params) ? sfToolkit::stringToArray($user_params) : $user_params; + ?> + isLink()): ?> + + getParameterValue('list.object_actions.edit.credentials'); ?> + + [?php if ($sf_user->hasCredential()): ?] + + [?php echo tag('td', , true) ?][?php echo link_to(getColumnListTag($column) ?> ? getColumnListTag($column) ?> : __('-'), 'getModuleName() ?>/edit?getPrimaryKeyUrlParams() ?>) ?] + + [?php else: ?] + [?php echo tag('td', , true) ?][?php echo getColumnListTag($column) ?> ?] + [?php endif; ?] + + + [?php echo tag('td', , true) ?][?php echo getColumnListTag($column) ?> ?] + + + [?php endif; ?] + + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_stacked.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_stacked.php new file mode 100644 index 0000000..305bdcf --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_stacked.php @@ -0,0 +1 @@ +[?php include_partial('list_th_tabular') ?] diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_tabular.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_tabular.php new file mode 100644 index 0000000..4a48eca --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_list_th_tabular.php @@ -0,0 +1,28 @@ +getParameterValue('list.hide', array()) ?> +getColumns('list.display') as $column): ?> +getName(), $hides)) continue ?> +getParameterValue('list.fields.'.$column->getName().'.credentials') ?> + + [?php if ($sf_user->hasCredential()): ?] + + getParameterValue('list.fields.'.$column->getName().'.params'); + $user_params = is_array($user_params) ? $user_params : sfToolkit::stringToArray($user_params); + $user_params['id'] = "sf_admin_list_th_".$column->getName(); + ?> + [?php echo tag('th', , true) ?] + isReal()): ?> + [?php if ($sf_user->getAttribute('sort', null, 'sf_admin/getSingularName() ?>/sort') == 'getName() ?>'): ?] + [?php echo link_to(__('getParameterValue('list.fields.'.$column->getName().'.name')) ?>'), 'getModuleName() ?>/list?sort=getName() ?>&type='.($sf_user->getAttribute('type', 'asc', 'sf_admin/getSingularName() ?>/sort') == 'asc' ? 'desc' : 'asc')) ?][?php $sorttype = $sf_user->getAttribute('type', 'asc','sf_admin/getSingularName() ?>/sort'); if($sorttype=='images') $sorttype = 'desc'; ?][?php echo image_tag('sort-'.$sorttype.'.gif', array('alt' => __($sorttype), 'border' => 0)) ?] + [?php else: ?] + [?php echo link_to(__('getParameterValue('list.fields.'.$column->getName().'.name')) ?>'), 'getModuleName() ?>/list?sort=getName() ?>&type=asc') ?] + [?php endif; ?] + + [?php echo __('getParameterValue('list.fields.'.$column->getName().'.name')) ?>') ?] + + getHelpAsIcon($column, 'list') ?> + + + [?php endif; ?] + + diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/_pager.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/_pager.php new file mode 100644 index 0000000..818d925 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/_pager.php @@ -0,0 +1,13 @@ +[?php if($pager->getNbResults() > 25 || $pager->haveToPaginate()): ?] +
+ +
+[?php endif; ?] diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/editSuccess.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/editSuccess.php new file mode 100644 index 0000000..2727a2c --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/editSuccess.php @@ -0,0 +1,20 @@ +[?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?] + +
+ +

[?php echo ($sf_context->getActionName()=='create' ? getI18NString('create.title', 'create '.$this->getModuleName(), false) ?>: getI18NString('edit.title', 'edit '.$this->getModuleName(), false) ?>) ?]

+ +
+[?php include_partial('getModuleName() ?>/edit_header', array('getSingularName() ?>' => $getSingularName() ?>)) ?] +
+ +
+[?php include_partial('getModuleName() ?>/edit_messages', array('getSingularName() ?>' => $getSingularName() ?>, 'labels' => $labels)) ?] +[?php include_partial('getModuleName() ?>/edit_form', array('getSingularName() ?>' => $getSingularName() ?>, 'labels' => $labels)) ?] +
+ + + +
diff --git a/data/generator/sfPropelAdmin/mailadmin/template/templates/listSuccess.php b/data/generator/sfPropelAdmin/mailadmin/template/templates/listSuccess.php new file mode 100644 index 0000000..c92aaf4 --- /dev/null +++ b/data/generator/sfPropelAdmin/mailadmin/template/templates/listSuccess.php @@ -0,0 +1,38 @@ +[?php use_helper('I18N', 'Date', 'Tag', 'Javascript') ?] + +
+ +

getI18NString('list.title', $this->getModuleName().' list') ?>

+ +
+[?php include_partial('getModuleName() ?>/list_header', array('pager' => $pager)) ?] +[?php include_partial('getModuleName() ?>/list_messages', array('pager' => $pager)) ?] +
+ +
+[?php echo __('Results') ?]: [?php echo $pager->getNbResults() ?]Entries per Page: [?php echo select_tag("resultsperpage", options_for_select(getParameterValue('list.max_per_page_options', array(10,25,50,100)); var_export(@array_combine($opt,$opt)); ?>, $pager->getMaxPerPage()), array("onchange" => "document.location.href = '".url_for('getModuleName() ?>/list')."?max_per_page='+this.value")) ?]getParameterValue('list.filters')): ?>[?php echo link_to_function(__('Toggle Filter Settings'), visual_effect('toggle_blind', 'sf_admin_filters' )) ?] + + +getParameterValue('list.filters')): ?> +
+[?php include_partial('filters', array('filters' => $filters)) ?] +
+ + +[?php include_partial('pager', array('pager' => $pager, 'location' => 'top')) ?] +
+[?php if (!$pager->getNbResults()): ?] +[?php echo __('no result') ?] +[?php else: ?] +[?php include_partial('getModuleName() ?>/list', array('pager' => $pager)) ?] +[?php endif; ?] +
+[?php include_partial('pager', array('pager' => $pager, 'location' => 'bottom')) ?] +[?php include_partial('list_actions') ?] +
+ + + +
-- cgit v1.1-32-gdbae