17 require_once SQ_CORE_PACKAGE_PATH.
'/page/page_edit_fns.inc';
47 $write_access = $asset->writeAccess(
'attributes');
48 $size = $GLOBALS[
'SQ_SYSTEM']->getUserPrefs($asset->type(),
'SQ_COMMENT_INPUT_SIZE');
51 $name = isset($_REQUEST[$prefix.
'_name']) ? $_REQUEST[$prefix.
'_name'] : $asset->attr(
'name_raw');
52 text_box($prefix.
'_name', $name,
'',
'', FALSE,
'style="width: '.$size[
'width'].
';"');
54 echo $asset->attr(
'name');
74 $write_access = $asset->writeAccess(
'attributes');
76 if ($write_access && isset($_REQUEST[$prefix.
'_name']) === TRUE) {
77 $value = array_get_index($_REQUEST, $prefix.
'_name');
78 $asset->setAttrValue(
'name', $value);
79 $asset->setAttrValue(
'short_name', $asset->attr(
'name'));
100 $write_access = $asset->writeAccess(
'attributes');
102 $current_setting = $asset->attr(
'rating');
103 if ($current_setting != -1) {
104 $current_setting = $asset->_getRatingScaledInteger();
108 $max_rating = $asset->_getRatingLimit();
110 $option_array[-1] =
'No Rating';
111 for ($i = 0; $i<=$max_rating; $i++) {
112 $option_array[$i] = $i;
115 combo_box($prefix.
'_rating', $option_array, FALSE, $current_setting);
117 echo $current_setting;
137 $write_access = $asset->writeAccess(
'attributes');
139 if ($write_access && isset($_REQUEST[$prefix.
'_rating']) === TRUE) {
140 $value = array_get_index($_REQUEST, $prefix.
'_rating');
143 $percent = $asset->_convertIntegerRatingToPercent($value);
144 $asset->setAttrValue(
'rating', $percent);
165 $write_access = $asset->writeAccess(
'attributes');
167 $size = $GLOBALS[
'SQ_SYSTEM']->getUserPrefs($asset->type(),
'SQ_COMMENT_INPUT_SIZE');
168 $length = $GLOBALS[
'SQ_SYSTEM']->getUserPrefs($asset->type(),
'SQ_COMMENT_MAX_LENGTH');
171 $comment = isset($_REQUEST[$prefix.
'_comment']) ? $_REQUEST[$prefix.
'_comment'] : $asset->attr(
'comment_raw');
172 text_area($prefix.
'_comment', $comment, 0, 0, $length,
'style="width: '.$size[
'width'].
'; height: '.$size[
'height'].
';"');
174 echo $asset->attr(
'comment');
194 $write_access = $asset->writeAccess(
'attributes');
196 if ($write_access && isset($_REQUEST[$prefix.
'_comment']) === TRUE) {
197 $comment = array_get_index($_REQUEST, $prefix.
'_comment');
198 $asset->setAttrValue(
'comment', $comment);
218 if (!empty($asset->created_userid)) {
219 echo get_asset_tag_line($asset->created_userid,
'details');
221 echo isset($GLOBALS[
'SQ_SYSTEM']->user) ? $GLOBALS[
'SQ_SYSTEM']->user->name :
'';