Date: Thu, 28 Mar 2024 23:43:33 -0700 (PDT)
Message-ID: <1199307307.986.1711694613915@ip-172-30-17-85.ec2.internal>
Subject: Exported From Confluence
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_985_573040840.1711694613907"
------=_Part_985_573040840.1711694613907
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/exported.html
This topic will walk you through the steps to use the #ew_=
create_record
macro to create a record submission form for the Tasks=
table.
The basic steps for adding a new page to the EUI are:
- Create the HTML template
- Add a link from the menu and/or home page
- Set user permissions and create an end user layout.
To create a page in the EUI that gives end users the ability to submit a=
task:
- Navigate to the EUI Templates table.
- Copy the template new_user.html to use as a starting point. When prompt=
ed, enter the name "new_task.html" for this template record.
- Click Finish.
- Open new_task.html for edit and change the Description to "Page for cre=
ating new tasks in the EUI".
The <iframe> tag which contains t=
he #ew_create_record macro will be similar to the following:
<ifr=
ame src=3D'#ew_create_record("contacts.employees" "/eui2template/main.php" =
"parent")' name=3D"content_frame" id=3D"frameres" width=3D"100%" frameborde=
r=3D"0"></iframe>
Replace contacts.employees (the first p=
arameter) with "task" (the logical table name of the Tasks table).
- Click Save.
The next step in making this page accessible is to add a link from the m=
enu by making a few changes to menu.htm. Each menu tab is a list item <l=
i> containing a link to a template page. Menu.htm makes heavy use of&nbs=
p;conditionals&n=
bsp;and the method $ewUser.isInGroup to ensure that different types o=
f end users see only the tabs relevant to them.
In the initial default setup, the EUI is configured for users in several=
different groups. The table below outlines the available functions and nav=
igational tabs each user group sees when accessing the EUI:
Group |
Default EUI Tabs |
Guest |
- Home
- New Support Case
- View
- My Profile
|
Internal Customer |
- Home
- New (Helpdesk Case)
- View
- My Helpdesk Cases
- My Documents
- All Documents
- FAQs
- My Profile
|
Document Creator |
- Home
- New (Document)
- View (My Documents)
- FAQs (Documents)
- My Profile
|
Contract Creator |
- Home
- New (Contract)
- View
- My Contracts
- All Contracts
|
Repair Customer |
- Home
- New (Support Case)
- View
- My Support Cases
- My Documents
- All Documents
- FAQs (Support Cases)
|
Any groups not listed above will see the fo=
llowing tabs:
- Home
- New (Support Case)
- View (Support Cases)
- FAQ (Support Cases)
- My Profile
Let's look at the first <li> item in menu.htm:
<li id=3D"main"><a href=3D'#ew_forward("main.php")'>$ewTex=
t.get("menu.home")</a></li>
There are a few things to note about the code.
The link's href attribute is formed wit=
h the #ew_forward
macro. This macro forwards the use=
r to the page specified by the $templateName parameter.
The link text is referenced by the meth=
od $ewText.get()
. We will return to $ewText.ge=
t
in more detail a little later.
- Each list item is assigned an ID. For the Home tab link above, the ID i=
s "main". Each menu tab is assigned an ID that refers to some part of the U=
RL (i.e. main.php). Note that the ID here only uses the URL name for the sa=
ke of convenience.
The menu tab's ID is used in part by the JavaScript function =
menuChange()
. This simple script allows the browser to recognize the=
current page and highlight the corresponding menu tab:
In menu.htm, scroll to the Body field. Locate the <script> section=
and the block of text beginning function menuChange()
.&n=
bsp;
function =
menuChange() {
if (document.getElementById && document.createTextNode) {
if (homepage || location.href.match('main.php')) {
document.getElementById('main').className=3D'active';
} else if (location.href.match('new_user')) {
document.getElementById('new_user').className=3D'active';
} else if (location.href.match('new_')) {
document.getElementById('new').className=3D'active';
} else if (location.href.match('-faq')) {
document.getElementById('faq').className=3D'active';
} else if (location.href.match('my_profile')) {
document.getElementById('my_profile').className=3D'active';
}else if (location.href.match('my_') || location.href.match('open') || =
location.href.match('all_')) {
document.getElementById('view').className=3D'active';
} else if (location.href.match('chat')) {
document.getElementById('chat').className=3D'active';
}=20
}
}
This piece of JavaScript looks at the browser's current URL.
- If it finds the 'main.php' in the URL, it assigns the 'active' CSS clas=
s to the element on the page with an ID of 'main'.
- If 'main.php' is not in the URL, it goes through the remaining conditio=
ns in the script. Next, it looks for the URL string 'new_user' to find a ma=
tch, followed by 'new_' and so on.
The stylesheet style.css holds a rule that sets the background color of =
an 'active' menu tab.
Link to the New Page=
h2>
Set Table Permissio=
ns
The next step in creating a task submission page is to create an end use=
r layout and give the appropriate users access permissions to the Tasks tab=
le.
- Navigate to Setup gear > Tables > Tasks > Edit > La=
yout.
- Check if an end user layout exists; if not, copy the Power User layout =
and make additional changes if desired.
- Click Finish to save the changes.
- Navigate to Setup gear > Access > Manage Groups,=
then edit the Customer group.
- On the Table tab, find and edit the Task table.
- On the Record Permissions tab, allow the group to Create Tasks and View=
their own Tasks.
- On the Field Permissions tab, make sure that the Customer group can Vie=
w own and Create the necessary fields. .
- When you are done, click Finish in the Table Permissions wizard and the=
n Finish again in the Manage Groups wizard.
- View the completed task submission page in the EUI.
------=_Part_985_573040840.1711694613907
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Location: file:///C:/59ce8ed09eaa88a1efb7a514c3f6172c
iVBORw0KGgoAAAANSUhEUgAAAjcAAABKCAYAAABHC3WYAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA
B3RJTUUH5QQeECowmo/5CQAADFdJREFUeJzt3W9IHHcex/FPjlhPNjSbSG6jiEgMQXusYDAVfVC0
xYgIPXMHBvJsk9P2ScC9LoEU+qD0qCBbFPKkMW3z5CjUJ1kKixhJLeUw5CoRsnfRC00Q8Uy8YLOW
LDnPQO7BzOzO/nFddc16k/cLfODs7OTX+Tm/+f5+3+9M9/zu4xsvBAAA4BB7JSl863ah2wEAALBt
nY3H9atCNwIAACCfCG4AAICjENwAAABHIbgBAACOQnADAAAcheAGAAA4CsENAABwFIIbAADgKAQ3
AADAUQhuAACAoxDcAAAARyG4AQAAjkJwAwAAHIXgBgAAOArBDQAAcBSCGwAA4Ch7t/KltXAg3+1A
Doo6g4VuAgAAux4rNwAAwFEIbgAAgKNsKS21JzCZ73YgB1vqLAAAXjGs3AAAAEchuAEAAI5CcAMA
AByF4AYAADgKwQ0AAHAUghsAAOAoBDcAAMBRCG4AAICjENwAAABHIbgBAACOQnADYEP+/vNaC5/X
9a5CtwTAy9euSDigtXBAayPd8lu/X243P2/Q9RH774W3i/93RdW6G/So7Kc5Hfh8Mfmj0/V6caJI
3337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