Skip to content
Snippets Groups Projects
Commit 81f7588c authored by Eugen Ciur's avatar Eugen Ciur
Browse files

minor refactoring

parent c6470fbc
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,37 @@ import Component from '@glimmer/component';
export default class DualLinkToComponent extends Component {
/*
Like LinkTo component, but for dual panel mode
Arguments:
@node - main node, which is visually located on left panel
@extranode - extra node, visually on right panel
@hint = can be either "left" "right". Indicates in which panel
is current <DualLinkTo /> located at this very moment.
URL has one of following forms:
Single panel modes:
/nodes/<node_id> - opens commander single panel model, with <node_id>
root folder/node
/documents/<node_id> - opens viewer in single panel mode, with <node_id>
as current document/node
Dual panel models:
/nodes/<node_id>?extranode_id=<extranode_id> - opens dual panel mode. On left side
commander is opened with <node_id> as root folder/node. On right panel
there will be opened a commander or a viewer, depending on what node type is
<extranode_id>.
/documents/<node_id>?extranode_id=<extranode_id> - opens dual panel mode. On left side
document viewer is opened with <node_id> as root document/node. On right panel
there will be opened a commander or a viewer, depending on what node type is
<extranode_id>.
*/
get route() {
let node,
......@@ -9,6 +40,7 @@ export default class DualLinkToComponent extends Component {
hint = this.args.hint;
node = this.args.node;
if (hint == 'left') {
if (node && node.get('nodeType') === 'document') {
return 'authenticated.document';
......
File moved
File moved
<div>
<button
class="btn btn-success"
type="button">
<i class="fa fa-upload mr-1"></i>
Upload
</button>
</div>
\ No newline at end of file
<div class="panel viewer col m-2 p-2">
<Breadcrumb
<div class="d-flex justify-content-between">
<Viewer::ActionButtons />
</div>
<Breadcrumb
@node={{@model.document_version.document}}
@extranode={{@extranode}}
@hint="left" />
<div class="d-flex">
<Viewer::Thumbnails @pages={{@model.pages}} />
<Viewer::Pages @pages={{@model.pages}} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment