diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig index 3dbfae8..4a50fff 100644 --- a/app/Resources/views/base.html.twig +++ b/app/Resources/views/base.html.twig @@ -18,7 +18,7 @@ {# #} - + {% endblock %} {{ get_var('CssBlock')|raw }} @@ -205,10 +205,8 @@ {% block javascripts %} - - {# #} diff --git a/src/Deblan/Bundle/BlogBundle/Resources/public/css/main.css b/src/Deblan/Bundle/BlogBundle/Resources/public/css/main.css index abef269..97f44c2 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/public/css/main.css +++ b/src/Deblan/Bundle/BlogBundle/Resources/public/css/main.css @@ -32,7 +32,7 @@ h1 a:hover { #header { height: 200px; - background: #333333 url(../img/header.jpg) center center; + background: #333333 url(../img/header.jpg) -1130px 0; } #bottom { @@ -427,6 +427,9 @@ aside .glyphicon { position: relative; margin-top: -105px; height: 105px; + margin-left: auto; + margin-right: auto; + width: 990px; } #wrap { @@ -437,6 +440,14 @@ aside .glyphicon { overflow: auto; padding-bottom: 110px; min-height: 500px; + margin: auto; + width: 990px; +} + +@media (max-width: 990px) { + #bottom, #main { + width: 100%; + } } #footer { diff --git a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig index 94783c6..c4e8cc9 100644 --- a/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig +++ b/src/Deblan/Bundle/BlogBundle/Resources/views/Default/postRss.html.twig @@ -2,7 +2,7 @@ Deblan - Blog - http://www.deblan.tv/ + http://www.deblan.io/ Deblan - Blog fr diff --git a/vendor/trinity/src/Trinity/.svn/wc.db b/vendor/trinity/src/Trinity/.svn/wc.db index b998611..ddab3f6 100644 Binary files a/vendor/trinity/src/Trinity/.svn/wc.db and b/vendor/trinity/src/Trinity/.svn/wc.db differ diff --git a/vendor/trinity/src/Trinity/Bundle/AdminBreadcrumbsBundle/Listener/RequestListener.php b/vendor/trinity/src/Trinity/Bundle/AdminBreadcrumbsBundle/Listener/RequestListener.php index ff06e53..114768e 100644 --- a/vendor/trinity/src/Trinity/Bundle/AdminBreadcrumbsBundle/Listener/RequestListener.php +++ b/vendor/trinity/src/Trinity/Bundle/AdminBreadcrumbsBundle/Listener/RequestListener.php @@ -35,6 +35,10 @@ class RequestListener } } + if (!$event->getRequest()->get('_route')) { + return false; + } + $this->breadcrumbManager->buildCrudBreadcrumbFor($event->getRequest()); return true; diff --git a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Configuration/CrudConfiguration.php b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Configuration/CrudConfiguration.php index 82294c9..0e0c6a0 100644 --- a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Configuration/CrudConfiguration.php +++ b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Configuration/CrudConfiguration.php @@ -46,6 +46,8 @@ class CrudConfiguration protected $sort = null; protected $sortOrder = \Criteria::ASC; + protected $highlighting = 'edit'; + protected $rankable = false; protected $i18nCultures = array(); @@ -737,4 +739,16 @@ class CrudConfiguration { return $this->collections; } + + public function setHighlighting($highlighting) + { + $this->highlighting = $highlighting; + + return $this; + } + + public function getHighlighting() + { + return $this->highlighting; + } } diff --git a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Controller/BaseAdminController.php b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Controller/BaseAdminController.php index 85cf795..e92620c 100644 --- a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Controller/BaseAdminController.php +++ b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Controller/BaseAdminController.php @@ -488,6 +488,7 @@ class BaseAdminController extends Controller 'fields' => $this->getFields(), 'fields_templates' => $this->getConfiguration()->getFieldsTemplates(), 'fields_attrs' => $this->getConfiguration()->getDisplayFieldsAttrs(), + 'highlighting' => $this->getConfiguration()->getHighlighting(), 'list_actions' => $this->getConfiguration()->getIndexListActions(), 'index_actions' => $this->getConfiguration()->getIndexActions(), 'batch_actions' => $this->getConfiguration()->getBatchActions(), @@ -512,7 +513,7 @@ class BaseAdminController extends Controller $response = new Response(); $response->headers->setCookie($cookie); - return $response->send(); + return $response->sendHeaders(); } protected function exportTo($format) @@ -559,9 +560,9 @@ class BaseAdminController extends Controller $form = $this->getConfiguration()->getFormEdit(); - if($this->has($form)){ + if ($this->has($form)) { $form = $this->createForm($this->get($form)->getName(), $object, $this->getConfiguration()->getFormEditOptions()); - }else { + } else { $form = $this->createForm(new $form($this->getConfiguration()->getFormEditOptions()), $object); } @@ -599,9 +600,9 @@ class BaseAdminController extends Controller $form = $this->getConfiguration()->getFormNew(); - if($this->has($form)){ + if ($this->has($form)) { $form = $this->createForm($this->get($form)->getName(), $object, $this->getConfiguration()->getFormNewOptions()); - }else { + } else { $form = $this->createForm(new $form($this->getConfiguration()->getFormNewOptions()), $object); } diff --git a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/public/css/style.css b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/public/css/style.css index 6d7fb33..bcfda90 100644 --- a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/public/css/style.css +++ b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/public/css/style.css @@ -1301,6 +1301,10 @@ li.item p { margin-left: 157px; } +.vars .mce-tinymce.mce-container.mce-panel { + margin-left: 160px; +} + .user_profile_edit:hover { cursor: pointer; } diff --git a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/views/BaseAdmin/indexTbody.html.twig b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/views/BaseAdmin/indexTbody.html.twig index 33026f4..5d9245a 100644 --- a/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/views/BaseAdmin/indexTbody.html.twig +++ b/vendor/trinity/src/Trinity/Bundle/AdminBundle/Resources/views/BaseAdmin/indexTbody.html.twig @@ -14,7 +14,7 @@ {% for key, field in fields %} - {% set href = list_actions.edit is defined and key == 0 ? path(route_prefix ~ "edit", { id: object.id }) : false %} + {% set href = list_actions[highlighting] is defined and key == 0 ? path(route_prefix ~ highlighting, { id: object.id }) : false %} {{ field_render(object, field.method, field.template, href) }} diff --git a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php b/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php index 130be5e..fec6186 100644 --- a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php +++ b/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php @@ -27,7 +27,7 @@ class Node extends BaseNode public function __toString() { - return (string) $this->getTitle(); + return (string)$this->getTitle(); } public function getHttpMethod() @@ -55,7 +55,7 @@ class Node extends BaseNode public function getRealRouteName() { if ($navId = $this->getNavId()) { - return $this->getNavId().'_'.$this->getRouteName(); + return $this->getNavId() . '_' . $this->getRouteName(); } return $this->getRouteName(); @@ -325,7 +325,11 @@ class Node extends BaseNode continue; } - if (in_array($param->getName(), $injected_params) && in_array($param->getName(), array_keys($defaults))) { + if (in_array($param->getName(), $injected_params) && in_array( + $param->getName(), + array_keys($defaults) + ) + ) { $this->setUrl(preg_replace('`\/{' . $param->getName() . '}`', '', $this->getUrl())); } elseif (!preg_match('`{' . $param->getName() . '}`', $this->getUrl())) { $this->setUrl(sprintf('%s/{%s}', $this->getUrl(), $param->getName())); @@ -527,13 +531,15 @@ class Node extends BaseNode return \PropelQuery::from($this->getPage()->getDataModel()); } - public function getDataModelsCollection() + public function getDataModelsCollection($raw = false) { $method = method_exists( $this->getDataModelQuery(), 'dataModelsCollectionFind' ) ? 'dataModelsCollectionFind' : 'find'; + $method = ($raw) ? 'find' : $method; + return $this->layOnDataModels() ? call_user_func(array($this->getDataModelQuery(), $method)) : array(); } @@ -580,7 +586,11 @@ class Node extends BaseNode public function getRequirements() { - return '{' . preg_replace('/^\{{1}(.*)\}{1}$/is', '$1', str_replace(array("\r", "\n"), '', parent::getRequirements())) . '}'; + return '{' . preg_replace( + '/^\{{1}(.*)\}{1}$/is', + '$1', + str_replace(array("\r", "\n"), '', parent::getRequirements()) + ) . '}'; } public function addDefaultParams($params) diff --git a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Page.php b/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Page.php index 3491056..6a9c706 100644 --- a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Page.php +++ b/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Model/Page.php @@ -1,6 +1,7 @@ getConfiguration()->getBlock($name)->getType(); + $block = $this->getConfiguration()->getBlock($name); + if(!$block){ + throw new FatalErrorException($name." block don't exist or is not registered for this page"); + } + $type = $block->getType(); $form = new $type(); $formModel = $form->getOption('data_class') ? $form->getOption('data_class') : 'Trinity\Bundle\ContentManagerBundle\Model\Block'; diff --git a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Twig/Extension/.PageExtension.php.swp b/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Twig/Extension/.PageExtension.php.swp deleted file mode 100644 index 00ba589..0000000 Binary files a/vendor/trinity/src/Trinity/Bundle/ContentManagerBundle/Twig/Extension/.PageExtension.php.swp and /dev/null differ diff --git a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Configuration/NotificationCrudConfiguration.php b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Configuration/NotificationCrudConfiguration.php index 15822ae..12ba53a 100644 --- a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Configuration/NotificationCrudConfiguration.php +++ b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Configuration/NotificationCrudConfiguration.php @@ -44,6 +44,7 @@ class NotificationCrudConfiguration extends \Trinity\Bundle\AdminBundle\Configur ->setFieldTemplate('is_read', 'TrinityAdminBundle:BaseAdmin:bool.html.twig') ->setFieldTemplate('user_id', 'TrinityNotificationBundle:NotificationAdmin:user.html.twig') + ->setFieldTemplate('log_content_render', 'TrinityAdminBundle:BaseAdmin:raw.html.twig') ->setDisplayFieldAttrs('user_id', array('width' => 80)) ->setDisplayFieldAttrs('is_read', array('width' => 80)) diff --git a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/NotificationFilterType.php b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/NotificationFilterType.php index 4ae9d4d..15c4e29 100644 --- a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/NotificationFilterType.php +++ b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/NotificationFilterType.php @@ -46,5 +46,13 @@ class NotificationFilterType extends BaseAbstractType ) ) ); + + $builder->add( + 'logContentRender', + 'text', + array( + 'required' => false, + ) + ); } } diff --git a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php index b4c51d0..4bab0af 100644 --- a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php +++ b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php @@ -41,7 +41,7 @@ class TemplateType extends BaseAbstractType ) ); - if ($options['use_ace_editor'] == true) { + if ($options['use_ace_editor'] === true) { $builder->add( 'content', 'ace_editor', diff --git a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Notifier/EmailNotifier.php b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Notifier/EmailNotifier.php index 068327a..e2da3cc 100644 --- a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Notifier/EmailNotifier.php +++ b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Notifier/EmailNotifier.php @@ -67,6 +67,16 @@ class EmailNotifier extends AbstractNotifier 'text/html' ); + if (isset($data['attachments']) && is_array($data['attachments']) && !empty($data['attachments'])) { + foreach ($data['attachments'] as $file) { + if (is_object($file) && $file instanceof \Swift_Attachment) { + $message->attach($file); + } elseif (is_string($file) && file_exists($file) && is_readable($file) && !is_dir($file)) { + $message->attach(\Swift_Attachment::fromPath($file)); + } + } + } + $this->mailer->send($message); $this->basicNotifier->notify($template, $data); diff --git a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Resources/translations/messages.fr.xlf b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Resources/translations/messages.fr.xlf index 4baea97..40fdb6d 100644 --- a/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Resources/translations/messages.fr.xlf +++ b/vendor/trinity/src/Trinity/Bundle/NotificationBundle/Resources/translations/messages.fr.xlf @@ -50,6 +50,10 @@ Log_content_render Contenu du log + + Log content render + Contenu du log + diff --git a/vendor/trinity/src/Trinity/Bundle/VarsEditorBundle/Resources/views/VarsAdmin/index.html.twig b/vendor/trinity/src/Trinity/Bundle/VarsEditorBundle/Resources/views/VarsAdmin/index.html.twig index dbcbf97..4768cd7 100644 --- a/vendor/trinity/src/Trinity/Bundle/VarsEditorBundle/Resources/views/VarsAdmin/index.html.twig +++ b/vendor/trinity/src/Trinity/Bundle/VarsEditorBundle/Resources/views/VarsAdmin/index.html.twig @@ -69,17 +69,16 @@
{% for key, tabs in fieldset.tabs %} -
+
{% for fieldname in tabs.fields %}
- {{ form_label(form[fieldname], fieldname|trans({}, 'TrinityVarsEditorBundle'), { 'label_attr': {'class': 'control-label'} }) }} + {{ form_label(form[fieldname], null, { 'label_attr': {'class': 'control-label'} }) }} {{ form_errors(form[fieldname]) }} {{ form_widget(form[fieldname]) }} -
{% endfor %}
@@ -102,3 +101,4 @@
{% endblock %} + diff --git a/vendor/trinity/src/Trinity/Component/Utils/Image.php b/vendor/trinity/src/Trinity/Component/Utils/Image.php index bdd837d..7d90fcd 100644 --- a/vendor/trinity/src/Trinity/Component/Utils/Image.php +++ b/vendor/trinity/src/Trinity/Component/Utils/Image.php @@ -131,6 +131,30 @@ class Image return $this; } + public function autoRotate() + { + $orientation = $this->getTool()->getImageOrientation(); + + switch ($orientation) { + case \Imagick::ORIENTATION_BOTTOMRIGHT: + $this->getTool()->rotateimage("#000", 180); // rotate 180 degrees + break; + + case \Imagick::ORIENTATION_RIGHTTOP: + $this->getTool()->rotateimage("#000", 90); // rotate 90 degrees CW + break; + + case \Imagick::ORIENTATION_LEFTBOTTOM: + $this->getTool()->rotateimage("#000", -90); // rotate 90 degrees CCW + break; + } + + $this->getTool()->setImageOrientation(\Imagick::ORIENTATION_TOPLEFT); + + return $this; + + } + public function save($output = null) { if (null === $output) { diff --git a/web/.htaccess b/web/.htaccess index 5b5d9ea..54762d9 100644 --- a/web/.htaccess +++ b/web/.htaccess @@ -7,10 +7,10 @@ DirectoryIndex app.php RewriteEngine On - + RewriteCond %{HTTPS} !on - RewriteCond %{SERVER_NAME} =www.deblan.tv - RewriteRule .*admin.* https://www.deblan.tv%{REQUEST_URI} [R,L] + RewriteCond %{SERVER_NAME} =www.deblan.io + RewriteRule .*admin.* https://www.deblan.io%{REQUEST_URI} [R,L] # Determine the RewriteBase automatically and set it as environment variable. # If you are using Apache aliases to do mass virtual hosting or installed the # project in a subdirectory, the base path will be prepended to allow proper diff --git a/web/app.php b/web/app.php index dc699f7..292c5f5 100644 --- a/web/app.php +++ b/web/app.php @@ -3,9 +3,9 @@ use Symfony\Component\ClassLoader\ApcClassLoader; use Symfony\Component\HttpFoundation\Request; -if (!in_array($_SERVER['SERVER_NAME'], ['www.deblan.tv', 'v1.deblan.org', 'localhost'])) { +if (!in_array($_SERVER['SERVER_NAME'], ['www.deblan.io', 'v1.deblan.org', 'localhost'])) { header("HTTP/1.0 301 Moved Permanently"); - header("Location: http://www.deblan.tv".$_SERVER['REQUEST_URI']); + header("Location: http://www.deblan.io".$_SERVER['REQUEST_URI']); die; }