Index: applications/editors/josm/plugins/pointInfo/build.xml
===================================================================
--- applications/editors/josm/plugins/pointInfo/build.xml	(revision 30832)
+++ applications/editors/josm/plugins/pointInfo/build.xml	(revision 30833)
@@ -3,5 +3,5 @@
 
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="PointInfo: Add an initial support for Ruian error reporting."/>
+    <property name="commit.message" value="PointInfo: Show issues reported on Ruian buildings."/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="7001"/>
Index: applications/editors/josm/plugins/pointInfo/servers/RUIAN/index.php
===================================================================
--- applications/editors/josm/plugins/pointInfo/servers/RUIAN/index.php	(revision 30832)
+++ applications/editors/josm/plugins/pointInfo/servers/RUIAN/index.php	(revision 30833)
@@ -73,6 +73,37 @@
            "plati_od" => $row["plati_od"]
            );
+
+  // Reported issues on building
+  $query="
+    select nb.user_nick, nb.datum, nbd.popis, nb.poznamka
+    from neplatne_budovy nb, neplatne_budovy_duvod nbd
+    where nb.duvod = nbd.id and nb.kod = ".$row["kod"]."
+    ;
+  ";
+  $result=pg_query($CONNECT,$query);
+
+  if (pg_num_rows($result) > 0)
+  {
+    $row = pg_fetch_array($result, 0);
+
+
+    $data["nahlaseny_problem"] =
+      array( "uzivatel" => $row["user_nick"],
+             "datum" => $row["datum"],
+             "duvod" => $row["popis"],
+             "poznamka" => $row["poznamka"]
+            );
+  } else
+  {
+    $data["nahlaseny_problem"] = array();
+  }
 } else
+{
     $data["stavebni_objekt"] = array();
+    $data["nahlaseny_problem"] = array();
+}
+
+
+
 
 // Ghosts: Buildings without geometry in close neighbourhood
