Commit 3232f547ac250096f0f4baefff1bc245be1455ac
1 parent
acb402a1
Exists in
master
and in
4 other branches
Add group button at Profile#groups page
Showing
2 changed files
with
11 additions
and
2 deletions
Show diff stats
app/controllers/profiles/groups_controller.rb
app/views/profiles/groups/index.html.haml
1 | 1 | .ui-box |
2 | - %h5.title Groups | |
2 | + %h5.title | |
3 | + %strong Groups | |
4 | + (#{@groups.count}) | |
5 | + - if current_user.can_create_group? | |
6 | + %span.pull-right | |
7 | + = link_to new_group_path, class: "btn btn-small btn-primary" do | |
8 | + %i.icon-plus | |
9 | + New Group | |
3 | 10 | %ul.well-list |
4 | 11 | - @groups.each do |group| |
5 | 12 | %li |
... | ... | @@ -15,3 +22,5 @@ |
15 | 22 | |
16 | 23 | = link_to group, class: 'group-name' do |
17 | 24 | = group.name |
25 | + | |
26 | += paginate @groups | ... | ... |