Skip to content

Commit

Permalink
Merge branch 'master' of github.com:concerto/concerto
Browse files Browse the repository at this point in the history
  • Loading branch information
augustf committed Jun 12, 2012
2 parents 5487d2d + bce0fd8 commit c92350e
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 139 deletions.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :set_locale
before_filter :check_for_initial_install
before_filter :set_version

def set_version
require 'concerto/version'
end

def set_locale
if user_signed_in? && current_user.locale != ""
Expand Down
3 changes: 1 addition & 2 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%= devise_error_messages! %>
<section class="C no">
<header>
<%= back_button :back %>
Expand All @@ -7,8 +8,6 @@
<article>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>

<fieldset>
<div class="field">
<%= f.label :first_name %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<%= render 'form' %>
</div>
<% else %>
<% if flash[:alert] %>
<p class="alert"><%= alert %></p>
<% end %>
<section class="C no">
<header>
<%= back_button :back %>
Expand Down
79 changes: 34 additions & 45 deletions app/views/elements/_topmenu_contents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,49 @@
<a href="#">-- Show Top Menu --</a>
</nav>

<!--googleoff: all-->
<nav id="TM">
<% if not user_signed_in? %>
<%= link_to "Concerto", "/", :id => "TM-logobutton" %>
<p id="TM-logintext"><%= link_to t(:sign_in), new_user_session_path, :id => "login-dropdown" %> <%=t(:signin_login_spiel) %> <% if ConcertoConfig[:allow_registration] == "true" %>No account? <%= link_to t(:sign_up), new_user_registration_path %> now!<% end %></p>
<p id="TM-logintext">
<%= link_to t(:sign_in), new_user_session_path, :id => "login-dropdown" %> <%=t(:signin_login_spiel) %>
<% if can? :create, User %>
No account? <%= link_to t(:sign_up), new_user_registration_path %> now!
<% end %>
</p>
<script type="text/javascript">
$(document).ready(function() {
$("#login-dropdown").each(function() {
$(this).qtip({
content: {
text: 'Loading...', // use this text while loading content via AJAX
ajax: {
url: '<%= new_user_session_path(:no_content_cell => 1) %>',
type: 'GET'
}
},
position: {
at: 'bottom center', // Position the tooltip above the link
my: 'top left',
viewport: $(window) // Keep the tooltip on-screen at all times
},
show: {
event: 'click', // Show it on click...
solo: true // ...and hide all other tooltips...
},
hide: 'unfocus',
style: 'ui-tooltip-light ui-tooltip-shadow ui-tooltip-rounded ui-tooltip-nopadding ui-tooltip-autowidth'
})
}).click(function(e) { e.preventDefault(); });
});
</script>
<% else %>
<%= link_to "Concerto", "/", :id => "TM-logobutton", :class => "full" %>
<%= link_to "Concerto", root_url, :id => "TM-logobutton", :class => "full" %>

<!-- Begin Menu for CONTENT -->
<section>
<div class="TM-sectop">
<%= link_to t(:browse), feeds_path, :class => "btn #{ current_page?(feeds_path) || (controller.controller_name == 'submissions' && ['index', 'show'].include?(controller.action_name)) ? 'selected' : '' }" %>
<%= link_to t(:add), new_content_path, :class => "btn #{ current_page?(new_content_path) ? 'selected' : '' }" %>
<%= link_to t(:add), new_content_path, :class => "btn #{ current_page?(new_content_path) ? 'selected' : '' }" if can? :create, Content %>
</div>
<div class="TM-secbot">
<h1><%= t(:content) %></h1>
Expand Down Expand Up @@ -64,44 +94,3 @@
<% end %>
<div class="clear"></div>
</nav>

<script type="text/javascript">

$(document).ready(function() {

$("#login-dropdown").each(function() {

$(this).qtip({
content: {
text: 'Loading...', // use this text while loading content via AJAX
ajax: {
url: '/users/sign_in?no_content_cell=1',
type: 'GET'
}
},

position: {
at: 'bottom center', // Position the tooltip above the link
my: 'top left',
viewport: $(window) // Keep the tooltip on-screen at all times
},

show: {
event: 'click', // Show it on click...
solo: true // ...and hide all other tooltips...
},

hide: 'unfocus',
style: 'ui-tooltip-light ui-tooltip-shadow ui-tooltip-rounded ui-tooltip-nopadding ui-tooltip-autowidth'

})

})

.click(function(e) { e.preventDefault(); });

});

