コード例 #1
0
ファイル: file-list.php プロジェクト: rahmanazhar/imperium
use Radix;
if (empty($data)) {
    return 0;
}
if (count($data) == 0) {
    return 0;
}
echo '<h2>Files';
// echo ' <span class="s">[';
// echo ' <a onclick="$(\'#note-list\').toggle(); return false;">View</a> ';
// echo ' <a onclick="$(\'#note-edit\').load(\'' . $this->page . '\').focus(); return false;" href="' . $this->page . '">';
// echo img('/silk/1.3/note_add.png','Add Note');
// echo '</a> ';
// echo ']</span>';
echo '</h2>';
echo '<div id="file-edit"></div>';
echo '<div id="file-list">';
echo '<table>';
echo '<tr><th>Icon</th><th>Name</th><th>Type</th><th>Size</th><th>&nbsp;</th></tr>';
foreach ($data as $f) {
    $mime = Base_File::mimeInfo($f['kind']);
    echo '<tr class="rero">';
    echo '<td>' . img($mime['icon'], $mime['note']) . '</td>';
    echo '<td><a href="' . Radix::link('/file/view?id=' . $f['id']) . '">' . html($f['name']) . '</a></td>';
    echo '<td class="r">' . html($mime['name']) . '</td>';
    echo '<td class="r">' . html(ImperiumView::niceSize($f['size'])) . '</td>';
    // echo '<td>' . $this->link('/file/render/' . $f->id,   img('/tango/24x24/actions/edit-find.png','Render') ) . '</td>';
    echo '<td><a href="' . Radix::link('/file/download?id=' . $f['id']) . '">' . img('/tango/24x24/actions/document-save.png', 'Download') . '</td>';
    echo '</tr>';
}
echo '</table>';
コード例 #2
0
ファイル: transaction.php プロジェクト: rahmanazhar/imperium
<?php

/**
	Account Journal Entry View

	Draws the form necessary to input a multi-account journal entry
*/
namespace Edoceo\Imperium;

use Edoceo\Radix;
use Edoceo\Radix\HTML\Form;
// @todo Set this in the controller
$this->FileYes = ini_get('file_uploads');
$this->FileMax = ImperiumView::niceSize(ini_get('upload_max_filesize'));
$css = null;
$cr_total = 0;
$dr_total = 0;
$account_list_json = array();
foreach ($this->AccountList as $i => $a) {
    $account_list_json[] = array('id' => $a['id'], 'value' => $a['full_name']);
}
$account_list_json = json_encode($account_list_json);
// @note duplicated on invoice/view.phtml
if (count($this->jump_list)) {
    echo '<div class="jump_list">';
    $list = array();
    foreach ($this->jump_list as $x) {
        if ($x['id'] == $this->AccountJournalEntry['id']) {
            $list[] = '<span class="hi">#' . $x['id'] . '</span>';
        } elseif ($x['id'] < $this->AccountJournalEntry['id']) {
            $list[] = '<a href="' . $this->link('/account/transaction?id=' . $x['id']) . '">&laquo; #' . $x['id'] . '</a>';