+ "Value": "If(GetVar(Search)){\r\n SetVar(Where,\"delete=0 and buildings_use_class=#Search#\")\r\n}.Else{\r\n SetVar(Where,\"delete=0\").(Search,)\r\n}\r\n\r\nIf(GetVar(Order)){}.Else{\r\n SetVar(Order,\"id desc\")\r\n}\r\n\r\nDBFind(applications).Columns(\"name,id\").Where(\"name='Land registry'\").Vars(application)\r\n\r\nDBFind(Name: land_registry, Source: src_land_registry).Where(#Where#).Order(#Order#).Custom(_id){\r\n Span(#id#)\r\n}.Custom(_owner){\r\n DBFind(Name: members, Source: src_members).Where(\"id=#owner_id#\").Vars(row)\r\n LinkPage(Page: profile_view, PageParams: \"v_member_id=#row_id#\"){\r\n Span(Class: h5 text-bold, Body: #row_member_name#)\r\n }\r\n}.Custom(_land){\r\n Span(AppParam(App:#application_id#, Name: land_use, Index: #land_use#))\r\n}.Custom(_buildings){\r\n Span(AppParam(App:#application_id#, Name: land_buildings_use_class, Index: #buildings_use_class#))\r\n}.Custom(_area){\r\n Span(#area#)\r\n}.Custom(_address){\r\n Span(#address#)\r\n}.Custom(_cons){\r\n Div(h6 ml-lg){\r\n If(#price#>0){\r\n Span(#price#)\r\n }.Else{\r\n Em(Class: fa fa-1x text-muted fa-question-circle)\r\n }\r\n }\r\n}.Custom(_legal){\r\n Div(h6 ml-lg){\r\n If(#legal_status#==0){\r\n Em(Class: fa fa-1x text-muted fa-question-circle)\r\n }\r\n If(#legal_status#==1){\r\n Em(Class: fa fa-1x text-success fa-check-circle)\r\n }\r\n If(#legal_status#==2){\r\n Em(Class: fa fa-1x text-danger fa-exclamation-circle)\r\n }\r\n }\r\n}.Custom(_encumberance){\r\n Div(h6 ml-lg){\r\n If(#encumbrance_certificate#==0){\r\n Em(Class: fa fa-1x text-muted fa-question-circle)\r\n }\r\n If(#encumbrance_certificate#==1){\r\n Em(Class: fa fa-1x text-success fa-check-circle)\r\n }\r\n If(#encumbrance_certificate#==2){\r\n Em(Class: fa fa-1x text-danger fa-exclamation-circle)\r\n }\r\n }\r\n}.Custom(_actions){\r\n Div(text-right text-nowrap){\r\n Button(Page: #this#, Contract: land_registry_Delete, Params: \"LandId=#id#\", Class: btn btn-default fa fa-2x fa-trash mh-sm)\r\n Button(Page: land_registry_view, PageParams: \"LandId=#id#\", Class: btn btn-default fa fa-2x fa-eye mh-sm)\r\n }\r\n}.Count(reg_count)\r\n\r\nDiv(Class: content-wrapper){\r\n Form(panel panel-primary){\r\n Div(panel-body){\r\n Div(row){\r\n Div(col-md-9 text-left){\r\n Div(input-group){\r\n Div(input-group-addon){\r\n $buildings_use_class$\r\n }\r\n AppParam(App:#application_id#, Name: land_buildings_use_class, Source:src_search)\r\n Select(Name: BuildingUse, Source: src_search, NameColumn: name, ValueColumn: id, Value: #Search#)\r\n\r\n Div(input-group-btn){\r\n Button(Page: #this#, PageParams: \"Search=Val(BuildingUse),Order=#Order#\", Class: btn btn-default fa fa-search)\r\n }\r\n }\r\n }\r\n Div(col-md-3 text-center){\r\n Div(btn-group text-nowrap){\r\n If(#Order#==\"price\"){\r\n Button(Page: #this#, Class: ml-sm btn bg-gray, PageParams: \"Order=price desc,Search=#Search#\", Body: Em(Class:fa fa-sort-numeric-asc) $price$)\r\n }.ElseIf(#Order#==\"price desc\"){\r\n Button(Page: #this#, Class: ml-sm btn bg-gray, PageParams: \"Order=price,Search=#Search#\", Body: Em(Class:fa fa-sort-numeric-desc) $price$)\r\n }.Else{\r\n Button(Page: #this#, Class: ml-sm btn bg-gray-lighter, PageParams: \"Order=price,Search=#Search#\", Body: $price$)\r\n }\r\n\r\n If(#Order#==\"area\"){\r\n Button(Page: #this#, Class: ml-sm btn bg-gray, PageParams: \"Order=area desc,Search=#Search#\", Body: Em(Class:fa fa-sort-numeric-asc) $area_size$)\r\n }.ElseIf(#Order#==\"area desc\"){\r\n Button(Page: #this#, Class: ml-sm btn bg-gray, PageParams: \"Order=area,Search=#Search#\", Body: Em(Class:fa fa-sort-numeric-desc) $area_size$)\r\n }.Else{\r\n Button(Page: #this#, Class: ml-sm btn bg-gray-lighter, PageParams: \"Order=area desc,Search=#Search#\", Body: $area_size$)\r\n }\r\n }\r\n\r\n\r\n }\r\n }\r\n Div(table-responsive){\r\n Table(Source:src_land_registry, Columns: \"ID=_id,$owner$=_owner,$area_size$=_area,$lr_address$=_address,$consideration_value$(INR)=_cons,$legal_status$=_legal,$encumbrance_certificate$=_encumberance,=_actions\")\r\n }\r\n If(GetVar(isSearch) == 1){\r\n Div(row){\r\n Div(col-md-12 mt-lg){\r\n Div(text-center){\r\n Button(Body: View all, Class: btn btn-primary, Page: #this#, PageParams: \"isSearch=0\")\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}",
0 commit comments