Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Actual Implementation

Project setup

Create a module and empty webapp using the maven archetype selector, then change the parent pom and module pom to this.

Slightly modified Content app

Import the following configuration as you can see, we slightly modified certain fields of a "standard" content app.

Linking the image to use stuff from the assets

Instead of using the image uploader we will link the image field of the restaurant to a Node in the assets. Uploading assets will be done using the asset app.

Adding an activation action

We duplicate the activation action we can find in ... and add it under the actions, add an acticate action in the actionbar.

Adding the public instance

We add a public server as described in the documentation, for easyness of use we will have author and public on teh same instance.

Creating the blog page for displaying the activated content

We now create a new template and blog page by extending stkHome, we will as well add a new FTL and new component to the project.

The new FTL will just display the activated items.

Creating normal users and the correct roles

We create a new role for teh mobile authors who submit the restos, add a new user and give him the correct roles and basic groups for only accessing the addrsto app.

Giving correct access rights to the app

We give the correct rights to the app.

Adding a "Request for activation action"

We now add some custom logic to the app, creating a custom action as defined below, the action will be fired from the addresto subapp, so we decide to inject the following.

We want to send a message, so we need the SubAppContext

We want to show a notification so we need the Shell.

Giving the correct rights to the activation action and request for activation action

We want to disable the "direct" publishing for the mobile author and enable only the "request for activation" button so this is how we restrict it.

Adding a messageView

We need to register a messageView so that the pulse can find it and open it. So we add a messageview to the addresto app as follows.

Adding a review action to the messageView.

We now add some custom logic to the messageView by defining a review action who will open the content the mobile author wants us to review. To do so we inject the Message, the LocationController and the Shell since we want to add some notifications.

Adding a reject action to the contentApp View.

...