Skip to main content

Building Recipe Binder Online: Hiding buttons for not logged in users in Yii2





While building Recipe Binder Online an issue cropped up. The Update and Delete buttons were visible to not logged in users.



The website has been built using the Yii2 framework.

See my earlier post on the reasons for using this framework (The Idea for creating the Recipe Binder Online website)

The changes in code to hide the update and delete buttons in the view file were done with help of the following resources

https://stackoverflow.com/questions/33254870/how-to-disable-a-button-in-yii2

The image of the same web-page after the changes:




Comments

Popular posts from this blog

The frist recipe to be made 'Kale Chane'

My daughter made the first ever recipe from Recipe Binder Online . This was the recipe Basic recipe for Kale Chane . It came out really well. The photo above is of the resulting dish. Ingredients 2 onions, 3 to four tomatoes, 1 inch ginger, 10 cloves of garlic, 1/2 tsp ajwain, 1 tsp jeera, 1/2 tsp garam masala, 1 tsp heaped dhania powder, 1/2 tsp green chillies/red chillies, salt to taste, 1/2 tsp haldi Method  Heat the oil, put in ajwain and jeera and heat till it splutters, add onion paste, and fry until light brown, add ginger garlic paste, and little water and fry for another 3 to 5 mins, add tomato puree/paste, fry till it leaves oil. Add haldi, dhania powder, salt, red chilli powder, garam masala to paste. Simultaneously add boiled channa with water and boil at low heat for 5 to 10 mins. Also take a few chanas and mash them to a paste and add back to the mixture and garnish with fresh coriander leaves.  About boiling the chanas: Soak cha...

Now I can cook! a little.

  Yummy's recipe binder Well the recent events, where we had to stay at home, had some positive outcomes. I learnt how to cook!  My wife taught me some of her recipes. My earlier cooking skills were limited to making an omelette or making tea. Now I know some more cooking. Here is a list of what I can treat my guests or myself with. It is empowering! All these are nicely collected in my recipe binder. You may reach it by clicking the collage image on top of this page.😋 Quick and easy dal Karela rings Matar wale chawal Rajma Aloo shimla mirch Arhar dal Paneer kulcha     Go to recipebinderonline.com for many more recipes and binders. Better still use the site for uploading and keeping your recipes in your very own binders. If you want to share your binder with others, just share the binder link        

Building Recipe Binder Online: Fixing bootstrap panel height in Yii2

While building Recipe Binder Online the list of recipes are displayed on the landing page in bootstrap panels. These were of varied height and therefore were not giving an orderly look when displayed. The website has been built using the  Yii2 framework . Making the panel heights fixed was a possible solution. This was done using the following resource: https://stackoverflow.com/questions/24450010/how-to-make-bootstrap-panel-body-with-fixed-height This resolved the issue and the new panels look as shown in the image below.