java: blockcontent mode

This commit is contained in:
Andrey Panov
2019-11-07 17:23:29 +03:00
parent 8887edefb3
commit 51ecf3afeb
3 changed files with 14 additions and 5 deletions

View File

@ -210,15 +210,17 @@ public class FileModel
public Boolean edit;
public Boolean fillForms;
public Boolean modifyFilter;
public Boolean modifyContentControl;
public Boolean review;
public Permissions(String mode, String type, Boolean canEdit)
{
comment = !mode.equals("view") && !mode.equals("fillForms") && !mode.equals("embedded");
comment = !mode.equals("view") && !mode.equals("fillForms") && !mode.equals("embedded") && !mode.equals("blockcontent");
download = true;
edit = canEdit && (mode.equals("edit") || mode.equals("filter"));
fillForms = !mode.equals("view") && !mode.equals("comment") && !mode.equals("embedded");
edit = canEdit && (mode.equals("edit") || mode.equals("filter") || mode.equals("blockcontent"));
fillForms = !mode.equals("view") && !mode.equals("comment") && !mode.equals("embedded") && !mode.equals("blockcontent");
modifyFilter = !mode.equals("filter");
modifyContentControl = !mode.equals("blockcontent");
review = mode.equals("edit") || mode.equals("review");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View File

@ -139,7 +139,7 @@
<thead>
<tr class="tableHeader">
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
<td colspan="5" class="tableHeaderCell contentCells-shift">Editors</td>
<td colspan="6" class="tableHeaderCell contentCells-shift">Editors</td>
<td colspan="3" class="tableHeaderCell">Viewers</td>
</tr>
</thead>
@ -185,13 +185,20 @@
<img src="css/img/comment-24.png" alt="Open in editor for comment" title="Open in editor for comment"/>
</a>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<td class="contentCells contentCells-icon">
<% if (docType.equals("text")) { %>
<a href="EditorServlet?fileName=<%= URLEncoder.encode(files[i].getName(), "UTF-8") %>&type=desktop&mode=fillForms" target="_blank">
<img src="css/img/fill-forms-24.png" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
</a>
<% } %>
</td>
<td class="contentCells contentCells-shift contentCells-icon">
<% if (docType.equals("text")) { %>
<a href="EditorServlet?fileName=<%= URLEncoder.encode(files[i].getName(), "UTF-8") %>&type=desktop&mode=blockcontent" target="_blank">
<img src="css/img/block-content-24.png" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
</a>
<% } %>
</td>
<td class="contentCells contentCells-icon">
<a href="EditorServlet?fileName=<%= URLEncoder.encode(files[i].getName(), "UTF-8") %>&type=desktop&mode=view" target="_blank">