summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormodela bitweaver <bitweaver@modela>2014-05-23 12:07:01 -0400
committermodela bitweaver <bitweaver@modela>2014-05-23 12:07:01 -0400
commit33301e28db59b2d304bc8c2784db75897c95e8d2 (patch)
tree5436cceb8c172a95e5c033428204c2d8e90d6385 /templates
parentc2e3ba9b708453cc9bb455f7ee38d5fb7a2dcd22 (diff)
downloadliberty-33301e28db59b2d304bc8c2784db75897c95e8d2.tar.gz
liberty-33301e28db59b2d304bc8c2784db75897c95e8d2.tar.bz2
liberty-33301e28db59b2d304bc8c2784db75897c95e8d2.zip
gContent check in service_content_icon
Diffstat (limited to 'templates')
-rw-r--r--templates/service_content_icon_inc.tpl44
1 files changed, 23 insertions, 21 deletions
diff --git a/templates/service_content_icon_inc.tpl b/templates/service_content_icon_inc.tpl
index 98317e1..670e788 100644
--- a/templates/service_content_icon_inc.tpl
+++ b/templates/service_content_icon_inc.tpl
@@ -1,27 +1,29 @@
{strip}
-{if $gBitSystem->isFeatureActive( 'liberty_cache' ) && $gContent && $gContent->isCached( $serviceHash.content_id ) && $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )}
- {assign var=url value=$gContent->getDisplayUrl()|default:$serviceHash.display_url}
- {if (not empty($url)) && strstr($url, "?") }
- {assign var="amp" value="&amp;"}
- {else}
- {assign var="amp" value="?"}
+{if !empty($gContent)}
+ {if $gBitSystem->isFeatureActive( 'liberty_cache' ) && $gContent && $gContent->isCached( $serviceHash.content_id ) && $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )}
+ {assign var=url value=$gContent->getDisplayUrl()|default:$serviceHash.display_url}
+ {if (not empty($url)) && strstr($url, "?") }
+ {assign var="amp" value="&amp;"}
+ {else}
+ {assign var="amp" value="?"}
+ {/if}
+ <a title="{tr}Refresh cache{/tr}" href="{$url}{$amp}refresh_liberty_cache={$serviceHash.content_id}">
+ {booticon iname="icon-recycle" ipackage="icons" iexplain="Refresh cache"}
+ </a>
{/if}
- <a title="{tr}Refresh cache{/tr}" href="{$url}{$amp}refresh_liberty_cache={$serviceHash.content_id}">
- {booticon iname="icon-recycle" ipackage="icons" iexplain="Refresh cache"}
- </a>
-{/if}
-{if $gBitUser->hasPermission( 'p_liberty_assign_content_perms' ) and $serviceHash.content_id}
- {if $gContent->hasUserPermissions()}
- {assign var=iconClass value="highlight"}
+ {if $gBitUser->hasPermission( 'p_liberty_assign_content_perms' ) and $serviceHash.content_id}
+ {if $gContent->hasUserPermissions()}
+ {assign var=iconClass value="highlight"}
+ {/if}
+ {if $role_model }
+ {smartlink ipackage=liberty ifile="content_role_permissions.php" ititle="Assign Permissions" booticon="icon-key" class=$iconClass ipackage=liberty ifile="content_permissions.php" content_id="$serviceHash.content_id"}
+ {else}
+ {smartlink ipackage=liberty ifile="content_permissions.php" ititle="Assign Permissions" booticon="icon-key" class=$iconClass ipackage=liberty ifile="content_permissions.php" content_id="$serviceHash.content_id"}
+ {/if}
{/if}
- {if $role_model }
- {smartlink ipackage=liberty ifile="content_role_permissions.php" ititle="Assign Permissions" booticon="icon-key" class=$iconClass ipackage=liberty ifile="content_permissions.php" content_id="$serviceHash.content_id"}
- {else}
- {smartlink ipackage=liberty ifile="content_permissions.php" ititle="Assign Permissions" booticon="icon-key" class=$iconClass ipackage=liberty ifile="content_permissions.php" content_id="$serviceHash.content_id"}
+ {* This should always be last so it is right most in the icons! *}
+ {if $preview && $closeclick}
+ <a onclick="javascript:return cClick();">{booticon iname="icon-remove" ipackage=icons iexplain="Close Popup"}</a>
{/if}
{/if}
-{* This should always be last so it is right most in the icons! *}
-{if $preview && $closeclick}
- <a onclick="javascript:return cClick();">{booticon iname="icon-remove" ipackage=icons iexplain="Close Popup"}</a>
-{/if}
{/strip}