Exemplo n.º 1
0
    function _showTabDocument(&$row, &$lists, $last, $created)
    {
        global $_DOCMAN, $_DMUSER;
        DOCMAN_Compat::calendarJS();
        ?>
		<fieldset class="dm_adminform">
        <table class="dm_admintable">
		<tr>
			<td class="dm_key">
				<label for="dmthumbnail"><?php 
        echo _DML_THUMBNAIL;
        ?>
</label>
			</td>
			<td>
				<?php 
        echo $lists['dmthumbnail'];
        ?>
				<?php 
        $previewfull = $lists['dmthumbnail_preview'] ? "images/stories/" . $lists['dmthumbnail_preview'] : "images/M_images/blank.png";
        ?>
				<img src="<?php 
        echo $previewfull;
        ?>
 " id="dmthumbnail_preview" alt="Preview" />
			</td>
		</tr>
		<tr>
			<td class="dm_key">
				<label for="dmfilename"><?php 
        echo _DML_FILE;
        ?>
</label>
			</td>
			<td>
				<?php 
        echo $lists['dmfilename'];
        ?>
			</td>
		</tr>
		<tr>
			<td class="dm_key">
				<label for="dmdate_published"><?php 
        echo _DML_DATE;
        ?>
</label>
			</td>
			<td>
				<?php 
        DOCMAN_Compat::calendar('dmdate_published', $row->dmdate_published);
        ?>
			</td>
		</tr>
		<?php 
        if (isset($row->dmlink)) {
            ?>
		<tr>
			<td class="dm_key">
				<label for="dmfilename" class="hasTip" title="<?php 
            echo _DML_DOCURL . '::' . _DML_DOCURL_TOOLTIP;
            ?>
"><?php 
            echo _DML_DOCURL;
            ?>
</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="document_url" size="50" maxlength="200" value="<?php 
            echo $row->dmlink;
            ?>
" />	
			</td>
		</tr>
		<?php 
        }
        ?>
		<tr>
			<td class="dm_key">
				<label for="dmurl" class="hasTip" title="<?php 
        echo _DML_HOMEPAGE . '::' . _DML_HOMEPAGE_TOOLTIP;
        ?>
"><?php 
        echo _DML_HOMEPAGE;
        ?>
</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="dmurl" size="50" maxlength="200" value="<?php 
        echo $row->dmurl;
        ?>
" />
				<div><i>(<?php 
        echo _DML_MAKE_SURE;
        ?>
)</i></div>
			</td>
		</tr>
		</table>
		</fieldset>
        <?php 
    }
