Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"oil generate admin/orm" generates an additional wrong template file #231

Closed
sdrdis opened this issue Aug 7, 2014 · 3 comments
Closed

Comments

@sdrdis
Copy link
Contributor

sdrdis commented Aug 7, 2014

Hi!

If I generate a scaffold using oil generate admin/orm, it generates an additional template file located at APPPATH/views/template.php, which is similar to the one at APPPATH/views/admin/templates.php. So when I generate a scaffold using oil generate scaffold/orm, the template file is not replaced, and I get an error since the template requires $current_user...

Thanks,

@WanWizard
Copy link
Member

The scaffold template is public, and doesn't require (or use) a logged in user, the admin template is not public, requires a login, and uses $current_user. So they are different templates.

Are you saying that both are generated in the same app location? That would be very wrong...

@WanWizard
Copy link
Member

Just ran a test here, and I don't see a problem, admin templates are generated separated from frontend templates. I see that the templates don't seem to be bootstrap 3 compatible, but that is another issue.

@sdrdis
Copy link
Contributor Author

sdrdis commented Aug 8, 2014

Hi,

I might not have been enough clear. I will show you exactly what I did:

First I installed Fuel:

git clone git@github.com:fuel/fuel.git
php composer.phar update

Then I generated an admin scaffold:

php oil generate admin/orm category name:string

Among the files that were generated, there are two templates:
One at APPPATH/views/template.php, and one at APPPATH/views/admin/template.php. The problem is that both are exactly similar ; APPPATH/views/template.php seems incorrect, as it is checking for <?php if ($current_user): ?>.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants