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


PHP t3lib_BEfunc::editOnClick方法代码示例

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


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

示例1: getNewIcon

 /**
  * Returns the New Icon with link
  *
  * @param string $table Table name
  * @param array $row Data row
  * @return string html output
  */
 protected function getNewIcon($table, array $row)
 {
     $params .= '&edit[' . $table . '][' . $row['storagePid'] . ']=new';
     $title = Tx_Extbase_Utility_Localization::translate('be.newEvent', 'woehrl_seminare', $arguments = NULL);
     $icon = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) . '" title="' . $title . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-new') . '</a>';
     return $icon;
 }
开发者ID:woehrlag,项目名称:Intranet,代码行数:14,代码来源:FunctionBarViewHelper.php

示例2: main

    /**
     * Main function
     *
     * @return	void
     */
    function main()
    {
        switch ((string) t3lib_div::_GET('cmd')) {
            case 'menuitem':
                echo '
				<img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
                $menuItems = array(array('title' => 'About TYPO3', 'xurl' => 'http://typo3.com/', 'subitems' => array(array('title' => 'License', 'xurl' => 'http://typo3.com/License.1625.0.html'), array('title' => 'Support', 'subitems' => array(array('title' => 'Mailing lists', 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo'), array('title' => 'Documentation', 'xurl' => 'http://typo3.org/documentation/'), array('title' => 'Find consultancy', 'xurl' => 'http://typo3.com/Consultancies.1248.0.html'))), array('title' => 'Contribute', 'xurl' => 'http://typo3.org/community/participate/'), array('title' => 'Donate', 'xurl' => 'http://typo3.com/Donations.1261.0.html', 'icon' => '1'))), array('title' => 'Extensions', 'url' => 'mod/tools/em/index.php'), array('title' => 'Menu preferences and such things', 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();', 'state' => 'checked'), array('title' => '--div--'), array('title' => 'Recent Items', 'id' => $this->id . '_recent', 'subitems' => array(), 'html' => $this->menuItemObject($this->id . '_recent', '
							fetched: false,
							onActivate: function() {
//								if (!this.fetched)	{
									//Element.update("' . $this->id . '_recent-layer","asdfasdf");
									getElementContent("' . $this->id . '_recent-layer", 0, "logomenu.php?cmd=recent")
									this.fetched = true;
//								}
							}
						')), array('title' => '--div--'), array('title' => 'View frontend', 'xurl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL')), array('title' => 'Log out', 'onclick' => "top.document.location='logout.php';"));
                echo $this->menuLayer($menuItems);
                break;
            case 'recent':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX', 'sys_log,pages', 'pages.uid=sys_log.event_pid AND sys_log.userid=' . intval($GLOBALS['BE_USER']->user['uid']) . ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0', 'tablename,recuid', 'tstamp_MAX DESC', 20);
                $items = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    $elRow = t3lib_BEfunc::getRecord($row['tablename'], $row['recuid']);
                    if (is_array($elRow)) {
                        $items[] = array('title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), 'icon' => array(t3lib_iconworks::getIcon($row['tablename'], $elRow), 'width="18" height="16"'), 'onclick' => 'content.' . t3lib_BEfunc::editOnClick('&edit[' . $row['tablename'] . '][' . $row['recuid'] . ']=edit', '', 'dummy.php'));
                    }
                }
                echo $this->menuItems($items);
                break;
        }
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:36,代码来源:logomenu.php

示例3: makeTableRow

    /**
     * [Describe function...]
     *
     * @param   [type]    $rec: ...
     * @return  [type]    ...
     */
    function makeTableRow($rec)
    {
        //Render information for base record:
        $baseRecord = t3lib_BEfunc::getRecordWSOL($rec['tablename'], $rec['recuid']);
        $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($rec['tablename'], $baseRecord);
        $title = t3lib_BEfunc::getRecordTitle($rec['tablename'], $baseRecord, 1);
        $baseRecordFlag = '<img src="' . htmlspecialchars($GLOBALS['BACK_PATH'] . $this->sysLanguages[$rec['sys_language_uid']]['flagIcon']) . '" alt="" title="" />';
        $tFlag = '<img src="' . htmlspecialchars($GLOBALS['BACK_PATH'] . $this->sysLanguages[$rec['translation_lang']]['flagIcon']) . '" alt="' . htmlspecialchars($this->sysLanguages[$rec['translation_lang']]['title']) . '" title="' . htmlspecialchars($this->sysLanguages[$rec['translation_lang']]['title']) . '" />';
        $baseRecordStr = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $rec['tablename'] . '][' . $rec['recuid'] . ']=edit', $this->doc->backPath)) . '">' . $icon . $title . '</a>';
        // Render for translation if any:
        $translationRecord = false;
        if ($rec['translation_recuid']) {
            $translationTable = $this->l10nMgrTools->t8Tools->getTranslationTable($rec['tablename']);
            $translationRecord = t3lib_BEfunc::getRecordWSOL($translationTable, $rec['translation_recuid']);
            $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($translationTable, $translationRecord);
            $title = t3lib_BEfunc::getRecordTitle($translationTable, $translationRecord, 1);
            $translationRecStr = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $translationTable . '][' . $translationRecord['uid'] . ']=edit', $this->doc->backPath)) . '">' . $icon . $title . '</a>';
        } else {
            $translationRecStr = '';
        }
        // Action:
        if (is_array($translationRecord)) {
            $action = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $translationTable . '][' . $translationRecord['uid'] . ']=edit', $this->doc->backPath)) . '"><em>[Edit]</em></a>';
        } elseif ($rec['sys_language_uid'] == -1) {
            $action = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $rec['tablename'] . '][' . $rec['recuid'] . ']=edit', $this->doc->backPath)) . '"><em>[Edit]</em></a>';
        } else {
            $action = '<a href="' . htmlspecialchars($this->doc->issueCommand('&cmd[' . $rec['tablename'] . '][' . $rec['recuid'] . '][localize]=' . $rec['translation_lang'])) . '"><em>[Localize]</em></a>';
        }
        return '<tr class="bgColor4-20">
			<td valign="top">' . $baseRecordFlag . '</td>
			<td valign="top" nowrap="nowrap">' . $baseRecordStr . '</td>
			<td valign="top">' . $tFlag . '</td>
			<td valign="top" nowrap="nowrap">' . $translationRecStr . '</td>
			<td valign="top">' . $action . '</td>
			<td align="center"' . ($rec['flag_new'] ? ' bgcolor="#91B5FF"' : '') . '>' . ($rec['flag_new'] ? $rec['flag_new'] : '') . '</td>
			<td align="center"' . ($rec['flag_unknown'] ? ' bgcolor="#FEFF5A"' : '') . '>' . ($rec['flag_unknown'] ? $rec['flag_unknown'] : '') . '</td>
			<td align="center"' . ($rec['flag_update'] ? ' bgcolor="#FF7161"' : '') . '>' . ($rec['flag_update'] ? $rec['flag_update'] : '') . '</td>
			<td align="center"' . ($rec['flag_noChange'] ? ' bgcolor="#78FF82"' : '') . '>' . ($rec['flag_noChange'] ? $rec['flag_noChange'] : '') . '</td>
			<td>' . implode('<br/>', unserialize($rec['serializedDiff'])) . '</td>
		</tr>';
    }
