Kaynağa Gözat

update + add list_taxonomy

kevin tessier 5 yıl önce
ebeveyn
işleme
c66917c9a0

+ 8 - 1
CHANGELOG.md

@@ -1,5 +1,12 @@
+# v1.5.8
+## 02/07/2019
+
+1. [](#improved)
+    * Improved `User` unserialize to not to break the object if serialized data is not what expected
+    * Removed unused parameter [#2357](https://github.com/getgrav/grav/pull/2357)
+
 # v1.5.7
-## 01/25/2018
+## 01/25/2019
 
 1. [](#new)
     * Support for AWS Cloudfront forwarded scheme header [#2297](https://github.com/getgrav/grav/pull/2297)

+ 1 - 1
system/defines.php

@@ -8,7 +8,7 @@
 
 // Some standard defines
 define('GRAV', true);
-define('GRAV_VERSION', '1.5.7');
+define('GRAV_VERSION', '1.5.8');
 define('GRAV_TESTING', false);
 define('DS', '/');
 

+ 1 - 1
system/src/Grav/Common/Page/Pages.php

@@ -946,7 +946,7 @@ class Pages
                 $this->grav['debugger']->addMessage('Page cache missed, rebuilding pages..');
 
                 // recurse pages and cache result
-                $this->resetPages($pages_dir, $this->pages_cache_id);
+                $this->resetPages($pages_dir);
 
             } else {
                 // If pages was found in cache, set the taxonomy

+ 4 - 0
system/src/Grav/Common/User/User.php

@@ -306,6 +306,10 @@ class User extends Data
         $this->gettersVariable = 'items';
         $this->nestedSeparator = '.';
 
+        if (null === $this->items) {
+            $this->items = [];
+        }
+
         if (null === $this->blueprints) {
             $blueprints = new Blueprints;
             $this->blueprints = $blueprints->get('user/account');

+ 54 - 0
user/config/plugins/admin.yaml

@@ -0,0 +1,54 @@
+enabled: true
+route: /admin
+cache_enabled: false
+theme: grav
+content_padding: true
+twofa_enabled: true
+sidebar:
+  activate: tab
+  hover_delay: 100
+  size: auto
+dashboard:
+  days_of_stats: 7
+widgets:
+  dashboard-maintenance: true
+  dashboard-statistics: true
+  dashboard-notifications: true
+  dashboard-feed: true
+  dashboard-pages: true
+pages:
+  show_parents: both
+  show_modular: true
+session:
+  timeout: 1800
+warnings:
+  delete_page: true
+edit_mode: normal
+frontend_preview_target: inline
+show_github_msg: true
+pages_list_display_field: title
+google_fonts: false
+admin_icons: line-awesome
+enable_auto_updates_check: true
+notifications:
+  feed: true
+  dashboard: true
+  plugins: true
+  themes: true
+popularity:
+  enabled: true
+  ignore:
+    - '/test*'
+    - /modular
+  history:
+    daily: '30'
+    monthly: '12'
+    visitors: '20'
+pagemedia:
+  resize_width: 0
+  resize_height: 0
+  res_min_width: 0
+  res_min_height: 0
+  res_max_width: 0
+  res_max_height: 0
+  resize_quality: 0.8

+ 0 - 3
user/pages/02.projets/nom-du-projets/item.md

@@ -1,8 +1,5 @@
 ---
 title: 'Nom du projets'
-taxonomy:
-    category:
-        - social
 ---
 
 blablablablabla

+ 2 - 0
user/pages/02.projets/tous-des-sang-meles-2/item.md

@@ -2,6 +2,8 @@
 title: 'Comprendre des migrations internationales'
 media_order: 'OSC_2779_01.jpg,OSC_2748_01.jpg,OSC_2785.jpg,OSC_2793.jpg,OSC_2800.jpg,OSC_2802.jpg,OSC_2820.jpg'
 taxonomy:
+    category:
+        - Éditions
     tag:
         - sociale
 ---

+ 2 - 0
user/pages/02.projets/tous-des-sang-meles-3/item.md

@@ -1,6 +1,8 @@
 ---
 title: 'L’Encyclopédie de la Parole'
 taxonomy:
+    category:
+        - 'Site web'
     tag:
         - culturelle
 ---

+ 2 - 0
user/pages/02.projets/tous-des-sang-meles-4/item.md

@@ -2,6 +2,8 @@
 title: 'Les spectacles de l’Encyclopédie'
 media_order: '1.jpg,2.jpg,3.jpg,4.jpg'
 taxonomy:
+    category:
+        - Éditions
     tag:
         - culturelle
 ---

+ 3 - 1
user/pages/02.projets/tous-des-sang-meles/item.md

@@ -2,6 +2,8 @@
 title: 'Tous, des sang-mêlés'
 media_order: 'OSC_2566.jpg,OSC_2539.jpg,OSC_2703_01.jpg,OSC_2614_01.jpg,OSC_2618_01.jpg,OSC_2625_02.jpg,OSC_2649.jpg,OSC_2672.jpg'
 taxonomy:
+    category:
+        - Éditions
     tag:
         - culturelle
 ---
@@ -12,4 +14,4 @@ Catalogue d’exposition
 L’ouvrage met en lumière l’exposition à travers cinq carnets de tailles et de couleurs différentes, dont les titrages mélangent plusieurs polices de caractères. La diversité des formats et des couleurs exprime la notion de différence, de singularité et de multi culturalité, sujets transversaux de l’exposition. Cet objet modulable, multipliant les approches, génère plusieurs lectures différentes.
 Une expérience éditoriale menée par Maud Boyer pour le design, Bachir Soussi-Chiadmi et Kevin Tessier pour le développement du HTML2Print
 
-Fabriqué par nos soins sous Scribus  pour la maquette de principe puis développée en HTML2Print
+Fabriqué par nos soins sous Scribus  pour la maquette de principe puis développée en HTML2Print

+ 0 - 13
user/themes/figureslibres/templates/partials/archives.html.twig

@@ -1,13 +0,0 @@
-<ul class="archives">
-
-{% for month,items in archives_data %}
-    <li>
-    	<a href="{{ base_url }}/{{ config.plugins.archives.taxonomy_names.month }}{{ config.system.param_sep }}{{ month|date('M_Y')|lower|e('url') }}">
-        {% if archives_show_count %}
-        <span class="label label-rounded label-primary">{{ items|length }}</span>
-        {% endif %}
-        <span class="archive_date">{{ month }}</span>
-        </a>
-    </li>
-{% endfor %}
-</ul>

+ 5 - 44
user/themes/figureslibres/templates/partials/sidebar.html.twig

@@ -1,47 +1,6 @@
 {% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
 {% set new_base_url = blog.url == '/' ? '' : blog.url %}
 
-{% if config.plugins.simplesearch.enabled %}
-<div class="sidebar-content">
-    {% include 'partials/simplesearch_searchbox.html.twig' %}
-</div>
-{% endif %}
-{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
-<div class="sidebar-content">
-    <h4>{{ 'THEME_QUARK.SIDEBAR.RELATED_POSTS.HEADLINE'|t }}</h4>
-    {% include 'partials/relatedpages.html.twig' %}
-</div>
-{% endif %}
-{% if config.plugins.random.enabled %}
-<div class="sidebar-content">
-	<h4>{{ 'THEME_QUARK.SIDEBAR.RANDOM_ARTICLE.HEADLINE'|t }}</h4>
-	<a class="button" href="{{ base_url }}/random"><i class="fa fa-retweet"></i> {{ 'THEME_QUARK.SIDEBAR.RANDOM_ARTICLE.FEELING_LUCKY'|t }}</a>
-</div>
-{% endif %}
-
-{{ page.find('/modules/sidebar').content|raw }}
-
-{% if config.plugins.taxonomylist.enabled %}
-<div class="sidebar-content">
-    <h4>{{ 'THEME_QUARK.SIDEBAR.POPULAR_TAGS.HEADLINE'|t }}</h4>
-    {% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
-</div>
-{% endif %}
-{% if config.plugins.archives.enabled %}
-<div class="sidebar-content">
-    <h4>{{ 'THEME_QUARK.SIDEBAR.ARCHIVES.HEADLINE'|t }}</h4>
-	{% include 'partials/archives.html.twig' with {'base_url':new_base_url} %}
-</div>
-{% endif %}
-{% if config.plugins.feed.enabled %}
-<div class="sidebar-content syndicate">
-    <h4>{{ 'THEME_QUARK.SIDEBAR.SYNDICATE.HEADLINE'|t }}</h4>
-    <a class="btn" href="{{ feed_url }}.atom"><i class="fa fa-rss-square"></i> Atom 1.0</a>
-    <a class="btn" href="{{ feed_url }}.rss"><i class="fa fa-rss-square"></i> RSS</a>
-    {% if config.plugins.feed.enable_json_feed %}<a class="btn" href="{{ feed_url }}.json"><i class="fa fa-rss-square"></i> JSON</a>{% endif %}
-</div>
-{% endif %}
-
 <div class="sidebar-left">
   {% set options = { items: {'@page': '/contact' } } %}
   {% set my_collection = page.collection(options) %}
@@ -55,9 +14,11 @@
 <div class="sidebar-right">
   {% set options = { items: {'@page': '/projets' } } %}
   {% set my_collection = page.collection(options) %}
+
   <ul>
-    {% for p in my_collection %}
-      <a href="{{p.url}}"><li>{{ p.title }}</li></a>
-    {% endfor %}
+    {% include 'partials/taxonomylist.html.twig' with {'base_url': new_base_url, 'taxonomy':'category'} %}
+    <!-- {% for i in my_collection %}
+      <li>{{i.title}}</li>
+    {% endfor %} -->
   </ul>
 </div>

+ 16 - 1
user/themes/figureslibres/templates/partials/taxonomylist.html.twig

@@ -1,8 +1,23 @@
 {% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
 
+
 {% if taxlist %}
+  <ul>
     {% for tax,value in taxlist[taxonomy] %}
-        {% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
+      {% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
+
+      <li>
         <a class="label {{ label_class }}" href="{{ base_url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
+      </li>
+      
+      {% set options = { items: {'@taxonomy': {'category': tax} } } %}
+      {% set my_collection = page.collection(options) %}
+
+      {% for i in my_collection %}
+        <li>{{i.title}}</li>
+      {% endfor %}
+
     {% endfor %}
+
+  </ul>
 {% endif %}