root / htmltest / sites / all / modules / flag / theme / flag.tpl.php @ a5572547
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Default theme implementation to display a flag link, and a message after the action
|
6 |
* is carried out.
|
7 |
*
|
8 |
* Available variables:
|
9 |
*
|
10 |
* - $flag: The flag object itself. You will only need to use it when the
|
11 |
* following variables don't suffice.
|
12 |
* - $flag_name_css: The flag name, with all "_" replaced with "-". For use in 'class'
|
13 |
* attributes.
|
14 |
* - $flag_classes: A space-separated list of CSS classes that should be applied to the link.
|
15 |
*
|
16 |
* - $action: The action the link is about to carry out, either "flag" or "unflag".
|
17 |
* - $status: The status of the item; either "flagged" or "unflagged".
|
18 |
*
|
19 |
* - $link_href: The URL for the flag link.
|
20 |
* - $link_text: The text to show for the link.
|
21 |
* - $link_title: The title attribute for the link.
|
22 |
*
|
23 |
* - $message_text: The long message to show after a flag action has been carried out.
|
24 |
* - $message_classes: A space-separated list of CSS classes that should be applied to
|
25 |
* the message.
|
26 |
* - $after_flagging: This template is called for the link both before and after being
|
27 |
* flagged. If displaying to the user immediately after flagging, this value
|
28 |
* will be boolean TRUE. This is usually used in conjunction with immedate
|
29 |
* JavaScript-based toggling of flags.
|
30 |
* - $needs_wrapping_element: Determines whether the flag displays a wrapping
|
31 |
* HTML DIV element.
|
32 |
*
|
33 |
* Template suggestions available, listed from the most specific template to
|
34 |
* the least. Drupal will use the most specific template it finds:
|
35 |
* - flag--name.tpl.php
|
36 |
* - flag--link-type.tpl.php
|
37 |
*
|
38 |
* NOTE: This template spaces out the <span> tags for clarity only. When doing some
|
39 |
* advanced theming you may have to remove all the whitespace.
|
40 |
*/
|
41 |
?>
|
42 |
<?php if ($needs_wrapping_element): ?> |
43 |
<div class="flag-outer flag-outer-<?php print $flag_name_css; ?>"> |
44 |
<?php endif; ?> |
45 |
<span class="<?php print $flag_wrapper_classes; ?>"> |
46 |
<?php if ($link_href): ?> |
47 |
<a href="<?php print $link_href; ?>" title="<?php print $link_title; ?>" class="<?php print $flag_classes ?>" rel="nofollow"><?php print $link_text; ?></a><span class="flag-throbber"> </span> |
48 |
<?php else: ?> |
49 |
<span class="<?php print $flag_classes ?>"><?php print $link_text; ?></span> |
50 |
<?php endif; ?> |
51 |
<?php if ($after_flagging): ?> |
52 |
<span class="<?php print $message_classes; ?>"> |
53 |
<?php print $message_text; ?> |
54 |
</span>
|
55 |
<?php endif; ?> |
56 |
</span>
|
57 |
<?php if ($needs_wrapping_element): ?> |
58 |
</div>
|
59 |
<?php endif; ?> |