开发者ID:danilovq,项目名称:l10nmgr,代码行数:47,代码来源:index.php

示例4: link_edit

 /**
  * Returns an HTML link for editing
  *
  * @param	string		$label: The label (or image)
  * @param	string		$table: The table, fx. 'tt_content'
  * @param	integer		$uid: The uid of the element to be edited
  * @param	boolean		$forced: By default the link is not shown if translatorMode is set, but with this boolean it can be forced anyway.
  * @return	string		HTML anchor tag containing the label and the correct link
  * @access protected
  */
 function link_edit($label, $table, $uid, $forced = FALSE)
 {
     if ($label) {
         if (($table == 'pages' && $this->calcPerms & 2 || $table != 'pages' && $this->calcPerms & 16) && (!$this->translatorMode || $forced)) {
             if ($table == "pages" && $this->currentLanguageUid) {
                 return '<a href="index.php?' . $this->link_getParameters() . '&amp;editPageLanguageOverlay=' . $this->currentLanguageUid . '">' . $label . '</a>';
             } else {
                 $onClick = t3lib_BEfunc::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $this->doc->backPath);
                 return '<a style="text-decoration: none;" href="#" onclick="' . htmlspecialchars($onClick) . '">' . $label . '</a>';
             }
         } else {
             return $label;
         }
     }
     return '';
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:26,代码来源:index.php

示例5: main


