Remove uneccesary project_activities HTML pages

This commit is contained in:
Luka Murn 2016-07-29 16:06:35 +02:00
parent ed2226c14b
commit b085aa1db3
6 changed files with 6 additions and 23 deletions

View file

@ -1,3 +0,0 @@
// Place all the styles related to the project_activities controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View file

@ -6,9 +6,6 @@ class ProjectActivitiesController < ApplicationController
@activities = @project.last_activities
respond_to do |format|
format.html {
render :index, layout: "fluid"
}
format.json {
render :json => {
:html => render_to_string({

View file

@ -11,8 +11,4 @@ module ApplicationHelper
controller_name == 'projects' ||
(controller_name == 'reports' && action_name == 'index')
end
def project_activities_page?
controller_name == 'project_activities'
end
end

View file

@ -12,10 +12,6 @@ module SecondaryNavigationHelper
action_name == "samples"
end
def is_project_activities?
controller_name == "project_activities" and action_name == "index"
end
def is_project_reports?
controller_name == "reports" and action_name == "index"
end

View file

@ -4,6 +4,7 @@
<!-- header -->
<div class="navbar-header">
<!-- Small devices dropdown button -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#secondary-menu" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
@ -22,7 +23,7 @@
</a>
<% end %>
</li>
<% if project_page? or project_activities_page? %>
<% if project_page? %>
<li class="active">
<span class="glyphicon glyphicon-blackboard"></span>
</li>
@ -65,7 +66,7 @@
<!-- buttons -->
<div class="collapse navbar-collapse" id="secondary-menu">
<ul class="nav navbar-nav navbar-right" style="vertical-align: bottom">
<% if project_page? or project_activities_page? %>
<% if project_page? %>
<!-- TEMPORARY HIDDEN -->
<!--<li class="<%= "active" if is_project_info? %>">
<a href="<%= project_url(@project) %>"><span class="glyphicon glyphicon-info-sign"></span></a>
@ -86,10 +87,6 @@
</a>
</li>
<% end %>
<!-- TEMPORARY HIDDEN -->
<!--<li class="<%= "active" if is_project_activities? %>">
<a href="<%= project_project_activities_url(@project) %>"><%=t "nav2.projects.activities" %></a></a>
</li>-->
<% if can_view_reports(@project) then %>
<li id="reports-nav-tab" class="<%= "active" if is_project_reports? %>">
<a href="<%= project_reports_url(@project) %>" title="<%=t "nav2.projects.reports" %>">
@ -169,7 +166,7 @@
</a>
<% end %>
</li>
<% if project_page? or project_activities_page? %>
<% if project_page? %>
<li class="active">
<%= truncate( @project.name, length: 20 ) %>
</li>

View file

@ -14,10 +14,10 @@
<div class="tree">
<ul>
<li class="<%= "active" if (project_page? || project_activities_page?) %>">
<li class="<%= "active" if project_page? %>">
<span class="tree-link line-wrap">
<i></i>
<% if !project_page? && !project_activities_page? %>
<% if !project_page? %>
<%= link_to @project.name, project_action_to_link_to(@project), title: @project.name %>
<% else %>
<span title="<%= @project.name %>"><%= @project.name %></span>