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
brzaik committed Jun 3, 2012
2 parents 473b69f + a9ccb51 commit 608ea43
Show file tree
Hide file tree
Showing 21 changed files with 168 additions and 72 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ config/database.yml
public/.htaccess
.DS_Store
doc/app/*
public/assets/*
vendor/bundle/
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ end

gem 'jquery-rails'

# ActiveRecord requires a database adapter.
gem 'sqlite3'
# In production we prefer MySQL over sqlite3. If you are only
# interested in development and don't want to bother with production,
# run `bundle install --without production` to ignore MySQL.
gem "sqlite3", :group => [:development, :test]
gem "mysql2", :group => [:production]

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.4)
mysql2 (0.3.11)
orm_adapter (0.0.7)
polyglot (0.3.3)
rack (1.4.1)
Expand Down Expand Up @@ -122,6 +123,7 @@ DEPENDENCIES
devise
jquery-rails
jquery-tools
mysql2
rails (= 3.2.3)
rmagick (>= 2.12.2)
sass-rails (~> 3.2.3)
Expand Down
Empty file modified Rakefile
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion app/controllers/groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def index
# GET /groups/1.xml
def show
@group = Group.find(params[:id])
@membership = Membership.where(:group_id => @group.id, :user_id => current_user.id).first

respond_to do |format|
format.html # show.html.erb
Expand Down
7 changes: 5 additions & 2 deletions app/views/contents/form_elements/_dates.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<% content_for :js_ready do %>
$("#start_time_date").dateinput();
var date_settings = {
format: 'mm/dd/yyyy',
};
$("#start_time_date").dateinput(date_settings);
$('#start_time_time').timepicker();
$("#end_time_date").dateinput();
$("#end_time_date").dateinput(date_settings);
$("#end_time_time").timepicker();

var end_date_api = $("#end_time_date").data("dateinput");
Expand Down
11 changes: 5 additions & 6 deletions app/views/elements/_topmenu_contents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p id="TM-logintext"><%= link_to t(:sign_in), new_user_session_path %> <%=t(:signin_login_spiel) %> <% if ConcertoConfig[:allow_registration] == "true" %>No account? <%= link_to t(:sign_up), new_user_registration_path %> now!<% end %></p>
<% else %>
<%= link_to "Concerto", "/", :id => "TM-logobutton", :class => "full" %>

<!-- Begin Menu for CONTENT -->
<section>
<div class="TM-sectop">
Expand All @@ -21,7 +21,7 @@
</div>
</section>
<!-- End Menu for CONTENT -->

<!-- Begin Menu for SCREENS -->
<section>
<div class="TM-sectop">
Expand All @@ -33,7 +33,7 @@
</div>
</section>
<!-- End Menu for SCREENS -->

<!-- Begin Menu for FEEDS -->
<section>
<div class="TM-sectop">
Expand All @@ -44,12 +44,12 @@
</div>
</section>
<!-- End Menu for FEEDS -->

<!-- Begin Menu for USER GROUPS -->
<section>
<div class="TM-sectop">
<%= link_to groups_path, :class => "btn #{ controller.controller_name == 'groups' ? 'selected' : '' }" do %><%= t(:groups) %><% end %>
<%= link_to users_path, :class => "btn #{ controller.controller_name == 'users' ? 'selected' : '' }" do %>Accounts<% end %>
<%= link_to users_path, :class => "btn #{ controller.controller_name == 'users' ? 'selected' : '' }" do %><%= t(:accounts) %><% end %>
</div>
<div class="TM-secbot">
<h1><%= t(:users) %></h1>
Expand All @@ -72,4 +72,3 @@
<div class="clear"></div>
</nav>
<!--googleon: all-->

40 changes: 21 additions & 19 deletions app/views/groups/_show_body.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<td><%= membership.user.name %></td>

<td>
<% if @membership.is_leader? %>
<% if can? :edit, membership %>
<%= form_for([@group, membership]) do |f| %>
<%= f.select :level, Membership::LEVELS %>
<%= f.submit %>
Expand All @@ -39,7 +39,7 @@
<td><%= membership.user.name %></td>

<td>
<% if @membership.is_leader? %>
<% if can? :edit, membership %>
<%= form_for([@group, membership]) do |f| %>
<%= f.select :level, Membership::LEVELS %>
<%= f.submit %>
Expand All @@ -51,7 +51,7 @@

</table>

<% if !@membership.nil? && @membership.is_leader? %>
<% if can? :edit, @group %>
<b>Add Member</b>
<%= form_for([@group, @group.memberships.new]) do |f| %>
<%= f.collection_select :user_id, User.all - @group.all_users, :id, :name %>
Expand Down Expand Up @@ -86,23 +86,25 @@

</article>

<aside>

<div>
<% if @group.made_request?(current_user) %>
<p><b>You are currently a <%= @membership.level_name %><%= " member" unless @membership.is_leader? %> of this group.</b></p>
<% if @group.has_member?(current_user) %>
<%= link_to("Leave Group", group_membership_path(:group_id => @group.id, :id => @membership.id), :method => :delete, :class => "btn") %>
<% if @membership.is_leader? %>
<%= link_to 'Edit Group Details', edit_group_path(@group), :class => "btn" %>
<% if user_signed_in? %>
<aside>

<div>
<% if @group.made_request?(current_user) %>
<% membership = Membership.where(:group_id => @group.id, :user_id => current_user.id).first %>
<p><b>You are currently a <%= membership.level_name %><%= " member" unless can? :edit, @group %> of this group.</b></p>
<% if @group.has_member?(current_user) %>
<%= link_to("Leave Group", group_membership_path(:group_id => @group.id, :id => membership.id), :method => :delete, :class => "btn") %>
<% if can? :edit, @group %>
<%= link_to 'Edit Group Details', edit_group_path(@group), :class => "btn" %>
<% end %>
<% end %>
<% else %>
<p><b>You are not currently in this group.</b></p>
<%= link_to("Join Group", group_memberships_path(:group_id => @group.id, :membership => {:user_id => current_user.id}), :method => :post, :class => "btn") %>
<% end %>
<% else %>
<p><b>You are not currently in this group.</b></p>
<%= link_to("Join Group", group_memberships_path(:group_id => @group.id, :membership => {:user_id => current_user.id}), :method => :post, :class => "btn") %>
<% end %>
</div>

</aside>
</div>

</aside>
<% end %>
<div class="clear"></div>
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= render :partial => 'elements/javascript' %>

<!--[if lt IE 9]>
<%= javascript_include_tag "html5.js" %>
<%= javascript_include_tag "html5_shiv/html5.js" %>
<![endif]-->
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion app/views/submissions/_index_body.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<% feeds.each_with_index do |feed, i| %>
<li data-filter="<%= feed.name %>">
<%= link_to feed_submissions_path(feed), :remote => true, :class => "link-hl" do %>
<%= feed.name %> <span class="badge"><%= feed.approved_contents.count %></span>
<%= ("&nbsp;"*feed.depth).html_safe %> <%= feed.name %> <span class="badge"><%= feed.approved_contents.count %></span>
<% end %>
</li>
<% end %>
Expand Down
86 changes: 86 additions & 0 deletions app/views/users/_show_body.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<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/>

</div>

</article>

<aside>

<div>
<p>
<b>Email:</b>
<%= @user.email %>
</p>

<p>
<b>Language:</b>
<%= @user.locale %>
</p>
</div>

</aside>
<div class="clear"></div>
4 changes: 4 additions & 0 deletions app/views/users/_show_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>
<%= link_to "All Users", users_path %> &gt;
<%= @user.name %>
</h1>
33 changes: 8 additions & 25 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
<p id="notice"><%= notice %></p>

<p>
<b>First name:</b>
<%= @user.first_name %>
</p>

<p>
<b>Last name:</b>
<%= @user.last_name %>
</p>

<p>
<b>Email:</b>
<%= @user.email %>
</p>

<p>
<b>Language:</b>
<%= @user.locale %>
</p>


<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', users_path %>
<section class="C">
<header id="users-header">
<%= render :partial => "users/show_header" %>
</header>
<div id="users-body" class="C-cont">
<%= render :partial => "users/show_body" %>
</div>
</section>
9 changes: 5 additions & 4 deletions config/database.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ test:
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
adapter: mysql2
database: concerto_production
username: concerto
password:
host: localhost
7 changes: 6 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#To deploy in production:
#rake db:migrate RAILS_ENV="production"
#rake db:seed RAILS_ENV="production"
#bundle exec rake assets:precompile

Concerto::Application.configure do
# Settings specified here will take precedence over those in config/application.rb

Expand Down Expand Up @@ -46,7 +51,7 @@
# config.action_controller.asset_host = "http://assets.example.com"

# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
config.assets.precompile += %w( html5_shiv/html5.js )

# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
Expand Down
9 changes: 5 additions & 4 deletions config/locales/devise.pirate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n

pirate:
errors:
messages:
expired: "is no more, so make new one"
expired: "is no more, so make a new one"
not_found: "can't be found"
already_confirmed: "was already allowed. Make yerself known"
not_locked: "wasn't locked"
Expand Down Expand Up @@ -37,8 +37,9 @@ pirate:
signed_up_but_locked: "Ye signed up, but ye can't come aboard. Yer locked out."
updated: "Thanks for tellin' us more."
destroyed: 'Yar! Yer account is no more. Come back soon'
send_instructions: "Ye'll be gettin' a message about how to unlock your account shortly."
unlocked: 'Your account was successfully unlocked. You are now signed in.'
unlocks:
send_instructions: "Ye'll be gettin' a message about how to unlock your account shortley."
unlocked: 'Yer account unlock was successfull. Welcome aboard.'
omniauth_callbacks:
success: '%{kind} recommends you highly.'
failure: "We can't accept %{kind}s recommendation, for %{reason}."
Expand Down
7 changes: 5 additions & 2 deletions config/locales/views/elements/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ en:
log_out: "Log Out"
sign_up: "Register"
sign_in: "Sign In"
browse: "Browse"
add: "Add"
content: "Content"
groups: "Groups"
users: "Users"
manage: "Manage"
templates: "Templates"
screens: "Screens"
feeds: "Feeds"
groups: "Groups"
accounts: "Accounts"
users: "Users"
moderate: "Moderate"

0 comments on commit 608ea43

Please sign in to comment.