//.........这里部分代码省略.........
            if ($e['resources']) {
                // Upload
                $outCode = '<input type="File" name="resources"' . $this->pObj->doc->formWidth() . ' size="50">';
                $outCode .= '<input type="Hidden" name="data[resources]" value="1">';
                $outCode .= '<input type="Hidden" name="e[resources]" value="1">';
                $outCode .= '<BR>' . $GLOBALS['LANG']->getLL('allowedExtensions') . ' <strong>' . $TCA['sys_template']['columns']['resources']['config']['allowed'] . '</strong>';
                $outCode .= '<BR>' . $GLOBALS['LANG']->getLL('maxFilesize') . ' <strong>' . t3lib_div::formatSize($TCA['sys_template']['columns']['resources']['config']['max_size'] * 1024) . '</strong>';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('uploadResource'), $outCode);
                // New
                $opt = explode(',', $this->pObj->textExtensions);
                $optTags = '';
                foreach ($opt as $extVal) {
                    $optTags .= '<option value="' . $extVal . '">.' . $extVal . '</option>';
                }
                $outCode = '<input type="text" name="new_resource"' . $this->pObj->doc->formWidth(20) . '>
					<select name="new_resource_ext">' . $optTags . '</select>';
                $outCode .= '<input type="Hidden" name="data[new_resource]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('newTextResource'), $outCode);
                // Make copy
                $rL = $this->resourceListForCopy($this->pObj->id, $template_uid);
                if ($rL) {
                    $theOutput .= $this->pObj->doc->spacer(20);
                    $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('copyResource'), $rL);
                }
                // Update resource list
                $rL = $this->procesResources($tplRow['resources'], 1);
                if ($rL) {
                    $theOutput .= $this->pObj->doc->spacer(20);
                    $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('updateResourceList'), $rL);
                }
            }
            if ($e['constants']) {
                $outCode = '<textarea name="data[constants]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . t3lib_div::formatForTextarea($tplRow['constants']) . '</textarea>';
                $outCode .= '<input type="Hidden" name="e[constants]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('constants'), '');
                $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
            }
            if ($e['file']) {
                $path = PATH_site . $TCA['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $e[file];
                $fI = t3lib_div::split_fileref($e[file]);
                if (@is_file($path) && t3lib_div::inList($this->pObj->textExtensions, $fI['fileext'])) {
                    if (filesize($path) < $TCA['sys_template']['columns']['resources']['config']['max_size'] * 1024) {
                        $fileContent = t3lib_div::getUrl($path);
                        $outCode = $GLOBALS['LANG']->getLL('file') . ' <strong>' . $e[file] . '</strong><BR>';
                        $outCode .= '<textarea name="edit[file]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . t3lib_div::formatForTextarea($fileContent) . '</textarea>';
                        $outCode .= '<input type="Hidden" name="edit[filename]" value="' . $e[file] . '">';
                        $outCode .= '<input type="Hidden" name="e[file]" value="' . htmlspecialchars($e[file]) . '">';
                        $theOutput .= $this->pObj->doc->spacer(15);
                        $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editResource'), '');
                        $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
                    } else {
                        $theOutput .= $this->pObj->doc->spacer(15);
                        $fileToBig = sprintf($GLOBALS['LANG']->getLL('filesizeExceeded'), $TCA['sys_template']['columns']['resources']['config']['max_size']);
                        $filesizeNotAllowed = sprintf($GLOBALS['LANG']->getLL('notAllowed'), $TCA['sys_template']['columns']['resources']['config']['max_size']);
                        $theOutput .= $this->pObj->doc->section('<font color=red>' . $fileToBig . '</font>', $filesizeNotAllowed, 0, 0, 0, 1);
                    }
                }
            }
            if ($e['config']) {
                $outCode = '<textarea name="data[config]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, "width:98%;height:70%", "off") . ' class="fixed-font">' . t3lib_div::formatForTextarea($tplRow["config"]) . '</textarea>';
                if (t3lib_extMgm::isLoaded('tsconfig_help')) {
                    $url = $BACK_PATH . 'wizard_tsconfig.php?mode=tsref';
                    $params = array('formName' => 'editForm', 'itemName' => 'data[config]');
                    $outCode .= '<a href="#" onClick="vHWin=window.open(\'' . $url . t3lib_div::implodeArrayForUrl('', array('P' => $params)) . '\',\'popUp' . $md5ID . '\',\'height=500,width=780,status=0,menubar=0,scrollbars=1\');vHWin.focus();return false;">' . t3lib_iconWorks::getSpriteIcon('actions-system-typoscript-documentation-open', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:tsRef', true))) . '</a>';
                }
                $outCode .= '<input type="Hidden" name="e[config]" value="1">';
                $theOutput .= $this->pObj->doc->spacer(15);
                $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('setup'), '');
                $theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
            }
            // Processing:
            $outCode = '';
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('title'), htmlspecialchars($tplRow['title']), 'title');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('sitetitle'), htmlspecialchars($tplRow['sitetitle']), 'sitetitle');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('description'), nl2br(htmlspecialchars($tplRow['description'])), 'description');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('resources'), $this->procesResources($tplRow['resources']), 'resources');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('constants'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[constants]) ? count(explode(LF, $tplRow[constants])) : 0), 'constants');
            $outCode .= $this->tableRow($GLOBALS['LANG']->getLL('setup'), sprintf($GLOBALS['LANG']->getLL('editToView'), trim($tplRow[config]) ? count(explode(LF, $tplRow[config])) : 0), 'config');
            $outCode = '<br /><br /><table class="t3-table-info">' . $outCode . '</table>';
            // Edit all icon:
            $outCode .= '<br /><a href="#" onClick="' . t3lib_BEfunc::editOnClick(rawurlencode('&createExtension=0') . '&amp;edit[sys_template][' . $tplRow['uid'] . ']=edit', $BACK_PATH, '') . '"><strong>' . t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => $GLOBALS['LANG']->getLL('editTemplateRecord'))) . $GLOBALS['LANG']->getLL('editTemplateRecord') . '</strong></a>';
            $theOutput .= $this->pObj->doc->section('', $outCode);
            // hook	after compiling the output
            if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'])) {
                $postOutputProcessingHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/tstemplate_info/class.tx_tstemplateinfo.php']['postOutputProcessingHook'];
                if (is_array($postOutputProcessingHook)) {
                    $hookParameters = array('theOutput' => &$theOutput, 'POST' => $POST, 'e' => $e, 'tplRow' => $tplRow, 'numberOfRows' => $numberOfRows);
                    foreach ($postOutputProcessingHook as $hookFunction) {
                        t3lib_div::callUserFunction($hookFunction, $hookParameters, $this);
                    }
                }
            }
        } else {
            $theOutput .= $this->pObj->noTemplate(1);
        }
        return $theOutput;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.tx_tstemplateinfo.php

示例6: resultRowDisplay

    /**
     * [Describe function...]
     *
     * @param	[type]		$row: ...
     * @param	[type]		$conf: ...
     * @param	[type]		$table: ...
     * @return	[type]		...
     */
    function resultRowDisplay($row, $conf, $table)
    {
        static $even = FALSE;
        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
        $SET = $GLOBALS['SOBE']->MOD_SETTINGS;
        $out = '<tr class="bgColor' . ($even ? '6' : '4') . '">';
        $even = !$even;
        foreach ($row as $fN => $fV) {
            if (t3lib_div::inList($SET['queryFields'], $fN) || !$SET['queryFields'] && $fN != 'pid' && $fN != 'deleted') {
                if ($SET['search_result_labels']) {
                    $fVnew = $this->getProcessedValueExtra($table, $fN, $fV, $conf, '<br />');
                } else {
                    $fVnew = htmlspecialchars($fV);
                }
                $out .= '<td>' . $fVnew . '</td>';
            }
        }
        $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
        $out .= '<td nowrap>';
        if (!$row['deleted']) {
            $out .= '<a href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . t3lib_iconWorks::getSpriteIcon('status-dialog-information') . '</a>';
            $out .= '<a href="#" onClick="' . t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], t3lib_div::getIndpEnv('REQUEST_URI') . t3lib_div::implodeArrayForUrl('SET', (array) t3lib_div::_POST('SET'))) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
        } else {
            $out .= '<a href="' . t3lib_div::linkThisUrl($GLOBALS['BACK_PATH'] . 'tce_db.php', array('cmd[' . $table . '][' . $row['uid'] . '][undelete]' => '1', 'redirect' => t3lib_div::linkThisScript(array()))) . t3lib_BEfunc::getUrlToken('tceAction') . '">';
            $out .= t3lib_iconWorks::getSpriteIcon('actions-edit-restore', array('title' => 'undelete only')) . '</a>';
            $out .= '<a href="' . t3lib_div::linkThisUrl($GLOBALS['BACK_PATH'] . 'tce_db.php', array('cmd[' . $table . '][' . $row['uid'] . '][undelete]' => '1', 'redirect' => t3lib_div::linkThisUrl('alt_doc.php', array('edit[' . $table . '][' . $row['uid'] . ']' => 'edit', 'returnUrl' => t3lib_div::linkThisScript(array()))))) . t3lib_BEfunc::getUrlToken('tceAction') . '">';
            $out .= t3lib_iconWorks::getSpriteIcon('actions-edit-restore-edit', array('title' => 'undelete and edit')) . '</a>';
        }
        $_params = array($table => $row);
        if (is_array($this->hookArray['additionalButtons'])) {
            foreach ($this->hookArray['additionalButtons'] as $_funcRef) {
                $out .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
            }
        }
        $out .= '</td>
		</tr>
		';
        return $out;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:47,代码来源:class.t3lib_fullsearch.php

