Ejemplo n.º 1
0
<div class="section-wrapper">
    <div class="section">
        <ul class="projects-list">
        <?php 
echo Projects_utils::list_projects_view($projects);
?>
        </ul>
    </div>
</div>
Ejemplo n.º 2
0
        <h1>What is Projects Lounge?</h1>
        <p>Projects Lounge was created for web specialists who want to expose their portfolios and share their working experience with others. 
        It is both a business card for practitioners and a manual guide for apprentices.
        This is the perfect occasion to meet those who did that great application you talked about with your friends the other days. 
        See the best web related projects and learn how they were made.</p>
        <a class="btn awesome" href="<?php 
echo url::site('projects/add');
?>
">Become a member</a>
    </div>
    <div class="section">
        <div id="featured_projects">
            <h2>Featured Projects</h2>
            <ul class="projects-list">
               <?php 
echo Projects_utils::list_projects_view($featured_projects);
?>
            </ul>
        </div>
        <div id="featured_members">
            <h2>Featured Members</h2>
            <ul>
                <?php 
echo Profiles_utils::list_profiles_view($featured_members);
?>
            </ul>
        </div>
    </div>
</div>
    
    <div id="reasons">
Ejemplo n.º 3
0
 public function edit($id)
 {
     $user = User_Model::current();
     $project = ORM::factory('project', $id);
     if (!$user->loaded && $project->user_can($user, 'edit')) {
         return $this->template->content = 'oh, come on!';
     }
     if ($post = $this->input->post('project')) {
         $validation = Projects_utils::projects_edit_validation($post);
         if (!$project->validate($validation, true)) {
             return $this->template->content = Kohana::debug($validation->errors());
         }
         if ($additional_user_emails = $this->input->post('additional_user_emails')) {
             $additional_user_roles = $this->input->post('additional_user_roles');
             foreach ($additional_user_emails as $email) {
                 Profiles_utils::reserve_email_if_available($email);
             }
             $additional_users = array_combine($additional_user_emails, $additional_user_roles);
             $project->add_user_roles($additional_users);
         }
         url::redirect($project->local_url);
     } else {
         HTMLPage::add_style('forms');
         $this->template->content = View::factory('projects/edit')->bind('project_types', Projects_utils::get_project_types_dropdown_array())->bind('project', $project)->bind('user', $user);
     }
 }