Demonstrates two ways to style the form of a non-current version of an item.
- Change the background color of the non-current item's form.
- Display a watermark/overlay image indicating that the item displayed is not current.
Release | Notes |
---|---|
v1.1.0 | Updated code for new part bug; verified on 12.0 |
v1.0.1 | Tested 11.0 SP12, SP15. Tested on Edge, Firefox 60 ESR, Chrome. |
v1.0.0 | First release. Tested on Internet Explorer 11, Firefox 38 ESR, Chrome. Though built and tested using Aras 11.0 SP7, this project should function in older releases of Aras 11.0 and Aras 10.0. |
Project | Aras |
---|---|
v1.1.0 | 10.0+, 11.0+, 12.0+ |
v1.0.1 | 10.0 SPx, 11.0 SP7+, 11.0 SP12+, 11.0 SP15 |
v1.0.0 | 10.0 SPx, 11.0 SP7; Old Community Board Migration |
The project's import package includes two methods - labs_StyleNonCurrent
and labs_NonCurrentOverlay
. Both use the same basic logic to determine whether the context item is the current version.
First we check whether the context item includes the is_current
property. If so, we proceed with that value. If not, we retrieve the is_current
property from the server. If the is_current
property's value is 0
, we style the form accordingly:
- labs_StyleNonCurrent: changes the background color of the item's form
- labs_NonCurrentOverlay: displays an HTML field containing a watermark image
Always back up your code tree and database before applying an import package or code tree patch!
- Aras Innovator installed (current released version preferred)
- Aras Package Import tool
- StyleNonCurrentItems import package
- StyleNonCurrentItems code tree overlay
- Backup your code tree and store the backup in a safe place.
- Copy the Innovator folder from the project's CodeTree subdirectory.
- Paste the Innovator folder into the root directory of your Aras installation.
- Tip: This is the same directory that contains the InnovatorServerConfig.xml file.
- Backup your database and store the BAK file in a safe place.
- Open up the Aras Package Import tool.
- Enter your login credentials and click Login
- Note: You must login as root for the package import to succeed!
- Enter the package name in the TargetRelease field.
- Optional: Enter a description in the Description field.
- Enter the path to your local
..\StyleNonCurrentItems\Import\imports.mf
file in the Manifest File field. - Select StyleNonCurrentItems in the Available for Import field.
- Select Type = Merge and Mode = Thorough Mode.
- Click Import in the top left corner.
- Close the Aras Package Import tool.
You are now ready to login to Aras and check out the examples for customizing non-current items' forms.
- Log in to Aras as admin.
- Click Administration > Forms and search for the Part form.
- Open the Part form for editing.
- Click the Form Event tab.
- Find
labs_StyleNonCurrent
in the grid and set the Event column value to OnLoad. - Save the form.
- Click Design > Parts in the table of contents (TOC).
- Open an existing Part with previous versions (generation > 1).
- On the Part form, click Navigate > Revisions. (v12)
- On the Part form, click View > Revisions. (v11)
- In the resulting dialog, double-click one of the previous generations of the Part.
The Part form that appears will have a grey background. If you would like to change the color or style applied to non-current items, you can edit the labs_StyleNonCurrent
method.
- Log in to Aras as admin.
- Click Administration > Forms and search for the Part form.
- Open the Part form for editing.
- Click the Form Event tab.
- Find
labs_NonCurrentOverlay
in the grid and set the Event column value to OnLoad. - Find
labs_StyleNonCurrent
in the grid and confirm the Event column value is null/blank. - Save the form.
- Click Design > Parts in the table of contents (TOC).
- Open an existing Part with previous versions (generation > 1).
- On the Part form, click Navigate > Revisions. (v12)
- On the Part form, click View > Revisions. (v11)
- In the resulting dialog, double-click one of the previous generations of the Part.
The Part form that appears will have a watermark image that says "Non Current". If you would like to change the watermark image that is displayed:
- Add your image to the code tree under
Innovator\Client\customer\
. - Update the HTML source of the
overlay
field on the Part form.
Note: If your custom watermark image is not semi-transparent, you will need to update the CSS rules for the contents of the
overlay
field.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
For more information on contributing to this project, another Aras Labs project, or any Aras Community project, shoot us an email at araslabs@aras.com.
Created by Eli Donahue for Aras Labs. @EliJDonahue
Aras Labs projects are published to Github under the MIT license. See the LICENSE file for license rights and limitations.