Skip to content

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 3, 2016
2 parents 3026e8f + aacd3e8 commit e217f02
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.4.1
## 05/03/2016

1. [](#bugfix)
* Fixed translated months

# v1.4.0
## 01/06/2016

Expand Down
7 changes: 1 addition & 6 deletions archives.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

class ArchivesPlugin extends Plugin
{
/**
* @var ArchivesPlugin
*/


/**
* @return array
*/
Expand Down Expand Up @@ -116,7 +111,7 @@ public function onTwigSiteVariables()
}

// slice the array to the limit you want
$archives = array_slice($archives, 0, intval($this->config->get('plugins.archives.limit')));
$archives = array_slice($archives, 0, intval($this->config->get('plugins.archives.limit')), is_string(reset($archives)) ? false : true );

// add the archives_start date to the twig variables
$this->grav['twig']->twig_vars['archives_show_count'] = $this->config->get('plugins.archives.show_count');
Expand Down
16 changes: 8 additions & 8 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Archives
version: 1.4.0
version: 1.4.1
description: The **Archives** plugin creates links for pages grouped by month/year
icon: university
author:
Expand All @@ -17,12 +17,12 @@ form:
fields:
enabled:
type: toggle
label: Plugin status
label: PLUGIN_ADMIN.PLUGIN_STATUS
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

Expand All @@ -32,8 +32,8 @@ form:
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

Expand All @@ -56,8 +56,8 @@ form:
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

Expand Down
2 changes: 1 addition & 1 deletion templates/partials/archives.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% if archives_show_count %}
<span class="label">{{ items|length }}</span>
{% endif %}
<span class="archive_date">{{ 'MONTHS_OF_THE_YEAR'|ta(month|date('n') -1) }} {{ month|date('Y') }}</span>
<span class="archive_date">{{ month }}</span>
</a>
</li>
{% endfor %}
Expand Down

0 comments on commit e217f02

Please sign in to comment.