</script>

<!--googleon: all-->
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<html>
<head>
<title><%= yield_for_title(controller.controller_name.titleize) %> - Concerto Panel</title>

<meta name="generator" content="Concerto <%= Concerto::VERSION::STRING %>" />
<meta name="application-name" content="Concerto" />
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
Expand Down
152 changes: 89 additions & 63 deletions app/views/users/_show_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,68 +1,94 @@
<article>
<div class="default-padding">
<h2>Groups</h2>

<table>
<tr>
<th>Name</th>
<th>Roles</th>
</tr>

<% @user.memberships.each do |membership| %>
<tr>
<td><%= membership.group.name %></td>

<td>
<%= form_for([membership.group, membership]) do |f| %>
<%= f.select :level, Membership::LEVELS %>
<%= f.submit %>
<% end %>
</td>
</tr>
<% end %>
</table>

<br/><br/>

<h2>Screens</h2>

<table>
<tr>
<th>Name</th>
<th>Location</th>
<th>Dimensions</th>
</tr>

<% @user.screens.each do |screen| %>
<tr>
<td><%= screen.name %></td>
<td><%= screen.location %></td>
<td><%= screen.width %> X <%= screen.height %></td>
</tr>
<% end %>
</table>

<br/><br/>

<h2>Submissions</h2>

<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Airs</th>
</tr>

<% @user.contents.each do |content| %>
<tr>
<td><%= content.name %></td>
<td><%= content.type %></td>
<td><%= content.start_time %> - <%= content.end_time %></td>
</tr>
<% end %>
</table>

<br/><br/>
<% if !@user.memberships.empty? %>
<h2>Groups</h2>

<table>
<tr>
<th>Name</th>
<th>Roles</th>
</tr>

<% @user.memberships.each do |membership| %>
<tr>
<td><%= membership.group.name %></td>

<td>
<%= form_for([membership.group, membership]) do |f| %>
<%= f.select :level, Membership::LEVELS %>
<%= f.submit %>
<% end %>
</td>
</tr>
<% end %>
</table>

<br/><br/>
<% end %>
<% if !@user.screens.empty? %>
<h2>Screens</h2>

<table>
<tr>
<th>Name</th>
<th>Location</th>
<th>Dimensions</th>
</tr>

<% @user.screens.each do |screen| %>
<tr>
<td><%= screen.name %></td>
<td><%= screen.location %></td>
<td><%= screen.width %> X <%= screen.height %></td>
</tr>
<% end %>
</table>

<br/><br/>
<% end %>
<% Group.joins(:screens, :users).where(:users => {:id => @user}).group('groups.id').each do |group| %>
<h2><%= group.name %>'s Screens</h2>

<table>
<tr>
<th>Name</th>
<th>Location</th>
<th>Dimensions</th>
</tr>

<% group.screens.each do |screen| %>
<tr>
<td><%= screen.name %></td>
<td><%= screen.location %></td>
<td><%= screen.width %> X <%= screen.height %></td>
</tr>
<% end %>
</table>
<br/><br/>
<% end %>
<% if !@user.contents.empty? %>
<h2>Submissions</h2>

<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Airs</th>
</tr>

<% @user.contents.each do |content| %>
<tr>
<td><%= content.name %></td>
<td><%= content.type %></td>
<td><%= content.start_time %> - <%= content.end_time %></td>
</tr>
<% end %>
</table>
<br/><br/>
<% end %>

</div>

Expand Down
12 changes: 0 additions & 12 deletions db/migrate/20120418012853_create_players.rb

This file was deleted.

16 changes: 0 additions & 16 deletions db/migrate/20120418142310_remove_players.rb

This file was deleted.

10 changes: 10 additions & 0 deletions lib/concerto/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Concerto
module VERSION
MAJOR = 2
MINOR = 'x'
TINY = 'x'
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
end

0 comments on commit c92350e

Please sign in to comment.