示例7: main


//.........这里部分代码省略.........
            $sc_group = $row['sc_group'];
            if ($sc_group && strcmp($formerGr, $sc_group)) {
                if ($sc_group != -100) {
                    if ($this->groupLabels[abs($sc_group)] && strcmp('1', $this->groupLabels[abs($sc_group)])) {
                        $label = $this->groupLabels[abs($sc_group)];
                    } else {
                        $label = $LANG->getLL('shortcut_group_' . abs($sc_group), 1);
                        if (!$label) {
                            $label = $LANG->getLL('shortcut_group', 1) . ' ' . abs($sc_group);
                        }
                        // Fallback label
                    }
                    if ($sc_group >= 0) {
                        $onC = 'if (confirm(' . $GLOBALS['LANG']->JScharCode($LANG->getLL('shortcut_delAllInCat')) . ')){window.location.href=\'alt_shortcut.php?deleteCategory=' . $sc_group . '\';}return false;';
                        $this->linesPre[] = '<td>&nbsp;</td><td class="bgColor5"><a href="#" onclick="' . htmlspecialchars($onC) . '" title="' . $LANG->getLL('shortcut_delAllInCat', 1) . '">' . $label . '</a></td>';
                    } else {
                        $label = $LANG->getLL('shortcut_global', 1) . ': ' . ($label ? $label : abs($sc_group));
                        // Fallback label
                        $this->lines[] = '<td>&nbsp;</td><td class="bgColor5">' . $label . '</td>';
                    }
                    unset($label);
                }
            }
            $bgColorClass = $row['uid'] == $this->editSC ? 'bgColor5' : ($row['sc_group'] < 0 ? 'bgColor6' : 'bgColor4');
            if ($row['description'] && $row['uid'] != $this->editSC) {
                $label = $row['description'];
            } else {
                $label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']), 150);
            }
            $titleA = $this->itemLabel($label, $row['module_name'], $row['M_module_name']);
            $editSH = $row['sc_group'] >= 0 || $BE_USER->isAdmin() ? 'editSh(' . intval($row['uid']) . ');' : "alert('" . $LANG->getLL('shortcut_onlyAdmin') . "')";
            $jumpSC = 'jump(unescape(\'' . rawurlencode($row['url']) . '\'),\'' . implode('_', $mParts) . '\',\'' . $mParts[0] . '\');';
            $onC = 'if (document.shForm.editShortcut_check && document.shForm.editShortcut_check.checked){' . $editSH . '}else{' . $jumpSC . '}return false;';
            if ($sc_group >= 0) {
                // user defined groups show up first
                $this->linesPre[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
            } else {
                $this->lines[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
            }
            if (trim($row['description'])) {
                $kkey = strtolower(substr($row['description'], 0, 20)) . '_' . $row['uid'];
                $this->selOpt[$kkey] = '<option value="' . htmlspecialchars($jumpSC) . '">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['description'], 50)) . '</option>';
            }
            $formerGr = $row['sc_group'];
        }
        ksort($this->selOpt);
        array_unshift($this->selOpt, '<option>[' . $LANG->getLL('shortcut_selSC', 1) . ']</option>');
        $this->editLoadedFunc();
        $this->editPageIdFunc();
        if (!$this->editLoaded && t3lib_extMgm::isLoaded('cms')) {
            $editIdCode = '<td nowrap="nowrap">' . $LANG->getLL('shortcut_editID', 1) . ': <input type="text" value="' . ($this->editError ? htmlspecialchars($this->editPage) : '') . '" name="editPage"' . $this->doc->formWidth(15) . ' onchange="submitEditPage(this.value);" />' . ($this->editError ? '&nbsp;<strong><span class="typo3-red">' . htmlspecialchars($this->editError) . '</span></strong>' : '') . (is_array($this->theEditRec) ? '&nbsp;<strong>' . $LANG->getLL('shortcut_loadEdit', 1) . ' \'' . t3lib_BEfunc::getRecordTitle('pages', $this->theEditRec, TRUE) . '\'</strong> (' . htmlspecialchars($this->editPath) . ')' : '') . ($this->searchFor ? '&nbsp;' . $LANG->getLL('shortcut_searchFor', 1) . ' <strong>\'' . htmlspecialchars($this->searchFor) . '\'</strong>' : '') . '</td>';
        } else {
            $editIdCode = '';
        }
        // Adding CSH:
        $editIdCode .= '<td>&nbsp;' . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'shortcuts', $GLOBALS['BACK_PATH'], '', TRUE) . '</td>';
        // Compile it all:
        $this->content .= '

			<table border="0" cellpadding="0" cellspacing="0" width="99%">
				<tr>
					<td>
						<!--
							Shortcut Display Table:
						-->
						<table border="0" cellpadding="0" cellspacing="2" id="typo3-shortcuts">
							<tr>
							';
        if ($GLOBALS['BE_USER']->getTSConfigVal('options.enableShortcuts')) {
            $this->content .= implode('
								', $this->lines);
        }
        $this->content .= $editIdCode . '
							</tr>
						</table>
					</td>
					<td align="right">';
        if ($this->hasWorkspaceAccess()) {
            $this->content .= $this->workspaceSelector() . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'workspaceSelector', $GLOBALS['BACK_PATH'], '', TRUE);
        }
        $this->content .= '
					</td>
				</tr>
			</table>
			';
        // Launch Edit page:
        if ($this->theEditRec['uid']) {
            $this->content .= $this->doc->wrapScriptTags('top.loadEditId(' . $this->theEditRec['uid'] . ');');
        }
        // Load alternative table/uid into editing form.
        if (count($this->alternativeTableUid) == 2 && isset($TCA[$this->alternativeTableUid[0]]) && t3lib_div::testInt($this->alternativeTableUid[1])) {
            $JSaction = t3lib_BEfunc::editOnClick('&edit[' . $this->alternativeTableUid[0] . '][' . $this->alternativeTableUid[1] . ']=edit', '', 'dummy.php');
            $this->content .= $this->doc->wrapScriptTags('function editArbitraryElement() { top.content.' . $JSaction . '; } editArbitraryElement();');
        }
        // Load search for something.
        if ($this->searchFor) {
            $firstMP = intval($GLOBALS['WEBMOUNTS'][0]);
            $this->content .= $this->doc->wrapScriptTags('jump(unescape("' . rawurlencode('db_list.php?id=' . $firstMP . '&search_field=' . rawurlencode($this->searchFor) . '&search_levels=4') . '"),"web_list","web");');
        }
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:alt_shortcut.php

