New UI changes(tags, categories, authorisations, module index…)
To run: - ruby lib/remove_old_tags.rb DB_NAME - rake new_ui:migrate_tags - rake new_ui:migrate_categories['APP_KEY,''MODEL_NAME'] (check new_ui.rake for more details)
This commit is contained in:
1 parent
07b3857465
commit
856898016b
1495 files changed
+52132
-9876
No files matched your search
@@ -0,0 +1,8 @@
|
||||
<li class="filter-item selected_user" id="<%= user.id %>">
|
||||
<label>
|
||||
<%= image_tag (user.avatar? ? user.avatar.thumb : 'menber-pic.png'), :class => "user-pic" %>
|
||||
<span class="user-name"><%= user.name %></span>
|
||||
<!-- <span>國際事務學院,國際研究英語碩士學位學程</span> -->
|
||||
</label>
|
||||
<input type="checkbox">
|
||||
</li>
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="mini-layout row-fluid">
|
||||
<div class="mini-layout-sidebar span2">
|
||||
<div class="nano">
|
||||
<div class="content">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<% @module_apps.each do |module_app| %>
|
||||
<li class="<%= @module_app == module_app ? 'active' : '' %>">
|
||||
<%= link_to content_tag(:i, nil, class: (module_app.get_registration.get_icon_class rescue nil)) + ' ' + module_app.title, admin_authorizations_path(module_app.key, @type) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mini-layout-body span10">
|
||||
<%= link_to t(:module_authorization), admin_authorizations_path(@module_app.key) %>
|
||||
<%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, type: 'category') %>
|
||||
<%= link_to t(:approval_), admin_authorizations_path(@module_app.key, type: 'approval') %>
|
||||
<% if @error %>
|
||||
<%= @error %>
|
||||
<% else %>
|
||||
<%= select_tag :category, options_from_collection_for_select(@categories, "id", "title", @category.id), :onchange => "window.location.href = '/admin/authorizations/'+'#{@module_app.key}/#{@type}/'+$(this).val();" if @categories %>
|
||||
<ul id="card-list" class="checkbox-card clearfix">
|
||||
<%= render partial: 'user', collection: @users %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + ' ' + t(:add), '#', class: 'btn btn-primary select_user_modal', rel: admin_modal_select_authorizations_path(@module_app.key, @type, @category) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-trash") + ' ' + t(:delete), '#', id: 'remove_users', class: 'btn btn-danger', rel: admin_remove_users_authorizations_path(@module_app.key, @type, @category) %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#card-list").append("<%= j render partial: 'user', collection: @users %>");
|
||||
$("#member-filter").modal('hide');
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#select_user").html("<%= j render partial: 'admin/member_selects/modal_select', locals: {role_form_url: admin_add_roles_authorizations_path(@module_app.key, @type, @category_id), user_form_url: admin_add_users_authorizations_path(@module_app.key, @type, @category_id)} %>");
|
||||
$("#member-filter").modal();
|
||||
@@ -0,0 +1,3 @@
|
||||
<% @users.each do |user| %>
|
||||
$("#<%= user.id.to_s %>").remove()
|
||||
<% end %>
|
||||
@@ -0,0 +1,20 @@
|
||||
<tr class="<%= 'disable' if category.disable %>">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<td>
|
||||
<%= category.title_translations[locale] %>
|
||||
<% if i == 0 %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if is_admin?%>
|
||||
<li><%= link_to t(:edit), edit_admin_module_app_category_path(@module_app_id, category), class: "open-slide" %></li>
|
||||
<li><%= link_to show_toggle_archive_btn(category) , toggle_admin_module_app_category_path(@module_app_id, category), method: :post, remote: true, class: "archive_toggle" %></li>
|
||||
<% end %>
|
||||
<% if is_manager? || is_admin? %>
|
||||
<li><%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, 'category', category.id) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%= form_for @category, :url => admin_module_app_category_path(@module_app_id, @category), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t(:edit_category) %></legend>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
</fieldset>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1,9 @@
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= label_tag "name-#{locale}", "#{t(:name)} (#{I18nVariable.from_locale(locale)})" %>
|
||||
<%= f.text_field locale, :class => 'input-large', :value => (@category.title_translations[locale] rescue ''), placeholder: t(:name) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,21 @@
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr class="sort-header">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<th class="<%= 'span50-percent' if i==0 %>"><a href="#"><%= t(:_locale, :locale => locale) %></a></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render partial: 'category', collection: @categories %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_module_app_category_path(@module_app_id), class: "btn btn-primary open-slide" %>
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<%= paginate @categories unless @categories.blank? %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%= form_for @category, :url => admin_module_app_categories_path(@module_app_id), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t(:add_category) %></legend>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
</fieldset>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'edit' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -0,0 +1,3 @@
|
||||
<div id="categories_index">
|
||||
<%= render 'index' %>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
$("#categories_index").html("<%= j render 'index' %>")
|
||||
$.pageslide.close();
|
||||
openSlide();
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'new' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="box-header">
|
||||
<h2>
|
||||
<i class="icons-book-2"></i>
|
||||
<span class="break"></span>
|
||||
<%= t(:all_content) %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:module) %></th>
|
||||
<th class="span1"><%= t(:quantity) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @module_app_contents.each do |module_app_content| %>
|
||||
<tr>
|
||||
<td><%= link_to t("dashboard.#{module_app_content[0]}"), get_link(module_app_content[0]) %></td>
|
||||
<td><%= module_app_content[1] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pager">
|
||||
<li><%= link_to_previous_page @module_app_contents, t(:previous), params: {controller: 'admin/dashboards', action: 'reload_all_content'}, remote: true %></li>
|
||||
<li><%= link_to_next_page @module_app_contents, t(:next), params: {controller: 'admin/dashboards', action: 'reload_all_content'}, remote: true %></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<div class="box-header">
|
||||
<h2>
|
||||
<i class="icons-trophy"></i>
|
||||
<span class="break"></span>
|
||||
<%= t(:most_visited_page) %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:title) %></th>
|
||||
<th class="span2"><%= t(:module) %></th>
|
||||
<th class="span1"><%= t(:hits) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @most_visited.each do |object| %>
|
||||
<tr>
|
||||
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
|
||||
<td><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
|
||||
<td><%= object[1] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pager">
|
||||
<li><%= link_to_previous_page @most_visited, t(:previous), params: {controller: 'admin/dashboards', action: 'reload_most_visited'}, remote: true %></li>
|
||||
<li><%= link_to_next_page @most_visited, t(:next), params: {controller: 'admin/dashboards', action: 'reload_most_visited'}, remote: true %></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<div class="box-header">
|
||||
<h2>
|
||||
<i class="icons-cycle"></i>
|
||||
<span class="break"></span>
|
||||
<%= t(:recent_update) %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:title) %></th>
|
||||
<th class="span2"><%= t(:module) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @recent_updated.each do |object| %>
|
||||
<tr>
|
||||
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
|
||||
<td><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pager">
|
||||
<li><%= link_to_previous_page @recent_updated, t(:previous), params: {controller: 'admin/dashboards', action: 'reload_recent_update'}, remote: true %></li>
|
||||
<li><%= link_to_next_page @recent_updated, t(:next), params: {controller: 'admin/dashboards', action: 'reload_recent_update'}, remote: true %></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<div class="box-header">
|
||||
<h2>
|
||||
<i class="icons-book-2"></i>
|
||||
<span class="break"></span>
|
||||
<%= t(:traffic) %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:total_visitors) %></th>
|
||||
<th class="span1"><%= display_visitors %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= t(:visitors_today) %></td>
|
||||
<td><%= display_visitors_today %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_week) %></td>
|
||||
<td><%= display_visitors_this_week %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_month) %></td>
|
||||
<td><%= display_visitors_this_month %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_year) %></td>
|
||||
<td><%= display_visitors_this_year %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,570 +1,29 @@
|
||||
<% content_for :page_specific_css do -%>
|
||||
<%= stylesheet_link_tag "item" %>
|
||||
<% end -%>
|
||||
<div id="isotope">
|
||||
<div class="item element">
|
||||
<h3><i class="icons-book-2"></i><%= t(:content) %></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:all_content) %></span><%= @module_app_contents_total %></p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:module) %></th>
|
||||
<th class="span2"><%= t(:quantity) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<% @module_app_contents.each do |module_app_content| %>
|
||||
<tr>
|
||||
<td><%= link_to t("dashboard.#{module_app_content[0]}"), get_link(module_app_content[0]) %></td>
|
||||
<td class="span2"><%= module_app_content[1] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section id="main-wrap">
|
||||
<div class="wrap-inner initial">
|
||||
<div class="row-fluid">
|
||||
<div class="box span8">
|
||||
<div id='recent_update'>
|
||||
<%= render 'recent_update' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box span4">
|
||||
<div id='all_content'>
|
||||
<%= render 'all_content' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item element">
|
||||
<h3><i class="icons-"></i><a href=""><%= t(:member_) %></a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:all_member) %></span>2,217</p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:role) %></th>
|
||||
<th class="span2"><%= t(:quantity) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row-fluid">
|
||||
<div class="box span4">
|
||||
<div id='traffic'>
|
||||
<%= render 'traffic' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box span8">
|
||||
<div id='most_visited'>
|
||||
<%= render 'most_visited' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-"></i><a href=""><%= t(:file_) %></a></a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:all_file) %></span>3,422</p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:file_type) %></th>
|
||||
<th class="span2"><%= t(:quantity) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Word</td>
|
||||
<td>304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PDF</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PowerPoint</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Excel</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jpeg</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gif</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Png</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Avi</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Txt</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zip</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="item element">
|
||||
<h3><i class="icons-"></i><a href=""><%= t(:referral_in_links) %></a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:statistics) %></span>517</p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:site_name) %></th>
|
||||
<th class="span2"><%= t(:statistics) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Ruling</td>
|
||||
<td class="span2">36</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yahoo</td>
|
||||
<td class="span2">31</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google</td>
|
||||
<td class="span2">3,187</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>facebook</td>
|
||||
<td class="span2">公告</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title5</td>
|
||||
<td class="span2">公告</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title6</td>
|
||||
<td class="span2">頁面</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title7</td>
|
||||
<td class="span2">頁面</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title8</td>
|
||||
<td class="span2">公告</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title9</td>
|
||||
<td class="span2">頁面</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title10</td>
|
||||
<td class="span2">公告</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="item element">
|
||||
<h3><i class="icons-"></i><a href=""><%= t(:most_visited_page) %></a></h3>
|
||||
<div class="detail noStatistics w-b h-a">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:title) %></th>
|
||||
<th class="span2"><%= t(:module) %></th>
|
||||
<th class="span2"><%= t(:hits) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Title1</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">2,549</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title2</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">1,022</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title3</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">928</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title4</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">904</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title5</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">867</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title6</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">830</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title7</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">749</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title8</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">702</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title9</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">639</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title10</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">549</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title1</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">2,549</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title2</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">1,022</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title3</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">928</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title4</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">904</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title5</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">867</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title6</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">830</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title7</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">749</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title8</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">702</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title9</td>
|
||||
<td class="span2">頁面</td>
|
||||
<td class="span2">639</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title10</td>
|
||||
<td class="span2">公告</td>
|
||||
<td class="span2">549</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item element">
|
||||
<h3><i class="icons-"></i><a href=""><%= t(:site_info) %></a></h3>
|
||||
<div class="detail noStatistics w-b h-a">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:item) %></th>
|
||||
<th class="span6"><%= t(:content) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td class="span6">National Chengchi University</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description:</td>
|
||||
<td class="span6">......</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keywords</td>
|
||||
<td class="span6">.....</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Online Date:</td>
|
||||
<td class="span6">2012/04/30</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>WedID:</td>
|
||||
<td class="span6">nccu</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Softwave Version:</td>
|
||||
<td class="span6">R4 beta</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Warranty:</td>
|
||||
<td class="span6">Valid</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="item element">
|
||||
<h3><i class="icons-airplane"></i><%= t(:traffic) %></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:total_visitors) %></span><%= display_visitors %></p>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:item) %></th>
|
||||
<th class="span2"><%= t(:data) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= t(:visitors_today) %></td>
|
||||
<td><%= display_visitors_today %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_week) %></td>
|
||||
<td><%= display_visitors_this_week %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_month) %></td>
|
||||
<td><%= display_visitors_this_month %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t(:visitors_this_year) %></td>
|
||||
<td><%= display_visitors_this_year %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item element">
|
||||
<h3><i class="icons-cycle"></i><%= t(:recent_update) %></h3>
|
||||
<div class="detail noStatistics w-b h-a">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:title) %></th>
|
||||
<th class="span2"><%= t(:module) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<% @recent_updated.each do |object| %>
|
||||
<tr>
|
||||
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
|
||||
<td class="span2"><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item element">
|
||||
<h3><i class="icons-trophy"></i><%= t(:most_visited_page) %></h3>
|
||||
<div class="detail noStatistics w-b h-a">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t(:title) %></th>
|
||||
<th class="span2"><%= t(:module) %></th>
|
||||
<th class="span2"><%= t(:hits) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<% @most_visited.each do |object| %>
|
||||
<tr>
|
||||
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
|
||||
<td class="span2"><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
|
||||
<td class="span2"><%= object[1] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
$("#<%= div_id %>").html("<%= j render div_id %>")
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="filter-clear">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-cycle') + t(:clear), url_for(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-link btn-small" %>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="accordion-inner pagination-right" data-toggle="buttons-checkbox">
|
||||
<% field[:values].each do |value| %>
|
||||
<% field_title = field[:type].eql?('objects') ? value.send(field[:object_field]) : t(value) %>
|
||||
<% field_id = field[:type].eql?('objects') ? value.id : value %>
|
||||
<%= link_to field_title, url_for(:filter => @filter, :new_filter => {:type => field[:translation], :id => field_id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small #{is_filter_active?(field[:translation], field_id)}" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'admin/default_index/clear_filters', :locals => {:type => field[:translation]} %>
|
||||
@@ -0,0 +1,56 @@
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "lib/modal-preview" if @approvable %>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.reject_info').tooltip({
|
||||
placement : 'bottom'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
<% content_for :right_nav do %>
|
||||
<!-- <div class="pull-right">
|
||||
<input id="filter-input" class="search-query input-medium" type="text" placeholder="<%= t(:search_) %>" value="">
|
||||
</div> -->
|
||||
<% if @filterable %>
|
||||
<ul class="nav nav-pills filter-nav pull-right">
|
||||
<% @filter_fields.each do |field| %>
|
||||
<li class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a href="#collapse-<%= field[:translation] %>" data-toggle="collapse" data-parent="#filter" class="accordion-toggle"><%= t(field[:translation]) %></a>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="filter-group accordion-group">
|
||||
<% @filter_fields.each do |field| %>
|
||||
<div class="accordion-body collapse" id="collapse-<%= field[:translation] %>">
|
||||
<%= render partial: 'admin/default_index/filter', locals: {field: field} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= index_table %>
|
||||
|
||||
<%= @index_footer %>
|
||||
|
||||
|
||||
<div id="delete_tags" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel"><%= t('tag.delete') %></h3>
|
||||
</div>
|
||||
<div class="modal-body tags">
|
||||
<span class="text-warning text-center"><%= t('tag.warning.delete') %></span>
|
||||
<hr>
|
||||
<ul class="tags-groups checkbox-card">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<%= link_to t(:delete_), nil, class: "delete-tags btn btn-danger", method: :post, remote: true %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<span class="brand"><i class="<%= node.root? ? 'icons-house' : 'icons-list-2' %>"></i></span>
|
||||
<% if node.class.to_s.eql?('Page') %>
|
||||
<% unless node.root? %>
|
||||
<% name, icon_name = get_item_module_infos(node) %>
|
||||
<span title="<%= name %>" class="item-type page tip"><i class="<%= icon_name %>"></i></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span title="<%= t(:link) %>" class="item-type link tip"><i class="icon-link"></i></span>
|
||||
<% end %>
|
||||
<div class="item-title">
|
||||
<%= link_to node.title, "/" + node.path %>
|
||||
<div class="item-menu">
|
||||
<%= link_to content_tag(:i, nil, class: "icon-eye-open"), eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "view-page open-slide tip", title: t(:view) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-edit"), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), class: "open-slide tip", title: t(:edit) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-newspaper"), new_admin_page_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_page) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-link"), new_admin_link_path(:parent_id => node.id), class: "open-slide tip", title: t(:add_link) if node.class.to_s.eql?('Page') %>
|
||||
<%= link_to content_tag(:i, nil, class: "icon-trash"), nil, rel: eval("admin_#{node.class.to_s.downcase}_path(node)"), class: "delete tip", title: t(:delete_) unless node.root? %>
|
||||
</div>
|
||||
<%= content_tag(:em, node.url, class: "muted") if node.class.to_s.eql?('Link') %>
|
||||
</div>
|
||||
<div class="item-info pull-right">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<% if node.menu_enabled_for.include?(valid_locale) %>
|
||||
<span class="label label-warning"><%= I18nVariable.from_locale(valid_locale) %></span>
|
||||
|
|
||||
<% end %>
|
||||
<% end %>
|
||||
<span class="badge <%= 'badge-inverse' if node.root? %>"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<% unless node.root? %>
|
||||
<li id='<%= node.id %>' class="<%= 'disabled' unless node.is_published %> <%= 'no-nest' if node.class.to_s.eql?('Link') %>" >
|
||||
<% end %>
|
||||
|
||||
<%= render 'node', node: node %>
|
||||
|
||||
<% unless node.children.blank? %>
|
||||
<% unless node.root? %>
|
||||
<ol>
|
||||
<% end %>
|
||||
<% node.children.each do |child| %>
|
||||
<%= render 'node_and_children', node: child %>
|
||||
<% end %>
|
||||
<% unless node.root? %>
|
||||
</ol>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless node.root? %>
|
||||
</li>
|
||||
<% end %>
|
||||
@@ -0,0 +1,10 @@
|
||||
<nav id="sidebar">
|
||||
<h2 class="position"><a href="#"><i class="icons-flow-tree"></i></a></h2>
|
||||
<div id="sidebar-menu">
|
||||
<div class="scroller">
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-nav-block-list">
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</nav>
|
||||
@@ -1,15 +0,0 @@
|
||||
<ol class="nav nav-list">
|
||||
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
||||
</ol>
|
||||
<script type="text/javascript">
|
||||
$.ajaxSetup({
|
||||
error: function(xhr, status, err) {
|
||||
if (xhr.status == 401){
|
||||
alert("<%= I18n.t('access.denied.ajax_401_error') %>");
|
||||
window.location.href = '/';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
bindTreeDragHandle();
|
||||
</script>
|
||||
@@ -1,5 +1,35 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
<% node = Item.root %>
|
||||
|
||||
<%= render "admin/#{@item.class.to_s.downcase.pluralize}/show" %>
|
||||
<%= render 'site_bar' %>
|
||||
|
||||
<section id="main-wrap">
|
||||
<div class="wrap-inner initial">
|
||||
<ol id='<%= node.id %>' class="sortable">
|
||||
<%= render 'node_and_children', node: node %>
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div id="dialog" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Delete item</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span class="text-warning text-center">This action can not be restored, are you sure you want to delete?</span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<%= link_to t(:delete_), nil, class: "delete-item btn btn-danger", method: :delete, remote: true %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="view-page" class="nano" style="display:none">
|
||||
<div class="page-info clearfix">
|
||||
<a class="pull-right" href="javascript:$.pageslide.close()"><i class="icons-arrow-left-2"></i></a>
|
||||
<h3 class="page-name">Communications and liaison</h3>
|
||||
</div>
|
||||
<div class="content">
|
||||
</div>
|
||||
</div>
|
||||
<%= javascript_include_tag "lib/jquery.pageslide.js" %>
|
||||
@@ -0,0 +1,3 @@
|
||||
$("#dialog").modal('hide');
|
||||
$("#main-wrap ol.sortable").html("<%= j render 'admin/items/node_and_children', node: Item.root %>");
|
||||
reloadStructure();
|
||||
@@ -1,12 +1,10 @@
|
||||
<h1><%= t('editing.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= form_for @item, :url => admin_link_path(@item), :html => { :class => 'form' } do |f| %>
|
||||
|
||||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:update_) %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= form_for @item, url: admin_link_path(@item), remote: true, html: {class: nil} do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.link') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,59 +1,40 @@
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :name, t(:name) %>
|
||||
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
|
||||
|
||||
<%= f.label :url, t(:url) %>
|
||||
<%= f.text_field :url, :class => 'input-xlarge', placeholder: t(:url) %>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
No
|
||||
</label>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
|
||||
<p>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
<%= t(:yes_) %>
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
<%= t(:no_) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag 'link[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'link[menu_enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :url, "#{t(:url)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :url, :class => 'text input-xlarge', :value => (@item.url rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'link[menu_enabled_for][]', '' %>
|
||||
</p>
|
||||
@@ -1,13 +1,10 @@
|
||||
<h1><%= t('new.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= form_for @item, :url => admin_links_path, :html => { :class => 'form' } do |f| %>
|
||||
|
||||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:create_) %> <%= link_back %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
<%= form_for @item, url: admin_links_path, remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('new.link') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/edit')) %>");
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'new' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/new')) %>");
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -1,2 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/show')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_link_url(@item)) %>");
|
||||
@@ -0,0 +1,80 @@
|
||||
<div id="member-filter" class="modal hide fade">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3><%= t('list.user') %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="tabbable tabs-left">
|
||||
<div class="nano">
|
||||
<div class="content">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="active"><a href="#all" data-toggle="tab"><%= t('list.role') %></a></li>
|
||||
<% @sorted_users.each_key do |role| %>
|
||||
<li class=""><a href="#r_<%= role.id %>" data-toggle="tab"><%= role.title %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="all">
|
||||
<%= form_tag role_form_url, remote: true do %>
|
||||
<fieldset>
|
||||
<% @sorted_users.each_key do |role| %>
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag 'role_ids[]', role.id , false %> <%= role.title %>
|
||||
</label>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<div class="form-actions">
|
||||
<button type="button" class="btn" data-dismiss="modal"><%= t(:cancel) %></button>
|
||||
<%= submit_tag t(:submit), class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% @sorted_users.each do |role, users| %>
|
||||
<div class="tab-pane fade" id="r_<%= role.id %>">
|
||||
<%= form_tag user_form_url, remote: true do %>
|
||||
<fieldset class="clearfix">
|
||||
<div class="member-filter-result nano">
|
||||
<div class="content">
|
||||
<ul class="checkbox-card clearfix">
|
||||
<% users.each do |user| %>
|
||||
<li>
|
||||
<label>
|
||||
<%= image_tag (user.avatar.file ? user.avatar : "menber-pic.png"), class: "user-pic" %>
|
||||
<span class="user-name"><%= user.name %></span>
|
||||
</label>
|
||||
<%= check_box_tag 'user_ids[]', user.id , false %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions condition">
|
||||
<button type="button" class="btn" data-dismiss="modal"><%= t(:cancel) %></button>
|
||||
<%= submit_tag t(:submit), class: "btn btn-primary" %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".modal").on("hidden", function () {
|
||||
$("#select_user").remove();
|
||||
});
|
||||
$('#member-filter').on('shown', function() {
|
||||
$('#member-filter').off('shown')
|
||||
$(this).find('.nano').nanoScroller({ scrollTop: 0, iOSNativeScrolling: true });
|
||||
$(this).find('.checkbox-card > li').cardCheck({
|
||||
check: $(this).find('.checkbox-card > li input[type="checkbox"]'),
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,5 @@
|
||||
<span class="alert alert-info selected_user" user_id="<%= user.id %>">
|
||||
<%= user.name %>
|
||||
<%= hidden_field_tag field, user.id %>
|
||||
<%= content_tag :span, '×', class: 'close remove_user' %>
|
||||
</span>
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#select_user").html("<%= j render partial: 'admin/member_selects/modal_select', locals: {role_form_url: set_roles_admin_member_selects_path(field: @field), user_form_url: set_users_admin_member_selects_path(field: @field)} %>");
|
||||
$("#member-filter").modal();
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#selected_users").append("<%= j render partial: 'user', collection: @users, locals: {field: @field} %>");
|
||||
$("#member-filter").modal('hide');
|
||||
@@ -1 +0,0 @@
|
||||
<%= f.select :module_app_id, @module_apps.collect { |t| [t.module_name, t.id] }, {:include_blank => true} ,{:rel => admin_module_apps_path } %>
|
||||
@@ -1,33 +0,0 @@
|
||||
<% content_for :secondary do %>
|
||||
<% end %>
|
||||
|
||||
<h3><%= @module_app.title%></h3>
|
||||
|
||||
<div id="manager_management">
|
||||
<dl id="manager">
|
||||
<dt><%= t(:manager) %></ht>
|
||||
<% @module_app.managers.each do |manager| %>
|
||||
<dd><%= manager.user.name %> <%= get_auth_by(manager) %> <%= link_to '[X]',remove_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:manager) && manager.user != current_user %> </dd>
|
||||
<% end %>
|
||||
<dd>
|
||||
<%= form_tag(assign_manager_admin_module_app_path) do %>
|
||||
<%= collection_select(:manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:manager))%>
|
||||
<%= submit_tag t("auth.add_manager") %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="sub_manager">
|
||||
<dt><%#= t(:sub_manager) %></ht>
|
||||
<%# @module_app.sub_managers.each do |manager| %>
|
||||
<dd><%#= manager.user.name %> <%#= get_auth_by(manager) %><%#= link_to '[X]',remove_sub_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:sub_manager) && manager.user != current_user %> </dd>
|
||||
<%# end %>
|
||||
<dd>
|
||||
<%#= form_tag(assign_sub_manager_admin_module_app_path) do %>
|
||||
<%#= collection_select(:sub_manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:sub_manager))%>
|
||||
<%#= submit_tag t("auth.add_sub_manager") %>
|
||||
<%# end %>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<%#= render :partial => "admin/components/user_role_management", :locals => { :object => @module_app ,:auth=> @module_app.app_auth ,:submit_url=> admin_module_app_app_auths_path(@module_app),:ploy_route_ary=>['remove',:admin,@module_app,@module_app.app_auth] } %>
|
||||
|
||||
Whitespace-only changes.
@@ -1,37 +0,0 @@
|
||||
<br /><br /><br /><br />
|
||||
<%=@module_app.key %><br />
|
||||
<%=@module_app.title %><br />
|
||||
<%=@module_app.version %><br />
|
||||
<%=@module_app.organization %><br />
|
||||
<%=@module_app.author %><br />
|
||||
<%=@module_app.intro %><br />
|
||||
<%=@module_app.update_info %><br />
|
||||
<%=@module_app.create_date %><br />
|
||||
<%=@module_app.enable_frontend%><br />
|
||||
<%=@module_app.app_pages%><br />
|
||||
<%=@module_app.widgets%><br />
|
||||
|
||||
Mangers:
|
||||
<ul>
|
||||
<% @module_app.managers.each do |manager|%>
|
||||
<li><%= manager.user.name %></li>
|
||||
<%end%>
|
||||
</ul>
|
||||
|
||||
|
||||
SubManagers:
|
||||
<div>
|
||||
<% @module_app.sub_managers.each do |manager|%>
|
||||
<%= manager.user.name %>
|
||||
<%end%>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
All User?:<%= @module_app.app_auth.all %><br />
|
||||
Blocked Users:<%= @module_app.app_auth.blocked_users.collect{|t| t.name} %><br />
|
||||
Privilege Users:<%= @module_app.app_auth.privilege_users.collect{|t| t.name}%><br />
|
||||
User Roles:<%= @module_app.app_auth.roles.collect{|t| t.key} %><br />
|
||||
User Sub Roles:<%= @module_app.app_auth.sub_roles.collect{|t| t.key} %><br />
|
||||
|
||||
Available users after calculation:
|
||||
<%= @module_app.app_auth.auth_users.collect{|user| user.name}.join(',') %>
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= form_for :tag, :url => admin_tags_path, :remote => true, :html => {:id => 'tag_form'} do |f| %>
|
||||
<%= form_for :tag, :url => admin_module_tags_path, :remote => true, :html => {:id => 'tag_form'} do |f| %>
|
||||
<%= f.fields_for :name_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%= form_for @tag, url: admin_module_tag_path(@tag, module_app_id: @module_app_id), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.tag') %></legend>
|
||||
<%= render partial: "admin/tags/form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -0,0 +1,51 @@
|
||||
<%= hidden_field_tag 'module_app_id', @module_app_id %>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<button id="selectAllTags" class="btn"><%= t(:select_all) %></button>
|
||||
<button id="deselect" class="btn btn-inverse toggable hide"><%= t(:deselect_all) %></button>
|
||||
<%= link_to t(:delete), '#', id: "deleteTags", class: "btn btn-danger toggable hide", rel: '' %>
|
||||
<%= link_to t(:merge), '#', id: "mergerTags", class: "btn btn-success toggable hide", rel: merge_admin_module_tags_path(module_app_id: @module_app_id) %>
|
||||
<%= link_to t(:remove_default), '#', id: "removeDefaults", class: "btn btn-info toggable hide", rel: '' %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_module_tag_path(module_app_id: @module_app_id), class: "btn btn-primary open-slide" %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer:end -->
|
||||
|
||||
<!-- tags -->
|
||||
<div class="tags">
|
||||
<div id="tags-list">
|
||||
<ul class="tags-groups checkbox-card module-tags">
|
||||
<%= render partial: "module_tag", collection: @tags %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- tags:end -->
|
||||
|
||||
<!-- merge -->
|
||||
<%= render 'admin/tags/merge_modal' %>
|
||||
<!-- merge:end -->
|
||||
|
||||
<!-- delete -->
|
||||
<%= render 'admin/tags/delete_modal' %>
|
||||
<!-- delete:end -->
|
||||
|
||||
<!-- remove_default -->
|
||||
<div id="remove_defaults" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel"><%= t('tag.remove_default') %></h3>
|
||||
</div>
|
||||
<div class="modal-body tags">
|
||||
<span class="text-warning text-center"><%= t('tag.warning.remove_default') %></span>
|
||||
<hr>
|
||||
<ul class="tags-groups checkbox-card">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<%= link_to t(:remove_default), nil, class: "remove-defaults btn btn-danger", method: :post, remote: true %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- remove_default:end -->
|
||||
@@ -0,0 +1,17 @@
|
||||
<li class="filter-item <%= module_tag.is_default ? 'default' : 'module' %>">
|
||||
<p class="card pull-left">
|
||||
<input type="checkbox">
|
||||
</p>
|
||||
<%= hidden_field_tag "ids[]", module_tag.id, class: "tag_id" %>
|
||||
<% if module_tag.is_default %>
|
||||
<a>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
</a>
|
||||
<% else %>
|
||||
<%= link_to edit_admin_module_tag_path(module_tag, module_app_id: @module_app_id), class: "open-slide" do %>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -0,0 +1,49 @@
|
||||
<div id="add-tags">
|
||||
|
||||
<legend>Add Tags</legend>
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a href=".set_new" data-toggle="tab">Create new</a></li>
|
||||
<li><a href=".select_default" data-toggle="tab">Use Default</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="set_new tab-pane fade active in">
|
||||
<%= form_for @tag, url: admin_module_tags_path(module_app_id: @module_app_id), remote: true, id: 'create_new_tags' do |f| %>
|
||||
<fieldset>
|
||||
<%= render partial: "admin/tags/form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="select_default tags tab-pane fade">
|
||||
<input id="filter-default-tag" class="search-query" type="text" placeholder="Search Tags" value="">
|
||||
<%= form_tag update_included_default_admin_module_tags_path(module_app_id: @module_app_id), id: "filter-default-tag", method: :post, remote: true do %>
|
||||
<fieldset>
|
||||
<ul class="add-default-tags-list tags-groups checkbox-card">
|
||||
<% @default_tags.each do |module_tag| %>
|
||||
<li class="filter-item default">
|
||||
<p class="card pull-left">
|
||||
<input type="checkbox">
|
||||
<%= check_box_tag "ids[]", module_tag.id, false, class: "tag_id" %>
|
||||
</p>
|
||||
<a>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= submit_tag t(:add), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'edit' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -0,0 +1,9 @@
|
||||
<% content_for :right_nav do %>
|
||||
<div class="searchClear pull-right">
|
||||
<input id="filter-input" class="search-query input-medium" type="text" placeholder="<%= t('search.tags') %>" value="">
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="tags_index">
|
||||
<%= render 'index' %>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
$("#delete_tags").modal('hide');
|
||||
$("#tags-merger").modal('hide');
|
||||
$("#remove_defaults").modal('hide');
|
||||
$("#tags_index").html("<%= j render 'index' %>")
|
||||
$.pageslide.close();
|
||||
openSlide();
|
||||
$('.card').cardCheck({
|
||||
check: $('.card input[type="checkbox"]'),
|
||||
});
|
||||
checkedLength()
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'new' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
File renamed without changes.
@@ -1,3 +0,0 @@
|
||||
<div class="auth_unit">
|
||||
<%= unit%>
|
||||
<div>
|
||||
@@ -1,9 +0,0 @@
|
||||
<% content_for :secondary do %>
|
||||
<% end %>
|
||||
|
||||
<h3><%= @object_auth.title %></h3>
|
||||
|
||||
<%= render :partial => "admin/components/user_role_management", :locals => {
|
||||
:object => @object_auth.auth_obj ,:auth=>@object_auth,:submit_url=>create_role_admin_object_auth_path(@object_auth),:ploy_route_ary=>['remove',:admin,@object_auth] } %>
|
||||
|
||||
<%= link_to 'Back to object',eval(@object_auth.obj_authable.class.to_s+"::AfterObjectAuthUrl") %>
|
||||
@@ -1,39 +0,0 @@
|
||||
<% content_for :secondary do %>
|
||||
<% #render 'side_bar' %>
|
||||
<% end %>
|
||||
|
||||
<div class="main_list">
|
||||
<%= flash_messages %>
|
||||
<div class="button_bar up">
|
||||
<% #link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><%= t(:title) %></td>
|
||||
<td><%= t(:type) %></td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @object_auths.each do |object_auth| %>
|
||||
<tr>
|
||||
<td class="name"><%= object_auth.title %></td>
|
||||
<td class="name"><%= object_auth.obj_authable_type.to_s %></td>
|
||||
|
||||
<td class="action">
|
||||
<%= link_to t(:show), admin_object_auth_path(object_auth), :class => 'show' %>
|
||||
<%= link_to t(:edit), edit_admin_object_auth_path(object_auth), :class => 'edit' %>
|
||||
<%= link_to t(:delete_), admin_object_auth_path(object_auth), :class => 'delete', :confirm => t('sure?'), :method => :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="button_bar">
|
||||
<%# link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,24 +0,0 @@
|
||||
<% content_for :secondary do %>
|
||||
<ul class="list">
|
||||
</ul>
|
||||
<% end -%>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<%= flash_messages %>
|
||||
<h1><%= t('object_auth.new_object_auth') %></h1>
|
||||
<%= form_for @object_auth, :url => admin_object_auths_path do |f| %>
|
||||
<%= f.label :title %>
|
||||
<%= f.select :title,@object_auth_title_option %>
|
||||
|
||||
<%= f.hidden_field :obj_id, :value => params[:obj_id] %>
|
||||
<%= f.hidden_field :type, :value => params[:type] %>
|
||||
|
||||
<%= submit_tag 'Add Auth' %><br/>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
@@ -2,7 +2,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.select_widget_style") %>
|
||||
</label>
|
||||
<div class="controls well">
|
||||
<div class="controls">
|
||||
<% if @selected[:module_app].nil? || @selected[:module_app].widgets.nil? || (@selected[:module_app].widgets[@selected[:app_frontend_url]].blank? rescue true) || @selected[:module_app].widgets[@selected[:app_frontend_url]]["style"].nil? %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<%else%>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.fields_") %>
|
||||
</label>
|
||||
<div id="widget_field" class="well clear controls">
|
||||
<div id="widget_field" class="clear controls">
|
||||
|
||||
|
||||
<div class="rows clear">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<label class="control-label">
|
||||
<%= t("default_widget.select_widget_style") %>
|
||||
</label>
|
||||
<div class="controls well">
|
||||
<div class="controls">
|
||||
<ul class="clear">
|
||||
<% if @selected[:module_app].get_default_widget["enabled_styles"].include?("typeA") %>
|
||||
<li>
|
||||
|
||||
@@ -19,6 +19,3 @@
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
|
||||
@@ -6,17 +6,17 @@
|
||||
<% end %>
|
||||
|
||||
|
||||
<label class="control-label"><%= t "default_widget.data_source.category" %></label>
|
||||
<div class="well controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:category) %>
|
||||
<%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%>
|
||||
<%= check_box_tag("#{field_name}[category][]", category.id, category_checked_value(object,category.id),:class=>'select_option' )%>
|
||||
<%= category.title%>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<% else %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<% end %>
|
||||
</div>
|
||||
<label class="control-label"><%= t "default_widget.data_source.category" %></label>
|
||||
<div class="controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:category) %>
|
||||
<%= content_tag_for(:label, @categories,:class=>"radio inline") do |category|%>
|
||||
<%= check_box_tag("#{field_name}[category][]", category.id, category_checked_value(object,category.id),:class=>'select_option' )%>
|
||||
<%= category.title%>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<% else %>
|
||||
<%= t("default_widget.no_support_setting")%>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
<label class="control-label"><%= t "default_widget.data_source.tag" %></label>
|
||||
<div class="well controls">
|
||||
<div class="controls">
|
||||
<% if @categories %>
|
||||
<fieldset>
|
||||
<%= nil_checkbox_button(object,:tag) %>
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<label for="<%= field_name %>" class="control-label">
|
||||
<%= t("default_widget.widget_data_count") %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= select_tag(field_name,options_for_select(@page_frontend_data_counts||[],field_value )) %>
|
||||
</div>
|
||||
<label for="<%= field_name %>">
|
||||
<%= t("default_widget.widget_data_count") %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= select_tag(field_name, options_for_select(@page_frontend_data_counts||[],field_value), class: "input-xlarge") %>
|
||||
</div>
|
||||
@@ -1,11 +1,10 @@
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('editing.page') %></h1>
|
||||
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:update_), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for @item, url: admin_page_path(@item), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.page') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,116 +1,90 @@
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
<%= f.hidden_field :id, :value => (@item.id),:id=>"object_id" %>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, '*'+t(:name), :class => 'control-label' %>
|
||||
|
||||
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<span class="help-inline"><%= I18n.t("front_page.name_field_helper") %></span>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.hidden_field :id, :value => (@item.id), :id => "object_id" %>
|
||||
|
||||
<%= f.label :name, '*' + t(:name) %>
|
||||
<%= f.text_field :name, class: 'input-xlarge', placeholder: t(:name) %>
|
||||
<span class="help-block"><%= I18n.t("front_page.name_field_helper") %></span>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, class: 'input-xlarge', placeholder: "#{t(:title)} #{I18nVariable.from_locale(locale)}", value: (@item.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:template_name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => (@selected[:design].id rescue nil) }, {:rel => reload_themes_admin_pages_path} %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
<%= f.label :design, t(:template_name) %>
|
||||
<%= f.collection_select :design, @designs, :id, :title, {selected: (@selected[:design].id rescue nil) }, {rel: reload_themes_admin_pages_path, class: "input-xlarge"} %>
|
||||
|
||||
<%= f.label :theme, t(:theme) %>
|
||||
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {include_blank: true, selected: (@selected[:theme].id rescue nil) }, { class: "input-xlarge" } %>
|
||||
|
||||
<div id="module_app_list">
|
||||
<label for="select_module_app">
|
||||
<%= t("default_widget.select_module_app") %>
|
||||
</label>
|
||||
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, selected: (@selected[:module_app].id rescue nil)), {include_blank: true }, {rel: reload_after_module_changed_admin_pages_path, id: "page_module_app_id", class: "input-xlarge"} %>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:theme), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {:include_blank => true, :selected=>(@selected[:theme].id rescue nil) } %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
|
||||
<div id="frontend_list">
|
||||
<label for="select_app_url">
|
||||
<%= t("default_widget.select_app_url") %>
|
||||
</label>
|
||||
<div id="app_page_url">
|
||||
<%= select('page','app_frontend_url', @app_frontend_urls || [], {selected: @selected[:app_frontend_url], rel: reload_after_list_changed_admin_pages_path}, class: "input-xlarge") rescue '' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="module_app_list">
|
||||
<%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected =>(@selected[:module_app].id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="frontend_list">
|
||||
<%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
|
||||
<div class="controls" id="app_page_url">
|
||||
<%= select('page','app_frontend_url', @app_frontend_urls || [], {:selected => @selected[:app_frontend_url],:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="app_page_category" class="control-group">
|
||||
<div id="app_page_category">
|
||||
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %>
|
||||
</div>
|
||||
|
||||
<div id="app_page_tag" class="control-group">
|
||||
<div id="app_page_tag">
|
||||
<%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%>
|
||||
</div>
|
||||
|
||||
<div id="frontend_setting">
|
||||
<%= render :partial => 'frontend_setting', :locals=>{:object=>@item,:f=>f} %>
|
||||
<% if show_default_widget_setting_panel %>
|
||||
<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>@item,:f=>f} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id='data_count'>
|
||||
<div id='data_count'>
|
||||
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@selected[:page_frontend_data_count]} %>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
No
|
||||
</label>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :is_published, "#{t('front_page.is_published')} ?" %>
|
||||
<p>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
<%= t(:yes_) %>
|
||||
</label>
|
||||
<label class="radio inline">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
<%= t(:no_) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:" %>
|
||||
<p>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
||||
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
|
||||
</p>
|
||||
@@ -1,3 +0,0 @@
|
||||
<% if show_default_widget_setting_panel %>
|
||||
<%= render :partial=>'admin/page_parts/widget_setting',:locals=>{:object=>object,:f=>f} %>
|
||||
<% end %>
|
||||
@@ -1,11 +1,10 @@
|
||||
<%#= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('new.page') %></h1>
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:create_), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for @item, url: admin_pages_path, remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('new.page') %></legend>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,7 +1,7 @@
|
||||
<%#= flash_messages %>
|
||||
|
||||
|
||||
<%= page_stylesheets(@item, true).html_safe %>
|
||||
<%= page_javascripts(@item, true).html_safe %>
|
||||
<%#= page_stylesheets(@item, true).html_safe %>
|
||||
<%#= page_javascripts(@item, true).html_safe %>
|
||||
|
||||
<%= parse_page_edit_noko(@item).html_safe %>
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
||||
@@ -1,6 +1 @@
|
||||
<%= stylesheet_link_tag "admin/default_widget_setting" %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
<%= render 'edit' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render 'edit') %>");
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -1,5 +1 @@
|
||||
<% content_for :sidebar do %>
|
||||
<%= render 'admin/items/site_map_left_bar' %>
|
||||
<% end -%>
|
||||
|
||||
<%= render 'new' %>
|
||||
@@ -1 +1 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/new')) %>");
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -1,3 +0,0 @@
|
||||
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>");
|
||||
$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>");
|
||||
history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>");
|
||||
@@ -0,0 +1,16 @@
|
||||
<div id="delete_tags" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel"><%= t('tag.delete') %></h3>
|
||||
</div>
|
||||
<div class="modal-body tags">
|
||||
<span class="text-warning text-center"><%= t('tag.warning.delete') %></span>
|
||||
<hr>
|
||||
<ul class="tags-groups checkbox-card">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
<%= link_to t(:delete_), nil, class: "delete-tags btn btn-danger", method: :post, remote: true %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%= form_for @tag, url: admin_tag_path(@tag), remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('editing.tag') %></legend>
|
||||
<%= render partial: "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,9 +1,9 @@
|
||||
<%= form_for :tag, :url => admin_tag_path(tag), :method => :put, :remote => true do |f| %>
|
||||
<%= f.fields_for :name_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale, value: @tag.name_translations[locale] %>
|
||||
<% end %>
|
||||
<%= flash_messages %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<%= f.fields_for :name_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= f.label :locale, "#{t(:name)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, class: 'input-large', placeholder: "#{t(:name)} #{I18nVariable.from_locale(locale)}", value: (@tag.name_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag :module_app_id, @module_app_id %>
|
||||
<%= f.submit t(:update_) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,39 @@
|
||||
<!-- footer -->
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<button id="selectAllTags" class="btn"><%= t(:select_all) %></button>
|
||||
<button id="deselect" class="btn btn-inverse toggable hide"><%= t(:deselect_all) %></button>
|
||||
<%= link_to t(:delete), '#', id: "deleteTags", class: "btn btn-danger toggable hide", rel: '' %>
|
||||
<%= link_to t(:merge), '#', id: "mergerTags", class: "btn btn-success toggable hide", rel: merge_admin_tags_path %>
|
||||
<%= link_to t(:add_to_default), add_to_default_admin_tags_path, id: "addDefault", class: "btn btn-info toggable hide", method: :post, remote: true %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_tag_path, class: "btn btn-primary open-slide" %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer:end -->
|
||||
|
||||
<!-- tags -->
|
||||
<div class="tags">
|
||||
<div id="tags-list">
|
||||
<p class="tag-lead lead muted"><i class="icons-tag"></i> <%= t(:default) %> <span class="badge pull-right"><%= @tags.count %></span></p>
|
||||
<ul class="tags-groups checkbox-card default-tags">
|
||||
<%= render partial: "module_tag", collection: @tags %>
|
||||
</ul>
|
||||
<% @module_apps.each do |module_app| %>
|
||||
<% tags = module_app.module_tags %>
|
||||
<% icon_name = get_module_app_icon(module_app) %>
|
||||
<p class="tag-lead lead muted"><i class="<%= icon_name %>"></i> <%= module_app.title %> <span class="badge pull-right"><%= tags.count %></span></p>
|
||||
<ul class="tags-groups checkbox-card module-tags">
|
||||
<%= render partial: "module_tag", collection: tags, locals: {in_module: true} %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- tags:end -->
|
||||
|
||||
<!-- merge -->
|
||||
<%= render 'merge_modal' %>
|
||||
<!-- merge:end -->
|
||||
|
||||
<!-- delete -->
|
||||
<%= render 'delete_modal' %>
|
||||
<!-- delete:end -->
|
||||
@@ -0,0 +1,26 @@
|
||||
<div id="tags-merger" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<%= form_tag '', remote: true do %>
|
||||
<fieldset>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 id="myModalLabel"><%= t('tag.merger') %></h3>
|
||||
</div>
|
||||
<div class="modal-body tags">
|
||||
<div class="clearfix">
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= label_tag :locale, I18nVariable.from_locale(locale) %>
|
||||
<%= text_field_tag "name[#{locale}]", nil, class: 'new-tags-name', placeholder: t('tag.new_name') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<span class="help-block"><%= t('tag.merge_help') %></span>
|
||||
<hr>
|
||||
<ul class="tags-groups checkbox-card">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= t(:cancel) %></button>
|
||||
<button class="btn btn-primary"><%= t(:submit) %></button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<li class="filter-item <%= module_tag.is_default ? 'default' : '' %>">
|
||||
<% unless defined?(in_module) && module_tag.is_default %>
|
||||
<p class="card pull-left">
|
||||
<input type="checkbox">
|
||||
</p>
|
||||
<%= hidden_field_tag "ids[]", module_tag.id, class: "tag_id" %>
|
||||
<% end %>
|
||||
<% if defined?(in_module) && module_tag.is_default %>
|
||||
<a>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
</a>
|
||||
<% else %>
|
||||
<%= link_to edit_admin_tag_path(module_tag), class: "open-slide" do %>
|
||||
<span class="amount"><%= get_tagging_count(module_tag) %></span>
|
||||
<%= show_names_slash(module_tag) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -0,0 +1,10 @@
|
||||
<%= form_for @tag, url: admin_tags_path, remote: true do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t('new.tag') %></legend>
|
||||
<%= render partial: "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
@@ -1,13 +0,0 @@
|
||||
<div id="<%= dom_id tag %>" class="tag clear">
|
||||
<div class="tagitem">
|
||||
<i class="icons-tag"></i>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%#= I18nVariable.from_locale(locale) %>
|
||||
<%= tag.name_translations[locale] %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="action">
|
||||
<%= link_to t(:edit), edit_admin_tag_path(tag, :module_app_id => @module_app_id), :remote => true %>
|
||||
<%= link_to t(:delete_), admin_tag_path(tag, :module_app_id => @module_app_id), :confirm => t('sure?'), :method => :delete, :remote => true %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +0,0 @@
|
||||
$('#tag_form').each(function(){
|
||||
this.reset();
|
||||
});
|
||||
$('#tags').append("<%= j render :partial => 'tag', :object => @tag %>")
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'edit' %>
|
||||
@@ -1 +1 @@
|
||||
$('#<%= dom_id @tag %>').html("<%= j render :partial => 'form', :locals => {:tag => @tag} %>")
|
||||
$('#view-page .content').html("<%= j render 'edit' %>");
|
||||
@@ -1,17 +1,9 @@
|
||||
<!--<div class="subnav">
|
||||
<ul class="nav nav-pills filter">
|
||||
<li class="accordion-group">
|
||||
<form class="form-search">
|
||||
<input type="text" class="input-medium search-query">
|
||||
<button type="submit" class="btn">Search</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<% content_for :right_nav do %>
|
||||
<div class="searchClear pull-right">
|
||||
<input id="filter-input" class="search-query input-medium" type="text" placeholder="<%= t('search.tags') %>" value="">
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="tags_index">
|
||||
<%= render 'index' %>
|
||||
</div>
|
||||
-->
|
||||
<div id='tags' class="clear">
|
||||
<%= render :partial => 'tag', :collection => @tags %>
|
||||
</div>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= render 'add' %>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
$("#delete_tags").modal('hide');
|
||||
$("#tags-merger").modal('hide');
|
||||
$("#tags_index").html("<%= j render 'index' %>")
|
||||
$.pageslide.close();
|
||||
openSlide();
|
||||
$('.card').cardCheck({
|
||||
check: $('.card input[type="checkbox"]'),
|
||||
});
|
||||
checkedLength()
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'new' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="accordion-body collapse" id="collapse-tags">
|
||||
<div class="accordion-inner" data-toggle="buttons-checkbox">
|
||||
<% @sub_role_tags.each do |sr_tag|%>
|
||||
<a href="#" class="btn"><%= sr_tag[I18n.locale] %></a>
|
||||
<a href="#" class="btn"><%= sr_tag.name %></a>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="filter-clear">
|
||||
|
||||
Reference in new issue
Block a user