fixed flag nav bug

This commit is contained in:
2018-09-04 13:12:20 +02:00
parent 9ad0aa199f
commit fa07acdd31
6 changed files with 34 additions and 23 deletions

View File

@@ -14,6 +14,6 @@
<?php $content = $list['content']; ?>
<?php $entity_view = entity_view('node', $content, $viewmode); ?>
<div class="flaged <?php print $list['list']->name; ?>"> <?php print render($entity_view); ?> </div>
</section>
</section>
<?php endforeach; ?>
</div>
</div>

View File

@@ -4,25 +4,30 @@
<?php foreach ($flags as $name => $flag): ?>
<?php //dsm($flag, 'flag') ;?>
<li class="flaglist <?php print $flag->name; ?>">
<?php print l($flag->title . '<span class="count">('.count($flag->flaged_content).')</span>', 'lists/'.$flag->fid, array('html'=>true,'attributes'=>array('class'=>array('open-list', $flag->name)))); ?>
<?php
//dsm($list, 'list');
$flag_title = $flag->title;
$flag_title = (strlen($flag_title) > 20) ? substr($flag_title,0,20).'...' : $flag_title;
?>
<?php print l($flag_title . '<span class="count">('.count($flag->flaged_content).')</span>', 'lists/'.$flag->fid, array('html'=>true,'attributes'=>array('class'=>array('open-list', $flag->name)))); ?>
<?php if(flag_lists_is_owner('edit', $flag->fid)): ?>
<?php
print l('<i class="fi-wrench"></i>',
'flags/lists/edit/'.$flag->fid,
<?php
print l('<i class="fi-wrench"></i>',
'flags/lists/edit/'.$flag->fid,
array(
'html'=>true,
'attributes'=>array('class'=>array('edit-list', $flag->name)),
)
);
);
?>
<?php endif; ?>
</li>
<?php endforeach; ?>
<?php else: ?>
<?php
<?php
#create new list
$create_link = l(
'<i class="fi-plus"></i>&nbsp;<span>' . t('New @name', array('@name' => t(variable_get('flag_lists_name', 'list')))) . '</span>',
'<i class="fi-plus"></i>&nbsp;<span>' . t('New @name', array('@name' => t(variable_get('flag_lists_name', 'list')))) . '</span>',
'flag-lists/add/materiau',
array(
'attributes' => array(
@@ -36,4 +41,4 @@
<li class="flag-lists-create"><?php print $create_link; ?> </li>
<?php endif; ?>
</ul>
</section>
</section>