Commits

Tetsuya Morimoto committed abec5a2

fixed #3 to be able to select a column or a row in query-result page

Comments (0)

Files changed (1)

 
     def _filter_groups(self, req, data):
         fields_tref = data["fields"].get(TREF)
-        fields_tref_type = ""
         if fields_tref:  # column checkbox/select option
             fields_tref["label"] = _("Relationships")
-            fields_tref_type = fields_tref["type"]
+            if fields_tref["type"] == u"textarea":
+                data["all_columns"].append(TREF)
+
         for header in data["headers"]:  # list view header
             if header["name"] == TREF:
                 header["label"] = _("Relationships")
+
         for group, tickets in data["groups"]:
             for ticket in tickets:
                 if TREF in ticket:
-                    if fields_tref_type == u"textarea":
+                    if TREF in data["row"]:
                         ticket[TREF] = self._link_textarea(req, ticket[TREF])
-                    elif fields_tref_type == u"text":
+                    else:  # expect TREF in data["col"]
                         ticket[TREF] = self._link_refs(req, ticket[TREF])
 
     def _filter_row_groups(self, req, data):