Index: applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java
===================================================================
--- applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java	(revision 30832)
+++ applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/PointInfoAction.java	(revision 30833)
@@ -108,8 +108,12 @@
                 @Override
                 protected void finish() {
+
+                }
+
+                @Override
+                protected void afterFinish() {
                   if (htmlText.length() > 0) {
 
                     // Show result
-                    System.out.println("htmlText: " + htmlText);
                     JEditorPane msgLabel = new JEditorPane("text/html", htmlText);
                     msgLabel.setEditable(false);
Index: applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java
===================================================================
--- applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java	(revision 30832)
+++ applications/editors/josm/plugins/pointInfo/src/org/openstreetmap/josm/plugins/pointinfo/ruianModule.java	(revision 30833)
@@ -400,4 +400,9 @@
     private String   m_objekt_plati_od;
 
+    private String  m_err_user;
+    private String  m_err_date;
+    private String  m_err_type;
+    private String  m_err_note;
+
     private ArrayList <objectWithoutGeometry> m_so_bez_geometrie;
 
@@ -450,4 +455,9 @@
       m_objekt_plati_od = "";
 
+      m_err_user = "";
+      m_err_date = "";
+      m_err_type = "";
+      m_err_note = "";
+
       m_so_bez_geometrie = new ArrayList<objectWithoutGeometry> ();
       m_adresni_mista = new ArrayList<addrPlaces> ();
@@ -570,4 +580,36 @@
       } catch (Exception e) {
         System.out.println("stavebni_objekt: " + e.getMessage());
+      }
+
+// =========================================================================
+      try {
+        JsonObject errObjekt = obj.getJsonObject("nahlaseny_problem");
+
+        try {
+          m_err_user = errObjekt.getString("uzivatel");
+        } catch (Exception e) {
+          System.out.println("nahlaseny_problem.uzivatel: " + e.getMessage());
+        }
+
+        try {
+          m_err_date = errObjekt.getString("datum");
+        } catch (Exception e) {
+          System.out.println("nahlaseny_problem.datum: " + e.getMessage());
+        }
+
+        try {
+          m_err_type = errObjekt.getString("duvod");
+        } catch (Exception e) {
+          System.out.println("nahlaseny_problem.duvod: " + e.getMessage());
+        }
+
+        try {
+          m_err_note = errObjekt.getString("poznamka");
+        } catch (Exception e) {
+          System.out.println("nahlaseny_problem.poznamka: " + e.getMessage());
+        }
+
+      } catch (Exception e) {
+        System.out.println("nahlaseny_problem: " + e.getMessage());
       }
 
@@ -931,5 +973,5 @@
         return "";
 
-      r.append("<html><body bgcolor=\"white\" color=\"black\" topmargin=\"2\" leftmargin=\"2\" >");
+        r.append("<html><body bgcolor=\"white\" color=\"black\" ><table><tr><td>");
       r.append("<br/>");
       if (m_objekt_ruian_id > 0) {
@@ -946,5 +988,4 @@
         r.append("<b>Datum dokončení: </b>" + m_objekt_dokonceni + "<br/>");
         r.append("<b>Platí od: </b>" + m_objekt_plati_od + "<br/>");
-        r.append("<br/>");
 
         if (m_adresni_mista.size() > 1) {
@@ -952,4 +993,5 @@
           // More address places
           int i = 0;
+          r.append("<br/>");
           r.append("<b>" + m_adresni_mista.get(i).getCisloTyp() + "</b> (více adres)<b>: </b>" + m_adresni_mista.get(i).getCisloDomovni() + "<br/>");
           r.append("<b>Část obce: </b>" + m_adresni_mista.get(i).getCastObce());
@@ -969,4 +1011,5 @@
           // Without building number
           int i = 0;
+          r.append("<br/>");
           r.append("<i><u>Informace o adrese</u></i><br/>");
           r.append("<b>Budova: </b>" + m_adresni_mista.get(i).getCisloTyp() + "<br/>");
@@ -991,4 +1034,5 @@
             x_name = "/orientační";
           }
+          r.append("<br/>");
           r.append("<i><u>Informace o adrese</u></i><br/>");
           r.append("<b>RUIAN id: </b>"+ m_adresni_mista.get(i).getRuianID() +"&nbsp;&nbsp;<a href="+ url_adresni_misto + m_adresni_mista.get(i).getRuianID() +">" + icon_ext_link + "</a>");
@@ -1018,6 +1062,25 @@
 
         }
+         r.append("<br/>");
+      }
+
+      // Reported errors
+      if (m_objekt_ruian_id > 0 && !m_err_user.equals("")) {
+          r.append("<i><u>Nahlášený problém</u></i>");
+          r.append("&nbsp;&nbsp;<a href=" + url_ruian_error + m_objekt_ruian_id + ">"+ icon_ext_link +"</a><br/>");
+          r.append("<b>Nahlásil: </b>" + m_err_user);
+          r.append("<br/>");
+          r.append("<b>Dne: </b>" + m_err_date);
+          r.append("<br/>");
+          r.append("<b>Typ problému: </b>" + m_err_type);
+          r.append("<br/>");
+          if (!m_err_note.equals("")) {
+            r.append("<b>Poznámka: </b>" + m_err_note);
+            r.append("<br/>");
+          }
         r.append("<br/>");
       }
+
+      // Address places
       if (m_adresni_mista.size() > 1 && m_objekt_ruian_id > 0) {
         String x = "";
@@ -1027,5 +1090,4 @@
         r.append("<i><u>Adresní místa</u></i><br/>");
         for (int i=0; i<m_adresni_mista.size(); i++) {
-//           r.append(m_adresni_mista.get(i).getRuianID());
           r.append(m_adresni_mista.get(i).getUlice() + " " + x + m_adresni_mista.get(i).getCisloDomovni());
           if (!m_adresni_mista.get(i).getCisloOrientacni().isEmpty()) {
@@ -1142,5 +1204,5 @@
       r.append("<hr/>");
       r.append("<center><i><small>Zdroj: <a href=\"http://www.ruian.cz/\">" + m_source + "</a></small></i></center>");
-      r.append("</body></html>");
+      r.append("</td></tr></table></body></html>");
 
       return r.toString();
@@ -1395,5 +1457,5 @@
 
     private String m_text = "";
-    private String URL = "http://josm.poloha.net/pointInfo/v3/index.php";
+    private String URL = "http://josm.poloha.net/pointInfo/v4/index.php";
     protected PointInfoServer server = new PointInfoServer();
 
