Skip to content

Commit a4e10c1

Browse files
committed
small tweak regarding what dashlet links are shown to admins and site managers
git-svn-id: https://share-extras.googlecode.com/svn/trunk/Sandbox/Audit Dashlet@736 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent 4a6c0ed commit a4e10c1

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

README.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ of the dashboard and drag the dashlet into one of the columns from the list of d
6464
UI Name Description Audit API corresponding parameter
6565
-----------------------------------------------------------------------------------------------------------
6666
- value filter filter on the audit value (exact match,optional) 'value'
67-
- limit maximum number of audit entries retrieved (optional) 'limit'
67+
- limit maximum number of audit entries retrieved (optional) 'limit' (default 100)
6868
- Additional Query params other possible query parameters (optional) from/to time, from/to id, user
6969

7070
(See http://wiki.alfresco.com/wiki/Auditing_(from_V3.4)#Advanced_Query). This filtering is done server-side.
@@ -112,6 +112,7 @@ Changelog
112112
See the wiki documentation (http://wiki.alfresco.com/wiki/Auditing_(from_V3.4)#Advanced_Query) and the web script description.
113113
- datatable css fix for google chrome, and various css tweaks
114114
- Added help link opposite the config link
115+
- tweaked what links (configure, help) are shown to admins / site managers
115116

116117
0.31:
117118
- build.properties more consistent with other projects

config/alfresco/site-webscripts/org/alfresco/components/dashlets/audit-application.get.html.ftl

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"valueFilter": "${args.valueFilter!''}",
99
"limit": "${args.limit!''}",
1010
"rowsPerPage" : "${args.rowsPerPage!'10'}",
11-
"additionalQueryParams" : "${args.additionalQueryParams!''}",
12-
"show_id_column" : "${args.show_id_column!'show'}",
13-
"show_user_column" : "${args.show_user_column!'show'}",
14-
"show_time_column" : "${args.show_time_column!'show'}",
15-
"show_values_column" : "${args.show_values_column!'show'}"
11+
"additionalQueryParams" : "${args.additionalQueryParams!''}",
12+
"show_id_column" : "${args.show_id_column!'show'}",
13+
"show_user_column" : "${args.show_user_column!'show'}",
14+
"show_time_column" : "${args.show_time_column!'show'}",
15+
"show_values_column" : "${args.show_values_column!'show'}"
1616
}).setMessages(${messages});
1717
1818
<#-- dashlet resizer does not dynamically adjust the number of rows displayed on the page re: pagination -->
@@ -30,37 +30,40 @@
3030
<div class="title" id="${el}-title">${msg("audit.dashlet.header.default")}</div>
3131
<div class="refresh"><a id="${el}-refresh" href="#">&nbsp;</a></div>
3232

33-
<#-- audit only allows admin to query audit entries. therefore the dashlet is only usable by admin users. -->
34-
<#if userHasConfigPermission && userIsAdmin>
33+
3534
<div class="toolbar" id="${el}-toolbar">
36-
<span class="yui-button-align">
37-
<span class="first-child">
38-
<a class="theme-color-1" href="#" id="${el}-configure-link">${msg("audit.dashlet.link.configure")}</a>
35+
<#if userHasConfigPermission && userIsAdmin>
36+
<span class="yui-button-align">
37+
<span class="first-child">
38+
<a class="theme-color-1" href="#" id="${el}-configure-link">${msg("audit.dashlet.link.configure")}</a>
39+
</span>
3940
</span>
40-
</span>
41-
<span class="align-right yui-button-align">
42-
<span class="first-child spaced-more-left">
41+
</#if>
42+
<span class="align-right yui-button-align">
43+
<span class="first-child spaced-more-left">
4344
<a class="theme-color-1" href="${msg("audit.dashlet.link.help.url")}" id="${el}-help-link" target="_blank">${msg("audit.dashlet.link.help")}</a>
4445
</span>
45-
</span>
46+
</span>
4647
</div>
4748

48-
<#assign currentHeight=default_height>
49-
<#if args.height??><#assign currentHeight=args.height></#if>
50-
<div class="body" style="height: ${currentHeight}px;" id="${el}-body">
51-
<div class="message spaced-left" id="${el}-message"></div>
49+
<#-- audit only allows admin to query audit entries. therefore the dashlet is only usable by admin users. -->
50+
<#if userIsAdmin>
51+
<#assign currentHeight=default_height>
52+
<#if args.height??><#assign currentHeight=args.height></#if>
53+
<div class="body" style="height: ${currentHeight}px;" id="${el}-body">
54+
<div class="message spaced-left" id="${el}-message"></div>
55+
56+
<div class="markup spaced-left" id="${el}-searchbox">
57+
<#-- search box to filter audit values from YUI -->
58+
<label id="${el}-searchWithinResultsFilterLabel" for="${el}-searchWithinResultsFilter">${msg("audit.dashlet.searchWithinResults",0)} :</label>
59+
<input type="text" id="${el}-searchWithinResultsFilter">
60+
</div>
5261

53-
<div class="markup spaced-left" id="${el}-searchbox">
54-
<#-- search box to filter audit values from YUI -->
55-
<label id="${el}-searchWithinResultsFilterLabel" for="${el}-searchWithinResultsFilter">${msg("audit.dashlet.searchWithinResults",0)} :</label>
56-
<input type="text" id="${el}-searchWithinResultsFilter">
62+
<div class="entries custom-scrollable-list" id="${el}-entries"></div>
5763
</div>
5864

59-
<div class="entries custom-scrollable-list" id="${el}-entries"></div>
60-
</div>
61-
6265
<#else>
63-
<div class="body" id="${el}-body">
66+
<div class="body spaced-left" id="${el}-body">
6467
${msg("audit.dashlet.adminPrivilegesRequired")}
6568
</div>
6669
</#if>

source/web/components/dashlets/audit-application.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@
553553
{
554554
var unparsed=oData;
555555
// attempt to "simplify" the date for old/legacy browsers. drop the milliseconds and timezone
556-
if(YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 8)
556+
if(YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 7)
557557
oData=oData.replace(/\-/ig, '/').split('.')[0];
558-
else if (YAHOO.env.ua.ie >= 8)
558+
else if (YAHOO.env.ua.ie >= 7)
559559
oData=oData.replace(/\-/ig, '/').replace(/T/ig, ' ').replace(/\.\d\d\d/ig,"").replace(/\+.*/ig,"");
560560
else if ( YAHOO.env.ua.gecko > 0 && YAHOO.env.ua.gecko <= 1.9)
561561
oData=oData.replace(/\-/ig, '/').replace(/T/ig, ' ').split('.')[0];

0 commit comments

Comments
 (0)