Exemplo n.º 2
0
    function editDocument(&$row, &$lists, $last, $created, &$params)
    {
        global $database, $mosConfig_offset, $mosConfig_live_site, $mosConfig_locale, $mosConfig_absolute_path;
        $tabs = new mosTabs(1);
        mosMakeHtmlSafe($row);
        DOCMAN_Compat::calendarJS();
        ?>
    	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
    	<script language="JavaScript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js" type="text/javascript"></script>
    	<script language="JavaScript" type="text/javascript">
    		<!--
    		function submitbutton(pressbutton) {
    		  var form = document.adminForm;
    		  if (pressbutton == 'cancel') {
    			submitform( pressbutton );
    			return;
    		  }
    		  // do field validation
			<?php 
        dmHTML::docEditFieldsJS();
        /* Include all edits at once */
        ?>
			if ( $msg != "" ){
					$msghdr = "<?php 
        echo _DML_ENTRY_ERRORS;
        ?>
";
					$msghdr += '\n=================================';
					alert( $msghdr+$msg+'\n' );
			}else {
			<?php 
        getEditorContents('editor1', 'dmdescription');
        ?>
				submitform( pressbutton );
				}
			}
			//--> end submitbutton
    	</script>

    	<style>
			select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
		</style>

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_DOCUMENT;
        dmHTML::adminHeading($tmp, 'documents');
        ?>

    	<form action="index2.php" method="post" name="adminForm" class="adminform" id="dm_formedit">
        <table class="adminform">
        <tr>
            <th colspan="3"><?php 
        echo _DML_TITLE_DOCINFORMATION;
        ?>
</th>
        </tr>

        <?php 
        HTML_DMDocuments::_showTabBasic($row, $lists, $last, $created);
        ?>

        <tr>
        <td colspan="2">
		<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(_DML_DOC, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        $tabs->endTab();
        $tabs->startTab(_DML_TAB_PERMISSIONS, "ownership-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        $tabs->endTab();
        $tabs->startTab(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            $tabs->endTab();
            $tabs->startTab(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        $tabs->endTab();
        $tabs->endPane();
        ?>
        </td>
        </tr>
        </table>
		<input type="hidden" name="original_dmfilename" value="<?php 
        echo $lists['original_dmfilename'];
        ?>
" />
    	<input type="hidden" name="dmsubmitedby" value="<?php 
        echo $row->dmsubmitedby;
        ?>
" />
    	<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
    	<input type="hidden" name="option" value="com_docman" />
    	<input type="hidden" name="section" value="documents" />
    	<input type="hidden" name="task" value="" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
    	</form>
        <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
 function plugin()
 {
     DOCMAN_Compat::calendarJS();
 }
Exemplo n.º 4
0
    function _showTabDocument(&$row, &$lists, $last, $created)
    {
        global $_DOCMAN, $_DMUSER;
        DOCMAN_Compat::calendarJS();
        ?>
        <table class="adminform">
        <tbody>
        <tr>
        <td>


            <label for="dmname"><?php 
        echo _DML_TITLE;
        ?>
</label><br />
            <input class="inputbox" type="text" name="dmname" size="50" maxlength="100" value="<?php 
        echo $row->dmname;
        ?>
" />

        <p>
            <label for="catid"><?php 
        echo _DML_CATEGORY;
        ?>
</label><br />
            <?php 
        echo $lists['catid'];
        ?>
        </p>
        <p>
            <label for="dmdate_published"><?php 
        echo _DML_DATE;
        ?>
</label><br />
            <?php 
        DOCMAN_Compat::calendar('dmdate_published', $row->dmdate_published);
        ?>
        </p>

    	<p>
    		<label for="dmthumbnail"><?php 
        echo _DML_THUMBNAIL;
        ?>
</label><br />
			<?php 
        echo $lists['dmthumbnail'];
        ?>
			<img src="images/stories/<?php 
        echo $lists['dmthumbnail_preview'];
        ?>
 " id="dmthumbnail_preview" alt="Preview" />
		</p>
    	<p>
    		<label for="dmfilename"><?php 
        echo _DML_FILE;
        ?>
</label><br />
			<?php 
        echo $lists['dmfilename'];
        ?>
		</p>

    	<?php 
        if (isset($row->dmlink)) {
            ?>
            <p>
            	<label for="dmfilename"><?php 
            echo _DML_DOCURL;
            ?>
</label><br />
				<input class="inputbox" type="text" name="document_url" size="50" maxlength="200" value="<?php 
            echo $row->dmlink;
            ?>
" />
            	<?php 
            echo DOCMAN_Utils::mosToolTip(_DML_DOCURL_TOOLTIP . '</span>', _DML_DOCURL);
            ?>
            </p>
        <?php 
        }
        ?>
        <p>
			<label class="nofloat" for="dmurl"><?php 
        echo _DML_HOMEPAGE;
        ?>
</label><br />
			<input class="inputbox" type="text" name="dmurl" size="50" maxlength="200" value="<?php 
        echo $row->dmurl;
        ?>
" />
			<?php 
        echo DOCMAN_Utils::mosToolTip(_DML_HOMEPAGE_TOOLTIP . '</span>', _DML_HOMEPAGE);
        ?>
			<div><i>(<?php 
        echo _DML_MAKE_SURE;
        ?>
)</i></div>
		</p>
    	<?php 
        if (!$row->approved && $_DMUSER->canApprove()) {
            ?>
    	<p>
			<label><?php 
            echo _DML_APPROVED;
            ?>
</label><br />
			<?php 
            echo $lists['approved'];
            ?>
		</p>
    	<?php 
        }
        if ($row->approved && $_DMUSER->canPublish()) {
            ?>
        <p>
			<label><?php 
            echo _DML_PUBLISHED;
            ?>
</label><br />
			<?php 
            echo $lists['published'];
            ?>
		</p>
		<?php 
        }
        ?>

        </td>
        </tr>
        </tbody>
        </table>
        <?php 
    }
Exemplo n.º 5
0
    function editDocument(&$row, &$lists, $last, $created, &$params)
    {
        JHTML::_('behavior.tooltip');
        jimport('joomla.html.pane');
        $tabs = JPane::getInstance('tabs', array('useCookies' => true));
        JFilterOutput::objectHTMLSafe($row);
        DOCMAN_Compat::calendarJS();
        ?>
    	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
    	<script language="JavaScript" src="<?php 
        echo JURI::root(true);
        ?>
/includes/js/overlib_mini.js" type="text/javascript"></script>
    	<script language="JavaScript" type="text/javascript">
    		<!--
    		function submitbutton(pressbutton) {
    		  var form = document.adminForm;
    		  if (pressbutton == 'cancel') {
    			submitform( pressbutton );
    			return;
    		  }
    		  // do field validation
			<?php 
        dmHTML::docEditFieldsJS();
        /* Include all edits at once */
        ?>
			if ( $msg != "" ){
					$msghdr = "<?php 
        echo _DML_ENTRY_ERRORS;
        ?>
";
					$msghdr += '\n=================================';
					alert( $msghdr+$msg+'\n' );
			}else {
			<?php 
        jimport('joomla.html.editor');
        $editor =& JFactory::getEditor();
        echo $editor->save('dmdescription');
        ?>
				submitform( pressbutton );
				}
			}
			//--> end submitbutton
    	</script>

    	<style>
			select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
		</style>

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_DOCUMENT;
        dmHTML::adminHeading($tmp, 'documents');
        ?>

    	<form action="index.php" method="post" name="adminForm" class="adminform" id="dm_formedit">
        <fieldset class="adminform">
        <legend><?php 
        echo _DML_TITLE_DOCINFORMATION;
        ?>
</legend>
        <table class="admintable">

        <?php 
        HTML_DMDocuments::_showTabBasic($row, $lists, $last, $created);
        ?>

        <tr>
        </table>
    	</fieldset>
		<?php 
        echo $tabs->startPane("content-pane");
        echo $tabs->startPanel(_DML_DOC, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_PERMISSIONS, "ownership-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            echo $tabs->endPanel();
            echo $tabs->startPanel(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        echo $tabs->endPanel();
        echo $tabs->endPane();
        ?>
        
        </fieldset>
		<input type="hidden" name="original_dmfilename" value="<?php 
        echo $lists['original_dmfilename'];
        ?>
" />
    	<input type="hidden" name="dmsubmitedby" value="<?php 
        echo $row->dmsubmitedby;
        ?>
" />
    	<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
    	<input type="hidden" name="option" value="com_docman" />
    	<input type="hidden" name="section" value="documents" />
    	<input type="hidden" name="task" value="" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
    	</form>
        <?php 
        include_once JPATH_SITE . "/components/com_docman/footer.php";
    }