forked from saurabh/orbit4-5
group mods..
This commit is contained in:
parent
017be3eb3d
commit
8dac8273f7
|
@ -59,7 +59,16 @@
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 45%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.trash {
|
||||||
|
color: $red;
|
||||||
|
font-size: 25px;
|
||||||
|
position: absolute;
|
||||||
|
top: 49%;
|
||||||
|
left: 60%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,12 @@ class Admin::GroupsController < OrbitGroupController
|
||||||
redirect_to admin_group_path(@group)
|
redirect_to admin_group_path(@group)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def deletepost
|
||||||
|
gp = GroupPost.find(params[:id])
|
||||||
|
gp.destroy
|
||||||
|
render :json => {"success" => true}.to_json
|
||||||
|
end
|
||||||
|
|
||||||
def showpost
|
def showpost
|
||||||
render_401 and return if !user_can_read?
|
render_401 and return if !user_can_read?
|
||||||
if (current_user.id.to_s != @post.author.to_s) && (!@post.read_by.include?(current_user.id.to_s))
|
if (current_user.id.to_s != @post.author.to_s) && (!@post.read_by.include?(current_user.id.to_s))
|
||||||
|
@ -53,6 +59,14 @@ class Admin::GroupsController < OrbitGroupController
|
||||||
render :partial => "group_categories"
|
render :partial => "group_categories"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_category
|
||||||
|
gc = GroupCategory.find(params[:category_id])
|
||||||
|
gc.update_attributes(category_params)
|
||||||
|
gc.save
|
||||||
|
@categories = GroupCategory.all
|
||||||
|
render :partial => "group_categories"
|
||||||
|
end
|
||||||
|
|
||||||
def upload_photo
|
def upload_photo
|
||||||
photo = GroupPostImage.new(post_image_params)
|
photo = GroupPostImage.new(post_image_params)
|
||||||
photo.save
|
photo.save
|
||||||
|
@ -81,6 +95,12 @@ class Admin::GroupsController < OrbitGroupController
|
||||||
redirect_to admin_groups_path
|
redirect_to admin_groups_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
group = Group.find(params[:id])
|
||||||
|
group.destroy
|
||||||
|
render :json => {"success" => true}.to_json
|
||||||
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@group = Group.new
|
@group = Group.new
|
||||||
@categories = GroupCategory.all.collect{|gc| [gc.title,gc.id]}
|
@categories = GroupCategory.all.collect{|gc| [gc.title,gc.id]}
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Group
|
||||||
|
|
||||||
belongs_to :group_category
|
belongs_to :group_category
|
||||||
has_and_belongs_to_many :users
|
has_and_belongs_to_many :users
|
||||||
has_many :group_posts
|
has_many :group_posts, :dependent => :destroy
|
||||||
|
|
||||||
scope :closed, ->{ where(privacy: "closed") }
|
scope :closed, ->{ where(privacy: "closed") }
|
||||||
scope :open, ->{ where(privacy: "open") }
|
scope :open, ->{ where(privacy: "open") }
|
||||||
|
|
|
@ -6,13 +6,16 @@
|
||||||
current_user_is_group_member = true
|
current_user_is_group_member = true
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<li class="group-card animated bounceInDown">
|
<li class="group-card animated bounceInDown" data-group-id="<%= group.id.to_s %>">
|
||||||
<div class="group-card-inner card-ownership card-owner card">
|
<div class="group-card-inner card-ownership card-owner card">
|
||||||
<div class="group-avatar">
|
<div class="group-avatar">
|
||||||
<p class="<%= current_user_is_group_admin ? "gender-man" : (current_user_is_group_member ? "gender-woman" : "gender-none") %>"></p>
|
<p class="<%= current_user_is_group_admin ? "gender-man" : (current_user_is_group_member ? "gender-woman" : "gender-none") %>"></p>
|
||||||
<div class="action">
|
<% if current_user_is_group_admin %>
|
||||||
<%= link_to(content_tag(:i, nil, :class => 'icon-edit'),"#",:class=>"edit" ) if current_user_is_group_admin %>
|
<div class="action">
|
||||||
</div>
|
<%= link_to(content_tag(:i, nil, :class => 'icon-edit'),"#",:class=>"edit" ) %>
|
||||||
|
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'),"/admin/groups/#{group.id.to_s}",:class=>"trash delete-group-button" ) %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<%= image_tag(group.image) %>
|
<%= image_tag(group.image) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="group-info">
|
<div class="group-info">
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
<div class="group-post-item card clearfix wow bounceInUp">
|
<div class="group-post-item card clearfix wow bounceInUp" data-post-id="<%= post.id.to_s %>">
|
||||||
<a href="/admin/posts/<%= post.to_param %>" class="group-post-link"></a>
|
<a href="/admin/posts/<%= post.to_param %>" class="group-post-link"></a>
|
||||||
<div class="group-post-actions tool-tip-parent">
|
<div class="group-post-actions tool-tip-parent">
|
||||||
<div class="group-post-action-hint tool-tip right">
|
|
||||||
<span>Edit this post</span>
|
|
||||||
</div>
|
|
||||||
<button class="group-post-dropdown-toggle">
|
<button class="group-post-dropdown-toggle">
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="group-post-dropdown">
|
<ul class="group-post-dropdown">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a href="#">Flag inappropriate</a></li>
|
||||||
<li><a href="#">Another action</a></li>
|
<% if is_user_group_admin? || post.author.to_s == current_user.id.to_s %>
|
||||||
|
<li><a href="/admin/posts/<%= post.id.to_s %>" class="delete-post-btn">Delete this post</a></li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="group-post-image-wrap">
|
<div class="group-post-image-wrap">
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="group-category-tab-content tab-content">
|
<div class="group-category-tab-content tab-content">
|
||||||
<div class="group-category-existing tab-pane fade in active">
|
<div class="group-category-existing tab-pane fade in active" id="category_holder_box">
|
||||||
<%= render :partial => "group_categories" %>
|
<%= render :partial => "group_categories" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="group-category-request fade">
|
<div class="group-category-request fade">
|
||||||
|
@ -60,17 +60,17 @@
|
||||||
<h4 class="modal-title" id="myModalLabel"><%= t(:new_category) %></h4>
|
<h4 class="modal-title" id="myModalLabel"><%= t(:new_category) %></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal" id="create_category_form">
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
<form class="form-horizontal">
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label"><%= "#{t(:name)} (#{t(locale)})" %></label>
|
<label class="control-label"><%= "#{t(:name)} (#{t(locale)})" %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input class="input-large" id="<%=locale%>" name="category[title_translations][<%=locale%>]" placeholder="<%=t(:name)%>" type="text">
|
<input class="input-large" id="<%=locale%>" name="category[title_translations][<%=locale%>]" placeholder="<%=t(:name)%>" type="text">
|
||||||
<span class="help-inline hide">Please enter category title</span>
|
<span class="help-inline hide">Please enter category title</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</form>
|
||||||
<div class="text-error text-center"><%= t(:category_notice) %></div>
|
<div class="text-error text-center"><%= t(:category_notice) %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
<div class="view-page">
|
<div class="view-page">
|
||||||
<div class="nano">
|
<div class="nano">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= form_for :category, url: nil, remote: true, :html=>{id: "category_form"} do |f| %>
|
<%= form_for :category, url: "/admin/groups/", remote: true, :html=>{id: "category_form"} do |f| %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<%= f.fields_for :title_translations do |f| %>
|
<%= f.fields_for :title_translations do |f| %>
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
|
@ -104,6 +104,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
|
<input type="hidden" name="_method" value="patch" />
|
||||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||||
<%= f.submit t(:submit), class: 'btn btn-primary btn-small', id: "category_submit" %>
|
<%= f.submit t(:submit), class: 'btn btn-primary btn-small', id: "category_submit" %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,6 +116,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var bindOpenSlide = function(bind){
|
||||||
|
$("a.open-slide").on('click', function() {
|
||||||
|
setForm($(this).data('form'));
|
||||||
|
$("#category_form").attr("action","/admin/groups/updatecategory/" + $(this).data("id"));
|
||||||
|
});
|
||||||
|
if(bind){
|
||||||
|
$("a.open-slide").pageslide();
|
||||||
|
}
|
||||||
|
}
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#add_category").click(createCategory);
|
$("#add_category").click(createCategory);
|
||||||
|
|
||||||
|
@ -124,10 +134,12 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
bindOpenSlide(false);
|
||||||
$('.open-slide').on('click', function() {
|
$("#category_form").on("ajax:success",function(xhr,data){
|
||||||
setForm($(this).data('form'));
|
$("#category_holder_box").html(data);
|
||||||
});
|
$.pageslide.close();
|
||||||
|
bindOpenSlide(true);
|
||||||
|
})
|
||||||
|
|
||||||
$.each($('#categoryModal .input-large'),function(){
|
$.each($('#categoryModal .input-large'),function(){
|
||||||
$(this).blur(function(){
|
$(this).blur(function(){
|
||||||
|
@ -159,13 +171,14 @@
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "/admin/groups/create_category",
|
url : "/admin/groups/create_category",
|
||||||
type : "post",
|
type : "post",
|
||||||
data: $("input[name^='category']").serialize(),
|
data: $("#create_category_form input[type=text]").serialize(),
|
||||||
}).done(function(data){
|
}).done(function(data){
|
||||||
$.each($('#categoryModal .input-large'),function(){
|
$.each($('#categoryModal .input-large'),function(){
|
||||||
$(this).val("");
|
$(this).val("");
|
||||||
});
|
});
|
||||||
$("#group_categories").html(data);
|
$("#category_holder_box").html(data);
|
||||||
$('#categoryModal').modal('hide');
|
$('#categoryModal').modal('hide');
|
||||||
|
bindOpenSlide(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,20 @@
|
||||||
<ul class="group-index wrapper clearfix">
|
<ul class="group-index wrapper clearfix">
|
||||||
<%= render :partial=>"group",:collection=> @groups %>
|
<%= render :partial=>"group",:collection=> @groups %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(".delete-group-button").on("click",function(){
|
||||||
|
if(confirm("Are you sure that you want to delete this group?")){
|
||||||
|
var el = $(this);
|
||||||
|
$.ajax({
|
||||||
|
url : el.attr("href"),
|
||||||
|
dataType : "json",
|
||||||
|
type : "DELETE"
|
||||||
|
}).done(function(){
|
||||||
|
var id = el.attr("href").split("/")[3];
|
||||||
|
$("li[data-group-id="+id+"]").slideUp(function(){$(this).remove()});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -5,19 +5,24 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Dropzone.autoDiscover = false;
|
Dropzone.autoDiscover = false;
|
||||||
var image_id_panel = $("#image_ids");
|
var image_id_panel = $("#image_ids"),
|
||||||
var file_id_panel = $("#file_ids");
|
file_id_panel = $("#file_ids"),
|
||||||
|
total_images = 0,
|
||||||
|
total_files = 0;
|
||||||
var groupImageDropzone = new Dropzone("div#group-post-images", {
|
var groupImageDropzone = new Dropzone("div#group-post-images", {
|
||||||
url : "/admin/posts/image",
|
url : "/admin/posts/image",
|
||||||
previewsContainer : "#group-post-images-container",
|
previewsContainer : "#group-post-images-container",
|
||||||
paramName : "group_post_image[image]",
|
paramName : "group_post_image[image]",
|
||||||
clickable : true,
|
clickable : true,
|
||||||
autoProcessQueue : false,
|
autoProcessQueue : false,
|
||||||
|
maxFilesize : 2,
|
||||||
addRemoveLinks : true,
|
addRemoveLinks : true,
|
||||||
uploadMultiple : false,
|
uploadMultiple : false,
|
||||||
accept: function(file, done) {
|
accept: function(file, done) {
|
||||||
var regex = new RegExp(/(\.|\/)(gif|jpe?g|png)$/i)
|
var regex = new RegExp(/(\.|\/)(gif|jpe?g|png)$/i)
|
||||||
if(regex.test(file.name)){
|
if(regex.test(file.name)){
|
||||||
|
total_images++;
|
||||||
|
console.log(total_images)
|
||||||
done();
|
done();
|
||||||
}else{
|
}else{
|
||||||
this.removeFile(file);
|
this.removeFile(file);
|
||||||
|
@ -39,6 +44,14 @@
|
||||||
|
|
||||||
groupImageDropzone.on("success",function(file,data){
|
groupImageDropzone.on("success",function(file,data){
|
||||||
image_id_panel.append("<input type='hidden' name='group_post[group_post_images][]' value='" + data.id + "' />");
|
image_id_panel.append("<input type='hidden' name='group_post[group_post_images][]' value='" + data.id + "' />");
|
||||||
|
total_images--;
|
||||||
|
if(total_images == 0){
|
||||||
|
if(groupFilesDropzone.getQueuedFiles().length > 0){
|
||||||
|
doFilesUpload();
|
||||||
|
}else{
|
||||||
|
submitForm();
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
groupImageDropzone.on("sending",function(file,xhr,obj){
|
groupImageDropzone.on("sending",function(file,xhr,obj){
|
||||||
obj.append("authenticity_token",$("form#new_group_post input[name=authenticity_token]").val());
|
obj.append("authenticity_token",$("form#new_group_post input[name=authenticity_token]").val());
|
||||||
|
@ -50,12 +63,6 @@
|
||||||
var filesCount = groupImageDropzone.getQueuedFiles().length;
|
var filesCount = groupImageDropzone.getQueuedFiles().length;
|
||||||
if(filesCount > 0){
|
if(filesCount > 0){
|
||||||
doImagesUpload();
|
doImagesUpload();
|
||||||
}else{
|
|
||||||
if(groupFilesDropzone.getQueuedFiles().length > 0){
|
|
||||||
doFilesUpload();
|
|
||||||
}else{
|
|
||||||
submitForm();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -69,9 +76,12 @@
|
||||||
autoProcessQueue : false,
|
autoProcessQueue : false,
|
||||||
addRemoveLinks : true,
|
addRemoveLinks : true,
|
||||||
uploadMultiple : false,
|
uploadMultiple : false,
|
||||||
|
maxFilesize : 6,
|
||||||
accept: function(file, done) {
|
accept: function(file, done) {
|
||||||
var regex = new RegExp(/(\.|\/)(pdf|doc?x|xls?x|rtf|txt|ppt?x|mp3|mov|avi|gif|jpe?g|png|zip|rar)$/i)
|
var regex = new RegExp(/(\.|\/)(pdf|doc?x|xls?x|rtf|txt|ppt?x|mp3|mov|avi|gif|jpe?g|png|zip|rar)$/i)
|
||||||
if(regex.test(file.name)){
|
if(regex.test(file.name)){
|
||||||
|
total_files++;
|
||||||
|
console.log(total_files)
|
||||||
done();
|
done();
|
||||||
}else{
|
}else{
|
||||||
this.removeFile(file);
|
this.removeFile(file);
|
||||||
|
@ -92,6 +102,10 @@
|
||||||
|
|
||||||
groupFilesDropzone.on("success",function(file,data){
|
groupFilesDropzone.on("success",function(file,data){
|
||||||
file_id_panel.append("<input type='hidden' name='group_post[group_post_files][]' value='" + data.id + "' />");
|
file_id_panel.append("<input type='hidden' name='group_post[group_post_files][]' value='" + data.id + "' />");
|
||||||
|
total_files--;
|
||||||
|
if(total_files == 0){
|
||||||
|
submitForm();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
groupFilesDropzone.on("sending",function(file,xhr,obj){
|
groupFilesDropzone.on("sending",function(file,xhr,obj){
|
||||||
obj.append("authenticity_token",$("form#new_group_post input[name=authenticity_token]").val());
|
obj.append("authenticity_token",$("form#new_group_post input[name=authenticity_token]").val());
|
||||||
|
@ -103,8 +117,6 @@
|
||||||
var filesCount = groupFilesDropzone.getQueuedFiles().length;
|
var filesCount = groupFilesDropzone.getQueuedFiles().length;
|
||||||
if(filesCount > 0){
|
if(filesCount > 0){
|
||||||
doFilesUpload();
|
doFilesUpload();
|
||||||
}else{
|
|
||||||
submitForm();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -130,7 +142,7 @@
|
||||||
}else{
|
}else{
|
||||||
$(".upload-status-notice span.upload-text").text("Submitting");
|
$(".upload-status-notice span.upload-text").text("Submitting");
|
||||||
$("form#new_group_post").submit();
|
$("form#new_group_post").submit();
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,22 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(".delete-post-btn").on("click",function(){
|
||||||
|
if(confirm("Are you sure that you want to delete this post?")){
|
||||||
|
var el = $(this);
|
||||||
|
$.ajax({
|
||||||
|
url : el.attr("href"),
|
||||||
|
type : "DELETE",
|
||||||
|
dataType : "json"
|
||||||
|
}).done(function(){
|
||||||
|
var id = el.attr("href").split("/");
|
||||||
|
id = id[3];
|
||||||
|
$("div[data-post-id="+id+"]").slideUp(function(){$(this).remove();});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
|
||||||
$(document).on("scroll",function(){
|
$(document).on("scroll",function(){
|
||||||
|
|
||||||
orbit_bar.slideUp();
|
orbit_bar.slideUp();
|
||||||
|
|
|
@ -67,7 +67,27 @@
|
||||||
<% if !@post.group_post_files.blank? %>
|
<% if !@post.group_post_files.blank? %>
|
||||||
<span class="group-show-post-attachments">
|
<span class="group-show-post-attachments">
|
||||||
<% @post.group_post_files.each do |gpf| %>
|
<% @post.group_post_files.each do |gpf| %>
|
||||||
<a href="/admin/posts/file/<%= gpf.id.to_s %>" class="button button-primary button-small"><i class="group-show-post-attachment-file-format fa fa-file-image-o"></i><span class="group-show-post-attachments-file-name"><%= File.basename(gpf.file.path) %></span></a>
|
<%
|
||||||
|
case File.extname(gpf.file.path)
|
||||||
|
when ".doc",".docx",".DOC",".DOCX"
|
||||||
|
css_class = "fa-file-word-o"
|
||||||
|
when ".xls",".xlsx",".XLS",".XLSX"
|
||||||
|
css_class = "fa-file-excel-o"
|
||||||
|
when ".pdf", ".PDF"
|
||||||
|
css_class = "fa-file-pdf-o"
|
||||||
|
when ".txt", ".TXT"
|
||||||
|
css_class = "fa-file-text-o"
|
||||||
|
when ".ppt", ".pptx", ".PPT", ".PPTX"
|
||||||
|
css_class = "fa-file-powerpoint-o"
|
||||||
|
when ".mp3", ".MP3"
|
||||||
|
css_class = "fa-file-audio-o"
|
||||||
|
when ".gif",".GIF",".jpg",".JPG",".jpeg",".JPEG",".png",".PNG"
|
||||||
|
css_class = "fa-file-image-o"
|
||||||
|
when ".zip",".ZIP",".rar",".RAR"
|
||||||
|
css_class = "fa-file-zip-o"
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
<a href="/admin/posts/file/<%= gpf.id.to_s %>" class="button button-primary button-small"><i class="group-show-post-attachment-file-format fa <%= css_class %>"></i><span class="group-show-post-attachments-file-name"><%= File.basename(gpf.file.path) %></span></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -126,10 +126,12 @@ Orbit::Application.routes.draw do
|
||||||
get "groups/categories" => 'groups#categories'
|
get "groups/categories" => 'groups#categories'
|
||||||
post "groups/create_category" => 'groups#create_category'
|
post "groups/create_category" => 'groups#create_category'
|
||||||
get "groups/public" => 'groups#public_groups'
|
get "groups/public" => 'groups#public_groups'
|
||||||
|
patch "groups/updatecategory/:category_id" => 'groups#update_category'
|
||||||
get "posts/:id" => 'groups#showpost'
|
get "posts/:id" => 'groups#showpost'
|
||||||
post "posts/image" => 'groups#upload_photo'
|
post "posts/image" => 'groups#upload_photo'
|
||||||
post "posts/file" => 'groups#upload_file'
|
post "posts/file" => 'groups#upload_file'
|
||||||
get "posts/file/:id" => "groups#download_file"
|
get "posts/file/:id" => "groups#download_file"
|
||||||
|
delete "posts/:id" => "groups#deletepost"
|
||||||
post "posts/comment" => 'groups#new_comment'
|
post "posts/comment" => 'groups#new_comment'
|
||||||
|
|
||||||
resources :groups do
|
resources :groups do
|
||||||
|
|
Loading…
Reference in New Issue