示例8: renderL10nTable

    /**
     * Rendering the localization information table.
     *
     * @param	array		The Page tree data
     * @return	string		HTML for the localization information table.
     */
    function renderL10nTable(&$tree)
    {
        global $LANG;
        // System languages retrieved:
        $languages = $this->getSystemLanguages();
        // Title length:
        $titleLen = $GLOBALS['BE_USER']->uc['titleLen'];
        // Put together the TREE:
        $output = '';
        $newOL_js = array();
        $langRecUids = array();
        foreach ($tree->tree as $data) {
            $tCells = array();
            $langRecUids[0][] = $data['row']['uid'];
            // Page icons / titles etc.
            $tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' . $data['HTML'] . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $titleLen)) . (strcmp($data['row']['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') . '</td>';
            // DEFAULT language:
            // "View page" link is created:
            $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '" title="' . $LANG->getLL('lang_renderl10n_viewPage', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
            $status = $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-ok';
            // Create links:
            $info = '';
            $editUid = $data['row']['uid'];
            $params = '&edit[pages][' . $editUid . ']=edit';
            $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
            $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=0"); return false;') . '" title="' . $LANG->getLL('lang_renderl10n_editPage', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-open') . '</a>';
            $info .= str_replace('###LANG_UID###', '0', $viewPageLink);
            $info .= '&nbsp;';
            $info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $LANG->sL('LLL:EXT:cms/locallang_tca.php:pages.l18n_cfg.I.1', '1') . '">D</span>' : '&nbsp;';
            $info .= t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) ? '<span title="' . $LANG->sL('LLL:EXT:cms/locallang_tca.php:pages.l18n_cfg.I.2', '1') . '">N</span>' : '&nbsp;';
            // Put into cell:
            $tCells[] = '<td class="' . $status . ' c-leftLine">' . $info . '</td>';
            $tCells[] = '<td class="' . $status . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
            $modSharedTSconfig = t3lib_BEfunc::getModTSconfig($data['row']['uid'], 'mod.SHARED');
            $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? t3lib_div::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
            // Traverse system languages:
            foreach ($languages as $langRow) {
                if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int) $this->pObj->MOD_SETTINGS['lang'] === (int) $langRow['uid']) {
                    $row = $this->getLangStatus($data['row']['uid'], $langRow['uid']);
                    $info = '';
                    if (is_array($row)) {
                        $langRecUids[$langRow['uid']][] = $row['uid'];
                        $status = $row['_HIDDEN'] ? t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-fallback' : 'c-ok';
                        $icon = t3lib_iconWorks::getSpriteIconForRecord('pages_language_overlay', $row, array('class' => 'c-recIcon'));
                        $info = $icon . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['title'], $titleLen)) . (strcmp($row['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['nav_title'], $titleLen)) . '</em>]' : '') . ($row['_COUNT'] > 1 ? '<div>' . $LANG->getLL('lang_renderl10n_badThingThereAre', '1') . '</div>' : '');
                        $tCells[] = '<td class="' . $status . ' c-leftLine">' . $info . '</td>';
                        // Edit whole record:
                        $info = '';
                        $editUid = $row['uid'];
                        $params = '&edit[pages_language_overlay][' . $editUid . ']=edit';
                        $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editLanguageOverlayRecord', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
                        $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=' . $langRow['uid'] . '"); return false;') . '" title="' . $LANG->getLL('lang_renderl10n_editPageLang', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-page-open') . '</a>';
                        $info .= str_replace('###LANG_UID###', $langRow['uid'], $viewPageLink);
                        $tCells[] = '<td class="' . $status . '">' . $info . '</td>';
                        $tCells[] = '<td class="' . $status . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], $langRow['uid']) . '</td>';
                    } else {
                        if (in_array($langRow['uid'], $disableLanguages)) {
                            // Language has been disabled for this page
                            $status = 'c-blocked';
                            $info = '';
                        } else {
                            $status = t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-fallback';
                            $info = '<input type="checkbox" name="newOL[' . $langRow['uid'] . '][' . $data['row']['uid'] . ']" value="1" />';
                            $newOL_js[$langRow['uid']] .= '
								+(document.webinfoForm[\'newOL[' . $langRow['uid'] . '][' . $data['row']['uid'] . ']\'].checked ? \'&edit[pages_language_overlay][' . $data['row']['uid'] . ']=new\' : \'\')
							';
                        }
                        $tCells[] = '<td class="' . $status . ' c-leftLine">&nbsp;</td>';
                        $tCells[] = '<td class="' . $status . '">&nbsp;</td>';
                        $tCells[] = '<td class="' . $status . '">' . $info . '</td>';
                    }
                }
            }
            $output .= '
				<tr class="bgColor4">
					' . implode('
					', $tCells) . '
				</tr>';
        }
        // Put together HEADER:
        $tCells = array();
        $tCells[] = '<td>' . $LANG->getLL('lang_renderl10n_page', '1') . ':</td>';
        if (is_array($langRecUids[0])) {
            $params = '&edit[pages][' . implode(',', $langRecUids[0]) . ']=edit&columnsOnly=title,nav_title,l18n_cfg,hidden';
            $editIco = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editPageProperties', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-new') . '</a>';
        } else {
            $editIco = '';
        }
        $tCells[] = '<td class="c-leftLine" colspan="2">' . $LANG->getLL('lang_renderl10n_default', '1') . ':' . $editIco . '</td>';
        foreach ($languages as $langRow) {
            if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int) $this->pObj->MOD_SETTINGS['lang'] === (int) $langRow['uid']) {
                // Title:
                $tCells[] = '<td class="c-leftLine">' . htmlspecialchars($langRow['title']) . '</td>';
                // Edit language overlay records:
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.tx_cms_webinfo_lang.php

示例9: renderItem_headerFields

    /**
     * Renders the header fields menu item.
     * It iss possible to define a list of fields (currently only from the pages table) which should appear
     * as a header above the content zones while editing the content of a page. This function renders those fields.
     * The fields to be displayed are defined in the page's datastructure.
     *
     * @param	$pObj:		Reference to the parent object ($this)
     * @return	string		HTML output
     * @access	private
     */
    function renderItem_headerFields(&$pObj)
    {
        global $LANG, $TCA;
        $output = '';
        if ($pObj->rootElementTable != 'pages') {
            return '';
        }
        t3lib_div::loadTCA('pages');
        $conf = $TCA['pages']['columns']['tx_templavoila_flex']['config'];
        $dataStructureArr = t3lib_BEfunc::getFlexFormDS($conf, $pObj->rootElementRecord, 'pages');
        if (is_array($dataStructureArr) && is_array($dataStructureArr['ROOT']['tx_templavoila']['pageModule'])) {
            $headerTablesAndFieldNames = t3lib_div::trimExplode(chr(10), str_replace(chr(13), '', $dataStructureArr['ROOT']['tx_templavoila']['pageModule']['displayHeaderFields']), 1);
            if (is_array($headerTablesAndFieldNames)) {
                $fieldNames = array();
                $headerFieldRows = array();
                $headerFields = array();
                foreach ($headerTablesAndFieldNames as $tableAndFieldName) {
                    list($table, $field) = explode('.', $tableAndFieldName);
                    $fieldNames[$table][] = $field;
                    $headerFields[] = array('table' => $table, 'field' => $field, 'label' => $LANG->sL(t3lib_BEfunc::getItemLabel('pages', $field)), 'value' => t3lib_BEfunc::getProcessedValue('pages', $field, $pObj->rootElementRecord[$field], 200));
                }
                if (count($headerFields)) {
                    foreach ($headerFields as $headerFieldArr) {
                        if ($headerFieldArr['table'] == 'pages') {
                            $onClick = t3lib_BEfunc::editOnClick('&edit[pages][' . $pObj->id . ']=edit&columnsOnly=' . implode(',', $fieldNames['pages']), $this->doc->backPath);
                            $linkedValue = '<a style="text-decoration: none;" href="#" onclick="' . htmlspecialchars($onClick) . '">' . htmlspecialchars($headerFieldArr['value']) . '</a>';
                            $linkedLabel = '<a style="text-decoration: none;" href="#" onclick="' . htmlspecialchars($onClick) . '">' . htmlspecialchars($headerFieldArr['label']) . '</a>';
                            $headerFieldRows[] = '
								<tr>
									<td class="bgColor4-20" style="width: 10%; vertical-align:top">' . $linkedLabel . '</td><td class="bgColor4" style="vertical-align:top"><em>' . $linkedValue . '</em></td>
								</tr>
							';
                        }
                    }
                    $output = '
						<table border="0" cellpadding="0" cellspacing="1" width="100%" class="lrPadding">
							<tr>
								<td colspan="2" class="bgColor4-20">' . $LANG->getLL('pagerelatedinformation') . ':</td>
							</tr>
							' . implode('', $headerFieldRows) . '
						</table>
					';
                }
            }
        }
        return $output;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:57,代码来源:class.tx_templavoila_mod1_sidebar.php

示例10: linkWrap

 /**
  * Links the string $code to a create-new form for a record in $table created on page $pid
  *
  * @param	string		Link text
  * @param	string		Table name (in which to create new record)
  * @param	integer		PID value for the "&edit['.$table.']['.$pid.']=new" command (positive/negative)
  * @param	boolean		If $addContentTable is set, then a new contentTable record is created together with pages
  * @return	string		The link.
  */
 function linkWrap($linkText, $table, $pid, $addContentTable = false)
 {
     $parameters = '&edit[' . $table . '][' . $pid . ']=new';
     if ($table == 'pages' && $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'] && isset($GLOBALS['TCA'][$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']]) && $addContentTable) {
         $parameters .= '&edit[' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'] . '][prev]=new&returnNewPageId=1';
     } elseif ($table == 'pages_language_overlay') {
         $parameters .= '&overrideVals[pages_language_overlay][doktype]=' . (int) $this->pageinfo['doktype'];
     }
     $onClick = t3lib_BEfunc::editOnClick($parameters, '', $this->returnUrl);
     return '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $linkText . '</a>';
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:20,代码来源:db_new.php

