added publications links and display of pubications pages

This commit is contained in:
Bachir Soussi Chiadmi 2015-07-16 15:46:48 +02:00
parent 54f496acad
commit cc657eaec4
9 changed files with 115 additions and 17 deletions

View File

@ -132,16 +132,16 @@ function materio_publications_field_default_field_instances() {
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => 'large',
'image_style' => 'publication-couv',
),
'type' => 'image',
'weight' => 2,
'weight' => 0,
),
'homeblock' => array(
'label' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_link' => 'content',
'image_style' => 'publications-home',
),
'type' => 'image',
@ -221,10 +221,9 @@ function materio_publications_field_default_field_instances() {
),
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 3,
'type' => 'hidden',
'weight' => 2,
),
'homeblock' => array(
'label' => 'above',

View File

@ -13,6 +13,31 @@ function materio_publications_ctools_plugin_api($module = NULL, $api = NULL) {
}
}
/**
* Implements hook_image_default_styles().
*/
function materio_publications_image_default_styles() {
$styles = array();
// Exported image style: publication-couv.
$styles['publication-couv'] = array(
'label' => 'publication-couv',
'effects' => array(
16 => array(
'name' => 'image_scale',
'data' => array(
'width' => 480,
'height' => 480,
'upscale' => 1,
),
'weight' => 1,
),
),
);
return $styles;
}
/**
* Implements hook_node_info().
*/

View File

