-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed the delete buttons for none members
- Loading branch information
1 parent
f04a8bc
commit 103647e
Showing
4 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -292,4 +292,8 @@ form textarea { | |
font-size: 20px; | ||
font-weight: bold; | ||
color: grey; | ||
} | ||
|
||
.hidden{ | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
module GroupsHelper | ||
|
||
def edit_delete_btn(user, group) | ||
|
||
if group.user_id == user.id | ||
links = [link_to("edit", edit_group_path(group), class: "btn btn-primary edit_btn"), link_to("delete", group_path(group), class: "btn btn-danger delete_grp_btn", data: {confirm: "Are you sure?"}, method: :delete)] | ||
|
||
content_tag (:span) do | ||
links.collect{ | ||
|l| concat content_tag(:span, l) | ||
} | ||
end | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters