Professional CodeIgniter, Thomas Myer

Chapter 7: Improving the Dashboard
220
When you ' re all done, your dashboard home page should look like Figure 7 - 13 . Note the changes in the
global navigation along the top, too.
Figure 7-13


Creating Admin Screens for Sizes

Because the Sizes table is practically identical to the Colors table, you ' re going to be able to save a great
deal of time in this section. All you have to do is copy the controller, model, and three view files you
used for colors and repurpose them for sizes. Practically all you have to do is change out sizes for colors
within the code, and you ' ve got another working admin section.

For example, here is the admin/sizes controller. Please note that it is precisely identical in structure to
the admin/colors controller, except it uses the sizes nomenclature for redirects, labeling, and model
functions:
<
?php
class Sizes extends Controller {
function Sizes(){
parent::Controller();
c07.indd 220
c07.indd 220
6/10/08 5:36:49 PM
6/10/08 5:36:49 PM


Другие страницы

 
Cкачать книги бесплатно без регистрации в электронном виде (pdf, chm, txt).Вы можете читать книги онлайн на нашем сайте литературного портала книг.Большая подборка учебников, пособий, интересных книг.Электронные книги на английском языке скачать бесплатно без смс.