Merge branch 'ad_banner' of https://github.com/Rulingcom/orbit into ad_banner

This commit is contained in:
Matthew K. Fu JuYuan 2012-04-25 10:56:42 +08:00
commit 8e444a88d0
18 changed files with 78 additions and 40 deletions

View File

@ -66,6 +66,7 @@ textarea {
margin: 0;
font-size: 100%;
vertical-align: middle;
margin-bottom: 10px;
}
button, input {
*overflow: visible;

View File

@ -161,6 +161,6 @@ legend {
top: 10px;
left: 5px;
}
.list-remove {
#sort_headers .list-remove {
padding: 8px 0 8px 16px !important;
}

View File

@ -109,7 +109,8 @@
text-indent: -9999px;
padding:6px;
}
#orbit-bar .nav > li.search {
#orbit-bar .nav > li.search {
background-image: none;
overflow: hidden;
width: 28px;
position: relative;
@ -322,6 +323,9 @@
#main-wrap .breadcrumb li {
font-size: 12px;
color: #999;
}
.form-actions .btn {
margin-bottom: 0;
}
#sub-wiget {
clear: right;

View File

@ -84,7 +84,7 @@
border-radius: 0 3px 3px 0;
text-align: left;
margin: 0;
width: 180px;
width: 193px;
}
.file-upload .upload {
margin:0;

View File

@ -2,14 +2,14 @@
<%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %>
<%# end -%>
<%= content_tag :li, :class => active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'fact_checks') do -%>
<%= content_tag :li, :class => active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'fact_checks')) do -%>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')) do -%>
<%= content_tag :li, link_to(t('announcement.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
<%= content_tag :li, link_to(t('announcement.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
<%= content_tag :li, link_to(t('announcement.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %>
<%= content_tag :li, link_to(t('announcement.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('announcement.bulletin.approval_setting'), panel_announcement_back_end_approval_setting_path), :class => active_for_action('fact_checks', 'setting') if (is_manager? rescue nil) %>
<%= content_tag :li, link_to(t('announcement.bulletin.approval_setting'), panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue nil) %>
<% end -%>
<% end -%>

View File

@ -89,7 +89,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
# GET /bulletins/1/edit
def edit
@bulletin = Bulletin.find(params[:id])
if @bulletin.is_rejected?
if !current_user.admin? && (@bulletin.is_rejected? || @bulletin.is_checked?)
redirect_to :action => :index
else
# @summary_variable = @bulletin.summary_variable

View File

@ -2,9 +2,8 @@
<%= stylesheet_link_tag "inc/permission-checkbox" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "bootstrap" %>
<%#= javascript_include_tag "inc/permission-checkbox" %>
<%#= javascript_include_tag "inc/search" %>
<%= javascript_include_tag "inc/permission-checkbox" %>
<%= javascript_include_tag "inc/search" %>
<% end %>
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
<%= form_tag('', :remote => true) %>

View File

@ -12,5 +12,4 @@
<% @site_valid_locales.each do |locale| %>
<td><%= bulletin_category.i18n_variable[locale] rescue nil %></td>
<% end %>
<td><%= bulletin_category.display %></td>
</tr>

View File

@ -8,7 +8,6 @@
<% @site_valid_locales.each do |locale| %>
<th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
<% end %>
<th class="span1-2"><%= t('bulletin_category.display') %></th>
</tr>
</thead>
<tbody>

View File

@ -14,7 +14,7 @@
<span class="label"><%= t(:pending) %></span>
<% end %>
<% if bulletin.is_checked? %>
<span class="label"><%= t(:checked) %></span>
<span class="label"><%= t(:passed) %></span>
<% end %>
<% if bulletin.is_rejected? %>
<span class="label"><%= t(:rejected) %></span>
@ -25,23 +25,23 @@
<%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<% unless bulletin.is_rejected?%>
<li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>
<ul class="dropdown-menu" id="menu1">
<li><%= link_to t(:basic), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'basic'), :remote => true %></li>
<li><%= link_to t(:picture), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'picture'), :remote => true %></li>
<li><%= link_to t(:tags), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'tags'), :remote => true %></li>
<li><%= link_to t(:link), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'links'), :remote => true %></li>
<li><%= link_to t(:file), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'files'), :remote => true %></li>
</ul>
</li>
<%#= debugger %>
<%#= a=1 %>
<% if (bulletin.bulletin_category.authed_users('fact_check').include?(current_user) or is_manager?) and !bulletin.is_expired? %>
<li><%= link_to t('announcement.bulletin.approval'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li><%#= #TODO add ancher so user can quick access into that part %>
<% end %>
<% if current_user.admin? || (!bulletin.is_rejected? && !bulletin.is_checked?) %>
<li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>
<ul class="dropdown-menu" id="menu1">
<li><%= link_to t(:basic), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'basic'), :remote => true %></li>
<li><%= link_to t(:picture), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'picture'), :remote => true %></li>
<li><%= link_to t(:tags), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'tags'), :remote => true %></li>
<li><%= link_to t(:link), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'links'), :remote => true %></li>
<li><%= link_to t(:file), load_quick_edit_panel_announcement_back_end_bulletin_path(bulletin, :type => 'files'), :remote => true %></li>
</ul>
</li>
<%#= debugger %>
<%#= a=1 %>
<% if (bulletin.bulletin_category.authed_users('fact_check').include?(current_user) or is_manager?) and !bulletin.is_expired? %>
<li><%= link_to t('announcement.bulletin.approval'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li><%#= #TODO add ancher so user can quick access into that part %>
<% end %>
<% end %>
<li class="dropdown"><%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(bulletin), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
</ul>

View File

@ -50,7 +50,7 @@
<div class="control-group">
<label class="control-label">Start</label>
<div class="controls">
<%= f.date_select :postdate, {:use_month_numbers => true, :prompt => { :month => 'Month', :day => 'Day', :year => 'Year'}, :order => [:day, :month, :year] }, {:class => 'input-small'} %>
<%= f.date_select :postdate, {:use_month_numbers => true, :order => [:day, :month, :year] }, {:class => 'input-small'} %>
</div>
</div>
<div class="control-group">
@ -98,7 +98,7 @@
<% end %>
<% end %>
</div>
</div>
</div>
<% if params[:action] != 'new' %>
<div id="widget-audit" class="widget-box">
<div class="widget-action clear">
@ -144,14 +144,16 @@
<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %>
<ul class="nav nav-tabs">
<% @site_valid_locales.each_with_index do |locale, i| %>
<%# @site_valid_locales.each_with_index do |locale, i| %>
<% site_valid_locales_default_head.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
<div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %>
<%# @site_valid_locales.each_with_index do |locale, i| %>
<% site_valid_locales_default_head.each_with_index do |locale, i| %>
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
@ -208,7 +210,7 @@
<td style="text-align:center" colspan="4">
<div id='add_bulletin_link' class="info_input bulletin_links_block">
<%= hidden_field_tag 'bulletin_link_field_count', @bulletin.bulletin_links.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
</div>
</td>
</tr>
@ -253,7 +255,7 @@
<td style="text-align:center" colspan="4">
<div id='add_bulletin_file' class="info_input bulletin_files_block">
<%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
</div>
</td>
</tr>

View File

@ -4,6 +4,7 @@
<div class="control-group">
<div class="controls">
<%= f.file_field :file %>
<%= form_bulletin_file.file.file ? ( link_to t(:view), form_bulletin_file.file.url, {:target => '_blank', :title => t(:view)} ) : '' %>
</div>
</div>
</td>
@ -19,7 +20,7 @@
<div class="control-group">
<label for="link-<%= locale %>" class="control-label"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
<div class="controls">
<%= f.text_field locale, :id => "link-#{locale}", :class => "input-xlarge" %>
<%= f.text_field locale, :id => "link-#{locale}" %>
</div>
</div>
<% end %>
@ -43,7 +44,7 @@
<div class="control-group">
<label for="link-<%= locale %>" class="control-label"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
<div class="controls">
<%= f.text_field locale, :id => "link-#{locale}", :class => "input-xlarge" %>
<%= f.text_field locale, :id => "link-#{locale}" %>
</div>
</div>
<% end %>

View File

@ -2,9 +2,14 @@
<%= stylesheet_link_tag "inc/permission-checkbox" %>
<% end %>
<% content_for :page_specific_javascript do %>
<<<<<<< HEAD
<%= javascript_include_tag "bootstrap" %>
<%#= javascript_include_tag "inc/permission-checkbox" %>
<%#= javascript_include_tag "inc/search" %>
=======
<%= javascript_include_tag "inc/permission-checkbox" %>
<%= javascript_include_tag "inc/search" %>
>>>>>>> 291d5e3a03ba7da62ceb5e3b18012f0c9198dfba
<% end %>
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
<%= form_tag('', :remote => true) %>

View File

@ -5,6 +5,12 @@ en:
_locale: English
basic: Basic
picture: Piture
tags: Tag
link: Link
file: File
add: Add
back: Back
create: Create
@ -22,6 +28,23 @@ en:
sure?: Are you sure?
update: Update
yes_: "Yes"
hot: Hot
top: Top
hidden: Hidden
passed: Passed
pending: Pending
rejected: Rejected
clear: Clear
hot: Hot
top: Top
hidden: Hidden
passed: Approved
pending: Pending
rejected: Rejected
clear: Clear
hot: Hot
top: Top

View File

@ -5,7 +5,7 @@ class Panel::PageContent::BackEnd::PageContextsController < OrbitBackendControll
def index
@page_contexts = PageContext.where(:archived => false).desc(:updated_at)
@page_contexts = PageContext.where(:archived => false).desc(:updated_at).page(params[:page]).per(10)
respond_to do |format|
format.html # index.html.erb

View File

@ -17,4 +17,6 @@
</tbody>
</table>
<%= paginate @page_contexts %>

View File

@ -7,7 +7,8 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
get_categorys(params[:web_link_category_id])
@web_links = WebLink.search(params[:category_id])
# @web_links = WebLink.search(params[:category_id])
@web_links = WebLink.all.page(params[:page]).per(10)
get_tags

View File

@ -19,3 +19,5 @@
</tbody>
</table>
<%= paginate @web_links %>