Commit 14f42cc6 authored by Yann Mombrun's avatar Yann Mombrun

Merge branch 'develop'

* develop:
  Bump to stable version 2.3.1
  Add actions in the controller
  Minor fix of the CSS
  Minor fix of the CSS
  Bump to new dev version 2.3.1-SNAP
parents d68c332a 8b1b661b
Pipeline #2106 passed with stage
in 29 seconds
......@@ -9,7 +9,7 @@
</parent>
<artifactId>weblab-metaview</artifactId>
<version>2.3.0</version>
<version>2.3.1</version>
<packaging>war</packaging>
<name>WebLab Metaview</name>
......
......@@ -183,6 +183,34 @@ public class MetaViewController {
final PieceOfKnowledge pok = this.metaviewBusinessService.getPoKToUseAsSource(doc, this.sourceTypeTab);
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}useAsSource"), pok);
}
/**
* The user add the current document to the basket. An event to share this action is sent to others Portlets.
*
* @param response
* The action response
* @param model
* The model
*/
@ActionMapping(params = "action=addToBasketMeta")
public void addToBasket(final ActionResponse response, final ModelMap model) {
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}addToBasket"), (Document) model.get(MetaViewController.RESOURCE));
}
/**
* The user pin the current document to the basket. An event to share this action is sent to others Portlets.
*
* @param response
* The action response
* @param model
* The model
*/
@ActionMapping(params = "action=pinToBasketMeta")
public void pinToBasket(final ActionResponse response, final ModelMap model) {
response.setEvent(QName.valueOf("{http://weblab.ow2.org/portlet/metaview/action}pinToBasket"), (Document) model.get(MetaViewController.RESOURCE));
}
// #############################################################################
......@@ -277,5 +305,4 @@ public class MetaViewController {
mav.addObject("message_error", ex.getMessage());
return mav;
}
}
......@@ -50,6 +50,12 @@
<supported-publishing-event>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:useAsSource</qname>
</supported-publishing-event>
<supported-publishing-event>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:addDocument</qname>
</supported-publishing-event>
<supported-publishing-event>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:pinDocument</qname>
</supported-publishing-event>
</portlet>
<!-- filters -->
......@@ -97,4 +103,12 @@
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:useAsSource</qname>
<value-type>org.ow2.weblab.core.model.PieceOfKnowledge</value-type>
</event-definition>
<event-definition>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:addDocument</qname>
<value-type>org.ow2.weblab.core.model.Document</value-type>
</event-definition>
<event-definition>
<qname xmlns:meta="http://weblab.ow2.org/events/meta">meta:pinDocument</qname>
<value-type>org.ow2.weblab.core.model.Document</value-type>
</event-definition>
</portlet-app>
\ No newline at end of file
/* EDIT VIEW */
#editView {
margin-top: 25px;
margin-top: 5px;
margin-bottom : 15px;
}
#result_portlet_loading_image {
text-align: center;
}
.inputForm table {
margin-bottom: 25px;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment