Skip to content

Commit

Permalink
BO: Fix translation page layout with new ui kit
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebiloe committed Sep 8, 2017
1 parent ea348ec commit 543a651
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<div v-if="isReady" id="app" class="translations-app">
<TranslationsHeader />
<div class="container-fluid">
<div class="row">
<div class="translations-summary float-xs-right">
<div class="row justify-content-between align-items-center">
<Search @search="onSearch" />
<div class="translations-summary">
<span>{{ totalTranslations }}</span>
<span v-show="totalMissingTranslations"> - <span class="missing">{{ totalMissingTranslationsString }}</span></span>
</div>
<Search @search="onSearch" />
</div>

<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@
* International Registered Trademark & Property of PrestaShop SA
*-->
<template>
<div id="search" class="col-md-8 mb-2">
<div id="search" class="col-md-8 mb-4">
<form class="search-form" @submit.prevent>
<label>{{trans('search_label')}}</label>
<div class="search-group">
<div class="input-group">
<PSTags ref="psTags" :tags="tags" @tagChange="onSearch" :placeholder="trans('search_placeholder')" />
<button type="button" class="btn btn-primary search-button" @click="onClick">
<i class="material-icons">search</i>
{{trans('button_search')}}
</button>
<div class="input-group-btn">
<button type="button" class="btn btn-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">search</i>
{{trans('button_search')}}
</button>
</div>
</div>
</form>
</div>
Expand Down Expand Up @@ -66,31 +68,3 @@
},
};
</script>
<style lang="sass?outputStyle=expanded">
@import "../../../../../../scss/config/_settings.scss";
#search {
.search-input {
box-shadow: none;
border: $gray-light 1px solid;
background-color: white;
min-height: 35px;
outline: none;
border-radius: 0;
overflow: hidden;
float: left;
width: 70%;
}
}
.search-form {
.search-group {
overflow: hidden;
}
.search-button {
float: left;
border-radius: 0;
height:35px;
position: absolute;
bottom: 0;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
top: 40px;
background: white;
width: 100%;
z-index: 2;
z-index: 3;
border-bottom: 1px solid $gray-light;
height: 128px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,39 @@
*-->
<template>
<transition name="fade">
<div class="col-xs-9 card" v-if="principalReady">
<div class="pa-1 row translations-wrapper">
<div class="col-sm-9 card" v-if="principalReady">
<div class="p-3 translations-wrapper">
<PSAlert v-if="noResult" alertType="ALERT_TYPE_WARNING" :hasClose="false">
{{noResultInfo}}
</PSAlert>
<div class="translations-catalog" v-else>
<div class="translations-catalog row p-0" v-else>
<PSAlert v-if="searchActive" alertType="ALERT_TYPE_INFO" :hasClose="false">
{{searchInfo}}
</PSAlert>
<div class="col-xs-8 pt-1" >
<h1 class="domain-info">
<div class="col-sm-8 pt-3">
<h3 class="domain-info">
<span>{{ currentDomain }}</span>
<span>{{ currentDomainTotalTranslations }}</span>
<span v-show="currentDomainTotalMissingTranslations"> - <span class="missing">{{ currentDomainTotalMissingTranslationsString }}</span></span>
</h1>
</h3>
</div>
<div class="col-xs-4">
<div class="col-sm-4">
<PSPagination
:currentIndex="currentPagination"
:pagesCount="pagesCount"
class="float-xs-right"
class="float-sm-right"
@pageChanged="onPageChanged"
/>
</div>
<form class="col-xs-12"
<form class="col-sm-12"
method="post"
:action="saveAction"
:isEdited="isEdited"
@submit.prevent="saveTranslations"
>
<div class="row">
<div class="col-xs-12 mb-2">
<PSButton :primary="true" type="submit" class="float-xs-right">
<div class="col-sm-12 mb-2">
<PSButton :primary="true" type="submit" class="float-sm-right">
{{ trans('button_save') }}
</PSButton>
</div>
Expand All @@ -72,11 +72,16 @@
@editedAction="isEdited"
>
</TranslationInput>
<PSButton :primary="true" type="submit" class="float-xs-right mt-3">
{{ trans('button_save') }}
</PSButton>

<div class="row">
<div class="col-sm-12">
<PSButton :primary="true" type="submit" class="float-sm-right mt-3">
{{ trans('button_save') }}
</PSButton>
</div>
</div>
</form>
<div class="col-xs-12">
<div class="col-sm-12">
<PSPagination
:currentIndex="currentPagination"
:pagesCount="pagesCount"
Expand Down Expand Up @@ -268,9 +273,6 @@
<style lang="sass" scoped>
@import "../../../../../../scss/config/_settings.scss";
.domain-info {
font-size: 1rem;
}
.fade-enter-active, .fade-leave-active {
transition: opacity .5s
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<div class="form-group">
<label>{{label}}</label>
<textarea class="form-control" rows="2" v-model="getTranslated" :class="{ missing : isMissing }"></textarea>
<PSButton class="mt-1 float-xs-right" :primary="false" ghost @click="resetTranslation">
<PSButton class="mt-3 float-sm-right" :primary="false" ghost @click="resetTranslation">
{{ trans('button_reset') }}
</PSButton>
<small class="mt-1">{{extraInfo}}</small>
<small class="mt-3">{{extraInfo}}</small>
</div>
</template>

Expand Down Expand Up @@ -90,6 +90,9 @@
<style lang="sass" scoped>
@import "../../../../../../scss/config/_settings.scss";
.form-group {
overflow: hidden;
}
.missing {
border: 1px solid $danger;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* International Registered Trademark & Property of PrestaShop SA
*-->
<template>
<div class="col-xs-3">
<div class="card pa-1">
<div class="col-sm-3">
<div class="card p-3">
<PSTree
ref="domainTree"
:model="domainsTree"
Expand Down
4 changes: 0 additions & 4 deletions admin-dev/themes/new-theme/js/app/widgets/ps-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@

<style lang="sass" scoped>
@import "../../../scss/config/_settings.scss";
.btn {
border-radius:0;
min-height: 34px;
}
.btn-secondary {
background-color: $gray-medium;
border: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA
*-->
<template>
<nav class="float-xs-right mt-1" v-if="displayPagination">
<nav class="float-sm-right mt-1" v-if="displayPagination">
<ul class="pagination" :class="{'multi':isMultiPagination}">
<li v-if="isMultiPagination" class="page-item">
<button v-show="activeLeftArrow" class="float-left page-link" @click="prev($event)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
</div>
<PSCheckbox :ref="model.name" :id="id" :model="model" @checked="onCheck" v-if="hasCheckbox"/>
<span class="tree-label" :class="{warning: isWarning}">{{model.name}}</span>
<span class="tree-extra-label hidden-lg-down" v-if="displayExtraLabel">{{getExtraLabel}}</span>
<span class="tree-extra-label-mini hidden-xl-up" v-if="displayExtraLabel">{{this.model.extraLabel}}</span>
<span class="tree-extra-label d-sm-none d-xl-inline-block" v-if="displayExtraLabel">{{getExtraLabel}}</span>
<span class="tree-extra-label-mini d-xl-none" v-if="displayExtraLabel">{{this.model.extraLabel}}</span>
</div>
<ul v-show="open" v-if="isFolder" class="tree">
<li v-for="(element, index) in model.children" class="tree-item" :class="{disable: model.disable}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*-->
<template>
<div>
<div class="mb-1 tree-header">
<div class="mb-3 tree-header">
<span class="text-uppercase pointer" @click="expand">
<i class="material-icons">keyboard_arrow_down</i>
<strong v-if="translations">{{translations.expand}}</strong>
Expand Down
2 changes: 1 addition & 1 deletion admin-dev/themes/new-theme/scss/config/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $size-header-toolbar-height: 6.25rem;

$grid-gutter-width: 1.875rem !default;

$border-radius: .25rem !default;
$border-radius: 0;

//UI Kit variables - to be removed
$gray-soft: #FAFBFC;
Expand Down

0 comments on commit 543a651

Please sign in to comment.