steffen: server/kolab-horde-fbview/kolab-horde-fbview/fbview/templates/portal add.inc, NONE, 1.1 block.inc, NONE, 1.1 edit.inc, NONE, 1.1 empty.inc, NONE, 1.1 footer.inc, NONE, 1.1 header.inc, NONE, 1.1 layout.inc, NONE, 1.1 menu.inc, NONE, 1.1

cvs at intevation.de cvs at intevation.de
Mon Oct 31 12:43:37 CET 2005


Author: steffen

Update of /kolabrepository/server/kolab-horde-fbview/kolab-horde-fbview/fbview/templates/portal
In directory doto:/tmp/cvs-serv18388/kolab-horde-fbview/kolab-horde-fbview/fbview/templates/portal

Added Files:
	add.inc block.inc edit.inc empty.inc footer.inc header.inc 
	layout.inc menu.inc 
Log Message:
Fbview in separate package

--- NEW FILE: add.inc ---
<?php if ($layout->isChanged($row, $col)): ?>
<a name="block"></a>
<?php endif; ?>
<table cellspacing="0" width="100%">
  <tr>
    <td class="header"><?php echo _("Add Here:") ?></td>
  </tr>
</table>
<table cellspacing="0" cellpadding="3" width="100%" height="100%">
  <tr>
    <td width="100%" height="100%">
      <form action="<?php echo Horde::selfUrl() ?>#block" method="post">
        <?php Util::pformInput() ?>
        <input type="hidden" name="row" value="<?php echo $row ?>" />
        <input type="hidden" name="col" value="<?php echo $col ?>" />
        <input type="hidden" name="action" value="save-resume" />
        <?php echo $blocks->getBlocksWidget() ?>
        <input type="submit" class="button" value="<?php echo _("Add") ?>" />
      </form>
    </td>
  </tr>
</table>

--- NEW FILE: block.inc ---
<td valign="top" width="<?php echo $width ?>%" height="100%" rowspan="<?php echo $rowspan ?>" colspan="<?php echo $colspan ?>">
 <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  <tr>
   <td class="header"><?php echo $header ?></td>
  </tr>
  <tr>
   <td valign="top" class="summary"><?php echo $content ?></td>
  </tr>
 </table>
</td>

--- NEW FILE: edit.inc ---
<table cellpadding="0" cellspacing="6" border="0" width="100%">
<?php
$rows = $layout->rows();
$columns = 0;
for ($row = 0; $row < $rows; $row++):
?>
  <tr>
<?php
$columns = $layout->columns($row);
for ($col = 0; $col < $columns; $col++):
    if ($layout->isCovered($row, $col)):
?>
    <!-- covered cell here -->
<?php else: ?>
    <td class="summary" valign="top" width="<?php echo floor(100 / ($columns + 1)) ?>%" rowspan="<?php echo $layout->getHeight($row, $col) ?>" colspan="<?php echo $layout->getWidth($row, $col) ?>"<?php if ($edit_row === $row && $edit_col === $col) echo ' style="border:2px solid red"' ?>>
<?php
$blockInfo = $layout->getBlockInfo($row, $col);
if (!$layout->isEmpty($row, $col) && !is_a($blockInfo, 'PEAR_Error')) {
    if ($edit_row === $row && $edit_col === $col) {
        $edit_link = ' ';
    } else {
        $edit_link = Horde::link($layout->getActionUrl('edit', $row, $col), _("Edit Block"), 'smallheader', '', '', _("Edit Block")) . _("Edit") . '</a>';
    }

    $defaults = array();
    foreach ($blocks->getParams($blockInfo['app'], $blockInfo['block']) as $param) {
        $defaults[$param] = $blocks->getDefaultValue($blockInfo['app'], $blockInfo['block'], $param);
    }
    include HORDE_TEMPLATES . '/portal/layout.inc';
} else {
    include HORDE_TEMPLATES . '/portal/add.inc';
}
?>
    </td>
<?php endif; endfor; ?>
    <td valign="top" class="summary">
      <?php include HORDE_TEMPLATES . '/portal/add.inc'; ?>
    </td>
  </tr>
<?php endfor; ?>
  <tr>
<?php
for ($col = 0; $col <= $columns; $col++):
?>
    <td valign="top" class="summary">
      <?php include HORDE_TEMPLATES . '/portal/add.inc'; ?>
    </td>
<?php endfor; ?>
  </tr>
</table>

--- NEW FILE: empty.inc ---
<td valign="top" width="<?php echo $width ?>%"> </td>

--- NEW FILE: footer.inc ---
</table>

--- NEW FILE: header.inc ---
<table cellpadding="0" cellspacing="6" border="0" width="100%">

--- NEW FILE: layout.inc ---
<?php if ($layout->isChanged($row, $col)): ?>
<a name="block"></a>
<?php endif; ?>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td width="100%" class="header"><?php echo $registry->getParam('name', $blockInfo['app']) . ': ' . $blocks->getName($blockInfo['app'], $blockInfo['block']) ?></td>
    <td align="right" class="header"><?php echo $edit_link ?></td>
    <td class="header">
      <?php echo Horde::link($layout->getActionUrl('removeBlock', $row, $col), _("Remove Block"), '', '', '', _("Remove Block")) . Horde::img('close.gif', _("Remove Block")) ?></a>
    </td>
  </tr>
