Skip to content

Commit

Permalink
Always show the asset path (#998)
Browse files Browse the repository at this point in the history
  • Loading branch information
mensinda authored Mar 1, 2024
1 parent a8edcfe commit 2c80f5a
Show file tree
Hide file tree
Showing 10 changed files with 308 additions and 65 deletions.
10 changes: 10 additions & 0 deletions webapp/src/main/resources/properties/de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}}

Expand Down
10 changes: 10 additions & 0 deletions webapp/src/main/resources/properties/en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import alt from "../../alt";

class ViewModeActions {

constructor() {
this.generateActions(
"changeViewMode",
);
}
}

export default alt.createActions(ViewModeActions);
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -513,14 +517,16 @@ let SearchResults = createReactClass({
createTextUnitComponent(textUnit, arrayIndex) {

return (
<TextUnit key={this.getTextUnitComponentKey(textUnit)}
textUnit={textUnit} textUnitIndex={arrayIndex}
translation={textUnit.getTarget()}
isActive={arrayIndex === this.state.activeTextUnitIndex}
isSelected={this.isTextUnitSelected(textUnit)}
onEditModeSetToTrue={this.onTextUnitEditModeSetToTrue}
onEditModeSetToFalse={this.onTextUnitEditModeSetToFalse}
/>
<AltContainer key={this.getTextUnitComponentKey(textUnit)} stores={{"viewMode": ViewModeStore}}>
<TextUnit
textUnit={textUnit} textUnitIndex={arrayIndex}
translation={textUnit.getTarget()}
isActive={arrayIndex === this.state.activeTextUnitIndex}
isSelected={this.isTextUnitSelected(textUnit)}
onEditModeSetToTrue={this.onTextUnitEditModeSetToTrue}
onEditModeSetToFalse={this.onTextUnitEditModeSetToFalse}
/>
</AltContainer>
);
},

Expand Down Expand Up @@ -584,12 +590,16 @@ let SearchResults = createReactClass({
</DropdownButton>
</ButtonToolbar>
</div>
<div className="pull-right">
<div className="pull-right" style={{display: "flex", alignItems: "center", "gap": "15px"}}>
<AltContainer store={ViewModeStore}>
<ViewModeDropdown onModeSelected={(mode) => ViewModeActions.changeViewMode(mode)}/>
</AltContainer>

<TextUnitSelectorCheckBox numberOfSelectedTextUnits={numberOfSelectedTextUnits}/>
<Button bsSize="small" disabled={previousPageButtonDisabled}
onClick={this.onFetchPreviousPageClicked}><span
className="glyphicon glyphicon-chevron-left"></span></Button>
<label className="mls mrs default-label current-pageNumber">
<label className="default-label current-pageNumber">
{this.displayCurrentPageNumber()}
</label>
<Button bsSize="small" disabled={nextPageButtonDisabled}
Expand Down
Loading

0 comments on commit 2c80f5a

Please sign in to comment.