diff options
Diffstat (limited to 'templates')
| -rwxr-xr-x | templates/edit_component.tpl | 2 | ||||
| -rw-r--r-- | templates/stockcomponent/edit_xref_sup_item.tpl | 52 | ||||
| -rw-r--r-- | templates/stockcomponent/view_xref_sup_group.tpl | 34 | ||||
| -rw-r--r-- | templates/stockcomponent/view_xref_sup_item.tpl | 31 | ||||
| -rwxr-xr-x | templates/view_component.tpl | 5 |
5 files changed, 121 insertions, 3 deletions
diff --git a/templates/edit_component.tpl b/templates/edit_component.tpl index 197028f..380fd1f 100755 --- a/templates/edit_component.tpl +++ b/templates/edit_component.tpl @@ -30,7 +30,7 @@ {if $gContent->mInfo.stockcomponent_types} {jstabs} {section name=xrefGroup loop=$gContent->mInfo.stockcomponent_types} - {include file="bitpackage:liberty/list_xref.tpl" + {include file=$gContent->getXrefListTemplate($gContent->mInfo.stockcomponent_types[xrefGroup].template) source=$gContent->mInfo.stockcomponent_types[xrefGroup].source source_title=$gContent->mInfo.stockcomponent_types[xrefGroup].title group=$gContent->mInfo.stockcomponent_types[xrefGroup].sort_order diff --git a/templates/stockcomponent/edit_xref_sup_item.tpl b/templates/stockcomponent/edit_xref_sup_item.tpl new file mode 100644 index 0000000..3411efb --- /dev/null +++ b/templates/stockcomponent/edit_xref_sup_item.tpl @@ -0,0 +1,52 @@ +{strip} +<div class="edit stock"> + <div class="header"> + <h1>{tr}Edit Supplier{/tr}: {$gContent->getTitle()|escape}</h1> + </div> + <div class="body"> + {formfeedback error=$errors} + {form id="editXrefForm"} + <input type="hidden" name="content_id" value="{$xrefInfo.content_id|escape}" /> + <input type="hidden" name="xref_id" value="{$xrefInfo.xref_id|escape}" /> + <input type="hidden" name="item" value="{$xrefInfo.item|escape}" /> + + {if $xrefInfo.xref_title} + <div class="form-group"> + {formlabel label="Supplier"} + {forminput} + <p class="form-control-static"> + <a href="{$smarty.const.CONTACT_PKG_URL}display_contact.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|escape}</a> + </p> + {/forminput} + </div> + {/if} + + <div class="form-group"> + {formlabel label="Part Number" for="xkey"} + {forminput} + <input type="text" class="form-control input-small" name="xkey" id="xkey" value="{$xrefInfo.xkey|escape}" /> + {/forminput} + </div> + + <div class="form-group"> + {formlabel label="Price" for="xkey_ext"} + {forminput} + <input type="text" class="form-control input-small" name="xkey_ext" id="xkey_ext" value="{$xrefInfo.xkey_ext|escape}" /> + {/forminput} + </div> + + <div class="form-group"> + {formlabel label="Note" for="edit"} + {forminput} + <input type="text" class="form-control" name="edit" id="edit" value="{$xrefInfo.data|escape}" /> + {/forminput} + </div> + + <div class="form-group submit"> + <input type="submit" class="btn btn-default" name="fCancel" value="{tr}Cancel{/tr}" /> + <input type="submit" class="btn btn-primary" name="fSaveXref" value="{tr}Save{/tr}" /> + </div> + {/form} + </div> +</div> +{/strip} diff --git a/templates/stockcomponent/view_xref_sup_group.tpl b/templates/stockcomponent/view_xref_sup_group.tpl new file mode 100644 index 0000000..c8914da --- /dev/null +++ b/templates/stockcomponent/view_xref_sup_group.tpl @@ -0,0 +1,34 @@ +{assign var=xrefcnt value=$gContent->mInfo.$source|default:[]|@count} +{assign var=xrefAllowEdit value=$allow_edit|default:true} +{jstab title="$source_title ($xrefcnt)"} +{legend legend=$source_title} +<div class="form-group table-responsive"> + <table> + <thead> + <tr> + <th>{tr}Supplier{/tr}</th> + <th>{tr}Part No.{/tr}</th> + <th>{tr}Price{/tr}</th> + <th>{tr}Note{/tr}</th> + {if $xrefAllowEdit}<th>{tr}Added{/tr}</th><th>{tr}Updated{/tr}</th><th>{tr}Edit{/tr}</th>{/if} + </tr> + </thead> + <tbody> + {section name=xref loop=$gContent->mInfo.$source} + {assign var=_rowTpl value=$gContent->mInfo.$source[xref].template} + {include file=$gContent->getXrefRecordTemplate($_rowTpl)} + {sectionelse} + <tr class="norecords"> + <td colspan="7">{tr}No supplier records found{/tr}</td> + </tr> + {/section} + </tbody> + </table> +</div> +{if $allow_add && $gContent->isValid() && $gContent->hasUpdatePermission() && $source ne 'history'} + <div> + {smartlink ititle="Add record" ipackage="liberty" ifile="add_xref.php" booticon="icon-note-add" content_id=$gContent->mInfo.content_id group=$group} + </div> +{/if} +{/legend} +{/jstab} diff --git a/templates/stockcomponent/view_xref_sup_item.tpl b/templates/stockcomponent/view_xref_sup_item.tpl new file mode 100644 index 0000000..21377c0 --- /dev/null +++ b/templates/stockcomponent/view_xref_sup_item.tpl @@ -0,0 +1,31 @@ +{strip} +<tr class="{cycle values="even,odd"}"> + <td> + {if $gContent->mInfo.$source[xref].xref > 0} + <a href="{$smarty.const.CONTACT_PKG_URL}display_contact.php?content_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> + {else} + + {/if} + </td> + <td>{$gContent->mInfo.$source[xref].xkey|escape}</td> + <td>{$gContent->mInfo.$source[xref].xkey_ext|escape}</td> + <td>{$gContent->mInfo.$source[xref].data|escape}</td> + <td>{$gContent->mInfo.$source[xref].last_update_date|bit_short_date}</td> + {if $xrefAllowEdit|default:true} + <td> + <span class="actionicon"> + {if $gContent->hasUpdatePermission() && $source ne 'history'} + {smartlink ititle="Edit" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id} + {/if} + {if $gContent->hasExpungePermission()} + {if $source eq 'history'} + {smartlink ititle="Restore" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=-1} + {else} + {smartlink ititle="Delete" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-delete" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=1} + {/if} + {/if} + </span> + </td> + {/if} +</tr> +{/strip} diff --git a/templates/view_component.tpl b/templates/view_component.tpl index 379e839..f97373c 100755 --- a/templates/view_component.tpl +++ b/templates/view_component.tpl @@ -28,10 +28,11 @@ {if $gContent->mInfo.stockcomponent_types} {jstabs} {section name=xrefGroup loop=$gContent->mInfo.stockcomponent_types} - {include file="bitpackage:liberty/list_xref.tpl" + {include file=$gContent->getXrefListTemplate($gContent->mInfo.stockcomponent_types[xrefGroup].template) source=$gContent->mInfo.stockcomponent_types[xrefGroup].source source_title=$gContent->mInfo.stockcomponent_types[xrefGroup].title - group=$gContent->mInfo.stockcomponent_types[xrefGroup].sort_order} + group=$gContent->mInfo.stockcomponent_types[xrefGroup].sort_order + allow_edit=false} {/section} {/jstabs} {/if} |
