prestui
1.0.0
Prestui是一个UI库,可帮助您开发Prestashop模块的接口。它允许您编写一个简洁的HTML,与所有最新版本的Prestashop(1.5、1.6和1.7)兼容。 Prestui将自动调整该模块的Prestashop版本。
例如,您可以写:
< ps-switch name =" switch " label =" Switch " yes =" Yes " no =" No " active =" true " > </ ps-switch >您将自动获得类似的东西,这是Prestashop的有效HTML(在这里1.6+):
< div class =" form-group " >
< label class =" control-label col-lg-3 " > < span > Switch </ span > </ label >
< div class =" col-lg-9 " >
< span class =" switch prestashop-switch fixed-width-lg " >
< input type =" radio " value =" 1 " name =" switch " id =" switch_on " checked =" checked " >
< label for =" switch_on " > Yes </ label >
< input type =" radio " value =" 0 " name =" switch " id =" switch_off " >
< label for =" switch_off " > No </ label >
< a class =" slide-button btn " > </ a >
</ span >
</ div >
</ div >Prestui基于Riotjs 3,这是一个非常轻的反应式用户界面库。您可以在GitHub上找到有关Riotjs的更多信息,并在官方网站上找到完整的文档。
要使用Prestui,您需要将文件包括在模块中。下载prestui并在/views/templates/admin/中移动文件夹
您还需要包含Riotjs+编译器,因为所有组件均基于它。您可以下载副本并将其包含在模块中,也可以使用CDN。
您现在可以包括Prestui和Riotjs:
$ this -> context -> controller -> addJS ( ' path/to/riot+compiler.js ' )
$ html = $ this -> display ( __FILE__ , ' path/to/your/file.tpl ' )
return $ html. $ this -> display ( __FILE__ , ' views/templates/admin/prestui/ps-tags.tpl ' );如果您只需要几个标签,则可以在渲染PS-TAG之前只使用所需的组分配一个变量:
$ this -> smarty -> assign ( ' tags ' , array ( ' tabs ' , ' panel ' ));所有可用标签及其属性均在Wiki上列出
找到一个错误还是有想法?使用GitHub的门票系统。如果您想帮助并添加功能或修复错误,则需要提出拉动请求:
Prestui已获得MIT许可证的许可