Skip to content

Commit

Permalink
re #77 started to work on the issue, we wil have for that an admin pa…
Browse files Browse the repository at this point in the history
…nel, for the moment added only the auto-generated code
  • Loading branch information
allan-simon committed Aug 11, 2013
1 parent 872ce97 commit 13c5834
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/TatoWiki.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace apps {
TatoWiki::TatoWiki(cppcms::service &serv) :
cppcms::application(serv),
//%%%NEXT_MAIN_APP_CTRL_CONSTRUCT_MARKER%%%
admin(serv),

search(serv),

media(serv),
Expand Down Expand Up @@ -72,6 +74,7 @@ TatoWiki::TatoWiki(cppcms::service &serv) :
add(img,"^/img(.*)",1);
add(media,"^/media(.*)",1);
add(search,"^/search(.*)",1);
add(admin,"^/admin(.*)",1);
//%%%NEXT_CONTROLLER_DISPATCHER_MARKER%%%, do not delete
add(pages, "/(.*)", 1);

Expand Down
2 changes: 2 additions & 0 deletions app/src/TatoWiki.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "controllers/webs/History.h"
#include "controllers/webs/Media.h"
#include "controllers/webs/Search.h"
#include "controllers/webs/Admin.h"
//%%%NEXT_CONTROLLER_INCLUDE_MARKER%%%, do not delete
#include "controllers/webs/Pages.h"

Expand All @@ -46,6 +47,7 @@ class TatoWiki : public cppcms::application {

private:
//%%%NEXT_MAIN_APP_CTRL_ATTR%%%
controllers::webs::Admin admin;
controllers::webs::Search search;
controllers::webs::Media media;
controllers::webs::Img img;
Expand Down
36 changes: 36 additions & 0 deletions app/src/contents/Admin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Tatoeba wiki Wiki made with cppcmsskel
*
* Copyright (C) 2013 Allan SIMON <[email protected]>
* See accompanying file COPYING.TXT file for licensing details.
*
* @category Tatoeba wiki
* @package Contents
* @author Allan SIMON <[email protected]>
* @link https://github.com/allan-simon/tatowiki
*/

#ifndef TATOWIKI_CONTENTS_ADMIN_H
#define TATOWIKI_CONTENTS_ADMIN_H

#include "cppcms_skel/contents/content.h"

//%%%NEXT_CONTENT_FORM_INCLUDE_MARKER%%%

namespace contents {
namespace admin {

/**
* @class Admin
* @brief Base content for every action of Admin controller
* @since 10 August 2013
*/
struct Admin : public BaseContent {
};

//%%%NEXT_CONTENT_MARKER%%%

} // end of namespace admin
} //end of namespace contents

#endif
47 changes: 47 additions & 0 deletions app/src/controllers/webs/Admin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* Tatoeba wiki Wiki made with cppcmsskel
*
* Copyright (C) 2012 Allan SIMON <[email protected]>
* See accompanying file COPYING.TXT file for licensing details.
*
* @category Tatoeba wiki
* @package Controllers
* @author Allan SIMON <[email protected]>
* @link https://github.com/allan-simon/tatowiki
*/

#include <cppcms/session_interface.h>
#include "Admin.h"


#include "contents/Admin.h"

//%%%NEXT_INC_MODEL_CTRL_MARKER%%%


namespace controllers {
namespace webs {

Admin::Admin(cppcms::service& serv) :
controllers::webs::Controller(serv)
{

//%%%NEXT_ACTION_DISPATCHER_MARKER%%%, do not delete

//%%%NEXT_NEW_MODEL_CTRL_MARKER%%%
}

/**
*
*/
Admin::~Admin() {
//%%%NEXT_DEL_MODEL_CTRL_MARKER%%%
}

// %%%NEXT_ACTION_MARKER%%% , do not delete




} // End namespace webs
} // End namespace controllers
57 changes: 57 additions & 0 deletions app/src/controllers/webs/Admin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Tatoeba wiki Wiki made with cppcmsskel
*
* Copyright (C) 2012 Allan SIMON <[email protected]>
* See accompanying file COPYING.TXT file for licensing details.
*
* @category Tatoeba wiki
* @package Controllers
* @author Allan SIMON <[email protected]>
* @link https://github.com/allan-simon/tatowiki
*/

#ifndef TATOWIKICONTROLLERS_WEBS_ADMIN_H
#define TATOWIKICONTROLLERS_WEBS_ADMIN_H

#include "cppcms_skel/controllers/webs/Controller.h"


//needed to avoid to include models directly here,
//which would have the side effects to require to recompile the
// controller every time we modify a model. even though it does
// not affect the controller
namespace models {
// %%%NEXT_CLASS_MODEL_CTRL_MARKER%%%
}

namespace controllers {
namespace webs {
/**
* @class Admin @TODO add a description
* @since 10 August 2013
*/
class Admin : public Controller {
public:
/**
* @brief Constructor
* @since 10 August 2013
*/
Admin(cppcms::service &serv);

/**
* @brief Destructor
* @since 10 August 2013
*/
~Admin();

private:
// %%%NEXT_VAR_MODEL_CTRL_MARKER%%%

// %%%NEXT_ACTION_MARKER%%% , do not delete

};

} // End namespace webs
} // End namespace controllers

#endif

0 comments on commit 13c5834

Please sign in to comment.