Started experimenting with styles.
This commit is contained in:
@@ -188,7 +188,7 @@ int _handlePost(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq)
|
||||
rv=_handlePostAdd(uh, rq);
|
||||
else {
|
||||
DBG_ERROR(NULL, "Invalid url (2nd member is [%s])", s);
|
||||
msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 500, "Internal Error", protocol, NULL);
|
||||
msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 404, "Not found", protocol, NULL);
|
||||
AQH_HttpRequest_SetResponseMsg(rq, msgOut);
|
||||
return 0;
|
||||
}
|
||||
@@ -196,12 +196,11 @@ int _handlePost(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq)
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(NULL, "Invalid url (2nd member missing)");
|
||||
msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 500, "Internal Error", protocol, NULL);
|
||||
msgOut=AQH_HttpService_CreateResponseMsg(AQH_HttpUrlHandler_GetHttpService(uh), 404, "Not found", protocol, NULL);
|
||||
AQH_HttpRequest_SetResponseMsg(rq, msgOut);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
// TODO
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -225,11 +224,14 @@ void _handleGetList(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, GWEN_BUFFER *
|
||||
|
||||
GWEN_Buffer_AppendArgs(pageBuf,
|
||||
"<h2>%s</h2>"
|
||||
"<table>"
|
||||
" <tr><th>Id</th><th>%s</th><th>%s</th></tr>",
|
||||
"<table class=\"dataTable\">"
|
||||
"<thead>"
|
||||
" <tr><th>Id</th><th>%s</th><th>%s</th></tr>"
|
||||
"</thead>",
|
||||
I18N("Rooms"),
|
||||
I18N("Name"),
|
||||
I18N("Description"));
|
||||
GWEN_Buffer_AppendString(pageBuf, "<tbody>");
|
||||
rl=AQH_Storage_GetRoomList(sto);
|
||||
if (rl) {
|
||||
const AQH_ROOM *r;
|
||||
@@ -248,6 +250,7 @@ void _handleGetList(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, GWEN_BUFFER *
|
||||
r=AQH_Room_List_Next(r);
|
||||
}
|
||||
}
|
||||
GWEN_Buffer_AppendString(pageBuf, "</tbody>");
|
||||
GWEN_Buffer_AppendArgs(pageBuf, "</table><a href=\"/rooms/add\">%s</a><br>", I18N("Add Room"));
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user