Skip to content

Commit

Permalink
feat: Update old news webapp paths with content webapp paths - EXO-69…
Browse files Browse the repository at this point in the history
  • Loading branch information
azayati committed Apr 2, 2024
1 parent dd3462f commit 52235e4
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected MessageInfo makeMessage(NotificationContext ctx) {
String contentSpaceName = notification.getValueOwnerParameter(NotificationConstants.CONTENT_SPACE);
String authorAvatarUrl = notification.getValueOwnerParameter(NotificationConstants.AUTHOR_AVATAR_URL);
String baseUrl = PropertyManager.getProperty("gatein.email.domain.url");
String illustrationUrl = baseUrl.concat("/news/images/newsImageDefault.png");
String illustrationUrl = baseUrl.concat("/content/images/newsImageDefault.png");
String activityLink = notification.getValueOwnerParameter(NotificationConstants.ACTIVITY_LINK);
String context = notification.getValueOwnerParameter(NotificationConstants.CONTEXT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void shouldInstantiateMailTemplate() {
when(encoder.encode("title")).thenReturn("title");
when(encoder.encode("space1")).thenReturn("space1");
when(encoder.encode("jean")).thenReturn("jean");
when(encoder.encode("http://localhost:8080/news/images/newsImageDefault.png")).thenReturn("http://localhost:8080/news/images/newsImageDefault.png");
when(encoder.encode("http://localhost:8080/content/images/newsImageDefault.png")).thenReturn("http://localhost:8080/content/images/newsImageDefault.png");
when(encoder.encode("COMMENT MY NEWS")).thenReturn("COMMENT MY NEWS");
when(encoder.encode("http://localhost:8080/portal/intranet/activity?id=39")).thenReturn("http://localhost:8080/portal/intranet/activity?id=39");
when(notification.getValueOwnerParameter("read")).thenReturn("true");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default {
for (let i=0; i<this.newsInfo.length; i++){
if (this.newsInfo[i].illustrationURL === null) {
// eslint-disable-next-line vue/no-mutating-props
this.newsInfo[i].illustrationURL = '/news/images/news.png';
this.newsInfo[i].illustrationURL = '/content/images/news.png';
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
size="40"
:class="isMobile ? 'me-3' : 'mx-3'"
class="my-auto">
<v-img src="/news/images/news.png" />
<v-img src="/content/images/news.png" />
</v-avatar>
<div class="d-flex flex-grow-1 flex-column my-auto align-left">
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div v-if="archivedNews && !news.canArchive">
<div class="userNotAuthorized">
<div class="notAuthorizedIconDiv">
<img src="/news/images/notauthorized.png" class="iconNotAuthorized">
<img src="/content/images/notauthorized.png" class="iconNotAuthorized">
</div>
<h3>{{ $t('news.archive.text') }}</h3>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
return this.news && this.news.spaceMember ? this.news.spaceUrl : `${eXo.env.portal.context}/${eXo.env.portal.metaPortalName}`;
},
illustrationUrl() {
return this.news && this.news.illustrationURL ? this.news.illustrationURL.concat('&size=315x128').toString() : '/news/images/news.png';
return this.news && this.news.illustrationURL ? this.news.illustrationURL.concat('&size=315x128').toString() : '/content/images/news.png';
},
publicationState() {
return this.news && this.news.publicationState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const newsActivityTypeExtensionOptions = {
hideOnDelete: true,
supportsThumbnail: true,
windowTitlePrefixKey: 'news.window.title',
getThumbnail: (activity) => activity?.news?.illustrationURL && `${activity?.news?.illustrationURL}&size=305x285` || '/news/images/news.png',
getThumbnail: (activity) => activity?.news?.illustrationURL && `${activity?.news?.illustrationURL}&size=305x285` || '/content/images/news.png',
getThumbnailProperties: (activity) => !(activity?.news?.illustrationURL) && {
height: '90px',
width: '90px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<img
v-else
:alt="activityTitle"
src="/news/images/news.png">
src="/content/images/news.png">
</v-avatar>
</v-list-item-icon>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,19 @@ export default {
},
previewTemplate() {
if ( this.viewTemplate === 'NewsLatest') {
return '/news/images/latestNews.png';
return '/content/images/latestNews.png';
} else if ( this.viewTemplate === 'NewsSlider') {
return '/news/images/sliderNews.png';
return '/content/images/sliderNews.png';
} else if ( this.viewTemplate === 'NewsAlert') {
return '/news/images/alertNews.png';
return '/content/images/alertNews.png';
} else if ( this.viewTemplate === 'NewsList') {
return '/news/images/listNews.png';
return '/content/images/listNews.png';
} else if ( this.viewTemplate === 'NewsMosaic') {
return '/news/images/mosaicNews.png';
return '/content/images/mosaicNews.png';
} else if ( this.viewTemplate === 'NewsStories') {
return '/news/images/storiesNews.png';
return '/content/images/storiesNews.png';
} else if ( this.viewTemplate === 'NewsCards') {
return '/news/images/cardsNews.png';
return '/content/images/cardsNews.png';
} else {
return '';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {
return this.showArticleImage && this.item
&& this.item.illustrationURL
&& this.item.illustrationURL.concat('&size=235x140').toString()
|| '/news/images/news.png';
|| '/content/images/news.png';
},
isHiddenSpace() {
return this.item && !this.item.spaceMember && this.item.hiddenSpace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default {
return this.showArticleImage || (!this.showArticleImage && !this.index );
},
img() {
return this.illustrationURL() || '/news/images/news.png';
return this.illustrationURL() || '/content/images/news.png';
},
displayDate() {
return this.item.publishDate && this.item.publishDate.time && new Date(this.item.publishDate.time);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
return this.selectedOption?.showArticleReactions;
},
articleImage() {
return this.item?.illustrationURL?.concat('&size=70x70').toString() || '/news/images/news.png';
return this.item?.illustrationURL?.concat('&size=70x70').toString() || '/content/images/news.png';
},
extraClass() {
return (!this.showArticleSummary || !this.showArticleTitle) && 'text-truncate-2' || 'article-title' ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class="articleLink d-block"
target="_self"
:href="articleUrl(item)">
<img :src="showArticleImage && item.illustrationURL !== null ? illustrationURL(item,index) : '/news/images/news.png'" :alt="$t('news.latest.alt.articleImage')">
<img :src="showArticleImage && item.illustrationURL !== null ? illustrationURL(item,index) : '/content/images/news.png'" :alt="$t('news.latest.alt.articleImage')">
<div class="titleArea">
<div v-if="showArticleDate" class="articleDate">
<date-format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
dark>
<v-img
class="articleImage fill-height"
:src="showArticleImage && item.illustrationURL !== null ? item.illustrationURL.concat('&size=1420x222').toString() : '/news/images/news.png'"
:src="showArticleImage && item.illustrationURL !== null ? item.illustrationURL.concat('&size=1420x222').toString() : '/content/images/news.png'"
eager />
<v-container class="slide-text-container d-flex text-center body-2">
<div class="flex flex-column carouselNewsInfo">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
return this.selectedOption && this.selectedOption.showArticleImage;
},
articleImage() {
return this.showArticleImage && this.item.illustrationURL !== null ? this.item.illustrationURL.concat('&size=140x210').toString() : '/news/images/news.png';
return this.showArticleImage && this.item.illustrationURL !== null ? this.item.illustrationURL.concat('&size=140x210').toString() : '/content/images/news.png';
},
articleUrl() {
return eXo.env.portal.userName !== '' ? this.item.url : `${eXo.env.portal.context}/${eXo.env.portal.portalName}/news-detail?newsId=${this.item.id}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
return this.news && this.news.authorProfileURL && this.news.authorProfileURL.split('/').pop();
},
illustrationUrl() {
return this.news?.illustrationURL ? this.news.illustrationURL.concat('&size=150x150').toString() : '/news/images/news.png';
return this.news?.illustrationURL ? this.news.illustrationURL.concat('&size=150x150').toString() : '/content/images/news.png';
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

@images-path: "/news/images";
@images-path: "/content/images";

.composerActions .actionItem .actionItemIcon .newsComposerIcon {
background: url("@{images-path}/writeAnArticle.png") no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion content-webapp/src/main/webapp/skin/less/newsListView.less
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ p.caption-title:after {
float: right ~'; /** orientation=lt */ ';
float: left ~'; /** orientation=rt */ ';
.bookImage {
content: url("/news/images/book.png");
content: url("/content/images/book.png");
height: 12rem;
float: right ~'; /** orientation=lt */ ';
float: left ~'; /** orientation=rt */ ';
Expand Down

0 comments on commit 52235e4

Please sign in to comment.