@ -56,7 +56,10 @@ function materio_publications_user_default_permissions() {
// Exported permission: 'show publication title'.
$permissions['show publication title'] = array(
'name' => 'show publication title',
'roles' => array(),
'roles' => array(
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
),
'module' => 'materio_page_title',
);

View File

@ -3,8 +3,9 @@ core = 7.x
package = Materio
dependencies[] = ctools
dependencies[] = features
dependencies[] = list
dependencies[] = image
dependencies[] = materio_content_types
dependencies[] = materio_page_title
dependencies[] = metatag
dependencies[] = node
dependencies[] = strongarm
@ -17,6 +18,7 @@ features[field_base][] = field_weight
features[field_instance][] = node-publication-body
features[field_instance][] = node-publication-field_couverture
features[field_instance][] = node-publication-field_weight
features[image][] = publication-couv
features[node][] = publication
features[user_permission][] = create publication content
features[user_permission][] = delete any publication content
@ -64,8 +66,6 @@ features[variable][] = unique_field_show_matches_publication
features[variable][] = workflow_publication
features[workflow][] = Publication
features[workflow_access][] = Publication
features_exclude[dependencies][image] = image
features_exclude[dependencies][materio_page_title] = materio_page_title
features_exclude[dependencies][materio_subscriptions] = materio_subscriptions
features_exclude[dependencies][options] = options
project path = sites/all/modules/features

View File

@ -142,6 +142,9 @@ function materio_publications_strongarm() {
'token' => array(
'custom_settings' => FALSE,
),
'homeblock' => array(
'custom_settings' => TRUE,
),
),
'extra_fields' => array(
'form' => array(

View File

@ -4144,7 +4144,7 @@ a {
/_/ /_/\____/_/ /_/ /_/\___/ |___/____/
*/
/* line 215, ../scss/layout.scss */
/* line 216, ../scss/layout.scss */
body.front:not(.page-actuality) #header > .inner, body.front:not(.page-actuality) #utilities > .inner, body.front:not(.page-actuality) #center, body.front:not(.page-actuality) #footer,
body.page-whoweare #header > .inner,
body.page-whoweare #utilities > .inner,
@ -4177,7 +4177,11 @@ body.page-cart #footer,
body.node-type-simplenews #header > .inner,
body.node-type-simplenews #utilities > .inner,
body.node-type-simplenews #center,
body.node-type-simplenews #footer {
body.node-type-simplenews #footer,
body.node-type-publication #header > .inner,
body.node-type-publication #utilities > .inner,
body.node-type-publication #center,
body.node-type-publication #footer {
width: 100%;
margin-left: auto;
margin-right: auto;
@ -4250,7 +4254,15 @@ body.node-type-simplenews #utilities > .inner:after,
body.node-type-simplenews #center:before,
body.node-type-simplenews #center:after,
body.node-type-simplenews #footer:before,
body.node-type-simplenews #footer:after {
body.node-type-simplenews #footer:after,
body.node-type-publication #header > .inner:before,
body.node-type-publication #header > .inner:after,
body.node-type-publication #utilities > .inner:before,
body.node-type-publication #utilities > .inner:after,
body.node-type-publication #center:before,
body.node-type-publication #center:after,
body.node-type-publication #footer:before,
body.node-type-publication #footer:after {
content: " ";
display: table;
}
@ -4287,7 +4299,11 @@ body.page-cart #footer:after,
body.node-type-simplenews #header > .inner:after,
body.node-type-simplenews #utilities > .inner:after,
body.node-type-simplenews #center:after,
body.node-type-simplenews #footer:after {
body.node-type-simplenews #footer:after,
body.node-type-publication #header > .inner:after,
body.node-type-publication #utilities > .inner:after,
body.node-type-publication #center:after,
body.node-type-publication #footer:after {
clear: both;
}
@ -11921,6 +11937,34 @@ body.not-logged-in #home-v2 .field-name-field-liens a.member {
max-width: none !important;
}
/*
_ _ _ _ _
| | | (_) | | (_)
_ __ _ _| |__ | |_ ___ __ _| |_ _ ___ _ __ ___
| '_ \| | | | '_ \| | |/ __/ _` | __| |/ _ \| '_ \/ __|
| |_) | |_| | |_) | | | (_| (_| | |_| | (_) | | | \__ \
| .__/ \__,_|_.__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/
| |
|_|
*/
/* line 3399, ../scss/styles.scss */
body.node-type-publication article.node-publication .field-name-field-couverture {
display: moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
}
/* line 3402, ../scss/styles.scss */
body.node-type-publication article.node-publication .field-name-body {
display: moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
margin-left: 1em;
}
/*
__ ___
/ |/ /__ ______________ _____ ____ _____

View File

@ -268,7 +268,7 @@ function materiobasetheme_image_style($variables) {
$figure = '<figure style="'.$fig_dimensions.'" ' . (isset($variables['title']) ? 'title="'.$variables['title'].'"' : '') . '>';
// lazyload
$excluded_styles = array('pdf', 'card-bookmark', 'content_full', 'content_teaser', 'didactique_page', 'publications-home');
$excluded_styles = array('pdf', 'card-bookmark', 'content_full', 'content_teaser', 'didactique_page', 'publications-home', 'publication-couv');
if(!in_array($variables['style_name'], $excluded_styles) && ( (isset($variables['delta']) && $variables['delta'] > 0) || !isset($variables['delta']) ) ){
// store the real path

View File

@ -211,7 +211,8 @@ body.page-node-12324,
body.page-user,
body.page-node-11186,
body.page-cart,
body.node-type-simplenews{
body.node-type-simplenews,
body.node-type-publication{
#header>.inner, #utilities>.inner, #center, #footer{
@include grid-row();
}
@ -219,4 +220,3 @@ body.node-type-simplenews{
// position:relative;
// }
}

View File

@ -3384,6 +3384,30 @@ body.home-v2{
max-width: none !important;
}
}
/*
_ _ _ _ _
| | | (_) | | (_)
_ __ _ _| |__ | |_ ___ __ _| |_ _ ___ _ __ ___
| '_ \| | | | '_ \| | |/ __/ _` | __| |/ _ \| '_ \/ __|
| |_) | |_| | |_) | | | (_| (_| | |_| | (_) | | | \__ \
| .__/ \__,_|_.__/|_|_|\___\__,_|\__|_|\___/|_| |_|___/
| |
|_|
*/
body.node-type-publication{
article.node-publication{
.field-name-field-couverture{
@include inlineblock();
}
.field-name-body{
@include inlineblock();
margin-left: 1em;
}
}
}
@import "misc.scss";