$templates.shared.doctype {= string profile_name = internal.profile_name; int first_weekday = 0; int marked_weekday = 0; node n = "profiles." . profile_name . ".statistics.miscellaneous"; # get first_weekday if subnode_exists(n, "first_weekday") then ( first_weekday = node_value(subnode_by_name(n, "first_weekday")); ); # get marked_weekday if subnode_exists(n, "marked_weekday") then ( marked_weekday = node_value(subnode_by_name(n, "marked_weekday")); ); =} $PRODUCT_NAME {= expand(templates.shared.content_type); =}
\n"; '\n"; "\n"; "
{= string earliest_date = internal.date_time.earliest; string latest_date = internal.date_time.latest; earliest_date = substr(earliest_date,0,11); earliest_date = format(earliest_date, date_time); latest_date = substr(latest_date,0,11); latest_date = format(latest_date, date_time); lang_stats.calendar.label; "\n'; '' . lang_stats.calendar.close_calendar_button . '\n'; "
\n"; "\n"; "\n"; volatile.param1 = earliest_date; volatile.param2 = latest_date; '\n'; '\n"; "\n"; "
' . lang_stats.calendar.statistic_data_date_time_coverage_info . '\n'; '' . lang_stats.calendar.show_all_button . '\n'; "
\n"; node query_result = "internal.date_time.query_result"; node year_node; int year; string year_id; bool first_year_in_calendar = true; # js array which contains all years in the calendar string calendar_years = "["; # js array which contains all months in the calendar string calendar_months = "["; foreach year_node query_result ( year = node_name(year_node); year_id = "y_" . year; calendar_years .= "'" . year . "',"; '\n'; '\n'; '\n'; '
'; print('$year'); '
\n'; node month_node; int first_month_in_year = node_name(subnode_by_number(year_node, "0")); int last_month_in_year; foreach month_node year_node ( last_month_in_year = node_name(month_node); ); # print("first month in year: $first_month_in_year
\n"); # print("last month in year: $last_month_in_year
\n"); int the_month = first_month_in_year; string month_id; string month_label; string calendar_month_id; while (the_month <= last_month_in_year) ( month_id = "m_" . year . "_" . (the_month - 1); # -1 converts Salang month to Javascript month calendar_month_id = year . "_" . (the_month - 1); month_label = "lang_stats.months." . the_month; month_label = $month_label; calendar_months .= "'" . calendar_month_id . "',"; # print("$the_month
\n"); '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '
\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '
\n'; print('$month_label\n'); '\n'; print('$year\n'); '
\n'; '
\n'; print('
\n'); '\n'; # Don't emove empty table cells! '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '
MTWTFSS 
        
        
        
        
        
        
\n'; '
\n'; '
\n'; the_month++; ); ); '\n'; =}