Skip to content

Commit

Permalink
LRDOCS-3504 replicate sources
Browse files Browse the repository at this point in the history
  • Loading branch information
codyhoag committed Apr 17, 2017
1 parent 9c84749 commit 3590c9b
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 30 deletions.
39 changes: 31 additions & 8 deletions liferay-workspace/modules/blade.document.action/README.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# Action for Documents and Media Portlet
# Document Action

The blade.document.action is showing how to add a context menu to some entry in Documents and Media Portlet according to this [article](https://blogs.aca-it.be/liferay-dxp-document-actions/). You can see the effect in Documents and Media Admin Portlet(Control Panel->Liferay->Content->Documents and Media).
see the image below:
The Document Action sample shows how to add a context menu option to an entry in
the Documents and Media portlet. When deploying this sample with no
customizations, an additional menu option is available in the Documents and
Media Admin portlet and the Documents and Media portlet. This sample creates a
*Blade Basic Info* option that displays basic information about the entry (e.g.,
file name, type, version, etc.). For example, the Admin portlet provides the new
option as illustrated in the images below:

![Documents And Media Admin Portlet](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaAdminPortlet.png)
![Documents And Media Admin Portlet](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet.png)

![Documents And Media Admin Portlet Detail](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaAdminPortlet_Detail.png)
![Documents And Media Admin Portlet Detail](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet-detail.png)

Also you can see the same effect in Documents and Media Portlet , but you should check `Show Actions` in `Configuration` of the portlet first.
Likewise, the Documents and Media portlet provides the same option after
selecting `Show Actions` from the portlet's `Configuration` menu.

![Documents And Media Portlet](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaPortlet.png)
![Documents And Media Portlet](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet.png)

![Documents And Media Portlet Detail](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaPortlet_Detail.png)
![Documents And Media Portlet Detail](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet-detail.png)

There are four Java classes used in this sample:

- `BladeActionConfigurationIcon`: Adds the new context menu option to the
Document Detail screen options (top right corner) of the Documents and Media
Admin portlet. See the
[Configuring Your App's Actions Menu](https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/applying-lexicon-styles-to-your-app#configuring-your-apps-actions-menu)
tutorial for more details.
- `BladeActionDisplayContext`: Adds the
[Display Context](https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context)
for the document action.
- `BladeActionDisplayContextFactory`: Adds the
[Display Context](https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context)
factory for the document action.
- `BladeDocumentActionPortlet`: Provides the portlet class, which extends the
[GenericPortlet](https://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/GenericPortlet.html).
This class generates what is shown when the context menu option is selected.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@
import org.osgi.service.component.annotations.Reference;

/**
* This class is for adding context menu to Document Detail screen options(top right corner) in
* Documents and Media admin portlet.<br/>
* see
* <a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/applying-lexicon-styles-to-your-app#configuring-your-apps-actions-menu">CONFIGURING YOUR APPS ACTIONS MENU</a>.
* Adds the new context menu option to the Document Detail screen options (top
* right corner) of the Documents and Media Admin portlet.
*
* @author liferay
*/
@Component(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import javax.servlet.http.HttpServletResponse;

/**
* Custom Display Context.<br/>
* see <a href="https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context">DISPLAY CONTEXT</a>.
* Provides the Custom Display Context, which provides access to the Documents
* and Media portlet's UI elements.
*
* @author liferay
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import org.osgi.service.component.annotations.Component;

/**
* register a DLDisplayContextFactory to provide custom Display Context
* Implements the <code>DLDisplayContextFactory</code> to provide custom display contexts.
*
* @author liferay
*/
@Component(immediate = true, service = DLDisplayContextFactory.class)
Expand Down
39 changes: 31 additions & 8 deletions maven/blade.document.action/README.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# Action for Documents and Media Portlet
# Document Action

The blade.document.action is showing how to add a context menu to some entry in Documents and Media Portlet according to this [article](https://blogs.aca-it.be/liferay-dxp-document-actions/). You can see the effect in Documents and Media Admin Portlet(Control Panel->Liferay->Content->Documents and Media).
see the image below:
The Document Action sample shows how to add a context menu option to an entry in
the Documents and Media portlet. When deploying this sample with no
customizations, an additional menu option is available in the Documents and
Media Admin portlet and the Documents and Media portlet. This sample creates a
*Blade Basic Info* option that displays basic information about the entry (e.g.,
file name, type, version, etc.). For example, the Admin portlet provides the new
option as illustrated in the images below:

![Documents And Media Admin Portlet](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaAdminPortlet.png)
![Documents And Media Admin Portlet](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet.png)

![Documents And Media Admin Portlet Detail](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaAdminPortlet_Detail.png)
![Documents And Media Admin Portlet Detail](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet-detail.png)

Also you can see the same effect in Documents and Media Portlet , but you should check `Show Actions` in `Configuration` of the portlet first.
Likewise, the Documents and Media portlet provides the same option after
selecting `Show Actions` from the portlet's `Configuration` menu.

![Documents And Media Portlet](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaPortlet.png)
![Documents And Media Portlet](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet.png)

![Documents And Media Portlet Detail](https://github.com/liferay/liferay-blade-samples/tree/master/docImages/DocumentsAndMediaPortlet_Detail.png)
![Documents And Media Portlet Detail](https://github.com/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet-detail.png)

There are four Java classes used in this sample:

- `BladeActionConfigurationIcon`: Adds the new context menu option to the
Document Detail screen options (top right corner) of the Documents and Media
Admin portlet. See the
[Configuring Your App's Actions Menu](https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/applying-lexicon-styles-to-your-app#configuring-your-apps-actions-menu)
tutorial for more details.
- `BladeActionDisplayContext`: Adds the
[Display Context](https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context)
for the document action.
- `BladeActionDisplayContextFactory`: Adds the
[Display Context](https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context)
factory for the document action.
- `BladeDocumentActionPortlet`: Provides the portlet class, which extends the
[GenericPortlet](https://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/GenericPortlet.html).
This class generates what is shown when the context menu option is selected.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@
import org.osgi.service.component.annotations.Reference;

/**
* This class is for adding context menu to Document Detail screen options(top right corner) in
* Documents and Media admin portlet.<br/>
* see
* <a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/applying-lexicon-styles-to-your-app#configuring-your-apps-actions-menu">CONFIGURING YOUR APPS ACTIONS MENU</a>.
* Adds the new context menu option to the Document Detail screen options (top
* right corner) of the Documents and Media Admin portlet.
*
* @author liferay
*/
@Component(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import javax.servlet.http.HttpServletResponse;

/**
* Custom Display Context.<br/>
* see <a href="https://dev.liferay.com/participate/liferaypedia/-/wiki/Main/Display+Context">DISPLAY CONTEXT</a>.
* Provides the Custom Display Context, which provides access to the Documents
* and Media portlet's UI elements.
*
* @author liferay
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import org.osgi.service.component.annotations.Component;

/**
* register a DLDisplayContextFactory to provide custom Display Context
* Implements the <code>DLDisplayContextFactory</code> to provide custom display contexts.
*
* @author liferay
*/
@Component(immediate = true, service = DLDisplayContextFactory.class)
Expand Down

0 comments on commit 3590c9b

Please sign in to comment.