Skip to content

Commit

Permalink
Simplified content cells further and removed unused styles in navigat…
Browse files Browse the repository at this point in the history
…ion.scss.erb
  • Loading branch information
brzaik committed Jul 6, 2012
1 parent c8fee41 commit 93154bb
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 251 deletions.
54 changes: 54 additions & 0 deletions app/assets/stylesheets/application/layout/contentcell.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,58 @@ section.C {
border: solid 1px #ababab;
background: $white;
}

// .subnav is a light blue bar that appears below the content header
.subnav {
background: $concerto-blue-5;
padding:2px;
padding-left: 12px;
height: 25px;

a.button {
background:$concerto-blue-0;
color: $white !important;
font-size: 0.8em;
border: 0px;
padding: 4px 6px;
text-shadow: 0px 0px 0px;
}

.pills {
padding-top: 2px;
margin-bottom: 0px;

> li > a {
@include border-radius(3px);
padding: 0px 4px;
color: $concerto-blue-0;
line-height: 22px;

.count {
font-size: 0.8em;
}

&:hover {
background: $white;
color: $linkColorHover;
text-decoration: none;
}

}

li.legend {
font-size: 0.8em;
text-transform: uppercase;
padding: 3px 3px 0px 3px;
}

}

}

}

.content-holder {
padding: 20px;
text-align: center;
}
151 changes: 0 additions & 151 deletions app/assets/stylesheets/application/layout/navigation.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
//---------------

// Common styles
.tabs,
.pills {
margin: 0 0 $baseline;
padding: 0;
Expand All @@ -40,156 +39,6 @@
}
}

// Tabs
.tabs {
> li {
position: relative; // For the dropdowns mostly
margin-bottom: -1px;
> a {
padding: 0 10px;
margin-right: 2px;
line-height: ($baseline * 2) - 2;
border: 1px solid transparent;
@include border-radius(4px);
&:hover {
text-decoration: none;
background-color: #eee;
border-color: #eee #eee #ddd;
}
}
}
// Active state, and it's :hover to override normal :hover
.active > a,
.active > a:hover {
color: $gray;
background-color: $white;
border: 1px solid #ddd;
border-bottom-color: transparent;
cursor: default;
}
}

// Dropdowns in tabs
.tabs {
// first one for backwards compatibility
.menu-dropdown,
.dropdown-menu {
top: 35px;
border-width: 1px;
@include border-radius(0 6px 6px 6px);
}
// first one for backwards compatibility
a.menu:after,
.dropdown-toggle:after {
border-top-color: #999;
margin-top: 15px;
margin-left: 5px;
}
// first one for backwards compatibility
li.open.menu .menu,
.open.dropdown .dropdown-toggle {
border-color: #999;
}
// first one for backwards compatibility
li.open a.menu:after,
.dropdown.open .dropdown-toggle:after {
border-top-color: #555;
}
}

// Pills
.pills {
a {
margin: 5px 3px 5px 0;
padding: 0 15px;
line-height: 30px;
text-shadow: 0 1px 1px $white;
@include border-radius(15px);
&:hover {
color: $white;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0,0,0,.25);
background-color: $linkColorHover;
}
}
.active a {
color: $white;
text-shadow: 0 1px 1px rgba(0,0,0,.25);
background-color: $linkColor;
}
}

// Stacked pills
.pills-vertical > li {
float: none;
}

// Tabbable areas
.tab-content,
.pill-content {
}
.tab-content > .tab-pane,
.pill-content > .pill-pane,
.tab-content > div,
.pill-content > div {
display: none;
}
.tab-content > .active,
.pill-content > .active {
display: block;
}


.subnav {
background: $concerto-blue-5;
padding:2px;
padding-left: 12px;
height: 25px;

a.button {
background:$concerto-blue-0;
color: $white !important;
font-size: 0.8em;
border: 0px;
padding: 4px 6px;
text-shadow: 0px 0px 0px;
}

.tabs {
margin-bottom: 0px;

> li > a {
color: $concerto-blue-0;
line-height: 22px;

.count {
font-size: 0.8em;
}

&:hover {
background: $white;
color: $linkColorHover;
}

}

li.legend {
font-size: 0.8em;
text-transform: uppercase;
padding: 3px 3px 0px 3px;
}

}

}


.content-holder {
padding: 20px;
text-align: center;
}