示例11: link_edit

 /**
  * Returns an HTML link for editing
  *
  * @param	string		$label: The label (or image)
  * @param	string		$table: The table, fx. 'tt_content'
  * @param	integer		$uid: The uid of the element to be edited
  * @param	boolean		$forced: By default the link is not shown if translatorMode is set, but with this boolean it can be forced anyway.
  * @param	integer		$usePid: ...
  * @param	string		$linkClass: css class to use for regular content elements
  * @return	string		HTML anchor tag containing the label and the correct link
  * @access protected
  */
 function link_edit($label, $table, $uid, $forced = FALSE, $usePid = 0, $linkClass = '')
 {
     if ($label) {
         $class = $linkClass ? $linkClass : 'tpm-edit';
         $pid = $table == 'pages' ? $uid : $usePid;
         $calcPerms = $pid == 0 ? $this->calcPerms : $this->getCalcPerms($pid);
         if (($table == 'pages' && $calcPerms & 2 || $table != 'pages' && $calcPerms & 16) && (!$this->translatorMode || $forced)) {
             if ($table == "pages" && $this->currentLanguageUid) {
                 return '<a class="tpm-pageedit" href="index.php?' . $this->link_getParameters() . '&amp;editPageLanguageOverlay=' . $this->currentLanguageUid . '">' . $label . '</a>';
             } else {
                 $onClick = t3lib_BEfunc::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $this->doc->backPath);
                 return '<a class="' . $class . '" href="#" onclick="' . htmlspecialchars($onClick) . '">' . $label . '</a>';
             }
         } else {
             return $label;
         }
     }
     return '';
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:31,代码来源:index.php

