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:
chris committed 2013-07-02 16:46:44 +08:00
1 parent 07b3857465
commit 856898016b
1495 files changed
+52132 -9876

No files matched your search

+10 -12
View File
@@ -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 %>
+28 -47
View File
@@ -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>
+10 -13
View File
@@ -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 %>
-3
View File
@@ -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)) %>");
-4
View File
@@ -1,5 +1 @@
<% content_for :sidebar do %>
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'edit' %>
+1 -1
View File
@@ -1 +1 @@
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/edit')) %>");
$('#view-page .content').html("<%= j render 'edit' %>");
-4
View File
@@ -1,5 +1 @@
<% content_for :sidebar do %>
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'new' %>
+1 -1
View File
@@ -1 +1 @@
$('#back_main').html("<%= escape_javascript(render(:partial => 'admin/links/new')) %>");
$('#view-page .content').html("<%= j render 'new' %>");
-2
View File
@@ -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)) %>");