Skip to content

Commit

Permalink
Merge pull request #141 from gamerson/pr-229
Browse files Browse the repository at this point in the history
LRDOCS-3504 replicate sources
  • Loading branch information
gamerson committed Apr 18, 2017
2 parents 6554a11 + 3590c9b commit 0cc0aa4
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 21 deletions.
37 changes: 37 additions & 0 deletions liferay-gradle/blade.document.action/README.markdown
@@ -0,0 +1,37 @@
# Document Action

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/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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet-detail.png)

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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet.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.
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
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
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
37 changes: 37 additions & 0 deletions liferay-workspace/modules/blade.document.action/README.markdown
@@ -0,0 +1,37 @@
# Document Action

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/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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet-detail.png)

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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet.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.
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
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
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
37 changes: 37 additions & 0 deletions maven/blade.document.action/README.markdown
@@ -0,0 +1,37 @@
# Document Action

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/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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-admin-portlet-detail.png)

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/codyhoag/liferay-docs/blob/blade-sample-images/develop/tutorials/blade-images/documents-and-media-portlet.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.
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
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
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 0cc0aa4

Please sign in to comment.