Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
minor bug integrate disabled action in view
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo082 committed Jun 4, 2017
1 parent cb01ada commit 91ed815
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Core/ViewManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ private function loadViews(Execution $execution, Request $request, $id) {
$this->computeMainActionView($execution);
if ($execution->isDisplayable()) {
foreach ($execution->getViewContainer() as $childActionID) {
$childAction = $execution->entityInfo->getActionWithID($childActionID, true);
if (!$childAction->isFullAuthorize())
$childAction = $execution->entityInfo->getActionWithID($childActionID, false);
if (!$childAction || !$childAction->isFullAuthorize())
continue;
$data = $this->actionManager->processAction($request, $childAction, $id);
$viewMeta = $this->getViewMetaDataForAction($childAction, true);
Expand All @@ -104,8 +104,8 @@ private function loadLinks(Execution $execution) {
if ($linkMeta == null)
return;
foreach ($linkMeta->getContainer() as $childActionID) {
$childAction = $execution->entityInfo->getActionWithID($childActionID, true);
if (!$childAction->isFullAuthorize())
$childAction = $execution->entityInfo->getActionWithID($childActionID, false);
if (!$childAction || !$childAction->isFullAuthorize())
continue;
$execution->pushLink(new Link($childAction, $execution->entityInfo));
}
Expand Down
1 change: 0 additions & 1 deletion Resources/views/Manage/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<h2>form view</h2>


<h3>{{ (eInfo.name~'.'~action.id)|trans }} :</h3>
{{ form_start(data.form) }}
{% for row in data.form %}
Expand Down
12 changes: 7 additions & 5 deletions Resources/views/Manage/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
<h3>{{ 'entity.listing'|trans }} :</h3>
{% if data.all is not empty %}
<table>

<tr>
{% for name in data.all.0.obj.properties %}
<th>{{ name }}</th>
{% for name in data.all.0.annotation_container.annotations %}
<th>{{ name.title }}</th>
{% endfor %}
</tr>

{% for e in data.all %}
<tr>
{% for item in e.obj.vars %}
<td>{{ item }}</td>
{% for item in e.annotation_container.annotations %}
<td>{{ item.value }}</td>
{% endfor %}

{% for action in eInfo.actions %}
{% if e.permissions[action.id] and action.environment == constant('FQT\\DBCoreManagerBundle\\DependencyInjection\\Configuration::ENV_OBJECT') %}
<td><a href="{{ path('db.manager.process', {'actionID':action.id,'name':name,'id':e.obj.id})}}">{{ action.fullName }}</a></td>
<td><a href="{{ path('db.manager.process', {'actionID':action.id,'name':name,'id':e.annotation_container.objectId})}}">{{ action.fullName }}</a></td>
{% endif %}
{% endfor %}
</tr>
Expand Down

0 comments on commit 91ed815

Please sign in to comment.