|
147 | 147 | {% elif narrative.workspace.user_permission == 'r' %} |
148 | 148 | <span class="fa fa-minus dimmed" style="opacity: 0.4;" data-toggle="tooltip" data-placement="auto" title="Sharing information not available for this read-only Narrative" data-container="body"></span> |
149 | 149 | {% else %} |
| 150 | + {# Note: narrative sharing permissions are not reported for the current user -- we must grok that from other |
| 151 | + properties. E.g. in this case we know the current user permission is 'w', which is only possible when then |
| 152 | + narrative has been shared thus. #} |
150 | 153 | {% if narrative.permissions|length == 0 %} |
151 | | - <span data-toggle="tooltip" data-placement="auto" title="This narrative has not been shared with you, but not anyone else." data-container="body"> |
| 154 | + <span data-toggle="tooltip" data-placement="auto" title="This narrative has been shared with you, but not anyone else." data-container="body"> |
152 | 155 | 1 <span class="fa fa-share-alt"></span> |
153 | 156 | </span> |
154 | 157 | {% elif narrative.permissions|length == 1 %} |
155 | | - <span data-toggle="tooltip" data-placement="auto" title="This narrative has been shared with you and one other user." data-container="body"> |
156 | | - {{ narrative.permissions | length + 1}} |
| 158 | + <span data-toggle="tooltip" data-placement="auto" title="This narrative has been shared with 2 users, including you." data-container="body"> |
| 159 | + {{ narrative.permissions | length + 1}} |
157 | 160 | <span class="fa fa-share-alt"></span> |
158 | 161 | </span> |
159 | 162 | {% else %} |
160 | | - <span data-toggle="tooltip" data-placement="auto" title="This narrative has been shared with you and {{narrative.permissions|length}} other users." data-container="body"> |
161 | | - {{ narrative.permissions | length + 1}} |
162 | | - <span class="fa fa-share-alt"></span> |
163 | | - </span> |
| 163 | + {% if env.loggedInUser == narrative.workspace.owner %} |
| 164 | + <span data-toggle="tooltip" data-placement="auto" title="This narrative is owned by you and shared with {{narrative.permissions|length}} other users." data-container="body"> |
| 165 | + {{ narrative.permissions | length }} |
| 166 | + <span class="fa fa-share-alt"></span> |
| 167 | + </span> |
| 168 | + {% else %} |
| 169 | + <span data-toggle="tooltip" data-placement="auto" title="This narrative has been shared with {{narrative.permissions|length + 1}} users, including you." data-container="body"> |
| 170 | + {{ narrative.permissions | length + 1}} |
| 171 | + <span class="fa fa-share-alt"></span> |
| 172 | + </span> |
| 173 | + {% endif %} |
164 | 174 | {% endif %} |
165 | 175 | {% endif %} |
166 | 176 | {% if narrative.workspace.globalread == 'r' or narrative.workspace.globalread == 'w' %} |
|
0 commit comments