[mhk] r1001 committed - Adds rp name change and rps collection on identifications list.

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 20, 2011, 4:23:49 PM7/20/11
to mhk-dis...@googlegroups.com
Revision: 1001
Author: jmncarvalho
Date: Wed Jul 20 13:22:49 2011
Log: Adds rp name change and rps collection on identifications list.
http://code.google.com/p/mhk/source/detail?r=1001

Added:
/trunk/idb/etc/template/new/attribute_detail.vm
/trunk/idb/etc/template/new/message_error.vm
/trunk/idb/etc/template/new/message_success.vm
/trunk/idb/pt/uc/cisuc/jrc/mhk/servlet/DoChangeRPName.java
Modified:
/trunk/idb/.upload_information
/trunk/idb/build.number
/trunk/idb/etc/template/new/footer.vm
/trunk/idb/etc/template/new/linking_show.vm
/trunk/idb/etc/template/new/rperson_header.vm
/trunk/idb/etc/template/new/rperson_show.vm
/trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings.properties
/trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings_pt.properties
/trunk/idb/pt/uc/cisuc/jrc/mhk/servlet/CentralServlet.java

=======================================
--- /dev/null
+++ /trunk/idb/etc/template/new/attribute_detail.vm Wed Jul 20 13:22:49 2011
@@ -0,0 +1,262 @@
+
+##
+## Special template that shows atribute details with act date and emissor
+## iClio 2011
+##
+
+#set($dbutils=$db.getDBUtils())
+#set ( $dollar = "$" )
+#set($title="$mhks.get('show.all.results') $the_type #if($the_value)=
$the_value #end")
+#set ( $help = "rperson")
+#parse("new/head.vm")
+
+<script src="${baseaddr}/scripts/select.js"></script>
+<script src="${baseaddr}/scripts/jquery.tablesorter.js"></script>
+<script src="${baseaddr}/scripts/jquery.tooltip.js"></script>
+<script type="text/javascript">
+ $(document).ready(function(){
+ //Show more options
+ $("input.buttonBslidedown").click(function(){
$("div.showmore").find("span.showmore:hidden").slideDown("slow"); });
+ $("input.buttonBslideup").click(function(){
$("div.showmore").find("span.showmore:visible").slideUp("slow"); });
+ //Hide button
+ $("input.buttonBslidedown").click(function(){
+ $(this).toggle();
+ return false;});
+
+ //Caps on names
+ $("a.caps").each(function(){
+ $(this).text($(this).text().toTitleCase());
+ });
+ //Caps on names
+ $("span.caps").each(function(){
+ $(this).text($(this).text().toTitleCase());
+ });
+
+ $("table").tablesorter({});
+ });
+</script>
+
+</head>
+<body>
+
+#parse("new/header.vm")
+#initRIDColors()
+
+<div id="main">
+
+#set($maxrows="100")
+#set($skip="0")
+#set($first_date="")
+#set($last_date="")
+
+#set($maxrows=$req.getParameter("maxrows"))
+#set($skip=$req.getParameter("skip"))
+#set($the_type=$req.getParameter("the_type"))
+#set($the_value=$req.getParameter("the_value"))
+#set($first_date=$req.getParameter("first_date"))
+#set($last_date=$req.getParameter("last_date"))
+
+#if(!$the_value)
+ #set($the_value='%') ##query will show a list with all entities with
attributes of that type.
+#end
+
+#set($ffulldate="${first_date}0000") ## Allows the user to enter just the
year, or the year and the month
+#set($lfulldate="${last_date}9999") ## Allows the user to enter just the
year, or the year and the month
+
+#if($first_date.equals("") || $last_date.equals(""))
+ #set($attributes=$dbutils.search("SELECT
entity,the_type,the_value,the_date,obs FROM attributes WHERE the_type
LIKE '$the_type' and the_value LIKE '$the_value' ORDER BY the_date LIMIT
$skip, $maxrows;"))
+ #set($resultscount=$dbutils.search("SELECT
entity,the_type,the_value,the_date,obs FROM attributes WHERE the_type
LIKE '$the_type' and the_value LIKE '$the_value';"))
+#else ##if there is a date value the second query is used
+ #set($attributes=$dbutils.search("SELECT
entity,the_type,the_value,the_date,obs FROM attributes WHERE the_type
LIKE '$the_type' and the_value LIKE '$the_value' AND the_date between
#dbdate($ffulldate) and #dbdate($lfulldate) ORDER BY the_date LIMIT $skip,
$maxrows;"))
+ #set($resultscount=$dbutils.search("SELECT
entity,the_type,the_value,the_date,obs FROM attributes WHERE the_type
LIKE '$the_type' and the_value LIKE '$the_value' AND the_date between
#dbdate($ffulldate) and #dbdate($lfulldate);"))
+#end
+
+#################
+##Filter Box Form
+#################
+
+<div class="top">
+<div class="left">
+ #set($maxrowsint = $dbutils.addInt("0",$maxrows))
+ #set($upperlimmit = $maxrowsint)
+
+ #if( $resultscount.size() < $maxrows)
+ #set($upperlimmit = $resultscount.size())
+ #else
+ #set($upperlimmit = $dbutils.addInt($skip,$maxrows))
+ #end
+ <p>$mhks.get("search.resultscount") $skip - $upperlimmit $mhks.get("of")
$resultscount.size()
+</div>
+<div class="right">
+<FORM Action="${baseaddr}/servlet/do">
+ <INPUT TYPE="HIDDEN" NAME="action" VALUE="exec">
+ <INPUT TYPE="HIDDEN" NAME="script" VALUE="attribute_count_show.vm">
+ <INPUT TYPE="HIDDEN" name="the_type" value='$the_type'>
+ <INPUT TYPE="HIDDEN" name="the_value" value='$the_value'>
+ <INPUT TYPE="HIDDEN" name="skip" value="0">
+ $mhks.get("results.per.page"): <INPUT TYPE="TEXT" title="Input max
results per page" name="maxrows" VALUE="$maxrows" size="4">
+ $mhks.get("first.date"): <INPUT TYPE="TEXT"
title="$mhks.get("timeIntervalTitle")" name="first_date"
VALUE="$!first_date" size="7" maxlength="11">
+ $mhks.get("last.date"): <INPUT TYPE="TEXT"
title="$mhks.get("timeIntervalTitle")" name="last_date"
VALUE="$!last_date" size="7" maxlength="11">
+ <INPUT CLASS="button" TYPE="SUBMIT" NAME="Button" VALUE=$mhks.get("go")>
+</FORM>
+</div>
+</div>
+
+##Person identification management form
+<FORM action="${baseaddr}/servlet/do" METHOD="POST" NAME="resultsForm">
+<INPUT NAME="action" VALUE="exec" TYPE="HIDDEN">
+<INPUT NAME="script" TYPE="HIDDEN" VALUE="rentity_preview.vm">
+
+###############
+##Results table
+###############
+<table id="table">
+#set($th=0)
+#set($rownumber = 1)
+
+#foreach($attribute in $attributes)
+ #set($entidade=$attribute.entity)
+ #set($ent = $db.getEntityFull($entidade))
+
+ #if($th.equals(0))##Header of the table??
+ <thead>
+ <tr>
+ <th>
+ #if ($ent.rclass == "person")</th><th>#end
+ #if($ent.fields.name)<span class="caps">$mhks.get("name")</span>
+ #else
+ $mhks.get("id")
+ #end
+ </th>
+
+ <th>Act Date</th>
+ <th>Emissor</th>
+
+ <th>$mhks.get("entity")</th>
+ <th>$mhks.get("date")</th>
+ #if($ent.fields.sex)<th>$mhks.get("sex")</th>#end
+ <th>$the_type</th>
+ <th><center>
+ <input type="button" title="Show Full Description" value="Show
Description" class="buttonBslidedown" />
+ </center>
+ <div class="showmore">
+ <span class="showmore">$mhks.get("textualDescription")</span>
+ </div>
+ </th>
+ #if($attribute.obs)<th width="15%">$mhks.get("obs")</th>#end
+ </tr>
+ </thead>
+ <tbody>
+ #set($th=1)
+ #end
+
+ <tr id="r${rownumber}">
+ <td><!-- $ent.fields.name -->
+ #if ($ent.rclass == "person")
+
+ <INPUT NAME="personid" ID="cb_${rownumber}" TYPE="CHECKBOX"
VALUE="$entidade">
+ </td><td width="20%" onClick="selectRow($rownumber)">
+ #isRID($entidade)
+ <span class="flag" id="ri${rownumber}"
onclick="Set_Cookie('$rownumber','IDList','$entidade','/');"><img
onmouseover="Tip(txt1)" title="Click to save this ID on your list"
src="${baseaddr}/images/flag.gif"></span>
+ $rpsymb
+ #end
+
+ #if($ent.fields.name)<a
href=$resp.encodeURL("${uri}?dbname=$!db.dbname&action=show&id=$entidade")
title="$entidade"><span class="caps">$!ent.fields.name</span></a>
+ #else
+ <a
href=$resp.encodeURL("${uri}?dbname=$!db.dbname&action=show&id=$entidade")
title="$entidade">$!entidade</a>
+ #end
+ </td>
+
+
+ #set($act=$dbutils.search("SELECT * FROM nfuncs where id='$entidade'"))
+
+ <td>
+ #if($act.size()>0)
+ #pdate($!act.get(0).act_date)
+
+ #set($emissor=$dbutils.search("SELECT * FROM nfuncs where
func='emissor' and id_act='$!act.get(0).id_act'"))
+ #if($emissor.size()<1)
+ #set($tmpID=$dbutils.search("SELECT inside FROM entities where
id='$!act.get(0).id_act'"))
+
+ #set($emissor=$dbutils.search("SELECT * FROM nfuncs where
func='emissor' and id_act='$tmpID.get(0).inside'"))
+ #end
+ #end
+ </td>
+ <td>#if($emissor.size()>0) $!emissor.get(0).name #end</td>
+
+ <td onClick="selectRow($rownumber)"><span class="caps"> $!ent.rclass :
$!ent.gname</span></td>
+ <td onClick="selectRow($rownumber)">
+ #pdate($attribute.the_date)
+ </td>
+ #if($ent.fields.sex)<td>$!ent.fields.sex</td>#end
+ <td onClick="selectRow($rownumber)"><span
class="caps">$!attribute.the_value</span>
+ </td>
+ <td onClick="selectRow($rownumber)"><div class="showmore">
+ <span class="showmore">
+ #showent($entidade "FALSE")
+ </span>
+ </div>
+ </td>
+ #if($attribute.obs)<td width="15%">$!attribute.obs</td>#end
+ </tr>
+
+ #set($rownumber = $rownumber + 1)
+#end
+</tbody>
+</table>
+
+## If there are any persons in the table, show the identifications controls
+#if ($ent.rclass == "person")
+ <div class="tip">
+ $mhks.get('select.tip')
+ </div>
+ <INPUT class="button" TYPE="SUBMIT" NAME="sameas"
value="$mhks.get('rperson.link.selected')">
+ <!-- INPUT TYPE="SUBMIT" NAME="group" VALUE="Add or remove selected
persons to group" -->
+ <input class="dotted" type="button"
onClick="SetAllCheckBoxes('resultsForm', 'personid', true);"
value="$mhks.get('select.all')">
+ <input class="dotted" type="button"
onClick="SetAllCheckBoxes('resultsForm', 'personid', false);"
value="$mhks.get('select.none')">
+#end
+</FORM>
+
+############################################################################
+## This section handles the max results per page and the navigation buttons
+############################################################################
+#set($maxrows_negative=$dbutils.multInt($maxrows,"-1")) ##converts maxrows
to a negative to calculate skip previous bellow
+#set($skip_previous=$dbutils.addInt($skip,$maxrows_negative))
+#set($skip=$dbutils.addInt($skip,$maxrows))
+
+<div class="search_nav">
+#if ($attributes.size()>0 && $skip >$dbutils.addInt($maxrows,"0"))
##addInt used to convert $maxrows to integer
+<!--Previous Button-->
+ <FORM id="left" Action="${baseaddr}/servlet/do">
+ <INPUT TYPE="HIDDEN" NAME="action" VALUE="exec">
+ <INPUT TYPE="HIDDEN" NAME="script" VALUE="attribute_count_show.vm">
+ <INPUT TYPE="HIDDEN" name="the_type" value='$the_type'>
+ <INPUT TYPE="HIDDEN" name="the_value" value='$the_value'>
+ <INPUT TYPE="HIDDEN" name="maxrows" value=$maxrows>
+ <INPUT TYPE="HIDDEN" name="skip" value=$skip_previous>
+ <INPUT TYPE="HIDDEN" name="first_date" VALUE="$first_date">
+ <INPUT TYPE="HIDDEN" name="last_date" VALUE="$last_date">
+ <INPUT class="link" TYPE="SUBMIT" NAME="Button"
VALUE=$mhks.get("previous")>
+ </FORM>
+#end
+
+#if($attributes.size()>$dbutils.addInt($maxrows,"-1")) ##checks if results
size < than ($maxrows -1)
+<!--Next Button-->
+ <FORM id="right" Action="${baseaddr}/servlet/do">
+ <INPUT TYPE="HIDDEN" NAME="action" VALUE="exec">
+ <INPUT TYPE="HIDDEN" NAME="script" VALUE="attribute_count_show.vm">
+ <INPUT TYPE="HIDDEN" name="the_type" value='$the_type'>
+ <INPUT TYPE="HIDDEN" name="the_value" value='$the_value'>
+ <INPUT TYPE="HIDDEN" name="maxrows" value=$maxrows>
+ <INPUT TYPE="HIDDEN" name="skip" value=$skip>
+ <INPUT TYPE="HIDDEN" name="first_date" VALUE="$first_date">
+ <INPUT TYPE="HIDDEN" name="last_date" VALUE="$last_date">
+ <INPUT class="link" TYPE="SUBMIT" NAME="Button" VALUE=$mhks.get("next")>
+ </FORM>
+#end
+ </div>
+
+</div> ## Main div end
+#parse("new/footer.vm")
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/idb/etc/template/new/message_error.vm Wed Jul 20 13:22:49 2011
@@ -0,0 +1,53 @@
+##
+## This file is part of the Time Link project hosted at
+## http://code.google.com/p/mhk/
+##
+## Copyright (c) 2010, iClio Lda (http://www.iclio.pt)
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
modification, are
+## permitted provided that the following conditions are met:
+##
+## 1. Redistributions of source code must retain the above copyright
notice, this list of
+## conditions and the following disclaimer.
+##
+## 2. Redistributions in binary form must reproduce the above copyright
notice, this list
+## of conditions and the following disclaimer in the documentation
and/or other materials
+## provided with the distribution.
+##
+## 3. Neither the name of the iClio nor the names of its contributors
may be used to endorse
+## or promote products derived from this software without specific
prior written permission.
+##
+## THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS
OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND
+## FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
COPYRIGHT HOLDERS OR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR
+## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON
+## ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING
+## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF
+## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+#set ( $title = $mhks.get("system.warning"))
+
+#parse("new/head.vm")
+
+</head>
+
+<body>
+
+#parse("new/header.vm")
+
+<div id="main">
+<div id="center_dialog">
+ <h3 class="success">$mhks.get("system.warning")</h3>
+
+ <p>$mhks.get('go.back.to') <a
href=$resp.encodeURL("${uri}?dbname=$db.dbname&action=show&id=$id")>$id</a>
+
+
+</div>
+</div>
+
+#parse("new/footer.vm")
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/idb/etc/template/new/message_success.vm Wed Jul 20 13:22:49 2011
@@ -0,0 +1,55 @@
+##
+## This file is part of the Time Link project hosted at
+## http://code.google.com/p/mhk/
+##
+## Copyright (c) 2010, iClio Lda (http://www.iclio.pt)
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
modification, are
+## permitted provided that the following conditions are met:
+##
+## 1. Redistributions of source code must retain the above copyright
notice, this list of
+## conditions and the following disclaimer.
+##
+## 2. Redistributions in binary form must reproduce the above copyright
notice, this list
+## of conditions and the following disclaimer in the documentation
and/or other materials
+## provided with the distribution.
+##
+## 3. Neither the name of the iClio nor the names of its contributors
may be used to endorse
+## or promote products derived from this software without specific
prior written permission.
+##
+## THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS
OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND
+## FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
COPYRIGHT HOLDERS OR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR
+## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR
+## SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON
+## ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING
+## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF
+## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+##
+#set ( $title = $mhks.get("success"))
+
+#parse("new/head.vm")
+
+<META HTTP-EQUIV=REFRESH
CONTENT="3;URL=$resp.encodeURL($resp.encodeURL("${uri}?dbname=$db.dbname&action=show&id=$id"))")/>
+
+</head>
+
+<body>
+
+#parse("new/header.vm")
+
+<div id="main">
+<div id="center_dialog">
+ <h3 class="success">$mhks.get("success")</h3>
+
+ <p>$mhks.get('go.back.to') <a
href=$resp.encodeURL("${uri}?dbname=$db.dbname&action=show&id=$id")>$id</a>
+ <p><i>$mhks.get('redirection')</i>
+
+</div>
+</div>
+
+#parse("new/footer.vm")
+</body>
+</html>
=======================================
--- /dev/null
+++ /trunk/idb/pt/uc/cisuc/jrc/mhk/servlet/DoChangeRPName.java Wed Jul 20
13:22:49 2011
@@ -0,0 +1,76 @@
+/*
+ * This file is part of the Time Link project hosted at
+ * http://code.google.com/p/mhk/
+ *
+ * Copyright (c)2010, iClio Lda (http://www.iclio.pt)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
notice, this list
+ * of conditions and the following disclaimer in the documentation
and/or other materials
+ * provided with the distribution.
+ *
+ * 3. Neither the name of the iClio nor the names of its contributors
may be used to endorse
+ * or promote products derived from this software without
specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS
OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package pt.uc.cisuc.jrc.mhk.servlet;
+
+import org.apache.velocity.context.Context;
+import pt.uc.cisuc.jrc.mhk.rch.DBSystem;
+import pt.uc.cisuc.jrc.mhk.rch.DBGeoentity;
+import pt.uc.cisuc.jrc.mhk.servlet.Command;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Vector;
+import java.io.*;
+
+import org.owasp.validator.html.*;
+import org.cyberneko.html.parsers.DOMParser;
+
+import org.apache.log4j.Logger;
+
+public class DoChangeRPName extends Command {
+
+Logger log =
Logger.getLogger("pt.uc.cisuc.jrc.mhk.servlet.DoChangeRPName");
+
+public DoChangeRPName ( ServletContext con, HttpServletRequest req,
HttpServletResponse resp ){
+ super(con, req, resp );
+}
+
+public String exec(Context ctx) {
+
+ DBSystem db = (DBSystem) ctx.get("db");
+
+ String entity_id = request.getParameter("id");
+ String name = request.getParameter("name");
+
+ try {
+ db.sqlUpdate("UPDATE rpersons SET sname='" + name + "' WHERE
id='"+entity_id+"'");
+ db.sqlUpdate("UPDATE rentities SET description='" + name + "' WHERE
id='"+entity_id+"'");
+ } catch (Exception e) {
+ System.out.println("[DoChangeRPName] error while changing rp
name "+e.getMessage());
+ return "message_error.vm";
+ }
+ return "message_success.vm";
+}
+
+}
=======================================
--- /trunk/idb/.upload_information Tue Jul 12 11:48:19 2011
+++ /trunk/idb/.upload_information Wed Jul 20 13:22:49 2011
@@ -1,5 +1,5 @@
-#Fri Jul 08 13:58:10 WEST 2011
-build.number=360
+#Wed Jul 20 15:48:09 WEST 2011
+build.number=465
upload.number=89
09=
-prepare.time=08/07/2011 01\:58
+prepare.time=20/07/2011 03\:48
=======================================
--- /trunk/idb/build.number Tue Jul 12 11:48:19 2011
+++ /trunk/idb/build.number Wed Jul 20 13:22:49 2011
@@ -1,4 +1,4 @@
#Build Number for ANT. Do not edit!
-#Fri Jul 08 13:58:10 WEST 2011
-build.number=361
+#Wed Jul 20 15:48:08 WEST 2011
+build.number=466
33=
=======================================
--- /trunk/idb/etc/template/new/footer.vm Fri Dec 3 07:05:49 2010
+++ /trunk/idb/etc/template/new/footer.vm Wed Jul 20 13:22:49 2011
@@ -23,11 +23,19 @@
<INPUT NAME="script" TYPE="HIDDEN" VALUE="rentity_preview.vm">
#foreach($id in $id_split)

- #set($ent = $db.getEntityBrief($id))
- <a
href="$resp.encodeURL("${uri}?dbname=$!db.dbname&action=show&id=$id")"><span
class="caps">$!ent.fields.name</span></a> <br>
-
- <INPUT TYPE="HIDDEN" name="personid" value="$id">
-
+ #set($ent = $db.getEntityBrief($id))
+ #if($ent.fields.sname) ##got an rperson
+ <a
href="$resp.encodeURL("${uri}?dbname=$!db.dbname&action=show&id=$id")"><span
class="caps">$!ent.fields.sname (RP)</span></a> <br>
+
+ #set($sql="select links.instance from links,rentities where
rentities.id=links.rid AND links.rid='$id' limit 1") ##and
rentities.user='$user'
+ #set($person_id=$dbutils.search($sql))
+ <INPUT TYPE="HIDDEN" name="personid" value="$person_id.get(0).instance">
+ #else
+ <a
href="$resp.encodeURL("${uri}?dbname=$!db.dbname&action=show&id=$id")"><span
class="caps">$!ent.fields.name</span></a> <br>
+
+ <INPUT TYPE="HIDDEN" name="personid" value="$id">
+ #end
+
#end
</FORM>

=======================================
--- /trunk/idb/etc/template/new/linking_show.vm Tue Jul 12 11:48:19 2011
+++ /trunk/idb/etc/template/new/linking_show.vm Wed Jul 20 13:22:49 2011
@@ -78,7 +78,7 @@
</thead>

<p style="text-align:right;padding:0;margin:0;"><small>* <span
style="width:20px;height:20px;background-color:#F5D0A9">&nbsp;&nbsp;&nbsp;&nbsp;</span>Includes
Robot identifications</small></p>
-
+ #set($i=0)
#foreach($result in $results)
#set($personid = $result.id)
#set($persons="yes")
@@ -93,7 +93,7 @@
<tr #if($robotid>0) bgcolor="#F5D0A9" #end>
<td>
<INPUT TYPE="CHECKBOX" NAME="personid" VALUE="$personid">
- ##<span class="flag" id="ri${enumber}"
onclick="Set_Cookie('$enumber','IDList','$personid','/');"><img
onmouseover="Tip(txt1)" title="Click to save this ID on your list"
src="${baseaddr}/images/flag.gif"></span>
+ <span class="flag" id="ri${i}"
onclick="Set_Cookie('$i','IDList','$result.id','/');"><img
onmouseover="Tip(txt1)" title="Click to save this ID on your list"
src="${baseaddr}/images/flag.gif"></span>
<a title="$mhks.get('show') $result.id"
href="$resp.encodeURL("${uri}?dbname=$!dbname&action=show&id=$result.id")">$result.id</a>
</td>
<td>
@@ -102,6 +102,7 @@
<td>$result.user</td>
<td>$result.obs</td>
</tr>
+ #set($i=$i+1)
#end

</table>
=======================================
--- /trunk/idb/etc/template/new/rperson_header.vm Tue Mar 24 03:50:48 2009
+++ /trunk/idb/etc/template/new/rperson_header.vm Wed Jul 20 13:22:49 2011
@@ -43,7 +43,7 @@
#end
##<li class="value"><span class="name">Indexed:</span> $indexed</li>
##<li class="value"><span class="name">Updated:</span> $updated</li>
- <li class="value"><span class="name">Obs:</span> $obs</li>
+ #if($obs)<li class="value"><span class="name">Obs:</span> $!obs</li>
#end
#if ($Entity.rid=="")
#else
<li class="value"><span class="name">rid:</span> <A
HREF="${uri}?dbname=$db.dbname&action=show&id=$Entity.rid">$Entity.rid</A>
=======================================
--- /trunk/idb/etc/template/new/rperson_show.vm Tue Jul 12 11:48:19 2011
+++ /trunk/idb/etc/template/new/rperson_show.vm Wed Jul 20 13:22:49 2011
@@ -131,6 +131,7 @@
<th>$mhks.get('attributes')</th>
<th>$mhks.get('relations')</th>
<th>$mhks.get('name')</th>
+ <th></th>
</tr>
#foreach($line in $rp_lines)
<!-- line -> $line -->
@@ -159,7 +160,7 @@
#set($last_name="")
#set($show_rels="YES")
#set($last_act="$line.id_act")
- #set($attrs=$dbutils.search("select
the_type,the_value,the_date,obs from attributes where
entity='$line.instance' order by the_type,the_value"))
+ #set($attrs=$dbutils.search("select
id,the_type,the_value,the_date,obs from attributes where
entity='$line.instance' order by the_type,the_value"))

#set($rels_in_sql="SELECT
relations.the_type,relations.the_value,name,relations.origin,relations.the_date,relations.obs ")
#set($rels_in_sql="$rels_in_sql FROM relations,persons where
relations.destination='$line.instance' and persons.id=relations.origin and
relations.the_type<>'identification'")
@@ -184,7 +185,8 @@

## This handles geographic attributes
#if ($gpoint_attribute.indexOf($attr.the_type)>-1)
- |<a
href=$resp.encodeURL("${uri}?dbname=$db.dbname&action=exec&script=attribute_to_kml.vm&the_value=$attr.the_value&the_type=$attr.the_type")>MAP</a>|
+ ##|<a
href=$resp.encodeURL("${uri}?dbname=$db.dbname&action=exec&script=attribute_to_kml.vm&the_value=$attr.the_value&the_type=$attr.the_type")>MAP</a>|
+ &raquo;<a
href="${uri}?dbname=$db.dbname&action=show&id=${attr.id}-geo"><i>geoentity</i></a>
#end

<!-- $attr.the_date $line.the_date -->
@@ -258,12 +260,16 @@
<td>
#if(!$last_name.equals($line.name))
<a class="caps"
title="$mhks.get('rperson.show.all.like') '$line.name'"
href="${uri}?dbname=$db.dbname&action=query&sql=select * from persons where
name='$line.name'">
- $line.name
- </a>
+ $line.name</a>
+
#set($last_name="$line.name")
#else

#end</td>
+ <td>
+
#set($url="${uri}?dbname=$!dbname&action=changerpname&id=$Entity.id&name=$line.name")
+ &nbsp;<a href="$url"
title="$mhks.get('set.name.title')"><small>&raquo;$mhks.get('set.name')</small></a>
+ </td>
</tr>
#end
</table>
=======================================
--- /trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings.properties Mon May
2 04:11:48 2011
+++ /trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings.properties Wed Jul
20 13:22:49 2011
Binary file, no diff available.
=======================================
--- /trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings_pt.properties Mon
May 2 04:11:48 2011
+++ /trunk/idb/pt/uc/cisuc/jrc/mhk/resources/MHKStrings_pt.properties Wed
Jul 20 13:22:49 2011
Binary file, no diff available.
=======================================
--- /trunk/idb/pt/uc/cisuc/jrc/mhk/servlet/CentralServlet.java Tue Jan 18
12:38:52 2011
+++ /trunk/idb/pt/uc/cisuc/jrc/mhk/servlet/CentralServlet.java Wed Jul 20
13:22:49 2011
@@ -1249,7 +1249,10 @@
template = c.exec(context);
} else if (name.equalsIgnoreCase("geoentity") && level > 2) {
c = new DoGeoentity(appcontext, req, resp);
- template = c.exec(context);
+ template = c.exec(context);
+ } else if (name.equalsIgnoreCase("changerpname") && level > 2 &&
adminUser.equals(user)) {
+ c = new DoChangeRPName(appcontext, req, resp);
+ template = c.exec(context);
} else if (name.equalsIgnoreCase("upload") && level > 2) {
c = new UploadFile(appcontext, req, resp);
template = c.exec(context);

Reply all
Reply to author
Forward
0 new messages