-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Display new target action of News list portlet drawer only for managers of web-contributors group - EXO-65909 - Meeds-io/MIPs#68 #919
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -68,9 +68,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
PortalHttpServletResponseWrapper responseWrapper = ( PortalHttpServletResponseWrapper ) rcontext.getResponse(); | ||||||
String newsListUrl = "/portal/rest/v1/news/byTarget/" + newsTarget + "?offset=0&limit=" + limit + "&returnSize=true"; | ||||||
responseWrapper.addHeader("Link", "<" + newsListUrl + ">; rel=prefetch; as=fetch; crossorigin=use-credentials", false); | ||||||
boolean canManageNews = NewsUtils.canManageNewsPublishTargets(currentIdentity); | ||||||
%> | ||||||
<div class="news-list-view-app" id="<%= appId %>"> | ||||||
<script type="text/javascript"> | ||||||
eXo.env.portal.canManageNews = <%=canManageNews%>; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
require(['PORTLET/news/NewsListView'], app => app.init({ | ||||||
appId: '<%=appId%>', | ||||||
saveSettingsURL: <%= "'" + saveSettingsURL + "'" %>, | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
</v-card-text> | ||||||
</v-card> | ||||||
<news-settings-drawer v-if="canPublishNews" /> | ||||||
<news-publish-targets-management-drawer v-if="canPublishNews" /> | ||||||
<news-publish-targets-management-drawer v-if="canManageNews" /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
</v-app> | ||||||
</template> | ||||||
|
||||||
|
@@ -104,6 +104,7 @@ export default { | |||||
hasMore: false, | ||||||
offset: 0, | ||||||
canPublishNews: false, | ||||||
canManageNews: eXo.env.portal.canManageNews | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}), | ||||||
computed: { | ||||||
displayHeader() { | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -102,7 +102,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||||
</template> | ||||||
</v-select> | ||||||
</div> | ||||||
<div class="d-flex flex-row clickable text-decoration-underline"> | ||||||
<div v-if="canManageNews" class="d-flex flex-row clickable text-decoration-underline"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<a @click="createNewTarget"> {{ $t('news.list.settings.drawer.createNewTarget') }} </a> | ||||||
</div> | ||||||
<div v-if="newsTargets.length === 0" class="d-flex flex-row grey--text"> | ||||||
|
@@ -197,7 +197,8 @@ export default { | |||||
showArticleReactions: false, | ||||||
showTooltip: false, | ||||||
seeAllUrl: `${eXo.env.portal.context}/${eXo.env.portal.portalName}/news?filter=pinned`, | ||||||
saveSettingsURL: '' | ||||||
saveSettingsURL: '', | ||||||
canManageNews: eXo.env.portal.canManageNews | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}), | ||||||
computed: { | ||||||
backgroundColor(){ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.