function bootstrap_theme_get_collection_options($empty = array('' => '<none>'))
{
    $options = $empty;
    foreach (bootstrap_theme_get_collections() as $collection) {
        $options[$collection->nid] = $collection->title;
    }
    return $options;
}
function _bootstrap_theme_collections_html()
{
    $header = array('Collection', 'Link to Collection', 'Settings');
    $rows = array();
    foreach (bootstrap_theme_get_collections() as $collection) {
        $row = array();
        $row[] = array('data' => $collection->title, 'class' => array('cell-collection-name'));
        $row[] = array('data' => '<a href="' . url('collection/' . $collection->nid, array('absolute' => TRUE)) . '">' . url('collection/' . $collection->nid, array('absolute' => TRUE)) . '</a>', 'class' => 'cell-collection-link');
        //$row[] = array('data' => '<a href="#">privacy</a><span>&nbsp;&nbsp;|&nbsp;&nbsp;</span><a href="#">delete collection</a>', 'class' => 'cell-collection-settings');
        $link = array('#type' => 'link', '#title' => t('delete collection'), '#href' => 'dashboard/collection/delete/' . $collection->nid, '#ajax' => array('callback' => 'bootstrap_theme_delete_collection', 'wrapper' => 'dashboard_a_collections', 'method' => 'replace', 'effect' => 'fade'));
        $edit_link = array('#type' => 'link', '#title' => t('edit collection'), '#href' => 'node/' . $collection->nid . '/edit');
        $row[] = array('data' => drupal_render($edit_link) . ' | ' . drupal_render($link));
        $rows[] = $row;
    }
    $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('data-table'))));
    $output .= theme('pager');
    return $output;
}
function bootstrap_theme_collections_sidebar()
{
    $collections = bootstrap_theme_get_collections();
    $output = '<div class="sidebar-collections">';
    $output .= '<h3>Collections</h3>';
    if (!empty($collections)) {
        $output .= '<ul>';
        foreach ($collections as $collection) {
            $output .= '<li><a href="' . url('collection/' . $collection->nid) . '">' . $collection->title . '</a></li>';
        }
        $output .= '</ul>';
    }
    $output .= '</div>';
    return $output;
}