Coder Social home page Coder Social logo

Comments (2)

feisley avatar feisley commented on May 28, 2024

Another point worth considering, is making certain fields default in the macro using the XML configuration but allow for the possibility for the user to override the visible fields.

For example: on one page the user may wish to show, name, email and phone number and on a different page they may want to show name, department, manager. This could be done as a comma separated list of field ID's similar to the JIRA issue macro.

from adam.

blaubaer avatar blaubaer commented on May 28, 2024

Now it is able to define new views in the configuration; example:

<view id="default">
    <element id="fullName" />
    <element id="email" />
    <element id="telephone" />
    <element id="mobile" />
    <element id="company" />
    <element id="department" />
    <element id="position" />
</view>

<view id="contact">
    <localization locale="en_US" title="Contact" />
    <localization locale="de_DE" title="Kontakt" />
    <access>
        <administrator view="allowed" />
        <group name="employees" view="allowed" />
        <default view="forbidden" />
    </access>
    <element id="fullName" />
    <element id="email" />
    <element id="telephone" />
    <element id="mobile" />
</view>

<view id="compact">
    <element id="fullName" />
    <element id="email" />
</view>

By default the default view has the id id. This could be changed by adding the defaultView parameter to the configuration root element. The same is handled by the hoverView attribute. This will handle the look of the user name hovers; example:

<configuration ... defaultView="default" hoverView="compact" ...>

The default view will be selected as default view for the marco. It is also possible to define more views. There are 3 special views:

  • default It will select by default all possible fields.
  • compact It will be normally used by the user hover popup and contains the fullName and email fields.
  • all will only be present of the fields of default does not contain all possible fields and will contain always all fields.

In the macro it is possible to select a view or select the fields manually. If a field in a view is added also all marcos that uses this marco will be updated. If the custom selection of the fields is used this could not work.

from adam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.