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);
|
rv=_handlePostAdd(uh, rq);
|
||||||
else {
|
else {
|
||||||
DBG_ERROR(NULL, "Invalid url (2nd member is [%s])", s);
|
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);
|
AQH_HttpRequest_SetResponseMsg(rq, msgOut);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -196,12 +196,11 @@ int _handlePost(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DBG_ERROR(NULL, "Invalid url (2nd member missing)");
|
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);
|
AQH_HttpRequest_SetResponseMsg(rq, msgOut);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -225,11 +224,14 @@ void _handleGetList(AQH_HTTP_URLHANDLER *uh, AQH_HTTP_REQUEST *rq, GWEN_BUFFER *
|
|||||||
|
|
||||||
GWEN_Buffer_AppendArgs(pageBuf,
|
GWEN_Buffer_AppendArgs(pageBuf,
|
||||||
"<h2>%s</h2>"
|
"<h2>%s</h2>"
|
||||||
"<table>"
|
"<table class=\"dataTable\">"
|
||||||
" <tr><th>Id</th><th>%s</th><th>%s</th></tr>",
|
"<thead>"
|
||||||
|
" <tr><th>Id</th><th>%s</th><th>%s</th></tr>"
|
||||||
|
"</thead>",
|
||||||
I18N("Rooms"),
|
I18N("Rooms"),
|
||||||
I18N("Name"),
|
I18N("Name"),
|
||||||
I18N("Description"));
|
I18N("Description"));
|
||||||
|
GWEN_Buffer_AppendString(pageBuf, "<tbody>");
|
||||||
rl=AQH_Storage_GetRoomList(sto);
|
rl=AQH_Storage_GetRoomList(sto);
|
||||||
if (rl) {
|
if (rl) {
|
||||||
const AQH_ROOM *r;
|
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);
|
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"));
|
GWEN_Buffer_AppendArgs(pageBuf, "</table><a href=\"/rooms/add\">%s</a><br>", I18N("Add Room"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user