Changeset 22

Show
Ignore:
Timestamp:
04/26/07 16:41:33
Author:
svn
Message:

added read-only output option

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phptagengine.class.inc.php

    r19 r22  
    908908         * @param mixed $type 
    909909         */ 
    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) { 
    911911                $user = $this->default_value('user', $user); 
    912912                $type = $this->default_value('type', $type); 
     
    930930                                                <li id="pte_tag_'.$item.'_'.$tag.'"><a href="'.$this->tag_browse_url($tag, $type).'">'.$this->html($tag).'</a> 
    931931                                '); 
    932                                 if ($this->show_remove_links) { 
     932                                if ($this->show_remove_links && !$read_only) { 
    933933                                        print(' 
    934934                                                        <a href="javascript:void(pte.remove_tag(\''.$item.'\', \''.$tag.'\', \''.$type.'\'));" title="'.$this->strings['action_delete'].'">'.$this->button_display('delete').'</a> 
     
    947947                        $edit_value = ''; 
    948948                } 
    949                 print(' 
     949                if ($read_only) { 
     950                        print(' 
     951                                        </ul> 
     952                                </form> 
     953                        '); 
     954                } 
     955                else { 
     956                        print(' 
    950957                                                <li class="pte_edit"><a href="javascript:void(pte.item_tag_view(\''.$item.'\', \'edit\'));">'.$this->button_display('edit').'</a></li> 
    951958                                        </ul> 
     
    953960                                                <div class="pte_edit_wrapper"> 
    954961                                                        <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                        } 
    957968                        print(' 
    958                                                         <div id="yac_container_'.$item.'" class="yac_list"></div> 
    959                         '); 
    960                 } 
    961                 print(' 
    962969                                                </div> 
    963970                                                <input type="submit" name="submit_button" value="'.$this->strings['action_save'].'" /> 
     
    968975                                </form> 
    969976                        </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> 
    979977                        '); 
     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                        } 
    980988                } 
    981989                print('<!-- PHP Tag Engine html_item_tags for '.$item.' - end -->'."\n"); 
  • trunk/phptagengine.css

    r19 r22  
    8888        border: 1px solid #ccc; 
    8989        border-top: 0; 
     90        color: #000; 
    9091        list-style: none; 
    9192        margin: 0;