</table>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td colspan="3" align="center">
      <?php if ($row > 0) echo $layout->getControl('expand/up', $row, $col) ?> 
      <?php if ($layout->getHeight($row, $col) > 1) echo $layout->getControl('shrink/up', $row, $col) ?>
    </td>
  </tr>
  <tr>
    <td align="left" width="11">
      <?php if ($col > 0) echo $layout->getControl('expand/left', $row, $col) ?> 
      <?php if ($layout->getWidth($row, $col) > 1) echo $layout->getControl('shrink/left', $row, $col) ?>
    </td>
    <td>
      <table border="0" align="center">
        <tr>
          <td width="11"> </td>
          <td width="11"><?php echo $row > 0 ? $layout->getControl('move/up', $row, $col) : ' ' ?></td>
          <td width="11"> </td>
        </tr>
        <tr>
          <td><?php echo $col > 0 ? $layout->getControl('move/left', $row, $col) : ' ' ?></td>
          <td> </td>
          <td><?php echo $layout->getControl('move/right', $row, $col) ?></td>
        </tr>
        <tr>
          <td> </td>
          <td><?php echo $layout->getControl('move/down', $row, $col) ?></td>
          <td> </td>
        </tr>
      </table>
    </td>
    <td align="right" width="11">
      <?php if ($layout->getWidth($row, $col) > 1) echo $layout->getControl('shrink/right', $row, $col) ?>
      <?php echo $layout->getControl('expand/right', $row, $col) ?>
    </td>
  </tr>
  <tr>
    <td colspan="3" align="center">
        <?php if ($layout->getHeight($row, $col) > 1) echo $layout->getControl('shrink/down', $row, $col) ?>
        <?php echo $layout->getControl('expand/down', $row, $col) ?>
    </td>
  </tr>
</table>

<?php if (($edit_row === $row) && ($edit_col === $col)): ?>
<a name="block"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td> </td>
  </tr>
  <tr>
    <td valign="middle" align="left" width="100%">
      <form action="<?php echo Horde::selfUrl() ?>#block" method="post" name="blockform">
        <?php Util::pformInput() ?>
        <input type="hidden" name="row" value="<?php echo $row ?>" />
        <input type="hidden" name="col" value="<?php echo $col ?>" />
        <input type="hidden" name="action" value="save" />
        <table border="0" cellpadding="2" cellspacing="0" width="100%">
          <tr>
            <td class="smallheader" colspan="2"><b><?php echo _("Block Type") ?></b></td>
          </tr>
          <tr>
            <td colspan="2">
              <?php echo $blocks->getBlocksWidget($blockInfo['app'], $blockInfo['block'], true) ?>
            </td>
          </tr>
<?php 
if ($blocks->isEditable($blockInfo['app'], $blockInfo['block'])): 
    $block = &$layout->getBlock($row, $col);
    foreach ($block->_params as $key => $val) {
        $defaults[$key] = $val;
    }
?>
          <tr>
            <td colspan="2" class="smallheader"><b><?php echo _("Block Settings") ?></b></td>
          </tr>
<?php $i = 0; foreach ($blocks->getParams($blockInfo['app'], $blockInfo['block']) as $id): $i++; ?>
          <tr>
            <td class="<?php echo ($i % 2) ? 'text' : 'item0' ?>" valign="top" align="right"><?php echo $blocks->getParamName($blockInfo['app'], $blockInfo['block'], $id) ?>: </td>
            <td class="<?php echo ($i % 2) ? 'text' : 'item0' ?>" valign="top"><?php echo $blocks->getOptionsWidget($blockInfo['app'], $blockInfo['block'], $id, $defaults) ?></td>
          </tr>
<?php endforeach; endif; ?>
        </table>
        <input type="submit" class="button" value="<?php echo _("Save") ?>" />
      </form>
    </td>
  </tr>
</table>
<?php endif; ?>

--- NEW FILE: menu.inc ---
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
  <td class="menu"><table border="0" width="100%">
  <tr valign="middle">
    <td class="menuheader" align="left" nowrap="nowrap" width="100%">
       <b><?php echo sprintf(_("Welcome, %s"), $fullname) ?></b>
    </td>
<?php
echo Menu::createItem(Horde::applicationUrl('services/portal/'), _("Home"), 'horde.gif');
if (!$prefs->isLocked('portal_layout')) {
    echo Menu::createItem(Horde::applicationUrl('services/portal/edit.php'), _("Layout"), 'prefs.gif');
}
if (Auth::isAdmin()) {
    echo Menu::createItem(Horde::applicationUrl('admin/'), _("Administration"), 'administration.gif');
}
if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] != 'none')) {
    echo Menu::createItem(Horde::applicationUrl('services/prefs.php?app=horde'), _("Options"), 'prefs.gif');
}

/* Online Help. */
if ($help_link = Help::listLink('horde')) {
    echo Menu::createItem($help_link, _("Help"), 'manual.gif');
}

echo Menu::createItem(Auth::addLogoutParameters(Horde::applicationUrl('login.php'), AUTH_REASON_LOGOUT), _("Log out"), 'logout.gif', null, '_parent', null, '__noselection');
?>
  </tr>
  </table></td>
</tr></table><br />





More information about the commits mailing list