// Dropdown Menus
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
Expand Down
126 changes: 61 additions & 65 deletions app/views/submissions/_index_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<article>
<div class="subnav clearfix">
<div class="pull-left" style="padding: 3px 0px; width:120px">
<%= link_to "Jump to Feed...", "#", :title => "Click on a feed to jump", :class => "btn small info dropdown-toggle dropdown-control dd-jumpto", :rel => "#jump_to" %>
Expand All @@ -23,7 +22,7 @@

</div>

<ul class="tabs">
<ul class="pills">
<% if @feed.children.empty? %>
<li class="legend">No Sub-feeds</li>
<% else %>
Expand All @@ -37,79 +36,76 @@
</ul>

</div>
<div id="content_holder">

<% if @submissions.empty? %>
<div class="default-padding">
<h3>Oops - there's no content inside this feed.</h3>
</div>
<% else %>
<ul class="GL">
<% @submissions.each do |submission| %>
<li>
<div class="cont">
<%= link_to [submission.feed, submission], :remote => true do %>
<%= render_content(submission.content, {:type => 'grid'}) %>
<% end %>
<b><%= link_to submission.content.name, [submission.feed, submission], :remote => true %></b>
<br />
<%= submission.content.start_time.strftime("%m/%d") %> to <%= submission.content.end_time.strftime("%m/%d") %>
<br />
<% if @can_moderate_feed %>
<p>
<%= link_to "#", :class => "dropdown-control dd-moderate", :title => "Moderate '#{ submission.content.name }'", :rel => "#moderate_#{ submission.id }" do %>
<% if submission.is_approved? %>
Approved
<% elsif submission.is_denied? %>
Denied
<% else %>
Pending Moderation
<% end %>
<% end %>
</p>


<div id="moderate_<%= submission.id %>" style="display:none;">
<% if @submissions.empty? %>
<div class="content-holder default-padding">
<h3>Oops - there's no content inside this feed.</h3>
</div>
<% else %>
<ul class="GL">
<% @submissions.each do |submission| %>
<li>
<div class="cont">
<%= link_to [submission.feed, submission], :remote => true do %>
<%= render_content(submission.content, {:type => 'grid'}) %>
<% end %>
<b><%= link_to submission.content.name, [submission.feed, submission], :remote => true %></b>
<br />
<%= submission.content.start_time.strftime("%m/%d") %> to <%= submission.content.end_time.strftime("%m/%d") %>
<br />
<% if @can_moderate_feed %>
<p>
<%= link_to "#", :class => "dropdown-control dd-moderate", :title => "Moderate '#{ submission.content.name }'", :rel => "#moderate_#{ submission.id }" do %>
<% if submission.is_approved? %>
<p>Currently <b style="color: green;">Approved</b></p>
<p>Change to Denied</p>
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => false } %>
Approved
<% elsif submission.is_denied? %>
<p>Currently <b style="color: red;">Denied</b></p>
<p>Change to Approved</p>
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => true } %>
Denied
<% else %>
<p>Currently <b>Pending Moderation</b></p>
<div class="form-stacked">
<h4>Moderate Content</h4>
<div id="moderate-select" class="btn-toolbar">
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn approve">Approve</button>
<button class="btn deny">Deny</button>
</div>
Pending Moderation
<% end %>
<% end %>
</p>


<div id="moderate_<%= submission.id %>" style="display:none;">
<% if submission.is_approved? %>
<p>Currently <b style="color: green;">Approved</b></p>
<p>Change to Denied</p>
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => false } %>
<% elsif submission.is_denied? %>
<p>Currently <b style="color: red;">Denied</b></p>
<p>Change to Approved</p>
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => true } %>
<% else %>
<p>Currently <b>Pending Moderation</b></p>
<div class="form-stacked">
<h4>Moderate Content</h4>
<div id="moderate-select" class="btn-toolbar">
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn approve">Approve</button>
<button class="btn deny">Deny</button>
</div>
</div>

<div id="moderate-true">
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => true } %>
</div>
<div id="moderate-false">
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => false } %>
</div>
<div id="moderate-true">
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => true } %>
</div>
<% end %>
<br />
</div>
<div id="moderate-false">
<%= render :partial => "submissions/moderate_form", :locals => { :submission => submission, :moderate => false } %>
</div>
</div>
<% end %>

<br />
</div>
</li>
<% end %>
</ul>
<% end %>
<% end %>

</div>
</li>
<% end %>
</ul>
<div class="clear"></div>
<% end %>

</div>
</article>
<div class="clear"></div>

<script type="text/javascript">

Expand Down

0 comments on commit 93154bb

Please sign in to comment.