Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update template

  • Loading branch information...
commit f642996ad4153d45a03ffe16c3a5f01fb8b13659 1 parent 685ddf1
Vincent CHALAMON authored
4 config/app.yml.sample
View
@@ -3,7 +3,7 @@ all:
sf_admin_template:
# Configuration du menu
menus:
- # Création d'un élément de menu "article"
+ # Création d'un élément de menu
dashboard:
label: Tableau de bord
credentials: [admin]
@@ -13,6 +13,4 @@ all:
# Configuration de GoogleAnalytics
google_analytics:
code: "UA-1234567-1"
- login: monlogin
- password: monpassword
profile: 12345678
36 data/generator/sfDoctrineModule/admin_template/template/templates/_form_columns.php
View
@@ -1,26 +1,32 @@
<div class="contentbox sf_admin_form">
[?php echo form_tag_for($form, '@<?php echo $this->params['route_prefix'] ?>', array('id' => $form->getName().'_form')) ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
[?php echo $form->renderHiddenFields(false) ?]
<div class="left">
[?php include_partial('<?php echo $this->getModuleName() ?>/form', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
</div>
<div class="right">
[?php foreach ($configuration->getFormFields($form, 'columns') as $fieldset => $fields): ?]
- [?php foreach ($fields as $name => $field): ?]
- [?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?]
- <li>
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_field', array(
- 'name' => $name,
- 'attributes' => $field->getConfig('attributes', array()),
- 'label' => $field->getConfig('label'),
- 'help' => $field->getConfig('help'),
- 'form' => $form,
- 'field' => $field,
- 'class' => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name,
- )) ?]
- </li>
- [?php endforeach; ?]
+ <fieldset id="sf_fieldset_[?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?]">
+ [?php if ('NONE' != $fieldset): ?]
+ <legend>[?php echo __($fieldset, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</legend>
+ [?php endif; ?]
+ <ul>
+ [?php foreach ($fields as $name => $field): ?]
+ [?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?]
+ <li>
+ [?php include_partial('<?php echo $this->getModuleName() ?>/form_field', array(
+ 'name' => $name,
+ 'attributes' => $field->getConfig('attributes', array()),
+ 'label' => $field->getConfig('label'),
+ 'help' => $field->getConfig('help'),
+ 'form' => $form,
+ 'field' => $field,
+ 'class' => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name,
+ )) ?]
+ </li>
+ [?php endforeach; ?]
+ </ul>
+ </fieldset>
[?php endforeach; ?]
</div>
<div class="clear"></div>
2  data/generator/sfDoctrineModule/admin_template/template/templates/editSuccess.php
View
@@ -23,7 +23,7 @@
<div class="headings">
<h2>[?php echo <?php echo $this->getI18NString('edit.title') ?> ?]</h2>
</div>
-
+
[?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
[?php include_partial('<?php echo $this->getModuleName() ?>/form_'.$configuration->getEditTemplate(), array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
2  data/generator/sfDoctrineModule/admin_template/template/templates/newSuccess.php
View
@@ -23,7 +23,7 @@
<div class="headings">
<h2>[?php echo <?php echo $this->getI18NString('new.title') ?> ?]</h2>
</div>
-
+
[?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
[?php include_partial('<?php echo $this->getModuleName() ?>/form_'.$configuration->getNewTemplate(), array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
3  modules/sfAdminDashboard/lib/gapi.class.php
View
@@ -33,7 +33,8 @@ class gapi
const report_data_url = 'https://www.google.com/analytics/feeds/data';
const interface_name = 'GAPI-1.3';
const dev_mode = false;
- const report_url = 'https://www.google.com/analytics/reporting/?id=%report_id%';
+ //const report_url = 'https://www.google.com/analytics/reporting/?id=%report_id%';
+ const report_url = 'https://www.google.com/analytics/web/#report/visitors-overview/a8749552w16603850p%report_id%/';
private $auth_token = null;
private $report_id = null;
8 modules/sfAdminDashboard/templates/dashboardSuccess.php
View
@@ -18,7 +18,7 @@
<?php echo $ga->getRawValue()->getGapiAreaChart(array("date"), array("visits"), "date", null, date('Y-m-d', strtotime("-20 days"))) ?>
</div>
<div class="access">
- <a target="_blank" href="https://www.google.com/analytics/reporting/?id=<?php echo sfConfig::get('google_analytics_profile') ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
+ <a target="_blank" href="<?php echo $ga->getLinkToReport() ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
</div>
</div>
<div class="element frequentation">
@@ -49,7 +49,7 @@
</table>
</div>
<div class="access">
- <a target="_blank" href="https://www.google.com/analytics/reporting/?id=<?php echo sfConfig::get('google_analytics_profile') ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
+ <a target="_blank" href="<?php echo $ga->getLinkToReport() ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
</div>
</div>
<div class="element left sources">
@@ -58,7 +58,7 @@
<?php echo $ga->getRawValue()->getGapiPieChart(array("source"), array("visits"), "-visits", null, null, null, 1, 5) ?>
</div>
<div class="access">
- <a target="_blank" href="https://www.google.com/analytics/reporting/?id=<?php echo sfConfig::get('google_analytics_profile') ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
+ <a target="_blank" href="<?php echo $ga->getLinkToReport() ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
</div>
</div>
<div class="element right origine">
@@ -67,7 +67,7 @@
<?php echo $ga->getRawValue()->getGapiMap(array("country"), array("visits")) ?>
</div>
<div class="access">
- <a target="_blank" href="https://www.google.com/analytics/reporting/?id=<?php echo sfConfig::get('google_analytics_profile') ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
+ <a target="_blank" href="<?php echo $ga->getLinkToReport() ?>"><?php echo __("View on GoogleAnalytics", null, "sf_admin") ?></a>
</div>
</div>
<div class="clear"></div>
2  web/css/styles.css
View
@@ -57,7 +57,7 @@ ul.pagination li.page a:hover {background: #00789F url(../images/bg_buttons.png)
width: 28%;
}
.contentbox .right textarea {
- width: 250px;
+ width: 230px !important;
height: 100px;
}
Please sign in to comment.
Something went wrong with that request. Please try again.