Changeset 2322
- Timestamp:
- 10/23/12 09:26:14 (12 years ago)
- Location:
- cats/ISOcat/trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
cats/ISOcat/trunk/mod-ISOcat-access-data/access/group.acc
r2029 r2322 13 13 <group>var:group</group> 14 14 <operator>ffcpl:/dbx/group.xml</operator> 15 <props>active:ISOcat.manage.system.properties</props> 15 16 <debug>var:accessor-debug</debug> 16 17 <trace>var:accessor-trace</trace> -
cats/ISOcat/trunk/mod-ISOcat-access-data/dbx/DCIF.xml
r2269 r2322 379 379 <dbx:for-each table="core_adhoc_group" min="0" max="1"> 380 380 <dbx:where field="id" select="$current/group" type="integer"/> 381 <isocat:recommendedBy i socat:id="{$current/id}" dbx:field="name"/>381 <isocat:recommendedBy id="{$current/id}" dbx:field="name"/> 382 382 </dbx:for-each> 383 383 <dbx:for-each table="core_thematic_domain_group" min="0" max="1"> 384 384 <dbx:where field="id" select="$current/group" type="integer"/> 385 <isocat:recommendedBy i socat:id="{$current/id}">385 <isocat:recommendedBy id="{$current/id}"> 386 386 <dbx:value-of select="concat('TDG: ',$current/name)"/> 387 387 </isocat:recommendedBy> -
cats/ISOcat/trunk/mod-ISOcat-access-data/dbx/group.xml
r2029 r2322 5 5 > 6 6 <dbx:param name="group"/> 7 <dbx:param name="props"/> 7 8 8 9 <dbx:process> … … 41 42 </forum> 42 43 </dbx:for-each> 44 <dbx:for-each table="view_link_dcs_access" min="0" max="*"> 45 <dbx:where field="account" select="$current/id"/> 46 <dbx:sort field="name" function="upper"/> 47 <dbx:variable name="rights" field="rights"/> 48 <dbx:for-each table="core_data_category_selection"> 49 <dbx:where field="id" select="$current/dcs" type="integer"/> 50 <dcs> 51 <dbx:attribute name="ref" field="id"/> 52 <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> 53 <dbx:attribute name="mode" select="$rights"/> 54 <name dbx:field="name"/> 55 </dcs> 56 </dbx:for-each> 57 </dbx:for-each> 43 58 </group> 44 59 </dbx:for-each> … … 50 65 <xsl:copy> 51 66 <xsl:apply-templates select="@*"/> 52 <xsl:apply-templates select="* except member"/>67 <xsl:apply-templates select="* except (member,dcs)"/> 53 68 <xsl:apply-templates select="member"> 69 <xsl:sort select="name"/> 70 </xsl:apply-templates> 71 <xsl:apply-templates select="dcs"> 54 72 <xsl:sort select="name"/> 55 73 </xsl:apply-templates> -
cats/ISOcat/trunk/mod-ISOcat-access-data/dbx/user-workspace.xml
r2029 r2322 39 39 <dbx:attribute name="mode" value="ru"/> 40 40 <dbx:attribute name="href" value="{string($props//site)}rest/dcrb"/> 41 <dbx:variable name="size" query=" 42 SELECT 43 COUNT(*) 44 FROM 45 link_group_members 46 WHERE 47 "group" = {$current/id} 48 ; 49 "/> 50 <dbx:attribute name="size" select="$size"/> 41 51 <dbx:for-each table="core_change_request"> 42 52 <dbx:sort field="id"/> … … 64 74 <dbx:attribute name="mode" value="ru"/> 65 75 <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/group}"/> 76 <dbx:variable name="size" query=" 77 SELECT 78 COUNT(*) 79 FROM 80 link_group_members 81 WHERE 82 "group" = {$current/id} 83 ; 84 "/> 85 <dbx:attribute name="size" select="$size"/> 66 86 <dbx:for-each table="view_link_dcs_access" min="0" max="*"> 67 87 <dbx:where field="account" select="$current/group"/> … … 97 117 <dbx:sort field="name" function="upper"/> 98 118 <cat:group> 99 <dbx:attribute name="id" field="id"/> 100 <dbx:attribute name="name" field="name"/> 101 <dbx:attribute name="mode" value="rud"/> 102 <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/id}"/> 119 <dbx:attribute name="id" field="id"/> 120 <dbx:attribute name="name" field="name"/> 121 <dbx:attribute name="mode" value="rud"/> 122 <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/id}"/> 123 <dbx:variable name="size" query=" 124 SELECT 125 COUNT(*) 126 FROM 127 link_group_members 128 WHERE 129 "group" = {$current/id} 130 ; 131 "/> 132 <dbx:attribute name="size" select="$size"/> 103 133 <dbx:for-each table="view_link_dcs_access" min="0" max="*"> 104 134 <dbx:where field="account" select="$current/id"/> … … 130 160 <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> 131 161 <dbx:attribute name="status" field="status"/> 162 <dbx:variable name="size" query=" 163 SELECT 164 COUNT(*) 165 FROM 166 link_group_members 167 WHERE 168 "group" = {$current/id} 169 ; 170 "/> 171 <dbx:attribute name="size" select="$size"/> 132 172 </cat:cr> 133 173 </dbx:for-each> … … 157 197 <dbx:where field="role" operator="ne" value="chair" type="string"/> <!-- role is NOT chair --> 158 198 <dbx:where field="status" value="accepted" type="string"/> 199 <dbx:variable name="size" query=" 200 SELECT 201 COUNT(*) 202 FROM 203 link_group_members 204 WHERE 205 "group" = {$current/id} 206 ; 207 "/> 208 <dbx:attribute name="size" select="$size"/> 159 209 <cat:dcrb> 160 210 <dbx:attribute name="id" field="group"/> … … 173 223 <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> 174 224 <dbx:attribute name="status" field="status"/> 225 <dbx:variable name="size" query=" 226 SELECT 227 COUNT(*) 228 FROM 229 link_group_members 230 WHERE 231 "group" = {$current/id} 232 ; 233 "/> 234 <dbx:attribute name="size" select="$size"/> 175 235 </cat:cr> 176 236 </dbx:for-each> … … 193 253 <dbx:attribute name="mode" value="r"/> 194 254 <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/group}"/> 255 <dbx:variable name="size" query=" 256 SELECT 257 COUNT(*) 258 FROM 259 link_group_members 260 WHERE 261 "group" = {$current/id} 262 ; 263 "/> 264 <dbx:attribute name="size" select="$size"/> 195 265 <dbx:for-each table="view_link_dcs_access" min="0" max="*"> 196 266 <dbx:where field="account" select="$current/group"/> … … 220 290 <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> 221 291 <dbx:attribute name="status" field="status"/> 292 <dbx:variable name="size" query=" 293 SELECT 294 COUNT(*) 295 FROM 296 link_group_members 297 WHERE 298 "group" = {$current/id} 299 ; 300 "/> 301 <dbx:attribute name="size" select="$size"/> 222 302 </cat:cr> 223 303 </dbx:for-each> … … 239 319 <dbx:attribute name="mode" value="r"/> 240 320 <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/group}"/> 321 <dbx:variable name="size" query=" 322 SELECT 323 COUNT(*) 324 FROM 325 link_group_members 326 WHERE 327 "group" = {$current/group} 328 ; 329 "/> 330 <dbx:attribute name="size" select="$size"/> 241 331 <dbx:for-each table="view_link_dcs_access" min="0" max="*"> 242 332 <dbx:where field="account" select="$current/group"/> … … 269 359 <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> 270 360 <dbx:attribute name="status" field="status"/> 361 <dbx:variable name="size" query=" 362 SELECT 363 COUNT(*) 364 FROM 365 link_group_members 366 WHERE 367 "group" = {$current/id} 368 ; 369 "/> 370 <dbx:attribute name="size" select="$size"/> 271 371 <dbx:for-each table="core_data_category_selection"> 272 372 <dbx:where field="id" select="$current/dcs" type="integer"/> … … 295 395 <dbx:attribute name="mode" value="r"/> 296 396 <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/id}"/> 397 <dbx:variable name="size" query=" 398 SELECT 399 COUNT(*) 400 FROM 401 link_group_members 402 WHERE 403 "group" = {$current/id} 404 ; 405 "/> 406 <dbx:attribute name="size" select="$size"/> 297 407 <dbx:for-each table="core_profile"> 298 408 <dbx:where field="tdg" select="$current/id" type="integer"/> … … 363 473 <dbx:attribute name="mode" value="r"/> 364 474 <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/id}"/> 475 <dbx:variable name="size" query=" 476 SELECT 477 COUNT(*) 478 FROM 479 link_group_members 480 WHERE 481 "group" = {$current/id} 482 ; 483 "/> 484 <dbx:attribute name="size" select="$size"/> 365 485 <dbx:variable name="dcss" query=" 366 486 SELECT DISTINCT -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat.js
r2288 r2322 139 139 140 140 /** 141 * Show a specific Group in a window 142 */ 143 ISOcat.showGroupInWindow = function(group) { 144 var grp = org.isocat.profile.ws().doc.selectSingleNode("//record[@id='"+group+"']"); 145 grp = org.isocat.profile.ws().doc.getRecord(grp.getAttribute("jsxid")); 146 if (grp != null) { 147 org.isocat.log.info("show Group["+grp+"] in window"); 148 org.isocat.explorer.showGroupWindow(grp); 149 } else 150 org.isocat.APP.alert("Failed to load the Group","Sorry, you don't have the right to access this group.",null,"OK"); 151 }; 152 153 /** 141 154 * Show a Change Request 142 155 */ -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/DCViewer.js
r2288 r2322 294 294 DCViewer_prototype.anchors = function (node, skip) { 295 295 org.isocat.gui.DCViewer.log.info("anchors(node[" + node + "],skip[" + skip + "])"); 296 // DCs 296 297 for (var iter = node.selectNodeIterator(".//a[@datcat]");iter.hasNext();) { 297 298 var anchor = iter.next(); … … 311 312 anchor.getParent().appendChild(winanchor); 312 313 } 314 } 315 // groups 316 for (var iter = node.selectNodeIterator(".//a[@group]");iter.hasNext();) { 317 var anchor = iter.next(); 318 var href = anchor.getAttribute("href"); 319 org.isocat.gui.DCViewer.log.info("anchor.href[" + href + "]"); 320 var id = anchor.getAttribute("group");; 321 org.isocat.gui.DCViewer.log.info("anchor.href[" + href + "].group[" + id + "]"); 322 anchor.setAttribute("onclick", "javascript:org.isocat.showGroupInWindow('" + id + "','" + this.view.getId() + "')"); 323 anchor.setAttribute("href", "#"); 324 anchor.setAttribute("target", null); 325 org.isocat.gui.DCViewer.log.info("anchor[" + anchor + "]"); 313 326 } 314 327 }; … … 610 623 var menu = jsx3.xml.CDF.Document.newDocument(); 611 624 var cnt = 0; 625 // grp should be owned by me 612 626 for (var iter = org.isocat.profile.ws().doc.selectNodeIterator("//record[@type='private']/record[@type='group']");iter.hasNext();) { 613 627 var grp = iter.next(); 614 var item = new Object(); 615 item.jsxid = grp.getAttribute("id"); 616 item.jsxtext = grp.getAttribute("jsxtext"); 617 menu.insertRecord(item); 618 cnt++; 628 // grp size should be 5 or more 629 if (parseInt(grp.getAttribute("size")) >= 5) { 630 // grp should be public 631 if (org.isocat.profile.ws().doc.selectSingleNode("//record[@type='public']/record[@id='"+grp.getAttribute("id")+"']") != null ) { 632 var item = new Object(); 633 item.jsxid = grp.getAttribute("id"); 634 item.jsxtext = grp.getAttribute("jsxtext"); 635 menu.insertRecord(item); 636 cnt++; 637 } 638 } 619 639 } 620 640 if (cnt>0) { -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/Explorer.js
r2029 r2322 190 190 } 191 191 } 192 193 /** 194 * Show a specific Group in a seperate window 195 */ 196 Explorer_prototype.showGroupWindow = function(grp) { 197 org.isocat.gui.Explorer.log.info("show the selected Group["+grp.id+"] in the explorer view in a seperate window"); 198 199 var name = "window-grp-" + grp.id; 200 var title = "Group: " + grp.name; 201 202 var window = org.isocat.desktop.getChild(name); 203 if (typeof(window) == 'undefined') { 204 window = org.isocat.createWindow(name,title); 205 var view = window.loadAndCache("components/Group.xml",true); 206 view.controller.showGroup(grp); 207 view.controller.setWindow(window); 208 209 org.isocat.gui.Explorer.log.info("loaded new Group["+view+"]"); 210 } else { 211 org.isocat.gui.Explorer.log.info("window["+name+"]["+title+"] already exists!"); 212 window.focus(); 213 } 214 }; 192 215 193 216 /** … … 277 300 * Show a specific DC in a seperate window 278 301 */ 279 302 Explorer_prototype.showDataCategoryWindow = function(dc,dcs) { 280 303 org.isocat.gui.Explorer.log.info("show the selected DC["+dc.id+"] in the explorer view is a seperate window"); 281 304 … … 295 318 window.focus(); 296 319 } 297 320 }; 298 321 299 322 /** -
cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/Group.js
r2288 r2322 69 69 70 70 // load the Group content 71 var uri = "http://isocat:8080/isocat/rest/group/"+group.id+". html?title=none";71 var uri = "http://isocat:8080/isocat/rest/group/"+group.id+".xhtml"; 72 72 org.isocat.gui.Group.log.info("loading uri["+uri+"]"); 73 73 … … 77 77 78 78 org.isocat.gui.Group.log.info("loaded uri["+uri+"]"); 79 80 this.viewer.setText(req.getResponseText(),true); 81 79 80 var doc = req.getResponseXML(); 81 var div = doc.selectSingleNode("//xhtml:div[@class='main']","xmlns:xhtml='http://www.w3.org/1999/xhtml'"); 82 83 this.viewer.setText(div.toString(), true); 84 this.viewer.getRendered().scrollTop = 0; 85 this.viewer.getRendered().scrollLeft = 0; 86 82 87 org.isocat.gui.Group.log.info("showing Group["+group.id+"]"); 83 88 }; 84 89 85 90 Group_prototype.reset = function() { 86 91 this.label.setText("group",true); -
cats/ISOcat/trunk/mod-ISOcat-interface-rest/etc/XRLLinks.xml
r2269 r2322 93 93 </link> 94 94 <link> 95 <ext>/group.xhtml</ext> 96 <int>active:sloot.accessor+operand@ffcpl:/interface/group.acc+representation@data:text/plain,xhtml</int> 97 <args>method,credentials,group,param</args> 98 </link> 99 <link> 95 100 <ext>/group/new</ext> 96 101 <int>active:sloot.accessor+operand@ffcpl:/interface/group.acc+method@data:text/plain,PUT</int> -
cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/group.acc
r2029 r2322 94 94 <type>sloot.mimeparse</type> 95 95 <accept>var:Accept</accept> 96 <types>xml:application/xml html:text/html </types>96 <types>xml:application/xml html:text/html xhtml:application/xhtml+xml</types> 97 97 <target>var:representation</target> 98 98 </instr> … … 403 403 </instr> 404 404 </then> 405 <cond> 406 <instr> 407 <type>sloot.xpath2eval</type> 408 <operand>var:representation</operand> 409 <operator> 410 <xpath>.='xhtml'</xpath> 411 </operator> 412 <target>this:cond</target> 413 </instr> 414 </cond> 415 <then> 416 <instr> 417 <type>xslt2</type> 418 <operand>var:response</operand> 419 <operator>ffcpl:/representations/html/group.xsl</operator> 420 <title>var:title</title> 421 <body>var:body</body> 422 <props>active:ISOcat.manage.system.properties</props> 423 <target>this:response</target> 424 </instr> 425 <instr> 426 <type>cast</type> 427 <operand>this:response</operand> 428 <operator> 429 <cast> 430 <mimetype>application/xhtml+xml</mimetype> 431 </cast> 432 </operator> 433 <target>this:response</target> 434 </instr> 435 </then> 405 436 <else> 406 437 <instr> -
cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/workspace.acc
r2029 r2322 242 242 <jsxunselectable type="constant">1</jsxunselectable> 243 243 <jsximg type="constant">{icon:public}</jsximg> 244 <type type="constant">public</type> 244 245 </cat:public> 245 246 <cat:shared> -
cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/html/datacategory.xsl
r2269 r2322 358 358 <td class="DC-data-label">Recommended by</td> 359 359 <td class="DC-data-value"> 360 < xsl:value-of select="."/>360 <a href="{$props//site}rest/group/{@id}" group="{@id}"><xsl:value-of select="."/></a> 361 361 </td> 362 362 </tr> -
cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/html/group.xsl
r2029 r2322 7 7 xmlns:dcr="http://www.isocat.org/ns/dcr" 8 8 xmlns:dcif="http://www.isocat.org/ns/dcif" 9 xmlns="http://www.w3.org/1999/xhtml" 9 10 > 10 11 … … 134 135 </head> 135 136 <body> 136 <xsl:call-template name="group"/> 137 <div class="main"> 138 <xsl:call-template name="group"/> 139 </div> 140 <ol> 141 <xsl:for-each select="dcs"> 142 <li><a href="{@href}"><xsl:value-of select="name"/></a></li> 143 </xsl:for-each> 144 </ol> 137 145 </body> 138 146 </html>
Note: See TracChangeset
for help on using the changeset viewer.