当前位置: 首页>>代码示例>>PHP>>正文


PHP flexicontent_html::builduploaderlist方法代码示例

本文整理汇总了PHP中flexicontent_html::builduploaderlist方法的典型用法代码示例。如果您正苦于以下问题:PHP flexicontent_html::builduploaderlist方法的具体用法?PHP flexicontent_html::builduploaderlist怎么用?PHP flexicontent_html::builduploaderlist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在flexicontent_html的用法示例。


在下文中一共展示了flexicontent_html::builduploaderlist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display


//.........这里部分代码省略.........
        $document->addScriptDeclaration($js);
        if ($autoselect && $newfileid) {
            $app->enqueueMessage(JText::_('FLEXI_UPLOADED_FILE_WAS_SELECTED'), 'message');
        }
        /*****************
         ** BUILD LISTS **
         *****************/
        $lists = array();
        // ** FILE UPLOAD FORM **
        // Build languages list
        //$allowed_langs = !$authorparams ? null : $authorparams->get('langs_allowed',null);
        //$allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
        $display_file_lang_as = $params->get('display_file_lang_as', 3);
        $allowed_langs = null;
        if (FLEXI_FISH || FLEXI_J16GE) {
            $lists['file-lang'] = flexicontent_html::buildlanguageslist('file-lang', '', '*', $display_file_lang_as, $allowed_langs, $published_only = false);
        } else {
            $lists['file-lang'] = flexicontent_html::getSiteDefaultLang() . '<input type="hidden" name="file-lang" value="' . flexicontent_html::getSiteDefaultLang() . '" />';
        }
        /*************
         ** FILTERS **
         *************/
        // language filter
        $lists['language'] = flexicontent_html::buildlanguageslist('filter_lang', 'class="use_select2_lib" onchange="submitform();" size="1" ', $filter_lang, 2);
        // search
        $lists['search'] = $search;
        //search filter
        $filters = array();
        $filters[] = JHTML::_('select.option', '1', JText::_('FLEXI_FILENAME'));
        $filters[] = JHTML::_('select.option', '2', JText::_('FLEXI_FILE_TITLE'));
        $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="use_select2_lib"', 'value', 'text', $filter);
        //build url/file filterlist
        $url = array();
        $url[] = JHTML::_('select.option', '', '- ' . JText::_('FLEXI_ALL_FILES') . ' -');
        $url[] = JHTML::_('select.option', 'F', JText::_('FLEXI_FILE'));
        $url[] = JHTML::_('select.option', 'U', JText::_('FLEXI_URL'));
        $lists['url'] = JHTML::_('select.genericlist', $url, 'filter_url', 'class="use_select2_lib" size="1" onchange="submitform( );"', 'value', 'text', $filter_url);
        //item lists
        /*$items_list = array();
        		$items_list[] = JHTML::_('select.option', '', '- '. JText::_( 'FLEXI_FILTER_BY_ITEM' ) .' -' );
        		foreach($items as $item) {
        			$items_list[] = JHTML::_('select.option', $item->id, JText::_( $item->title ) . ' (#' . $item->id . ')' );
        		}
        		$lists['item_id'] = JHTML::_('select.genericlist', $items_list, 'item_id', 'size="1" class="use_select2_lib" onchange="submitform( );"', 'value', 'text', $filter_item );*/
        $lists['item_id'] = '<input type="text" name="item_id" size="1" class="inputbox" onchange="submitform( );" value="' . $filter_item . '" />';
        //build secure/media filterlist
        $secure = array();
        $secure[] = JHTML::_('select.option', '', '- ' . JText::_('FLEXI_ALL_DIRECTORIES') . ' -');
        $secure[] = JHTML::_('select.option', 'S', JText::_('FLEXI_SECURE_DIR'));
        $secure[] = JHTML::_('select.option', 'M', JText::_('FLEXI_MEDIA_DIR'));
        $lists['secure'] = JHTML::_('select.genericlist', $secure, 'filter_secure', 'class="use_select2_lib" size="1" onchange="submitform( );"', 'value', 'text', $filter_secure);
        //build ext filterlist
        $lists['ext'] = flexicontent_html::buildfilesextlist('filter_ext', 'class="use_select2_lib" size="1" onchange="submitform( );"', $filter_ext);
        //build uploader filterlist
        $lists['uploader'] = flexicontent_html::builduploaderlist('filter_uploader', 'class="use_select2_lib" size="1" onchange="submitform( );"', $filter_uploader);
        // table ordering
        $lists['order_Dir'] = $filter_order_Dir;
        $lists['order'] = $filter_order;
        // removed files
        $filelist = JRequest::getString('files');
        $file = JRequest::getInt('file');
        $filelist = explode(',', $filelist);
        $files = array();
        foreach ($filelist as $fileid) {
            if ($fileid && $fileid != $file) {
                $files[] = (int) $fileid;
            }
        }
        $files = implode(',', $files);
        if (strlen($files) > 0) {
            $files .= ',';
        }
        $files .= $file;
        //assign data to template
        $this->assignRef('params', $params);
        $this->assignRef('client', $client);
        //Load pane behavior
        if (!FLEXI_J16GE) {
            jimport('joomla.html.pane');
            $pane = JPane::getInstance('Tabs');
            $this->assignRef('pane', $pane);
        }
        $this->assignRef('lists', $lists);
        $this->assignRef('rows', $rows);
        $this->assignRef('folder_mode', $folder_mode);
        $this->assignRef('img_folder', $img_folder);
        $this->assignRef('thumb_w', $thumb_w);
        $this->assignRef('thumb_h', $thumb_h);
        $this->assignRef('pagination', $pagination);
        $this->assignRef('files', $files);
        $this->assignRef('fieldid', $fieldid);
        $this->assignRef('u_item_id', $u_item_id);
        $this->assignRef('targetid', $targetid);
        $this->assignRef('CanFiles', $perms->CanFiles);
        $this->assignRef('CanUpload', $perms->CanUpload);
        $this->assignRef('CanViewAllFiles', $perms->CanViewAllFiles);
        $this->assignRef('files_selected', $files_selected);
        $this->assignRef('langs', $langs);
        parent::display($tpl);
    }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:101,代码来源:view.html.php