示例12: renderOverview

    /**
     * Render the module content in HTML
     *
     * @param	array		Translation data for configuration
     * @param	integer		Sys language uid
     * @param	array		Configuration record
     * @return	string		HTML content
     */
    function renderOverview()
    {
        global $LANG;
        $sysLang = $this->sysLang;
        $accumObj = $this->l10ncfgObj->getL10nAccumulatedInformationsObjectForLanguage($sysLang);
        $accum = $accumObj->getInfoArray();
        $l10ncfg = $this->l10ncfg;
        $output = '';
        $showSingle = t3lib_div::_GET('showSingle');
        if ($l10ncfg['displaymode'] > 0) {
            $showSingle = $showSingle ? $showSingle : 'NONE';
            if ($l10ncfg['displaymode'] == 2) {
                $noAnalysis = TRUE;
            }
        } else {
            $noAnalysis = FALSE;
        }
        // Traverse the structure and generate HTML output:
        foreach ($accum as $pId => $page) {
            $output .= '<h3>' . $page['header']['icon'] . htmlspecialchars($page['header']['title']) . ' [' . $pId . ']</h3>';
            $tableRows = array();
            foreach ($accum[$pId]['items'] as $table => $elements) {
                foreach ($elements as $elementUid => $data) {
                    if (is_array($data['fields'])) {
                        $FtableRows = array();
                        $flags = array();
                        if (!$noAnalysis || $showSingle === $table . ':' . $elementUid) {
                            foreach ($data['fields'] as $key => $tData) {
                                if (is_array($tData)) {
                                    list(, $uidString, $fieldName) = explode(':', $key);
                                    list($uidValue) = explode('/', $uidString);
                                    $diff = '';
                                    $edit = TRUE;
                                    $noChangeFlag = !strcmp(trim($tData['diffDefaultValue']), trim($tData['defaultValue']));
                                    if ($uidValue === 'NEW') {
                                        $diff = '<em>' . $LANG->getLL('render_overview.new.message') . '</em>';
                                        $flags['new']++;
                                    } elseif (!isset($tData['diffDefaultValue'])) {
                                        $diff = '<em>' . $LANG->getLL('render_overview.nodiff.message') . '</em>';
                                        $flags['unknown']++;
                                    } elseif ($noChangeFlag) {
                                        $diff = $LANG->getLL('render_overview.nochange.message');
                                        $edit = TRUE;
                                        $flags['noChange']++;
                                    } else {
                                        $diff = $this->diffCMP($tData['diffDefaultValue'], $tData['defaultValue']);
                                        $flags['update']++;
                                    }
                                    if (!$this->modeOnlyChanged || !$noChangeFlag) {
                                        $fieldCells = array();
                                        $fieldCells[] = '<b>' . htmlspecialchars($fieldName) . '</b>' . ($tData['msg'] ? '<br/><em>' . htmlspecialchars($tData['msg']) . '</em>' : '');
                                        $fieldCells[] = nl2br(htmlspecialchars($tData['defaultValue']));
                                        $fieldCells[] = $edit && $this->modeWithInlineEdit ? $tData['fieldType'] === 'text' ? '<textarea name="' . htmlspecialchars('translation[' . $table . '][' . $elementUid . '][' . $key . ']') . '" cols="60" rows="5">' . t3lib_div::formatForTextarea($tData['translationValue']) . '</textarea>' : '<input name="' . htmlspecialchars('translation[' . $table . '][' . $elementUid . '][' . $key . ']') . '" value="' . htmlspecialchars($tData['translationValue']) . '" size="60" />' : nl2br(htmlspecialchars($tData['translationValue']));
                                        $fieldCells[] = $diff;
                                        if ($page['header']['prevLang']) {
                                            reset($tData['previewLanguageValues']);
                                            $fieldCells[] = nl2br(htmlspecialchars(current($tData['previewLanguageValues'])));
                                        }
                                        $FtableRows[] = '<tr class="db_list_normal"><td>' . implode('</td><td>', $fieldCells) . '</td></tr>';
                                    }
                                }
                            }
                        }
                        if (count($FtableRows) || $noAnalysis) {
                            // Link:
                            if ($this->modeShowEditLinks) {
                                reset($data['fields']);
                                list(, $uidString) = explode(':', key($data['fields']));
                                if (substr($uidString, 0, 3) !== 'NEW') {
                                    $editId = is_array($data['translationInfo']['translations'][$sysLang]) ? $data['translationInfo']['translations'][$sysLang]['uid'] : $data['translationInfo']['uid'];
                                    $editLink = ' - <a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[' . $data['translationInfo']['translation_table'] . '][' . $editId . ']=edit', $this->doc->backPath)) . '"><em>[' . $LANG->getLL('render_overview.clickedit.message') . ']</em></a>';
                                } else {
                                    $editLink = ' - <a href="' . htmlspecialchars($this->doc->issueCommand('&cmd[' . $table . '][' . $data['translationInfo']['uid'] . '][localize]=' . $sysLang)) . '"><em>[' . $LANG->getLL('render_overview.clicklocalize.message') . ']</em></a>';
                                }
                            } else {
                                $editLink = '';
                            }
                            $tableRows[] = '<tr class="t3-row-header">
								<td colspan="2" style="width:300px;"><a href="' . htmlspecialchars('index.php?id=' . t3lib_div::_GET('id') . '&showSingle=' . rawurlencode($table . ':' . $elementUid)) . '">' . htmlspecialchars($table . ':' . $elementUid) . '</a>' . $editLink . '</td>
								<td colspan="3" style="width:200px;">' . htmlspecialchars(t3lib_div::arrayToLogString($flags)) . '</td>
							</tr>';
                            if (!$showSingle || $showSingle === $table . ':' . $elementUid) {
                                $tableRows[] = '<tr class="bgColor-20 tableheader">
									<td>Fieldname:</td>
									<td width="25%">Default:</td>
									<td width="25%">Translation:</td>
									<td width="25%">Diff:</td>
									' . ($page['header']['prevLang'] ? '<td width="25%">PrevLang:</td>' : '') . '
								</tr>';
                                $tableRows = array_merge($tableRows, $FtableRows);
                            }
                        }
//.........这里部分代码省略.........
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:101,代码来源:class.tx_l10nmgr_l10nHTMLListView.php

示例13: makeControl

    /**
     * Creates the control panel for a single record in the listing.
     *
     * @param	string		The table
     * @param	array		The record for which to make the control panel.
     * @return	string		HTML table with the control panel (unless disabled)
     */
    function makeControl($table, $row)
    {
        global $TCA, $LANG;
        // Initialize:
        t3lib_div::loadTCA($table);
        $cells = array();
        // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
        if ($this->mayUserEditCategories) {
            $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
            $cells[] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, $this->returnUrl)) . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2' . (!$TCA[$table]['ctrl']['readOnly'] ? '' : '_d') . '.gif', 'width="11" height="12"') . ' title="' . $LANG->getLLL('edit', $this->LL) . '" alt="" />' . '</a>';
        }
        // 			// "Info": (All records)
        // 		$cells[]='<a href="#" onclick="'.htmlspecialchars('top.launchView(\''.$table.'\', \''.$row['uid'].'\'); return false;').'">'.
        // 				'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.$LANG->getLLL('showInfo',$this->LL).'" alt="" />'.
        // 				'</a>';
        // "Hide/Unhide" links:
        $hiddenField = $TCA[$table]['ctrl']['enablecolumns']['disabled'];
        if ($this->mayUserEditCategories && $hiddenField && $TCA[$table]['columns'][$hiddenField] && (!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
            if ($row[$hiddenField]) {
                $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=0';
                $cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $this->issueCommand($params, $this->returnUrl) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_unhide.gif', 'width="11" height="10"') . ' title="' . $LANG->getLLL('unHide', $this->LL) . '" alt="" />' . '</a>';
            } else {
                $params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';
                $cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $this->issueCommand($params, $this->returnUrl) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_hide.gif', 'width="11" height="10"') . ' title="' . $LANG->getLLL('hide', $this->LL) . '" alt="" />' . '</a>';
            }
        }
        return '
				<!-- CONTROL PANEL: ' . $table . ':' . $row['uid'] . ' -->
				<span style="padding:0 0 0 7px;">' . implode('', $cells) . '</span>';
    }
开发者ID:ghanshyamgohel,项目名称:tt_news,代码行数:37,代码来源:index.php

示例14: getHeaderControl

 /**
  * Creates the control panel for the header.
  *
  * @return	string		control panel (unless disabled)
  */
 function getHeaderControl()
 {
     global $TCA;
     $permsEdit = $this->calcPerms & ($this->table === 'pages' ? 2 : 16);
     if ($permsEdit and !$TCA[$this->table]['ctrl']['readOnly'] and is_array($this->currentTable['idList']) and $this->showControls) {
         $editIdList = implode(',', $this->currentTable['idList']);
         $columnsOnly = implode(',', array_keys($this->columnList));
         $params = '&edit[' . $this->table . '][' . $editIdList . ']=edit&columnsOnly=' . $columnsOnly . '&disHelp=1';
         $content = '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('editShownColumns') . '" />';
         $onClick = t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'], -1);
         $content = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $content . '</a>';
     }
     return $content;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:19,代码来源:class.tx_dam_listrecords.php

示例15: getNewRecordButton

 /**
  * [Describe function...]
  *
  * @param	[type]		$table: ...
  * @param	[type]		$withLabel: ...
  * @return	[type]		...
  */
 function getNewRecordButton($table, $withLabel = false)
 {
     if ($this->category) {
         $addP = '&defVals[' . $table . '][category]=' . $this->category;
         $addLbl = 'InCategory';
     }
     $params = '&edit[' . $table . '][' . $this->newRecPid . ']=new' . $addP;
     $onclick = htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, $this->returnUrl));
     $button = '<a href="#" onclick="' . $onclick . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/new_el.gif') . ' title="' . $GLOBALS['LANG']->getLL('createArticle' . $addLbl, 1) . '" alt="" /> ' . ($withLabel ? $GLOBALS['LANG']->getLL('createArticle' . $addLbl) : '') . '</a>';
     return $button;
 }
开发者ID:ghanshyamgohel,项目名称:tt_news,代码行数:18,代码来源:class.tx_ttnews_recordlist.php


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