Page 1 of 1

Document Navigation/Views

Posted: Tue Jun 04, 2019 8:35 am
by sam.jenkins
Hi All,

I'm trialing Mayan for hosting project documents for a number of teams in our office.

I'd like to give general (non-technical) users an easy to use interface to browse and find documents. Ideally i'd like a tree view, so either Cabinets or Indexes but neither have the option to search or filter.

Has anyone had any experience implementing Mayan in this kind of environment? Did you just use the APIs to create your own custom front end?


Re: Document Navigation/Views

Posted: Wed Jun 05, 2019 1:01 pm
by Krzysztof

I've made some modifications in the Cabinets view that may interest you:
  • added the 'Search' jsTree plugin
  • more space for the folder tree on a screen
  • the description of the tree changed to 'Filing Structure'

Code: Select all

{% extends 'appearance/base.html' %}

{% load i18n %}
{% load static %}

{% load navigation_tags %}

{% block title %}{% include 'appearance/calculate_form_title.html' with non_html_title=True %}{% endblock %}

{% block stylesheets %}
    <link rel="stylesheet" href="{% static 'cabinets/packages/jstree/dist/themes/default/style.min.css' %}" />
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-4">
            <h4>{% trans 'Filing Structure:' %}</h4>
            <input class="search-input form-control">
            <div class="jstree"></div>

        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-8">
            {% if list_as_items %}
                {% include 'appearance/generic_list_items_subtemplate.html' %}
            {% else %}
                {% include 'appearance/generic_list_subtemplate.html' %}
            {% endif %}
{% endblock %}

{% block javascript %}
        $.getScript( "{% static 'cabinets/packages/jstree/dist/jstree.min.js' %}" )
            .done(function( script, textStatus ) {
            $(function () {
                var jstreeElement = $('.jstree');

                    .on('select_node.jstree', function (e, data) {
                        if(data.selected.length) {
                        "plugins" : ["search"],
                        "search": {
                            "case_insensitive": true,
                            "show_only_matches" : true
                        'core' : {
                            "check_callback" : true,
                            'data' : [
                                {{ jstree_data|safe }}

                            'themes' : {
                                'responsive' : true,

                    $(".search-input").keyup(function() {
                        var searchString = $(this).val();
                        $('.jstree').jstree('search', searchString);
{% endblock %}
  • close the folders tree at the beginning

Code: Select all

        '"state": {{ "closed": true, "selected": {} }},'.format(
            'true' if node == selected_node else 'false'
  • displaying the contents of folders in rows

Code: Select all

'list_as_items': False,
For me, the automatic Indexing is definitely a better solution for cataloging than the Cabinets.


Re: Document Navigation/Views

Posted: Wed Jun 05, 2019 5:12 pm
by rosarior
As @Krzysztof shows, you can customize the templates easily in-place or you can write a skeleton app that only overrides the templates. This last method allows keeping you changes even if when you upgrade ( ... p-creation).

An API client is the way to if you want a 100% custom UI:

Index mirroring was created for your use case. It allows experienced users to craft indexes and then these are exported as a filesystem which can be shared over the network as a network drive for less experienced user. As a mounted drive, all the OS features are available like search and filtering: ... #mirroring

We are discussing adding mirroring to cabinets too in a future version.

Re: Document Navigation/Views

Posted: Wed Jun 05, 2019 5:14 pm
by rosarior
Cabinets and Indexes are almost the same. The main difference is that Indexes are automatically build based on a template system. Cabinet are completely manual. Cabinets were added by user request for those looking to replicate a file explorer setup but in the long run are not feasible as document count increases. That is why we emphasize on learning to make your own Indexes and smart links, they will save you a lot of time in the later stages of your project.

Re: Document Navigation/Views

Posted: Thu Jun 06, 2019 8:33 am
by sam.jenkins
Thanks both for your reply's.

I'm on board with Indexing and trying to derive a process that will allow us to Index correctly. I've tried creating a top level Index based on Cabinets but I've come across an issue that I reported in GitLab here:

If I cant use Cabinets for this purpose then i suppose the other way would be to tag each document and use tags to generate the Indexes? This could mean lots of tags for each document but I don't suppose this is an issue.

I've also taken a look at the FUSE file system, i'm running in Docker so i'll need to give this a bit more time. Can you confirm where any user permissions are applied to the FUSE file systems? Or can anyone access the mirrored Index files?

Re: Document Navigation/Views

Posted: Tue Apr 14, 2020 5:58 pm
by davebauerart
Good afternoon,

The links to documentation for ... p-creation app creation doesn't appear to work. Doing a search of the current documentation site, I don't see a reference to app creation. Mayan EDMS appears to be a great solution for managing our collection of PDFs, but we do need to add some custom additions, and I would like to create our own forms. I was just looking for advice or where to look to start creating a custom app alongside Mayan.