示例2: display


//.........这里部分代码省略.........
        //add js to document
        if ($folder_mode) {
            $js = "\n\t\t\tjQuery(document).ready(function()\n\t\t\t{\n\t\t\t\tvar delfilename = '" . $delfilename . "';\n\t\t\t\tvar remove_existing_files_from_list = 0;\n\t\t\t\tvar remove_new_files_from_list = 0;\n\t\t\t\t\n\t\t\t\t// Find and mark file usage by filename search\n\t\t\t\tvar original_objs = jQuery(window.parent.document.body).find('.fcfieldval_container_" . $fieldid . " .originalname');\n\t\t\t\tvar existing_objs = jQuery(window.parent.document.body).find('.fcfieldval_container_" . $fieldid . " .existingname');\n\t\t\t\t\n\t\t\t\tvar imgobjs = Array();\n\t\t\t\tfor(i=0,n=original_objs.length; i<n; i++)  {\n\t\t\t\t\tif (original_objs[i].value) imgobjs.push(original_objs[i].value);\n\t\t\t\t\tif (delfilename!='' && original_objs[i].value == delfilename)\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.parent.qmAssignFile" . $fieldid . "('" . $targetid . "', '', '', '1');\n\t\t\t\t\t\tremove_existing_files_from_list = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(i=0,n=existing_objs.length; i<n; i++) {\n\t\t\t\t\tif (existing_objs[i].value) imgobjs.push(existing_objs[i].value);\n\t\t\t\t\tif (delfilename!='' && existing_objs[i].value == delfilename)\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.parent.qmAssignFile" . $fieldid . "('" . $targetid . "', '', '', '1');\n\t\t\t\t\t\tremove_new_files_from_list = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( remove_existing_files_from_list || remove_new_files_from_list ) {\n\t\t\t\t\tmssg = '" . JText::_('FLEXI_DELETE_FILE_IN_LIST_WINDOW_MUST_CLOSE') . "';\n\t\t\t\t\tmssg = mssg + '\\n' + (remove_existing_files_from_list ? '" . JText::_('FLEXI_EXISTING_FILE_REMOVED_SAVE_RECOMMENEDED', true) . "' : '');\n\t\t\t\t\talert( mssg );\n\t\t\t\t\twindow.parent.qmAssignFile" . $fieldid . "('" . $targetid . "', '', '', '2');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(i=0,n=imgobjs.length; i<n; i++) {\n\t\t\t\t\tvar rows = jQuery.find('a[data-filename=\"'+ imgobjs[i] +'\"]');\n\t\t\t\t\tjQuery(rows).addClass('striketext');\n\t\t\t\t}\n\t\t\t\t" . ($autoassign && $newfilename ? "window.parent.qmAssignFile" . $fieldid . "('" . $targetid . "', '" . $newfilename . "', '" . $thumb . "');" : "") . "\n\t\t\t});\n\t\t\t";
        } else {
            $js = "\n\t\t\tfunction qffileselementadd(obj, id, file) {\n\t\t\t\tvar result = window.parent.qfSelectFile" . $fieldid . "(obj, id, file);\n\t\t\t\tif ((typeof result) != 'undefined' && result == 'cancel') return;\n\t\t\t\tobj.className = 'striketext';\n\t\t\t\tdocument.adminForm.file.value=id;\n\t\t\t}\n\t\t\tjQuery(document).ready(function()\n\t\t\t{\n\t\t\t\t// Find and mark file usage by filename search\n\t\t\t\tvar existing_objs = jQuery(window.parent.document.body).find('.fcfieldval_container_" . $fieldid . " .existingname');\n\t\t\t\tfor(i=0,n=existing_objs.length; i<n; i++) {\n\t\t\t\t\tvar rows = jQuery.find('a[data-filename=\"'+ existing_objs[i].value +'\"]');\n\t\t\t\t\tjQuery(rows).addClass('striketext');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Find and mark file usage by fileid search\n\t\t\t\tvar id_objs = jQuery(window.parent.document.body).find('.fcfieldval_container_" . $fieldid . " input.contains_fileid');\n\t\t\t\tvar imgids = Array();\n\t\t\t\tfor(i=0,n=id_objs.length; i<n; i++) {\n\t\t\t\t\tif ( id_objs[i].value) imgids.push(id_objs[i].value);\n\t\t\t\t}\n\t\t\t\tfor(i=0,n=imgids.length; i<n; i++) {\n\t\t\t\t\tvar rows = jQuery.find('a[data-fileid=\"'+ imgids[i] +'\"]');\n\t\t\t\t\tjQuery(rows).addClass('striketext');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t" . ($autoselect && $newfileid ? "qffileselementadd( document.getElementById('file" . $newfileid . "'), '" . $newfileid . "', '" . $newfilename . "');" : "") . "\n\t\t\t});\n\t\t\t";
        }
        $document->addScriptDeclaration($js);
        if ($autoselect && $newfileid) {
            $app->enqueueMessage(JText::_('FLEXI_UPLOADED_FILE_WAS_SELECTED'), 'message');
        }
        /*****************
         ** BUILD LISTS **
         *****************/
        $lists = array();
        // ** FILE UPLOAD FORM **
        // Build languages list
        //$allowed_langs = !$authorparams ? null : $authorparams->get('langs_allowed',null);
        //$allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
        $display_file_lang_as = $cparams->get('display_file_lang_as', 3);
        $allowed_langs = null;
        $lists['file-lang'] = flexicontent_html::buildlanguageslist('file-lang', '', '*', $display_file_lang_as, $allowed_langs, $published_only = false);
        /*************
         ** FILTERS **
         *************/
        // language filter
        $lists['language'] = ($filter_lang || 1 ? '<label class="label">' . JText::_('FLEXI_LANGUAGE') . '</label>' : '') . flexicontent_html::buildlanguageslist('filter_lang', 'class="use_select2_lib" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" size="1" ', $filter_lang, '-');
        // search
        $lists['search'] = $search;
        //search filter
        $filters = array();
        $filters[] = JHTML::_('select.option', '1', JText::_('FLEXI_FILENAME'));
        $filters[] = JHTML::_('select.option', '2', JText::_('FLEXI_FILE_DISPLAY_TITLE'));
        $lists['scope'] = JHTML::_('select.genericlist', $filters, 'scope', 'size="1" class="use_select2_lib fc_skip_highlight" title="' . JText::_('FLEXI_SEARCH_TEXT_INSIDE') . '"', 'value', 'text', $scope);
        //build url/file filterlist
        $url = array();
        $url[] = JHTML::_('select.option', '', '-');
        $url[] = JHTML::_('select.option', 'F', JText::_('FLEXI_FILE'));
        $url[] = JHTML::_('select.option', 'U', JText::_('FLEXI_URL'));
        $lists['url'] = ($filter_url || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_FILES') . '</label>' : '') . JHTML::_('select.genericlist', $url, 'filter_url', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_url);
        //item lists
        /*$items_list = array();
        		$items_list[] = JHTML::_('select.option', '', '- '. JText::_( 'FLEXI_FILTER_BY_ITEM' ) .' -' );
        		foreach($items as $item) {
        			$items_list[] = JHTML::_('select.option', $item->id, JText::_( $item->title ) . ' (#' . $item->id . ')' );
        		}
        		$lists['item_id'] = JHTML::_('select.genericlist', $items_list, 'item_id', 'size="1" class="use_select2_lib" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_item );*/
        $lists['item_id'] = '<input type="text" name="item_id" size="1" class="inputbox" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" value="' . $filter_item . '" />';
        //build secure/media filterlist
        $secure = array();
        $secure[] = JHTML::_('select.option', '', '-');
        $secure[] = JHTML::_('select.option', 'S', JText::_('FLEXI_SECURE_DIR'));
        $secure[] = JHTML::_('select.option', 'M', JText::_('FLEXI_MEDIA_DIR'));
        $lists['secure'] = ($filter_secure || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_DIRECTORIES') . '</label>' : '') . JHTML::_('select.genericlist', $secure, 'filter_secure', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_secure);
        //build ext filterlist
        $lists['ext'] = ($filter_ext || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_EXT') . '</label>' : '') . flexicontent_html::buildfilesextlist('filter_ext', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $filter_ext, '-');
        //build uploader filterlist
        $lists['uploader'] = ($filter_uploader || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_UPLOADERS') . '</label>' : '') . flexicontent_html::builduploaderlist('filter_uploader', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $filter_uploader, '-');
        // table ordering
        $lists['order_Dir'] = $filter_order_Dir;
        $lists['order'] = $filter_order;
        // removed files
        $filelist = JRequest::getString('files');
        $file = JRequest::getInt('file');
        $filelist = explode(',', $filelist);
        $files = array();
        foreach ($filelist as $fileid) {
            if ($fileid && $fileid != $file) {
                $files[] = (int) $fileid;
            }
        }
        $files = implode(',', $files);
        if (strlen($files) > 0) {
            $files .= ',';
        }
        $files .= $file;
        //assign data to template
        $this->assignRef('target_dir', $target_dir);
        $this->assignRef('count_filters', $count_filters);
        $this->assignRef('params', $cparams);
        $this->assignRef('client', $client);
        $this->assignRef('lists', $lists);
        $this->assignRef('rows', $rows);
        $this->assignRef('folder_mode', $folder_mode);
        $this->assignRef('img_folder', $img_folder);
        $this->assignRef('thumb_w', $thumb_w);
        $this->assignRef('thumb_h', $thumb_h);
        $this->assignRef('pagination', $pagination);
        $this->assignRef('files', $files);
        $this->assignRef('fieldid', $fieldid);
        $this->assignRef('u_item_id', $u_item_id);
        $this->assignRef('targetid', $targetid);
        $this->assignRef('CanFiles', $perms->CanFiles);
        $this->assignRef('CanUpload', $perms->CanUpload);
        $this->assignRef('CanViewAllFiles', $perms->CanViewAllFiles);
        $this->assignRef('files_selected', $files_selected);
        $this->assignRef('langs', $langs);
        $this->assignRef('option', $option);
        $this->assignRef('view', $view);
        parent::display($tpl);
    }
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例3: display


//.........这里部分代码省略.........
     // ***********************
     // Get data from the model
     // ***********************
     $model = $this->getModel();
     if (!$folder_mode) {
         $rows = $this->get('Data');
     } else {
         // TODO MORE ...
     }
     $pagination = $this->get('Pagination');
     //$users = $this->get('Users');
     // Get item using at least one file (-of- the currently listed files)
     /*$items_single	= $model->getItemsSingleprop( array('file','minigallery') );
     		$items_multi	= $model->getItemsMultiprop ( $field_props=array('image'=>'originalname'), $value_props=array('image'=>'filename') );
     		$items = array();
     		foreach ($items_single as $item_id => $_item) $items[$item_id] = $_item;
     		foreach ($items_multi  as $item_id => $_item) $items[$item_id] = $_item;
     		ksort($items);*/
     $assigned_fields_labels = array('image' => 'image/gallery', 'file' => 'file', 'minigallery' => 'minigallery');
     $assigned_fields_icons = array('image' => 'picture_link', 'file' => 'page_link', 'minigallery' => 'film_link');
     /*****************
      ** BUILD LISTS **
      *****************/
     $lists = array();
     // ** FILE UPLOAD FORM **
     // Build languages list
     //$allowed_langs = !$authorparams ? null : $authorparams->get('langs_allowed',null);
     //$allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
     $display_file_lang_as = $params->get('display_file_lang_as', 3);
     $allowed_langs = null;
     if (FLEXI_FISH || FLEXI_J16GE) {
         $lists['file-lang'] = flexicontent_html::buildlanguageslist('file-lang', '', '*', $display_file_lang_as, $allowed_langs, $published_only = false);
     } else {
         $lists['file-lang'] = flexicontent_html::getSiteDefaultLang() . '<input type="hidden" name="file-lang" value="' . flexicontent_html::getSiteDefaultLang() . '" />';
     }
     /*************
      ** FILTERS **
      *************/
     // language filter
     $lists['language'] = flexicontent_html::buildlanguageslist('filter_lang', 'class="use_select2_lib" onchange="submitform();" size="1" ', $filter_lang, 2);
     // search
     $lists['search'] = $search;
     //search filter
     $filters = array();
     $filters[] = JHTML::_('select.option', '1', JText::_('FLEXI_FILENAME'));
     $filters[] = JHTML::_('select.option', '2', JText::_('FLEXI_FILE_TITLE'));
     $lists['filter'] = JHTML::_('select.genericlist', $filters, 'filter', 'size="1" class="use_select2_lib"', 'value', 'text', $filter);
     //build url/file filterlist
     $url = array();
     $url[] = JHTML::_('select.option', '', '- ' . JText::_('FLEXI_ALL_FILES') . ' -');
     $url[] = JHTML::_('select.option', 'F', JText::_('FLEXI_FILE'));
     $url[] = JHTML::_('select.option', 'U', JText::_('FLEXI_URL'));
     $lists['url'] = JHTML::_('select.genericlist', $url, 'filter_url', 'class="use_select2_lib" size="1" onchange="submitform( );"', 'value', 'text', $filter_url);
     //item lists
     /*$items_list = array();
     		$items_list[] = JHTML::_('select.option', '', '- '. JText::_( 'FLEXI_FILTER_BY_ITEM' ) .' -' );
     		foreach($items as $item) {
     			$items_list[] = JHTML::_('select.option', $item->id, JText::_( $item->title ) . ' (#' . $item->id . ')' );
     		}
     		$lists['item_id'] = JHTML::_('select.genericlist', $items_list, 'item_id', 'size="1" class="use_select2_lib" onchange="submitform( );"', 'value', 'text', $filter_item );*/
     $lists['item_id'] = '<input type="text" name="item_id" size="1" class="inputbox" onchange="submitform( );" value="' . $filter_item . '" />';
     //build secure/media filterlist
     $secure = array();
     $secure[] = JHTML::_('select.option', '', '- ' . JText::_('FLEXI_ALL_DIRECTORIES') . ' -');
     $secure[] = JHTML::_('select.option', 'S', JText::_('FLEXI_SECURE_DIR'));
     $secure[] = JHTML::_('select.option', 'M', JText::_('FLEXI_MEDIA_DIR'));
     $lists['secure'] = JHTML::_('select.genericlist', $secure, 'filter_secure', 'class="use_select2_lib" size="1" onchange="submitform( );"', 'value', 'text', $filter_secure);
     //build ext filterlist
     $lists['ext'] = flexicontent_html::buildfilesextlist('filter_ext', 'class="use_select2_lib" size="1" onchange="submitform( );"', $filter_ext);
     //build uploader filterlist
     $lists['uploader'] = flexicontent_html::builduploaderlist('filter_uploader', 'class="use_select2_lib" size="1" onchange="submitform( );"', $filter_uploader);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // uploadstuff
     if ($params->get('enable_flash', 1) && !FLEXI_J30GE) {
         JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ window.location.reload(); }'));
     }
     jimport('joomla.client.helper');
     $ftp = !JClientHelper::hasCredentials('ftp');
     //assign data to template
     $this->assignRef('params', $params);
     $this->assign('require_ftp', $ftp);
     //Load pane behavior
     if (!FLEXI_J16GE) {
         jimport('joomla.html.pane');
         $pane = JPane::getInstance('Tabs');
         $this->assignRef('pane', $pane);
     }
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('CanFiles', $perms->CanFiles);
     $this->assignRef('CanUpload', $perms->CanUpload);
     $this->assignRef('CanViewAllFiles', $perms->CanViewAllFiles);
     $this->assignRef('assigned_fields_labels', $assigned_fields_labels);
     $this->assignRef('assigned_fields_icons', $assigned_fields_icons);
     $this->assignRef('langs', $langs);
     parent::display($tpl);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:view.html.php

示例4: display


//.........这里部分代码省略.........
        // Create the toolbar
        $this->setToolbar();
        // ***********************
        // Get data from the model
        // ***********************
        if (!$folder_mode) {
            $rows = $this->get('Data');
        } else {
            // TODO MORE ...
        }
        $pagination = $this->get('Pagination');
        //$users = $this->get('Users');
        // Get item using at least one file (-of- the currently listed files)
        /*$items_single	= $model->getItemsSingleprop( array('file','minigallery') );
        		$items_multi	= $model->getItemsMultiprop ( $field_props=array('image'=>'originalname'), $value_props=array('image'=>'filename') );
        		$items = array();
        		foreach ($items_single as $item_id => $_item) $items[$item_id] = $_item;
        		foreach ($items_multi  as $item_id => $_item) $items[$item_id] = $_item;
        		ksort($items);*/
        $assigned_fields_labels = array('image' => 'image/gallery', 'file' => 'file', 'minigallery' => 'minigallery');
        $assigned_fields_icons = array('image' => 'picture_link', 'file' => 'page_link', 'minigallery' => 'film_link');
        /*****************
         ** BUILD LISTS **
         *****************/
        $lists = array();
        // ** FILE UPLOAD FORM **
        // Build languages list
        //$allowed_langs = !$authorparams ? null : $authorparams->get('langs_allowed',null);
        //$allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
        $display_file_lang_as = $cparams->get('display_file_lang_as', 3);
        $allowed_langs = null;
        $lists['file-lang'] = flexicontent_html::buildlanguageslist('file-lang', '', '*', $display_file_lang_as, $allowed_langs, $published_only = false);
        /*************
         ** FILTERS **
         *************/
        // language filter
        $lists['language'] = ($filter_lang || 1 ? '<label class="label">' . JText::_('FLEXI_LANGUAGE') . '</label>' : '') . flexicontent_html::buildlanguageslist('filter_lang', 'class="use_select2_lib" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" size="1" ', $filter_lang, '-');
        // search
        $lists['search'] = $search;
        //search filter
        $filters = array();
        $filters[] = JHTML::_('select.option', '0', '- ' . JText::_('FLEXI_ALL') . ' -');
        $filters[] = JHTML::_('select.option', '1', JText::_('FLEXI_FILENAME'));
        $filters[] = JHTML::_('select.option', '2', JText::_('FLEXI_FILE_DISPLAY_TITLE'));
        $filters[] = JHTML::_('select.option', '3', JText::_('FLEXI_DESCRIPTION'));
        $lists['scope'] = '
			<span class="hasTooltip" style="display:inline-block; padding:0; margin:0;" title="' . JText::_('FLEXI_SEARCH_TEXT_INSIDE') . '"><i class="icon-info"></i></span>
			' . JHTML::_('select.genericlist', $filters, 'scope', 'size="1" class="use_select2_lib fc_skip_highlight" onchange="jQuery(\'#search\').attr(\'placeholder\', jQuery(this).find(\'option:selected\').text());" ', 'value', 'text', $scope);
        //build url/file filterlist
        $url = array();
        $url[] = JHTML::_('select.option', '', '-');
        $url[] = JHTML::_('select.option', 'F', JText::_('FLEXI_FILE'));
        $url[] = JHTML::_('select.option', 'U', JText::_('FLEXI_URL'));
        $lists['url'] = ($filter_url || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_FILES') . '</label>' : '') . JHTML::_('select.genericlist', $url, 'filter_url', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_url);
        //item lists
        /*$items_list = array();
        		$items_list[] = JHTML::_('select.option', '', '- '. JText::_( 'FLEXI_FILTER_BY_ITEM' ) .' -' );
        		foreach($items as $item) {
        			$items_list[] = JHTML::_('select.option', $item->id, JText::_( $item->title ) . ' (#' . $item->id . ')' );
        		}
        		$lists['item_id'] = JHTML::_('select.genericlist', $items_list, 'item_id', 'size="1" class="use_select2_lib" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_item );*/
        $lists['item_id'] = '<input type="text" name="item_id" size="1" class="inputbox" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()" value="' . $filter_item . '" />';
        //build secure/media filterlist
        $secure = array();
        $secure[] = JHTML::_('select.option', '', '-');
        $secure[] = JHTML::_('select.option', 'S', JText::_('FLEXI_SECURE_DIR'));
        $secure[] = JHTML::_('select.option', 'M', JText::_('FLEXI_MEDIA_DIR'));
        $lists['secure'] = ($filter_secure || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_DIRECTORIES') . '</label>' : '') . JHTML::_('select.genericlist', $secure, 'filter_secure', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', 'value', 'text', $filter_secure);
        //build ext filterlist
        $lists['ext'] = ($filter_ext || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_EXT') . '</label>' : '') . flexicontent_html::buildfilesextlist('filter_ext', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $filter_ext, '-');
        //build uploader filterlist
        $lists['uploader'] = ($filter_uploader || 1 ? '<label class="label">' . JText::_('FLEXI_ALL_UPLOADERS') . '</label>' : '') . flexicontent_html::builduploaderlist('filter_uploader', 'class="use_select2_lib" size="1" onchange="document.adminForm.limitstart.value=0; Joomla.submitform()"', $filter_uploader, '-');
        // table ordering
        $lists['order_Dir'] = $filter_order_Dir;
        $lists['order'] = $filter_order;
        // uploadstuff
        if ($cparams->get('enable_flash', 1) && !FLEXI_J30GE) {
            JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ window.location.reload(); }'));
        }
        jimport('joomla.client.helper');
        $ftp = !JClientHelper::hasCredentials('ftp');
        //assign data to template
        $this->assignRef('count_filters', $count_filters);
        $this->assignRef('params', $cparams);
        $this->assign('require_ftp', $ftp);
        $this->assignRef('lists', $lists);
        $this->assignRef('rows', $rows);
        $this->assignRef('folder_mode', $folder_mode);
        $this->assignRef('pagination', $pagination);
        $this->assignRef('CanFiles', $perms->CanFiles);
        $this->assignRef('CanUpload', $perms->CanUpload);
        $this->assignRef('CanViewAllFiles', $perms->CanViewAllFiles);
        $this->assignRef('assigned_fields_labels', $assigned_fields_labels);
        $this->assignRef('assigned_fields_icons', $assigned_fields_icons);
        $this->assignRef('langs', $langs);
        $this->assignRef('option', $option);
        $this->assignRef('view', $view);
        $this->sidebar = FLEXI_J30GE ? JHtmlSidebar::render() : null;
        parent::display($tpl);
    }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php


注:本文中的flexicontent_html::builduploaderlist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。