Example #1
0
 public function isReadonly()
 {
     if (Application::isReadonly()) {
         $this->message->error = I18n::t('I_A');
         $this->request->redirect(Theme::URL('Index/Index'));
     }
 }
Example #2
0
" role="button" data-toggle="modal" title="Edit" class="icon-edit">
                                     
                                </a>
                                <a href="#myModal" data-delete-collection="<?php 
        echo urlencode($collection['name']);
        ?>
"role="button" data-toggle="modal" title="Remove" class="icon-remove">
                                    &nbsp;
                                </a>
                            </td>
                            <?php 
    }
    ?>
                        </tr>
                    <?php 
}
?>
                </tbody>
            </table>
        </div>
    </div>
    <?php 
if (!Application::isReadonly()) {
    require_once '_create.php';
}
?>
</div>
<?php 
if (!Application::isReadonly()) {
    require_once '_form.php';
}
Example #3
0
            <?php 
        $showTab = false;
    }
    ?>
        <div id="record-<?php 
    echo $format;
    ?>
" style="display: <?php 
    echo $format === 'json' ? 'block' : 'none';
    ?>
">
            <?php 
    $i = -1;
    foreach ($this->data['record'][$format] as $cursor) {
        ++$i;
        if (isset($this->data['record']['document'][0]['_id']) && !Application::isReadonly()) {
            echo '&nbsp<input type="checkbox" name="ids[]" value="' . $this->data['record']['document'][$i]['_id'] . '" class="checkbox-remove" />';
            echo '&nbsp<a href="javascript:void(0)"  onclick="callAjax(\'' . Theme::URL('Collection/EditRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'format' => $format, 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '\')" class="icon-edit" title="Edit">' . I18n::t('') . '</a>';
            echo '&nbsp<a href="' . Theme::URL('Collection/DeleteRecord', array('db' => $this->db, 'collection' => $this->collection, 'id' => $this->data['record']['document'][$i]['_id'], 'id_type' => gettype($this->data['record']['document'][$i]['_id']))) . '" class="icon-remove" title="Delete">' . I18n::t('') . '</a>';
        }
        echo "<pre>";
        print_r($cursor);
        echo "</pre>";
    }
    ?>

            
        </div>
        <?php 
}
?>