<ul class="breadcrumb"> <li><a href="<?php echo home_root_path_path(); ?> ">Home</a> <span class="divider">/</span></li> <li ><a href="<?php echo project_list_path(); ?> ">List of projects</a> <span class="divider">/</span></li> <li class="active">Stats for project</li> </ul> <h2 class="pull-left">Current data</h2> <h3 class="pull-right" > by <?php echo link_to(developer_show_path($this->project->owner()), $this->project->owner()->name, array("class" => "dev-link", "data-title" => "See all projects by this user")); ?> <?php echo image_tag($this->project->owner()->avatar(), array("class" => "avatar")); ?> </h3> <div class="clearfix"></div> <div class="well" id="project-data-panel"> <ul class="simple-data span4"> <li><span class="fui-menu-24"></span> <?php echo $this->project->forks; ?> forks</li> <li><span class="fui-heart-24"></span> <?php echo $this->project->stars;
</script> <div class="container"> <?php if (user_logged_in()) { ?> <div class="row-fluid"> <div class="top-nav"> <span class="app-name"> <!-- Looking For Pull Requests--> </span> <div class="pull-right"> <?php echo image_tag(current_user()->avatar_url); ?> <?php echo link_to(developer_show_path(current_user()), current_user()->name); ?> / <?php echo link_to(login_sign_out_path(), '<i class="icon-signout"></i> Log Out', array("class" => "has-tooltip", "data-title" => "Sign out")); ?> </div> <div class="clearfix"></div> </div> </div> <?php } ?> <div id="main-wrapper"> <?php
public function publishAction() { $id = mysql_real_escape_string($this->request->getParam("id")); $userId = current_user()->id; $project = load_project_where("id = '{$id}' and owner_id = '{$userId}'"); if ($project == null) { $this->flash->setError("Project not found!"); } else { $project->published = 1; save_project($project); //Create the first set of stats $project->saveInitStats(); $project->grabHistoricData(); $this->flash->setSuccess("Project was published correctly!"); } $this->redirect_to(developer_show_path(current_user())); }
<?php echo link_to(project_show_path($proj), '<span class="fui-eye-24"></span> View Stats', array("class" => "btn btn-primary btn-large")); ?> <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $proj->url(); ?> " data-text="Checkout this cool project on @Github! " data-via="lookingfor_pr" data-count="none">Tweet about it!</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </div> </div> <?php } ?> <div class="span3 text-center"> <div class="project-spotlight" id="your-project"> <h3>Your project</h3> <p> <img src="/img/illustrations/clipboard.png"> </p> <?php if (user_logged_in()) { echo link_to(developer_show_path(current_user()), '<i class="fui-plus-24"></i> Publish', array("class" => "btn btn-primary btn-large")); } else { echo link_to(GithubAPI::login_url(), '<i class="icon-github" style="font-size:30px;" ></i> Github', array("class" => "has-tooltip btn btn-large btn-success", "data-title" => "Sign-in using Github")); } ?> </div> </div> </div>