Changeset 22
- Timestamp:
- 04/26/07 16:41:33
- Files:
-
- trunk/phptagengine.class.inc.php (modified) (5 diffs)
- trunk/phptagengine.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/phptagengine.class.inc.php
r19 r22 908 908 * @param mixed $type 909 909 */ 910 function html_item_tags($item, $type = null, $user = null, $use_cache = false ) {910 function html_item_tags($item, $type = null, $user = null, $use_cache = false, $read_only = false) { 911 911 $user = $this->default_value('user', $user); 912 912 $type = $this->default_value('type', $type); … … 930 930 <li id="pte_tag_'.$item.'_'.$tag.'"><a href="'.$this->tag_browse_url($tag, $type).'">'.$this->html($tag).'</a> 931 931 '); 932 if ($this->show_remove_links ) {932 if ($this->show_remove_links && !$read_only) { 933 933 print(' 934 934 <a href="javascript:void(pte.remove_tag(\''.$item.'\', \''.$tag.'\', \''.$type.'\'));" title="'.$this->strings['action_delete'].'">'.$this->button_display('delete').'</a> … … 947 947 $edit_value = ''; 948 948 } 949 print(' 949 if ($read_only) { 950 print(' 951 </ul> 952 </form> 953 '); 954 } 955 else { 956 print(' 950 957 <li class="pte_edit"><a href="javascript:void(pte.item_tag_view(\''.$item.'\', \'edit\'));">'.$this->button_display('edit').'</a></li> 951 958 </ul> … … 953 960 <div class="pte_edit_wrapper"> 954 961 <input type="text" id="pte_tags_edit_field_'.$item.'" class="pte_tags_edit_field" name="tags" value="'.$edit_value.'" /> 955 '); 956 if ($this->yac) { 962 '); 963 if ($this->yac) { 964 print(' 965 <div id="yac_container_'.$item.'" class="yac_list"></div> 966 '); 967 } 957 968 print(' 958 <div id="yac_container_'.$item.'" class="yac_list"></div>959 ');960 }961 print('962 969 </div> 963 970 <input type="submit" name="submit_button" value="'.$this->strings['action_save'].'" /> … … 968 975 </form> 969 976 </div> 970 ');971 if ($this->yac) {972 print('973 <script type="text/javascript"><!--974 yac_'.$item.' = new YAHOO.widget.AutoComplete("pte_tags_edit_field_'.$item.'","yac_container_'.$item.'", yac_tags);975 yac_'.$item.'.delimChar = " ";976 yac_'.$item.'.maxResultsDisplayed = 20;977 yac_'.$item.'.queryDelay = 0;978 // --></script>979 977 '); 978 if ($this->yac) { 979 print(' 980 <script type="text/javascript"><!-- 981 yac_'.$item.' = new YAHOO.widget.AutoComplete("pte_tags_edit_field_'.$item.'","yac_container_'.$item.'", yac_tags); 982 yac_'.$item.'.delimChar = " "; 983 yac_'.$item.'.maxResultsDisplayed = 20; 984 yac_'.$item.'.queryDelay = 0; 985 // --></script> 986 '); 987 } 980 988 } 981 989 print('<!-- PHP Tag Engine html_item_tags for '.$item.' - end -->'."\n"); trunk/phptagengine.css
r19 r22 88 88 border: 1px solid #ccc; 89 89 border-top: 0; 90 color: #000; 90 91 list-style: none; 91 92 margin: 0;
