Add an about tab

This commit is contained in:
Andreas Öman 2008-04-07 21:33:26 +00:00
parent 5c93b3bde3
commit e372222754
2 changed files with 53 additions and 1 deletions

View file

@ -53,6 +53,7 @@ const char *ajax_tabnames[] = {
[AJAX_TAB_CHANNELS] = "Channels",
[AJAX_TAB_RECORDER] = "Recorder",
[AJAX_TAB_CONFIGURATION] = "Configuration",
[AJAX_TAB_ABOUT] = "About",
};
/**
@ -227,6 +228,53 @@ ajax_page_titlebar(http_connection_t *hc, const char *remain, void *opaque)
return 0;
}
/**
* About
*/
static int
ajax_about_tab(http_connection_t *hc)
{
tcp_queue_t tq;
tcp_init_queue(&tq, -1);
tcp_qprintf(&tq, "<center>");
tcp_qprintf(&tq, "<div style=\"padding: auto; width: 400px\">");
ajax_box_begin(&tq, AJAX_BOX_SIDEBOX, NULL, NULL, "About");
tcp_qprintf(&tq, "<div style=\"text-align: center\">");
tcp_qprintf(&tq,
"<p>HTS / Tvheadend</p>"
"<p>(c) 2006-2008 Andreas \303\226man</p>"
"<p>Latest release and information is available at:</p>"
"<p><a href=\"http://www.lonelycoder.com/hts/\">"
"http://www.lonelycoder.com/hts/</a></p>"
"<p>&nbsp;</p>"
"<p>This webinterface is powered by</p>"
"<p><a href=\"http://www.prototypejs.org/\">Prototype</a>"
" and "
"<a href=\"http://script.aculo.us/\">script.aculo.us</a>"
"</p>"
"<p>&nbsp;</p>"
"<p>Media formats and codecs by</p>"
"<p><a href=\"http://www.ffmpeg.org/\">FFmpeg</a></p>"
);
tcp_qprintf(&tq, "</div>");
ajax_box_end(&tq, AJAX_BOX_SIDEBOX);
tcp_qprintf(&tq, "</div>");
tcp_qprintf(&tq, "</center>");
http_output_queue(hc, &tq, "text/html; charset=UTF-8", 0);
return 0;
}
/*
* Tab AJAX page
*
@ -249,6 +297,9 @@ ajax_page_tab(http_connection_t *hc, const char *remain, void *opaque)
case AJAX_TAB_CONFIGURATION:
return ajax_config_tab(hc);
case AJAX_TAB_ABOUT:
return ajax_about_tab(hc);
default:
return HTTP_STATUS_NOT_FOUND;
}

View file

@ -39,7 +39,8 @@ TAILQ_HEAD(ajax_menu_entry_queue, ajax_menu_entry);
#define AJAX_TAB_CHANNELS 0
#define AJAX_TAB_RECORDER 1
#define AJAX_TAB_CONFIGURATION 2
#define AJAX_TABS 3
#define AJAX_TAB_ABOUT 3
#define AJAX_TABS 4
void ajaxui_start(void);