Added hook to change the titles of the pages

This commit is contained in:
weryques 2018-01-29 16:29:28 -02:00
parent 9813723077
commit 6a7d540a2c
5 changed files with 33 additions and 13 deletions

View File

@ -26,7 +26,7 @@ fi
new_md5_package=$(<last-package-build.md5)
if [ "$current_md5_package" != "$new_md5_package" ]
then
## Install composer dependencies
## Install js dependencies
npm install
fi

View File

@ -4,7 +4,8 @@
ref="multipleTable"
:data="collections"
style="width: 100%"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"
stripe>
<el-table-column type="selection" width="30">
</el-table-column>
<el-table-column width="55">
@ -12,15 +13,15 @@
<img class="table-thumb" :src="`${scope.row.featured_image}`"/>
</template>
</el-table-column>
<el-table-column label="Nome" show-overflow-tooltip>
<el-table-column label="Nome" sortable prop="{{ scope.row.name }}" show-overflow-tooltip>
<template slot-scope="scope"><router-link :to="`/collections/${scope.row.id}`" tag="a">{{ scope.row.name }}</router-link></template>
</el-table-column>
<el-table-column property="description" label="Descrição" show-overflow-tooltip>
</el-table-column>
<el-table-column label="Ações" width="100">
<el-table-column label="Ações" width="120">
<template slot-scope="scope">
<el-button size="small" type="text" @click.native="shareCollection(scope.row.id)"><i class="material-icons">share</i></el-button>
<el-button size="small" type="text" @click.native="showMoreCollection(scope.row.id)"><i class="material-icons">more_vert</i></el-button>
<el-button size="small" type="text" @click.native="shareCollection(scope.row.id)"><i class="material-icons md-18">share</i></el-button>
<el-button size="small" type="text" @click.native="showMoreCollection(scope.row.id)"><i class="material-icons md-18">more_vert</i></el-button>
</template>
</el-table-column>
</el-table>

View File

@ -7,6 +7,11 @@ import AdminPage from '../admin.vue'
import store from '../../js/store/store'
import router from './router'
router.beforeEach((to, from, next) => {
document.title = to.meta.title
next()
});
//------------------------------------------------
// FROM DEV

View File

@ -11,14 +11,14 @@ import ItemsList from '../components/items-list.vue'
Vue.use(VueRouter);
const routes = [
{ path: '/', component: CollectionsList },
{ path: '/collections', component: CollectionsList },
{ path: '/', component: CollectionsList, meta: {title: 'Admin Page'} },
{ path: '/collections', component: CollectionsList, meta: {title: 'Collections List'} },
{ path: '/collections/:id', component: CollectionPage, children: [
{ path: 'items-list', component: ItemsList }
]
{ path: 'items-list', component: ItemsList, meta: {title: 'Items List'} }
],
meta: { title: 'Collection Page' }
},
{ path: '/collections/:id/items/create', component: ItemCreationPage },
{ path: '/collections/:id/items/create', component: ItemCreationPage, meta: {title: 'Create Item'} },
{ path: '*', redirect: '/'}
]

View File

@ -30,4 +30,18 @@ body.tainacan-admin-page #adminmenumain {
width: 100%;
z-index: 999999;
overflow-y: auto;
}
}
/* Rules for sizing the icon. */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
/* Rules for using icons as black on a light background. */
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
/* Rules for using icons as white on a dark background. */
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }