anvoz / CodeIgniter-Skeleton

A decent starter for most web apps. Includes HMVC, jQuery, Bootstrap, Bootstrap TLDR, Ajax and Template libraries. Unit tests with PHPUnit and vfsStream.
Other
157 stars 100 forks source link

change directories layout, better manager of layouts (not only one) #16

Open enlacee opened 9 years ago

enlacee commented 9 years ago

I want add this functionality, for multiple layout, the old not help me, I think this may help

enlacee commented 9 years ago

I have other changes about JS mini script in view, and so metada custom sum for each controller y not set absolutie. in Template

anvoz commented 9 years ago

Thank you. I think adding the way to manage multi layouts for this project is great.

Basically all test cases must be passed before I can merge this PR into master branch. Please take a look at this to see why the test was failed.

But since you changed a lot of files that could make this project no longer backward compatible to older version, it would be trickier to accept the change. Imagine there're a lot of people who already use this project, and when they upgrade to newer version, everything is broken and they have to figure out and fix it themselves.

I would not use "partial", sounds like conflict with the term "pagelet" I'm using for this project. How about "theme"? We would add set_theme function. And the default theme path is unchanged, e.g. base_view is still located at application/views/base_view.php.

When we set new theme, e.g. "dark" theme, the new base view is located at application/views/dark/base_view.php. All views of "dark" theme are also located at application/views/dark/.

enlacee commented 9 years ago

this test I understand tittle, that test (and implicates of files) but the lines : 17-20 in (this is possible error :D ) :

application/libraries/Dialog.php

changes that thing, this brings a crawl errors

CodeIgniter-Skeleton/tests

I tested but I found the error in , not quite understand this test (Unit and vfsStream) for I'm not solutions

image test when was comment (the next error is because change directories of views) afters test comment 17-20

note: I'm thank if you send information about (test unit, vfsStream in this proyect :D )

anvoz commented 9 years ago

Are you still working on this? If so, just reopen this pull request.

When you make changes on a library of this project, some test cases could be failed. And you would have to confirm that they are not failed due to some unexpected behaviors and then, fix these test cases. Some details about the test suite is here. I just copied from the CodeIgniter original project here. So take some times to check this if you want to fix the test suite.

But I'd prefer to add more features to this project without breaking the test suite as I mentioned earlier.

I would not use "partial", sounds like conflict with the term "pagelet" I'm using for this project. How about "theme"? We would add set_theme function. And the default theme path is unchanged, e.g. base_view is still located at application/views/base_view.php.

When we set new theme, e.g. "dark" theme, the new base view is located at application/views/dark/base_view.php. All views of "dark" theme are also located at application/views/dark/.