app/views/layouts/cas/application.html.erb in cas-cms-0.1.3 vs app/views/layouts/cas/application.html.erb in cas-cms-1.0.0.alpha1

- old
+ new

@@ -24,11 +24,11 @@ }; </script> <%= csrf_meta_tags %> </head> -<body class="<%= "site-#{@site.id}" if @current_user.present? %>"> +<body class="<%= "site-#{@site.id}" if @current_user.present? && @site.present? %>"> <header> <div class="grid top"> <div class="mobile-col-1-1 col-1-3"> <h1> @@ -41,11 +41,11 @@ <% if @user_sites.count <= 1 %> <%= @user_sites[0].name %> (<%= @user_sites[0].domains.join(", ") %>) <% else %> <select id="select-site"> <% @user_sites.each do |site| %> - <% selected = site.id == @site.id %> + <% selected = site.id == @site&.id %> <option value="<%= site_sections_path(site) %>" <%= 'selected="selected"' if selected %> > <%= site.name %> @@ -68,9 +68,10 @@ <nav class="grid"> <ul> <% if user_signed_in? %> <li><%= link_to "Conteúdo", cas.site_sections_path(@site) %></li> + <li><%= link_to "Atividades", cas.activities_path, id: "go-to-activities" %></li> <% end %> <% if user_signed_in? && current_user.admin? %> <li><%= link_to "Pessoas", cas.site_users_path(@site), id: "list-people" %></li> <% end %> </ul>