17 require_once dirname(__FILE__).
'/../../../../../core/include/init.inc';
18 require_once dirname(__FILE__).
'/../../../../../core/lib/html_form/html_form.inc';
20 $assetid = array_get_index($_GET,
'assetid');
21 if (is_null($assetid))
return FALSE;
22 assert_valid_assetid($assetid);
24 $all = array_get_index($_REQUEST,
'all', FALSE);
30 <title>Metadata Keyword Replacements</title>
33 background-color: #FFFFFF;
36 body, p, td, ul, li, input, select, textarea{
38 font-family: Arial, Verdana Helvetica, sans-serif;
43 padding: 0px 10px 5px 5px;
44 border: 1px solid #E0E0E0;
54 <p><b><i>The following keyword replacements may be used
for metadata values.<br />Note that the percentage signs (%) are required.</i></b></p>
58 <legend><b>
Asset Information</b></legend>
59 <table border="0" width="100%">
60 <tr><td valign="top" width="200"><b>%asset_assetid%</b></td><td valign="top">The ID of the asset</td></tr>
61 <tr><td valign="top" width="200"><b>%asset_name%</b></td><td valign="top">Full name of the asset</td></tr>
62 <tr><td valign="top" width="200"><b>%asset_name_linked%</b></td><td valign="top">Full name of the asset with hyperlink</td></tr>
63 <tr><td valign="top" width="200"><b>%asset_short_name%</b></td><td valign="top">Short name of the asset</td></tr>
64 <tr><td valign="top" width="200"><b>%asset_short_name_linked%</b></td><td valign="top">Short name of the asset with hyperlink</td></tr>
65 <tr><td valign="top" width="200"><b>%asset_version%</b></td><td valign="top">Version of the asset being displayed</td></tr>
66 <tr><td valign="top" width="200"><b>%asset_url%</b></td><td valign="top">URL of the asset</td></tr>
67 <tr><td valign="top" width="200"><b>%asset_href%</b></td><td valign="top">Relative HREF of the asset</td></tr>
74 <legend><b>Creation Details</b></legend>
75 <table border="0" width="100%">
76 <tr><td valign="top" width="200"><b>%asset_created%</b></td><td valign="top">Date/Time the asset was created (YYYY-MM-DD HH-MM-SS)</td></tr>
77 <tr><td valign="top" width="200"><b>%asset_created_short%</b></td><td valign="top">Date/Time the asset was created (YYYY-MM-DD)</td></tr>
78 <tr><td valign="top" width="200"><b>%asset_created_readable%</b></td><td valign="top">Date/Time the asset was created (DD M YYYY H:MM[AM\PM])</td></tr>
79 <tr><td valign="top" width="200"><b>%asset_created_by_name%</b></td><td valign="top">Full name of the user that created this asset</td></tr>
80 <tr><td valign="top" width="200"><b>%asset_created_by_first_name%</b></td><td valign="top">First name of the user that created this asset</td></tr>
81 <tr><td valign="top" width="200"><b>%asset_created_by_last_name%</b></td><td valign="top">Surname of the user that created this asset</td></tr>
82 <tr><td valign="top" width="200"><b>%asset_created_by_email%</b></td><td valign="top">Email of the user that created this asset</td></tr>
89 <legend><b>Last Updated Details</b></legend>
90 <table border="0" width="100%">
91 <tr><td valign="top" width="200"><b>%asset_updated%</b></td><td valign="top">Date/Time the asset was last updated (YYYY-MM-DD HH-MM-SS)</td></tr>
92 <tr><td valign="top" width="200"><b>%asset_updated_short%</b></td><td valign="top">Date/Time the asset was last updated (YYYY-MM-DD)</td></tr>
93 <tr><td valign="top" width="200"><b>%asset_updated_readable%</b></td><td valign="top">Date/Time the asset was last updated (DD M YYYY H:MM[AM\PM])</td></tr>
94 <tr><td valign="top" width="200"><b>%asset_updated_by_name%</b></td><td valign="top">Full name of the user that last updated this asset</td></tr>
95 <tr><td valign="top" width="200"><b>%asset_updated_by_first_name%</b></td><td valign="top">First name of the user that last updated this asset</td></tr>
96 <tr><td valign="top" width="200"><b>%asset_updated_by_last_name%</b></td><td valign="top">Surname of the user that last updated this asset</td></tr>
97 <tr><td valign="top" width="200"><b>%asset_updated_by_email%</b></td><td valign="top">Email of the user that last updated this asset</td></tr>
104 <legend><b>Last Published Details</b></legend>
105 <table border="0" width="100%">
106 <tr><td valign="top" width="200"><b>%asset_published%</b></td><td valign="top">Date/Time the asset was last published (YYYY-MM-DD HH-MM-SS)</td></tr>
107 <tr><td valign="top" width="200"><b>%asset_published_short%</b></td><td valign="top">Date/Time the asset was last published (YYYY-MM-DD)</td></tr>
108 <tr><td valign="top" width="200"><b>%asset_published_readable%</b></td><td valign="top">Date/Time the asset was last published (DD M YYYY H:MM[AM\PM])</td></tr>
109 <tr><td valign="top" width="200"><b>%asset_published_by_name%</b></td><td valign="top">Full name of the user that last published this asset</td></tr>
110 <tr><td valign="top" width="200"><b>%asset_published_by_first_name%</b></td><td valign="top">First name of the user that last published this asset</td></tr>
111 <tr><td valign="top" width="200"><b>%asset_published_by_last_name%</b></td><td valign="top">Surname of the user that last published this asset</td></tr>
112 <tr><td valign="top" width="200"><b>%asset_published_by_email%</b></td><td valign="top">Email of the user that last published this asset</td></tr>
119 <legend><b>Permissions</b></legend>
120 <table border="0" width="100%">
121 <tr><td valign="top" width="200"><b>%asset_read_permission%</b></td><td valign="top">Comma separated list of the full names for users with read access</td></tr>
122 <tr><td valign="top" width="200"><b>%asset_write_permission%</b></td><td valign="top">Comma separated list of the full names for users with write access</td></tr>
123 <tr><td valign="top" width="200"><b>%asset_admin_permission%</b></td><td valign="top">Comma separated list of the full names for users with administrator access</td></tr>
124 <tr><td valign="top" width="200"><b>%asset_read_permission_email%</b></td><td valign="top">Comma separated list of email addresses for users with read access</td></tr>
125 <tr><td valign="top" width="200"><b>%asset_write_permission_email%</b></td><td valign="top">Comma separated list of email addresses for users with write access</td></tr>
126 <tr><td valign="top" width="200"><b>%asset_admin_permission_email%</b></td><td valign="top">Comma separated list of email addresses for users with administrator access</td></tr>
127 <tr><td valign="top" width="200"><b>%asset_read_permission_email_linked%</b></td><td valign="top">Comma separated list of linked email addresses for users with read access</td></tr>
128 <tr><td valign="top" width="200"><b>%asset_write_permission_email_linked%</b></td><td valign="top">Comma separated list of linked email addresses for users with write access</td></tr>
129 <tr><td valign="top" width="200"><b>%asset_admin_permission_email_linked%</b></td><td valign="top">Comma separated list of linked email addresses for users with administrator access</td></tr>
137 $roles_temp = $GLOBALS[
'SQ_SYSTEM']->am->getTypeAssetids(
'role');
139 foreach ($roles_temp as $roleid) {
140 $role = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($roleid);
141 if ($role->readAccess(Array())) $roles[] = $roleid;
142 $GLOBALS[
'SQ_SYSTEM']->am->forgetAsset($role);
145 $roles = $GLOBALS[
'SQ_SYSTEM']->am->getRole($assetid);
146 $roles = array_keys($roles);
149 if (!empty($roles)) {
153 <legend><b>Roles</b></legend>
154 <table border=
"0" width=
"100%">
156 $roleinfo = $GLOBALS[
'SQ_SYSTEM']->am->getAssetInfo($roles, Array(), FALSE,
'name');
157 foreach ($roleinfo as $roleid => $name) {
160 <td valign=
"top" width=
"200" colspan=
"2"><b><?php echo $name; ?></b></td>
163 <td valign=
"top" width=
"200"><b>%asset_role_<?php echo $roleid; ?>%</b></td>
164 <td valign=
"top">Comma separated list of the full names
for users/groups who can perform the
"<?php echo $name; ?>" role</td>
167 <td valign=
"top" width=
"200"><b>%asset_role_<?php echo $roleid; ?>_email%</b></td>
168 <td valign=
"top">Comma separated list of email addresses
for users/groups who can perform the
"<?php echo $name; ?>" role</td>
171 <td valign=
"top" width=
"200"><b>%asset_role_<?php echo $roleid; ?>_email_linked%</b></td>
172 <td valign=
"top">Comma separated list of linked email addresses
for users/groups who can perform the
"<?php echo $name; ?>" role</td>
186 <legend><b>All Keywords</b> (dynamically populated)</legend>
187 <table border=
"0" width=
"100%">
189 $asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($assetid);
190 $keywords = $asset->getAvailableKeywords();
193 foreach ($keywords as $keyword => $description) {
196 <td valign=
"top" width=
"200"><b>%<?php echo $keyword; ?>%</b></td>
197 <td valign=
"top"><?php echo $description; ?></td>