wasimshaikh / php-calendar

Automatically exported from code.google.com/p/php-calendar
1 stars 0 forks source link

Show Calendars At Top #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I made some code to list the calendars at top, since anonymous users have no 
way to change calendars. Obviously there should be a separate css class but it 
should look similar to the navbar:

function getCalendarList() {
        $calendarList = tag('div', attributes('class="phpc-navbar"'));

        global $phpc_script, $phpcdb;

        foreach($phpcdb->get_calendars() as $calendar) {
                $title = $calendar->get_title();
                $cid = $calendar->get_cid();

                $as ="href=\"$phpc_script?phpcid=" . $cid . "\"";

                $calendarList->add(tag('a', attributes($as), $title));
        }

        return $calendarList;
}

function display_phpc() {

        $navbar = false;

        try {
                $content = do_action();
                $calendarList = getCalendarList();
                $navbar = navbar();
                return tag('', $calendarList, $navbar, $content, link_bar());
...

Original issue reported on code.google.com by oldbus...@gmail.com on 6 May 2011 at 5:12

GoogleCodeExporter commented 9 years ago
Also, there should probably be an option to sort the calendars by name on the 
listing.

Original comment by oldbus...@gmail.com on 6 May 2011 at 5:15

GoogleCodeExporter commented 9 years ago
Where would i put this to make is function?

Original comment by KratosDe...@gmail.com on 1 Sep 2011 at 1:56

GoogleCodeExporter commented 9 years ago
includes/calendar.php

Original comment by oldbus...@gmail.com on 1 Sep 2011 at 2:26

GoogleCodeExporter commented 9 years ago
putting this on my todo list.

Original comment by sproctor@gmail.com on 20 Jul 2012 at 3:17

GoogleCodeExporter commented 9 years ago
This is committed in r560

Original comment by sproctor@gmail.com on 24 Jul 2012 at 2:16