Skip to content
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

merge cp-lji branch to develop #36

Merged
merged 90 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
1c09fc0
Release 1.14.0
MarkLark86 Aug 22, 2019
042ea8b
[SDAN-590] (fix): Celery beat and queue configs (#840)
MarkLark86 Aug 30, 2019
38f9bd2
[SDAN-568] Further response layout improvements (#844)
MarkLark86 Sep 9, 2019
14c75f5
Release 1.15.0
MarkLark86 Sep 9, 2019
c3411ef
Update changelog
MarkLark86 Sep 9, 2019
e421376
Release 1.15.1
MarkLark86 Sep 10, 2019
6e7c479
Release 1.15.2-rc1
MarkLark86 Oct 14, 2019
a3c6d23
Release 1.15.2
MarkLark86 Oct 16, 2019
b2f10ee
Added theme and setting files
Oct 26, 2019
126f7eb
Theme updates
Oct 28, 2019
a5a15e4
Fix for the footer links
Oct 28, 2019
945c482
CP identity
darconny Nov 13, 2019
51fa7d1
Adding fr
Nov 14, 2019
11b0909
[SDCP-107] - Remove unnecessary search parameters from Newshub
Nov 18, 2019
9630f87
SDCP-109
darconny Nov 19, 2019
3f10b94
[SDCP-106] - Remove agenda from newshub
Nov 25, 2019
eea8209
[SDCP-111] - Remove divider
Nov 25, 2019
f9a172a
Rebasing the branch on master
Nov 27, 2019
63ca0b2
Added translation files
Nov 27, 2019
d182c36
Merge remote-tracking branch 'origin/master' into cp-lji
petrjasek Nov 28, 2019
2df8e53
update yarn.lock
petrjasek Nov 28, 2019
e486aba
fix props validation
petrjasek Nov 28, 2019
899094e
disable newsapi for now
petrjasek Nov 28, 2019
ed87591
Merging master to cp-lji (#912)
akintolga Dec 2, 2019
fcfbe76
Added translation files
Nov 27, 2019
a3569ad
Removed watermark image
Dec 2, 2019
34bd2aa
UI config for home page
Dec 4, 2019
03ac127
New logo and CSS (#919)
darconny Dec 5, 2019
582d0e3
Removed behave tests
Dec 5, 2019
1ca7425
Merge remote-tracking branch 'origin/master' into cp-lji
petrjasek Dec 5, 2019
a6d7624
update fr_CA translation
petrjasek Dec 6, 2019
ee90723
Merging master into cp-lji (#924)
akintolga Dec 9, 2019
1f83174
Updated translations
Dec 9, 2019
a093ab0
Changed the name of the button to sign up
Dec 9, 2019
1e046be
Footer static pages (#925)
darconny Dec 10, 2019
b1cb12f
Updated translation files
Dec 11, 2019
57c9160
Disabling watch lists for cp (#931)
akintolga Dec 16, 2019
82862c4
[SDCP-146] - remove category and subject filters (#983)
akintolga Feb 24, 2020
5c8ec5b
[SDCP-144] - Improvements in download formats (#992)
akintolga Feb 27, 2020
f0aa070
fix generating renditions for png images (#994)
petrjasek Feb 27, 2020
9a525d8
SDCP-97 (#996)
darconny Mar 3, 2020
3f0cb3c
SDCP-179 (#998)
darconny Mar 5, 2020
581b821
Terms page update (#1001)
darconny Mar 6, 2020
cf29938
Download option for story image (#1003)
akintolga Mar 11, 2020
9fbca7a
fix terms link on signup page (#1004)
petrjasek Mar 11, 2020
795a3e2
disable picture formatter
petrjasek Mar 11, 2020
9a908b6
New translations
Mar 12, 2020
ba055fb
New translations
Mar 12, 2020
1c2f17e
[SDCP-182] - Translated email templates (#1005)
akintolga Mar 16, 2020
989fad8
SDCP-97 (#1007)
darconny Mar 18, 2020
24d530e
Cp lji merged to master (#1008)
akintolga Mar 19, 2020
aa6930e
display byline without link (#1009)
petrjasek Mar 19, 2020
151bb8f
SDCP-147 (#1010)
darconny Mar 20, 2020
fd2c44c
add config for disabling item actions (#1013)
petrjasek Mar 20, 2020
1a387c2
Template fixes (#1015)
petrjasek Mar 20, 2020
8fb496d
implement follow story on item detail (#1012)
petrjasek Mar 20, 2020
9305154
fix title
petrjasek Mar 20, 2020
cf3a93e
SDCP-183 (#1016)
darconny Mar 23, 2020
32ad0d9
Cp lji merged (#1019)
akintolga Mar 24, 2020
0980396
[SDCP-182] - Language in the url from emails (#1020)
akintolga Mar 24, 2020
e02569a
add simple search bar to dashboard (#1017)
petrjasek Mar 24, 2020
05488de
fix print footer copyright holder
petrjasek Mar 24, 2020
ed5d830
Missing selector changes added
Mar 25, 2020
29b0fad
Fixing aspect ratio in 3-picture-text card (#1021)
darconny Mar 25, 2020
65fccce
Fix canadian french translations (#1018)
pablopunk Mar 25, 2020
b3da2d8
fix subscriber activity report error (#1023)
petrjasek Mar 25, 2020
cf10f8f
Merged from master
Mar 26, 2020
8ccb49b
Wire item image aspect ratio fix (#1024)
darconny Mar 26, 2020
1827692
update translations
petrjasek Mar 26, 2020
ff3e971
remove share action from my wire topics page (#1030)
petrjasek Apr 6, 2020
33a1c5d
Missing french translations (#1029)
pablopunk Apr 8, 2020
2a48fcb
Merge master into cp-lji (#1034)
pablopunk Apr 8, 2020
03febfd
Format dates with current locale (#1036)
pablopunk Apr 8, 2020
6411f42
compile fr_CA translations
petrjasek Apr 9, 2020
90e2d34
fix fr_CA translation
petrjasek Apr 9, 2020
59079ef
Add comment to moment.js locales (#1037)
pablopunk Apr 16, 2020
089037c
Merge remote-tracking branch 'origin/master' into cp-lji
petrjasek Apr 28, 2020
3d4eab5
fix test (#1046)
petrjasek May 4, 2020
4403fe2
Merge branch 'master' into cp-lji
MarkLark86 Jun 1, 2020
6be6129
Template changes (#1056)
akintolga Jun 10, 2020
dde84c6
[SDESK-5339] (fix): Incorrect Company id for product searches (#1057)
MarkLark86 Jun 12, 2020
e34d190
Merge remote-tracking branch 'origin/develop' into cp-lji
petrjasek Dec 15, 2021
d7b4980
fix ci
petrjasek Dec 15, 2021
6ce17bf
remove lji settings/theme
petrjasek Dec 15, 2021
8bdfc1a
remove watch lists
petrjasek Dec 15, 2021
25a1bf1
remove Procfile
petrjasek Dec 15, 2021
28fc0d9
remove custom templates
petrjasek Dec 15, 2021
397ed93
remove empty file
petrjasek Dec 16, 2021
3cb5d41
revert download_item template
petrjasek Dec 16, 2021
6d36243
delete unused templates
petrjasek Dec 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# Newsroom Changelog

## [1.15.2] 2019-10-17
### Features
- None

### Improvements
- Add ANA logo (#856)
- [SDCP-25] Allow new users to register their interests (#857)
- [SDAN-596] Pressing back button on a mobile phone when the preview is open should close the preview (#859)
- [SDAN-599] 'Time to be confirmed' feature for Agenda Items (#860)
- [SDAN-588] Use Topic instead of Events in navigation labels (#863)
- [SDAN-599] Display changes to 'Time to be confirmed' label (#864)

### Fixes
- Use default Ubuntu in Travis (#853)
- [SDAN-598] fix: Save button not being enabled when turning off topic notifications (#855)
- [SDAN-595] fix(agenda-emails) Use correct url_for method (#854)
- Updating superdesk-core version for newsroom package (#861)

## [1.15.1] 2019-09-10
### Features
- None

### Improvements
- None

### Fixes
- [SDAN-594] Previewing past or future Agenda item from email displays list not the preview (#848)
- Save Topic and Save Events 'SAVE' button was disabled while saving (#849)

## [1.15] 2019-09-09
### Features
- None

### Improvements
- [SDAN-578][SDAN-579] 'Account Manager' field in Company schema and use that in Company Expiry alerts (#832)
- [SDAN-570] Fixes/Improvements to the 'share' action (#838)
- [SDAN-591] Improve company expiry email layout and text (#841)
- [SDAN-570] Changes to 'share' item template (#842)
- [SDAN-572] Style changes to display 'Event Completed' label (#843)
- [SDAN-568] Improve responsive behaviour for mobile phones (#834)
- [SDAN-568] Further response layout improvements (#844)

### Fixes
- [SDAN-583] Preview for items that aren't wire or agenda in the Subscriber Activity report don't show the body text (#831)
- [SDAN-580] Remove company expiry check from user login and notifications (#833)
- [SDAN-587] Ignore agenda when applying time limit to search (#836)
- [SDAN-590] (fix): Celery beat and queue configs (#840)
- [SDAN-592] Coverages in the Agenda Share/Print Preview are misaligned (#845)
- [SDAN-593] Show all event coverages if no planning item selected (#847)

## [1.14] 2019-08-22
### Features
- [SDAN-538] Add the ability to execute the remove expired command (#817)

### Improvements
- [SDAN-572] Label completed agenda items as 'Completed' (#829)
- [SDAN-572][SDAN-567] UI changes in displaying 'byline', 'located' and 'slugline' (#823)
- [SDAN-565] Reposition the 'show map' text in Agenda Preview (#821)
- [SDAN-566] Add 'preview' and 'open' to 'actions' filter in subscriber activity report (#822)
- [SDAN-524][SDAN-530] Record 'open' and 'preview' actions in history collection (#815)
- [SDAN-519] Toggle map display in Agenda Preview (#811)

### Fixes
- [SDAN-585] (fix): Corrections showing up as 'Updates Coming' (#830)
- [SDAN-569] Market Place Bookmarks were not seen (#828)
- UI fix to add padding after 'published' and remove 'on created_time' in wire ite, detail (#826)
- fix creating new dashboard card when there is single dashboard type (#827)
- [SDAN-576] Prefer description_text over body_text for image captions (#825)
- [SDAN-575] Internal note on coverages is visible for public users in Newsroom (#824)
- [SDAN-548] ednote from wire item was not displayed in Agenda coverage. (#818)
- [SDAN-549] Text from wire items were not updating in Agenda preview (#818)
- [SDAN-531] Push errors when event is created from a planning item (#814)
- [SDAN-516] Show agency logos for AAPX (#816)
- [SDAN-535] Add 'located' attribute as 'Location' when a wire item is copied (#813)

## [1.13.1] 2019-07-18
- [SDAN-532] Fetch card external item details after loading the page (#812)

## [1.13] 2019-07-16
- [SDAN-529] Fix incorrect coverage scheduled date in Agenda notification email
- [SDAN-514] Changes to Watched Agenda Emails (#808)
Expand Down
2 changes: 1 addition & 1 deletion assets/cards/components/CardsApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CardsApp extends React.Component {
onNewItem={this.props.newCard}
setQuery={this.props.setQuery}
fetch={this.props.fetchCards}
buttonName={gettext('Card')}
buttonText={gettext('New Card')}
>
<DashboardSwitch
dashboards={this.props.dashboards}
Expand Down
2 changes: 1 addition & 1 deletion assets/companies/components/CompaniesApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CompaniesApp extends React.Component {
onNewItem={this.props.newCompany}
setQuery={this.props.setQuery}
fetch={this.props.fetchCompanies}
buttonName={gettext('Company')}
buttonText={gettext('New Company')}
/>,
<Companies key="Companies" />
]
Expand Down
16 changes: 9 additions & 7 deletions assets/components/ListBar.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {gettext} from 'utils';
import SearchBar from 'search/components/SearchBar';

class ListBar extends React.Component {
Expand All @@ -16,11 +15,14 @@ class ListBar extends React.Component {
/>
)}
<div className="content-bar__right">
{this.props.onNewItem && <button
className="btn btn-outline-secondary btn-responsive"
onClick={() => this.props.onNewItem()}>
{gettext('New {{ buttonName }}', {buttonName: this.props.buttonName})}
</button>}
{this.props.onNewItem && (
<button
className="btn btn-outline-secondary btn-responsive"
onClick={() => this.props.onNewItem()}
>
{this.props.buttonText}
</button>
)}
</div>
</nav>
</section>
Expand All @@ -31,7 +33,7 @@ class ListBar extends React.Component {
ListBar.propTypes = {
setQuery: PropTypes.func,
fetch: PropTypes.func,
buttonName: PropTypes.string,
buttonText: PropTypes.string,
onNewItem: PropTypes.func,
children: PropTypes.node,
noSearch: PropTypes.bool,
Expand Down
10 changes: 4 additions & 6 deletions assets/components/PreviewActionButtons.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import ActionButton from './ActionButton';
import types from 'wire/types';


function PreviewActionButtons({item, user, actions, plan, group}) {
Expand All @@ -25,12 +26,9 @@ function PreviewActionButtons({item, user, actions, plan, group}) {
}

PreviewActionButtons.propTypes = {
item: PropTypes.object,
user: PropTypes.string,
actions: PropTypes.arrayOf(PropTypes.shape({
name: PropTypes.string,
action: PropTypes.func,
})),
item: types.item,
user: types.user,
actions: types.actions,
plan: PropTypes.string,
group: PropTypes.string,
};
Expand Down
3 changes: 2 additions & 1 deletion assets/components/SelectInput.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import {gettext} from 'utils';

const SelectInput = ({
name,
Expand All @@ -26,7 +27,7 @@ const SelectInput = ({
<option value="">{defaultOption}</option>
}
{options.map((option) => {
return <option key={option.value} value={option.value}>{option.text}</option>;
return <option key={option.value} value={option.value}>{gettext(option.text)}</option>;
})}
</select>
{error && <div className="alert alert-danger">{error}</div>}
Expand Down
6 changes: 5 additions & 1 deletion assets/components/cards/render/LargePictureTextCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const getPictureTextPanel = (item, picture, openItem, cardId, listConfig) => {

return (<div key={item._id} className="col-sm-6 col-lg-4 d-flex mb-4">
<div className="card card--home" onClick={() => openItem(item, cardId)}>
<img className="card-img-top" src={imageUrl} alt={caption} />
{rendition &&
<div className="card-img-top-wrapper card-img-top-wrapper--aspect-16-9">
<img className="card-img-top" src={imageUrl} alt={caption} />
</div>
}
<CardBody item={item} displaySource={false} />
<CardFooter
wordCount={wordCount(item)}
Expand Down
6 changes: 4 additions & 2 deletions assets/components/cards/render/PictureTextCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ const getPictureTextPanel = (item, picture, openItem, withPictures, cardId, list
const imageUrl = rendition && rendition.href;
const caption = rendition && getCaption(picture);

return (<div key={item._id} className="col-sm-6 col-lg-3 d-flex mb-4">
return (<div key={item._id} className="col-sm-6 col-lg-4 col-xl-3 d-flex mb-4">
<div className="card card--home" onClick={() => openItem(item, cardId)}>
{rendition &&
<img className="card-img-top" src={imageUrl} alt={caption} />
<div className="card-img-top-wrapper card-img-top-wrapper--aspect-16-9">
<img className="card-img-top" src={imageUrl} alt={caption} />
</div>
}
<CardBody item={item} displayMeta={false} />
<CardFooter
Expand Down
3 changes: 3 additions & 0 deletions assets/home/actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import server from '../server';
import {errorHandler, recordAction} from 'utils';
import {pushNotification as wirePushNotification} from 'wire/actions';
import {get} from 'lodash';

export const INIT_DATA = 'INIT_DATA';
Expand Down Expand Up @@ -46,6 +47,8 @@ export function pushNotification(push) {
() => window.location.reload(),
1000
);
} else {
return wirePushNotification(push);
}
};
}
36 changes: 22 additions & 14 deletions assets/home/components/HomeApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import DownloadItemsModal from 'wire/components/DownloadItemsModal';
import WirePreview from 'wire/components/WirePreview';
import {followStory} from 'search/actions';
import {downloadVideo} from 'wire/actions';
import {SearchBar} from './search-bar';
import {previewConfigSelector, listConfigSelector, detailsConfigSelector} from 'ui/selectors';

const modals = {
Expand Down Expand Up @@ -111,21 +112,25 @@ class HomeApp extends React.Component {

renderContent(children) {
return (
<section className="content-main d-block py-4 px-2 p-md-3 p-lg-4"
onScroll={this.onHomeScroll}
ref={(elem) => this.elem = elem}
>
<div className="container-fluid">
{this.props.cards.length > 0 &&
this.props.cards.filter((c) => c.dashboard === 'newsroom').map((card) => this.getPanels(card))}
{this.props.cards.length === 0 &&
<div className="alert alert-warning" role="alert">
<strong>{gettext('Warning')}!</strong> {gettext('There\'s no card defined for home page!')}
<React.Fragment>
<SearchBar />

<section className="content-main d-block py-4 px-2 p-md-3 p-lg-4"
onScroll={this.onHomeScroll}
ref={(elem) => this.elem = elem}
>
<div className="container-fluid">
{this.props.cards.length > 0 &&
this.props.cards.filter((c) => c.dashboard === 'newsroom').map((card) => this.getPanels(card))}
{this.props.cards.length === 0 &&
<div className="alert alert-warning" role="alert">
<strong>{gettext('Warning')}!</strong> {gettext('There\'s no card defined for home page!')}
</div>
}
</div>
}
</div>
{children}
</section>
{children}
</section>
</React.Fragment>
);
}

Expand All @@ -136,8 +141,10 @@ class HomeApp extends React.Component {
(this.props.itemToOpen ? [<ItemDetails key="itemDetails"
item={this.props.itemToOpen}
user={this.props.user}
topics={this.props.topics}
actions={this.filterActions(this.props.itemToOpen, this.props.previewConfig)}
onClose={() => this.props.actions.filter(a => a.id === 'open')[0].action(null)}
followStory={this.props.followStory}
detailsConfig={this.props.detailsConfig}
/>, modal] :
this.renderContent()
Expand Down Expand Up @@ -200,6 +207,7 @@ HomeApp.propTypes = {
detailsConfig: PropTypes.object,
downloadVideo: PropTypes.func,
topics: PropTypes.array,
isFollowing: PropTypes.bool,
};

const mapStateToProps = (state) => ({
Expand Down
35 changes: 35 additions & 0 deletions assets/home/components/search-bar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import {gettext} from 'utils';

export class SearchBar extends React.PureComponent {
render() {
return (
<section className="content-header">
<nav className="content-bar navbar justify-content-start flex-nowrap flex-sm-wrap">
<div className="search form-inline">
<span className="search__icon d-none d-sm-block">
<i className="icon--search icon--gray-light" />
</span>
<div className="search__form input-group searchForm--active">
<form className="form-inline" action="/wire">
<input type="text" name="q" className="search__input form-control"
placeholder={gettext('Search for...')}
aria-label={gettext('Search for...')} />
<div className="search__form__buttons">
<button type="reset" className="icon-button search__clear" title={gettext('Clear')}>
<span className="search__clear">
<img src="/static/search_clear.png" width="16" height="16"/>
</span>
</button>
<button className="btn btn-outline-secondary" type="submit" title={gettext('Search')}>
{gettext('Search')}
</button>
</div>
</form>
</div>
</div>
</nav>
</section>
);
}
}
12 changes: 8 additions & 4 deletions assets/home/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ import {
import {BOOKMARK_ITEMS, REMOVE_BOOKMARK} from '../wire/actions';
import {CLOSE_MODAL, MODAL_FORM_VALID, RENDER_MODAL} from '../actions';
import {modalReducer} from '../reducers';
import {topicsReducer} from '../topics/reducer';

const initialState = {
cards: [],
itemsByCard: {},
topics: [],
products: [],
itemsByCard: {},
activeCard: null,
uiConfig: {},
};

export default function homeReducer(state = initialState, action) {
export default function homeReducer(state=initialState, action) {

switch (action.type) {

case INIT_DATA:
Expand All @@ -31,8 +34,9 @@ export default function homeReducer(state = initialState, action) {
company: action.data.company,
formats: action.data.formats || [],
userSections: action.data.userSections,
context: 'wire',
uiConfig: action.data.ui_config || {},
topics: action.data.topics || [],
context: 'wire'
};

case OPEN_ITEM:{
Expand Down Expand Up @@ -84,6 +88,6 @@ export default function homeReducer(state = initialState, action) {
return {...state, modal: modalReducer(state.modal, action)};

default:
return state;
return {...state, topics: topicsReducer(state.topics, action)};
}
}
6 changes: 2 additions & 4 deletions assets/item-actions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {gettext} from './utils';

import {gettext, isActionEnabled} from './utils';

export function getItemActions(dispatch, actions) {
const {
Expand All @@ -13,7 +12,6 @@ export function getItemActions(dispatch, actions) {
removeItems,
} = actions;


return [
{
id: 'open',
Expand Down Expand Up @@ -81,5 +79,5 @@ export function getItemActions(dispatch, actions) {
when: (state) => state.user && state.userType === 'administrator',
action: (items) => removeItems(items),
}
];
].filter(isActionEnabled('item_actions'));
}
Loading