Skip to content

Commit

Permalink
#87 correction d'affichage
Browse files Browse the repository at this point in the history
  • Loading branch information
cobalt74 committed Mar 8, 2014
1 parent f3fff96 commit b5f263d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 36 deletions.
67 changes: 32 additions & 35 deletions templates/marigolds/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,45 +45,42 @@ <h3 class="articleDetails">
</h3>

<!-- CONTENU/DESCRIPTION -->
{if="$articleDisplayMode!='title'"}
{if="$articleDisplayMode=='summary'"}
<div class="articleContent summary">
{function="Plugin::callHook("event_pre_description", array(&$value))"}
{$value->getDescription()}
{function="Plugin::callHook("event_post_description", array(&$value))"}
</div>
{else}
<div class="articleContent summary" style="display: none;"></div>
{/if}

{if="$articleDisplayMode=='content'"}
<div class="articleContent content">
{function="Plugin::callHook("event_pre_content", array(&$value))"}
{$value->getContent()}
{function="Plugin::callHook("event_post_content", array(&$value))"}
</div>
{else}
<div class="articleContent content" style="display: none;"></div>
{/if}

{if="$articleDisplayMode=='content'"}
<!-- RAPPEL DETAILS + OPTIONS POUR LES ARTICLES AFFICHES EN ENTIER -->
<h3 class="articleDetails">
{function="Plugin::callHook("event_pre_bottom_options", array(&$value))"}

<a class="pointer right readUnreadButton">(lu/non lu)</a>
{if="$value->getFavorite()!=1"}<a class="right pointer favorite" onclick="addFavorite(this,{$value->getId()});">{function="_t('FAVORIZE')"}</a>
{else}
<a class="right pointer favorite" onclick="removeFavorite(this,{$value->getId()});">{function="_t('UNFAVORIZE')"}</a>
{/if}
<div class="clear"></div>
{function="Plugin::callHook("event_post_bottom_options", array(&$value))"}
</h3>
{/if}
{if="$articleDisplayMode=='summary'"}
<div class="articleContent summary">
{function="Plugin::callHook("event_pre_description", array(&$value))"}
{$value->getDescription()}
{function="Plugin::callHook("event_post_description", array(&$value))"}
</div>
{else}
<div class="articleContent summary" style="display: none;"></div>
{/if}

{if="$articleDisplayMode=='content'"}
<div class="articleContent content">
{function="Plugin::callHook("event_pre_content", array(&$value))"}
{$value->getContent()}
{function="Plugin::callHook("event_post_content", array(&$value))"}
</div>
{else}
<div class="articleContent content" style="display: none;"></div>
{/if}

{if="$articleDisplayMode=='content'"}
<!-- RAPPEL DETAILS + OPTIONS POUR LES ARTICLES AFFICHES EN ENTIER -->
<h3 class="articleDetails">
{else}
<h3 class="articleDetails" style="display: none;">
{/if}
{function="Plugin::callHook("event_pre_bottom_options", array(&$value))"}

<a class="pointer right readUnreadButton">(lu/non lu)</a>
{if="$value->getFavorite()!=1"}<a class="right pointer favorite" onclick="addFavorite(this,{$value->getId()});">{function="_t('FAVORIZE')"}</a>
{else}
<a class="right pointer favorite" onclick="removeFavorite(this,{$value->getId()});">{function="_t('UNFAVORIZE')"}</a>
{/if}
<div class="clear"></div>
{function="Plugin::callHook("event_post_bottom_options", array(&$value))"}
</h3>
</section>
{function="Plugin::callHook("event_post_section", array(&$value))"}
{$hightlighted=$hightlighted+1}
Expand Down
4 changes: 3 additions & 1 deletion templates/marigolds/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ function toggleArticleDisplayMode(button, target){
// btn pour passer en mode reduit
button.innerHTML = '|&nbsp;&nbsp;';
button.title = _t('EVENT_DISPLAY_TITLE');
$('#'+target+' > .articleDetails').last().hide();
if ($('#'+target+' > .articleDetails').length > 1) {
$('#'+target+' > .articleDetails').last().hide();
}

} else {

Expand Down

0 comments on commit b5f263d

Please sign in to comment.