dt_navbar_month (private)
dt_navbar_month view base_url date
Defined in packages/acs-datetime/tcl/acs-calendar-procs.tcl
- Parameters:
- view (required)
- base_url (required)
- date (required)
- Returns:
- the monthly navbar
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set now [clock scan $date] set curr_month [clock format $now -format "%B"] # Check that the arrows to prev/next months don't go to illegal dates and bomb if {[catch {set prev_month [clock format [clock scan "1 month ago" -base $now] -format "%Y-%m-%d"]} err ]} { set prev_month_legal_p 0 } else { if {[catch {clock scan $prev_month}]} { set prev_month_legal_p 0 } else { set prev_month_legal_p 1 } } if {[catch {set next_month [clock format [clock scan "1 month" -base $now] -format "%Y-%m-%d"]} err]} { set next_month_legal_p 0 } else { if {[catch {clock scan $next_month}]} { set next_month_legal_p 0 } else { set next_month_legal_p 1 } } append results [subst { <tr><td class="bottom-border" nowrap align="center" colspan="5"> <table cellspacing="0" cellpadding="1" border="0"> <tr><td nowrap valign="middle"> }] # Output link to previous month only if it's legal if {$prev_month_legal_p != 0} { append results [subst { <a href="[ns_quotehtml ${base_url}view=$view&date=[ns_urlencode $prev_month]]"> <img alt="left arrow" src="[dt_left_arrow]"></a> }] } append results " <span style=\"font-size: smaller; font-weight: bold\">$curr_month</span>" # Output link to next month only if it's a legal month if {$next_month_legal_p != 0} { append results [subst { <a href="[ns_quotehtml ${base_url}view=$view&date=[ns_urlencode $next_month]]"> <img border="0" src="[dt_right_arrow]"></a> }] } append results " </td> </tr>\n" return $resultsXQL Not present: Generic, PostgreSQL, Oracle