forked from techjoomla/com_cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
techjoomla#12 chore: Update query, added joins based on filters & int…
…roduce new ACL
- Loading branch information
Showing
9 changed files
with
288 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 85 additions & 18 deletions
103
src/components/com_cluster/administrator/models/forms/cluster.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,91 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fieldset> | ||
<field name="id" type="hidden" /> | ||
<field name="name" type="text" required="true" filter="string" label="COM_CLUSTER_CLUSTER_FORM_LBL_NAME" description="COM_CLUSTER_CLUSTER_FORM_DESC_NAME" /> | ||
<field name="description" type="text" filter="SAFEHTML" label="COM_CLUSTER_CLUSTER_FORM_LBL_DESCRIPTION" description="COM_CLUSTER_CLUSTER_FORM_DESC_DESCRIPTION" /> | ||
<field name="params" type="textarea" filter="string" label="COM_CLUSTER_CLUSTER_FORM_LBL_PARAMS" description="COM_CLUSTER_CLUSTER_FORM_DESC_PARAMS" /> | ||
<field name="client" required="true" type="text" filter="string" label="COM_CLUSTER_CLUSTER_FORM_LBL_CLIENT" description="COM_CLUSTER_CLUSTER_FORM_DESC_CLIENT" /> | ||
<field name="client_id" required="true" type="text" filter="INT" default="0" label="COM_CLUSTER_CLUSTER_FORM_LBL_CLIENT_ID" description="COM_CLUSTER_CLUSTER_FORM_DESC_CLIENT_ID" size="10" /> | ||
<field name="state" type="list" filter="intval" label="JSTATUS" description="" default="1" class="inputbox" size="1"> | ||
<option value="1">JPUBLISHED</option> | ||
<option value="0">JUNPUBLISHED</option> | ||
<option value="2">JARCHIVED</option> | ||
<option value="-2">JTRASHED</option> | ||
<field name="id" type="hidden"/> | ||
<field | ||
name="name" | ||
type="text" | ||
required="true" | ||
filter="string" | ||
label="COM_CLUSTER_CLUSTER_FORM_LBL_NAME" | ||
description="COM_CLUSTER_CLUSTER_FORM_DESC_NAME"/> | ||
<field | ||
name="description" | ||
type="text" | ||
filter="SAFEHTML" | ||
label="COM_CLUSTER_CLUSTER_FORM_LBL_DESCRIPTION" | ||
description="COM_CLUSTER_CLUSTER_FORM_DESC_DESCRIPTION"/> | ||
|
||
<field | ||
name="params" | ||
type="textarea" | ||
filter="string" | ||
label="COM_CLUSTER_CLUSTER_FORM_LBL_PARAMS" | ||
description="COM_CLUSTER_CLUSTER_FORM_DESC_PARAMS"/> | ||
|
||
<field | ||
name="client" | ||
required="true" | ||
type="text" | ||
filter="string" | ||
label="COM_CLUSTER_CLUSTER_FORM_LBL_CLIENT" | ||
description="COM_CLUSTER_CLUSTER_FORM_DESC_CLIENT"/> | ||
|
||
<field | ||
name="client_id" | ||
required="true" | ||
type="text" | ||
filter="INT" | ||
default="0" | ||
label="COM_CLUSTER_CLUSTER_FORM_LBL_CLIENT_ID" | ||
description="COM_CLUSTER_CLUSTER_FORM_DESC_CLIENT_ID" | ||
size="10" /> | ||
|
||
<field | ||
name="state" | ||
type="list" | ||
filter="intval" | ||
label="JSTATUS" | ||
description="" | ||
default="1" | ||
class="inputbox" | ||
size="1"> | ||
<option value="1">JPUBLISHED</option> | ||
<option value="0">JUNPUBLISHED</option> | ||
<option value="2">JARCHIVED</option> | ||
<option value="-2">JTRASHED</option> | ||
</field> | ||
<field name="created_by" type="hidden" /> | ||
<field name="modified_on" type="hidden" /> | ||
<field name="modified_by" type="hidden" /> | ||
<field name="created_on" type="hidden" /> | ||
<field name="ordering" type="hidden" filter="INT" /> | ||
<field name="checked_out" type="hidden" filter="unset" /> | ||
<field name="checked_out_time" type="hidden" filter="unset" /> | ||
|
||
<field | ||
name="created_by" | ||
type="hidden"/> | ||
|
||
<field | ||
name="modified_on" | ||
type="hidden"/> | ||
|
||
<field | ||
name="modified_by" | ||
type="hidden" | ||
/> | ||
|
||
<field | ||
name="created_on" | ||
type="hidden"/> | ||
|
||
<field | ||
name="ordering" | ||
type="hidden" | ||
filter="INT"/> | ||
|
||
<field | ||
name="checked_out" | ||
type="hidden" | ||
filter="unset"/> | ||
|
||
<field | ||
name="checked_out_time" | ||
type="hidden" | ||
filter="unset"/> | ||
</fieldset> | ||
</form> |
90 changes: 75 additions & 15 deletions
90
src/components/com_cluster/administrator/models/forms/clusteruser.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fieldset> | ||
<field name="id" type="hidden" /> | ||
<field name="cluster_id" required="true" type="sql" query="SELECT id,name FROM `#__tj_clusters` WHERE state = '1' ORDER BY id DESC" key_field="id" value_field="name" translate="false" header="COM_CLUSTER_USER_FORM_LBL_CLUSTER_HEADER" filter="int" label="COM_CLUSTER_USER_FORM_LBL_CLUSTER" description="COM_CLUSTER_USER_FORM_LBL_CLUSTER_DESC" /> | ||
<field name="user_id" required="true" type="user" filter="INT" default="0" label="COM_CLUSTER_USER_FORM_LBL_USER" description="COM_CLUSTER_USER_FORM_LBL_USER_DESC" size="10" /> | ||
<field name="state" type="list" filter="intval" label="JSTATUS" description="" default="1" class="inputbox" size="1"> | ||
<option value="1">JPUBLISHED</option> | ||
<option value="0">JUNPUBLISHED</option> | ||
<option value="2">JARCHIVED</option> | ||
<option value="-2">JTRASHED</option> | ||
<field name="id" type="hidden"/> | ||
<field | ||
name="cluster_id" | ||
required="true" | ||
type="sql" | ||
query="SELECT id,name FROM `#__tj_clusters` WHERE state = '1' ORDER BY id DESC" key_field="id" value_field="name" | ||
translate="false" | ||
header="COM_CLUSTER_USER_FORM_LBL_CLUSTER_HEADER" | ||
filter="int" | ||
label="COM_CLUSTER_USER_FORM_LBL_CLUSTER" | ||
description="COM_CLUSTER_USER_FORM_LBL_CLUSTER_DESC" | ||
/> | ||
<field | ||
name="user_id" | ||
required="true" | ||
type="user" | ||
filter="INT" | ||
default="0" | ||
label="COM_CLUSTER_USER_FORM_LBL_USER" | ||
description="COM_CLUSTER_USER_FORM_LBL_USER_DESC" | ||
size="10" /> | ||
|
||
<field | ||
name="state" | ||
type="list" | ||
filter="intval" | ||
label="JSTATUS" | ||
description="" | ||
default="1" | ||
class="inputbox" | ||
size="1"> | ||
<option value="1">JPUBLISHED</option> | ||
<option value="0">JUNPUBLISHED</option> | ||
<option value="2">JARCHIVED</option> | ||
<option value="-2">JTRASHED</option> | ||
</field> | ||
<field name="created_by" type="user" label="JGLOBAL_FIELD_CREATED_BY_LABEL" class="readonly" readonly="true" filter="unset" /> | ||
<field name="modified_on" type="hidden" /> | ||
<field name="modified_by" type="user" label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" class="readonly" readonly="true" filter="unset" /> | ||
<field name="created_on" type="hidden" /> | ||
<field name="ordering" type="hidden" filter="INT" /> | ||
<field name="checked_out" type="hidden" filter="unset" /> | ||
<field name="checked_out_time" type="hidden" filter="unset" /> | ||
|
||
<field | ||
name="created_by" | ||
type="user" | ||
label="JGLOBAL_FIELD_CREATED_BY_LABEL" | ||
class="readonly" | ||
readonly="true" | ||
filter="unset" | ||
/> | ||
|
||
<field | ||
name="modified_on" | ||
type="hidden"/> | ||
|
||
<field | ||
name="modified_by" | ||
type="user" | ||
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" | ||
class="readonly" | ||
readonly="true" | ||
filter="unset" | ||
/> | ||
<field | ||
name="created_on" | ||
type="hidden"/> | ||
|
||
<field | ||
name="ordering" | ||
type="hidden" | ||
filter="INT"/> | ||
|
||
<field | ||
name="checked_out" | ||
type="hidden" | ||
filter="unset"/> | ||
|
||
<field | ||
name="checked_out_time" | ||
type="hidden" | ||
filter="unset"/> | ||
</fieldset> | ||
</form> |
31 changes: 26 additions & 5 deletions
31
src/components/com_cluster/administrator/models/forms/filter_clusters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fields name="filter"> | ||
<field name="search" type="text" label="COM_CLUSTER_FILTER_SEARCH_LABEL" description="COM_CLUSTER_CLUSTERS_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> | ||
<field name="state" type="status" label="COM_CLUSTER_FILTER_PUBLISHED" description="COM_CLUSTER_FILTER_PUBLISHED_DESC" onchange="this.form.submit();"> | ||
<field | ||
name="search" | ||
type="text" | ||
label="COM_CLUSTER_FILTER_SEARCH_LABEL" | ||
description="COM_CLUSTER_CLUSTERS_FILTER_SEARCH_DESC" | ||
hint="JSEARCH_FILTER" | ||
/> | ||
<field | ||
name="state" | ||
type="status" | ||
label="COM_CLUSTER_FILTER_PUBLISHED" | ||
description="COM_CLUSTER_FILTER_PUBLISHED_DESC" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">JOPTION_SELECT_PUBLISHED</option> | ||
</field> | ||
<input type="hidden" name="form_submited" value="1" /> | ||
<input type="hidden" name="form_submited" value="1"/> | ||
</fields> | ||
|
||
<fields name="list"> | ||
<field name="limit" type="limitbox" label="COM_CLUSTER_LIST_LIMIT" description="COM_CLUSTER_LIST_LIMIT_DESC" class="input-mini" default="25" onchange="this.form.submit();" /> | ||
<field | ||
name="limit" | ||
type="limitbox" | ||
label="COM_CLUSTER_LIST_LIMIT" | ||
description="COM_CLUSTER_LIST_LIMIT_DESC" | ||
class="input-mini" | ||
default="25" | ||
onchange="this.form.submit();" | ||
/> | ||
</fields> | ||
</form> | ||
</form> |
Oops, something went wrong.