mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Sync with latest development (#141)
* Update index.html * Update features.md * Update header.md * Update header.md * Update header.md * Add files via upload * Update header.md * Update header.md * Add files via upload * Update header.md * Add files via upload * Add files via upload * Update header.md * Add files via upload * Delete sid-nav.png * Add files via upload * Update side-nav.md * Add files via upload * Update side-nav.md * Update side-nav.md * Update doc-list.md * Add files via upload * Update doc-list.md * Update doc-list.md * Delete doclist.png * Add files via upload * small changes to docs * [ACA-1038] 'Load more' doesn't work correctly on destination picker (#135) made sure that a search is performed only if there is a search string to search for * [ACA-951] Color theme and logo (#138) - documented customization of the logo and header background color * [ACA-803] Navigation docs (#140) * navigation docs * spelling
This commit is contained in:
parent
94ec91a787
commit
f0a7bf3a75
@ -80,7 +80,6 @@ The default logo displayed in the top left corner of the Alfresco Content Applic
|
||||
### Header Background color
|
||||
|
||||
You can change the header background color by specifying color code for the "headerColor" key:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
|
BIN
docs/images/navigation-01.png
Normal file
BIN
docs/images/navigation-01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
docs/images/navigation-02.png
Normal file
BIN
docs/images/navigation-02.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
docs/images/navigation-03.png
Normal file
BIN
docs/images/navigation-03.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
@ -71,6 +71,10 @@
|
||||
{
|
||||
title: 'Configuration',
|
||||
path: 'configuration'
|
||||
},
|
||||
{
|
||||
title: 'Navigation',
|
||||
path: 'navigation'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
166
docs/navigation.md
Normal file
166
docs/navigation.md
Normal file
@ -0,0 +1,166 @@
|
||||
# Navigation
|
||||
|
||||
The Alfresco Content Application provides the following navigation links:
|
||||
|
||||
- Personal Files
|
||||
- File Libraries
|
||||
- Shared
|
||||
- Recent Files
|
||||
- Favorites
|
||||
- Trash
|
||||
|
||||
The side navigation provides support to customize the appearance of the links by editing the `app.config.json`.
|
||||
|
||||
## Customization
|
||||
|
||||
Navigation configuration supports array and object like schema. Defining an object helps navigation to render visual delimiters between different groups of links.
|
||||
|
||||
```json
|
||||
{
|
||||
"navigation": {
|
||||
"main": [
|
||||
...
|
||||
],
|
||||
"secondary": [
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
```json
|
||||
{
|
||||
"navigation": [
|
||||
{ ... },
|
||||
{ ... },
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Customize icons and text
|
||||
|
||||
`icon` - supported value can be anything from [Material Design](https://material.io/icons) icons library. If not defined, the link will render just the label value.
|
||||
|
||||
`title` - instructs the link to render a native browser tooltip with the given value. It can be a string or a i18n defined reference. If not defined, the link will not show a tooltip.
|
||||
|
||||
`label` - represents the visual name of the link. It can be a string or a i18n defined reference.
|
||||
|
||||
<p class="danger">
|
||||
Changing ` "route": { "url": "/..." } ` value will affect the navigation since these are mapped to application routing system.
|
||||
</p>
|
||||
|
||||
### Custom text (i18n)
|
||||
|
||||
To change the `title` and `label` of navigation links edit the values under `BROWSE` entry found at `/src/assets/i18n/en.json`
|
||||
|
||||
```json
|
||||
"APP" : {
|
||||
...
|
||||
BROWSE: {
|
||||
"PERSONAL": {
|
||||
"TITLE": "Personal Files",
|
||||
"SIDENAV_LINK": {
|
||||
"LABEL": "Personal Files",
|
||||
"TOOLTIP": "View your Personal Files"
|
||||
}
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For more information about internationalization see [Internationalization (i18n)](/i18n) section.
|
||||
|
||||
## User-defined navigation
|
||||
|
||||
To add custom navigation link for the application, first we need to create a component.
|
||||
|
||||
```src/app/components/custom-page/custom-page.component.ts```
|
||||
|
||||
```javascript
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<h4>{{ title }}</h4>
|
||||
`
|
||||
})
|
||||
export class CustomPage {
|
||||
title = 'My Custom Page'
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Register the component in ```app.module.ts```
|
||||
|
||||
```javascript
|
||||
|
||||
...
|
||||
import { CustomPage } from './components/custom-page/custom-page.component';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
declarations: [
|
||||
...,
|
||||
CustomPage
|
||||
]
|
||||
...
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
In the `app.config.json` define a link entry which will point to the custom page
|
||||
|
||||
```json
|
||||
|
||||
{
|
||||
...,
|
||||
"navigation": [
|
||||
"main": [ ... ],
|
||||
"secondary: [ ... ],
|
||||
"custom": [
|
||||
{
|
||||
"icon": "work",
|
||||
"label": "Link",
|
||||
"title": "My custome link",
|
||||
"route": {
|
||||
"url": "/custom-route"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Map the `/custom-route` in `app.routes.ts` as a child of `LayoutComponent` definition.
|
||||
|
||||
```json
|
||||
|
||||
import { CustomPage } from './components/custom-page/custom-page.component.ts';
|
||||
|
||||
...
|
||||
{
|
||||
path: '',
|
||||
component: LayoutComponent,
|
||||
children: [
|
||||
...,
|
||||
{
|
||||
path: 'custom-route',
|
||||
component: CustomPage
|
||||
}
|
||||
]
|
||||
}
|
||||
...,
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more information about the content of a custom page see [Document List Layout](/doc-list) section.
|
Loading…
x
Reference in New Issue
Block a user