fix for category and also can edit category

This commit is contained in:
Harry Bomrah 2015-01-08 18:30:22 +08:00
parent 4cbc7a6a0e
commit ddb0432cdf
2 changed files with 5 additions and 4 deletions

View File

@ -30,6 +30,7 @@
<a class="btn btn-small btn-danger action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/uninstall_site_list?id=<%= rm.id.to_s %>" for="uninstallation">Uninstall</a> <a class="btn btn-small btn-danger action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/uninstall_site_list?id=<%= rm.id.to_s %>" for="uninstallation">Uninstall</a>
<a class="btn btn-small btn-warning action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/revokelist?id=<%= rm.id.to_s %>" for="revoke_access">Revoke Access</a> <a class="btn btn-small btn-warning action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/revokelist?id=<%= rm.id.to_s %>" for="revoke_access">Revoke Access</a>
<a class="btn btn-small btn-success action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/grantlist?id=<%= rm.id.to_s %>" for="grant_access">Grant Access</a> <a class="btn btn-small btn-success action-btns" data-id="<%= rm.id.to_s %>" href="/admin/admin_modules/grantlist?id=<%= rm.id.to_s %>" for="grant_access">Grant Access</a>
<a class="btn btn-small" href="/admin/admin_modules/approve?module_id=<%= rm.id.to_s %>" data-toggle="modal" data-target="#approveModal">Edit</a>
</td> </td>
<% else %> <% else %>
<td> <td>

View File

@ -1,18 +1,18 @@
<%= form_for @rm, url: admin_admin_module_path(@rm.id), :html=>{:class => "form-horizontal", :id => "approveSiteForm"} do |f| %> <%= form_for @rm, url: admin_admin_module_path(@rm.id), :html=>{:class => "form-horizontal", :id => "approveSiteForm"} do |f| %>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="gitPath">Module Type : </label> <label class="control-label">Module Type : </label>
<div class="controls"> <div class="controls">
<%= f.collection_select(:module_type, ModuleType.all, :id, :name) %> <%= f.collection_select(:module_type, ModuleType.all, :id, :name) %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="gitPath">Category : </label> <label class="control-label">Category : </label>
<div class="controls"> <div class="controls">
<%= f.collection_select(:module_type, @categories, :id, :title) %> <%= f.collection_select(:category_id, @categories, :id, :title) %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="gitPath">Tags : </label> <label class="control-label">Tags : </label>
<span id="select_tags"> <span id="select_tags">
<div class="controls" data-toggle="buttons-checkbox"> <div class="controls" data-toggle="buttons-checkbox">
<% @tags.each do |tag| %> <% @tags.each do |tag| %>