diff --git a/webapp/src/main/resources/properties/de.properties b/webapp/src/main/resources/properties/de.properties index c8df8f041c..c1ac8947b4 100644 --- a/webapp/src/main/resources/properties/de.properties +++ b/webapp/src/main/resources/properties/de.properties @@ -216,6 +216,13 @@ search.result.empty=Es gibt keine Ergebnisse. Aktualisieren Sie Ihre Parametersu # Message displayed when the user has not selected repository and locales search.result.selectRepoAndLocale=Wählen Sie mindestens ein Speicher und Locale aus bevor Sie suchen können. +search.viewMode.title=Ansichtsmodus: {mode} + +search.viewMode.FULL=Voll +search.viewMode.REDUCED=Reduziert +search.viewMode.STANDARD=Standard +search.viewMode.COMPACT=Kompakt + # Label used in the header loggedInUser dropdown to show user's profile header.loggedInUser.profile=Mein Profil @@ -336,6 +343,9 @@ textUnit.saveVirtualAssetTextUnit.failed=Couldn't not set translate attribute, c # Confirmation message textUnit.cancel.confirmation=Sind Sie sicher, dass Sie die Bearbeitung abbrechen möchten? Sie werden ihre Änderungen verlieren. +textUnit.tag.repo=repo +textUnit.tag.asset=asset + # Label displayed on the repositories dropdown in the workbench search.repository.btn.text={numberOfSelectedRepositories, plural, =0{Repositories} =1{1 repository} other{# repositories}} diff --git a/webapp/src/main/resources/properties/en.properties b/webapp/src/main/resources/properties/en.properties index eb915a9693..85bde621a8 100644 --- a/webapp/src/main/resources/properties/en.properties +++ b/webapp/src/main/resources/properties/en.properties @@ -225,6 +225,13 @@ search.result.empty=There are no results. Update your search parameter to find w # Message displayed when the user has not selected repository and locales search.result.selectRepoAndLocale=Select at least one repository and locale before you can search. +search.viewMode.title=View mode: {mode} + +search.viewMode.FULL=Full +search.viewMode.REDUCED=Reduced +search.viewMode.STANDARD=Standard +search.viewMode.COMPACT=Compact + # Label used in the header loggedInUser dropdown to show user's profile header.loggedInUser.profile=My Profile @@ -362,6 +369,9 @@ textUnit.saveVirtualAssetTextUnit.failed=Couldn't not set translate attribute, c # Confirmation message textUnit.cancel.confirmation=Are you sure you want to cancel editing? You will lose the changes you've made. +textUnit.tag.repo=repo +textUnit.tag.asset=asset + # Label displayed on the repositories dropdown in the workbench search.repository.btn.text={numberOfSelectedRepositories, plural, =0{Repositories} =1{1 repository} other{# repositories}} diff --git a/webapp/src/main/resources/public/js/actions/workbench/ViewModeActions.js b/webapp/src/main/resources/public/js/actions/workbench/ViewModeActions.js new file mode 100644 index 0000000000..390afff024 --- /dev/null +++ b/webapp/src/main/resources/public/js/actions/workbench/ViewModeActions.js @@ -0,0 +1,12 @@ +import alt from "../../alt"; + +class ViewModeActions { + + constructor() { + this.generateActions( + "changeViewMode", + ); + } +} + +export default alt.createActions(ViewModeActions); diff --git a/webapp/src/main/resources/public/js/components/workbench/SearchResults.js b/webapp/src/main/resources/public/js/components/workbench/SearchResults.js index f9624245c6..eb909323b0 100644 --- a/webapp/src/main/resources/public/js/components/workbench/SearchResults.js +++ b/webapp/src/main/resources/public/js/components/workbench/SearchResults.js @@ -18,6 +18,10 @@ import TextUnitSelectorCheckBox from "./TextUnitSelectorCheckBox"; import WorkbenchActions from "../../actions/workbench/WorkbenchActions"; import ReviewTextUnitsDTO from "../../stores/workbench/ReviewTextUnitsDTO"; import TextUnitSDK from "../../sdk/TextUnit"; +import AltContainer from "alt-container"; +import ViewModeStore from "../../stores/workbench/ViewModeStore"; +import ViewModeDropdown from "./ViewModeDropdown"; +import ViewModeActions from "../../actions/workbench/ViewModeActions"; let SearchResults = createReactClass({ displayName: 'SearchResults', @@ -513,14 +517,16 @@ let SearchResults = createReactClass({ createTextUnitComponent(textUnit, arrayIndex) { return ( - + + + ); }, @@ -584,12 +590,16 @@ let SearchResults = createReactClass({ -
+
+ + ViewModeActions.changeViewMode(mode)}/> + + -