summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-12 11:52:13 +0200
committerPeter Kozak <spag@golwen.net>2013-04-12 11:52:13 +0200
commitf0ab616d674d7c7e9d0018ba7a9fde7107b0519f (patch)
tree75f0b8d38f83531f159378f8dab631df82d4d7e5 /app
parentf59241b377665c3b902aeadf70dddc495a708199 (diff)
files view added
Diffstat (limited to 'app')
-rw-r--r--app/views/users/_generic_files.html.haml7
-rw-r--r--app/views/users/show.html.haml5
2 files changed, 11 insertions, 1 deletions
diff --git a/app/views/users/_generic_files.html.haml b/app/views/users/_generic_files.html.haml
new file mode 100644
index 0000000..15bdb74
--- /dev/null
+++ b/app/views/users/_generic_files.html.haml
@@ -0,0 +1,7 @@
+-# Files
+-#
+- if (can?( :index, GenericFile ) && user.generic_files.count > 0 ) || can?( :create, GenericFile )
+ %h2= t('generic_files.index.page_title')
+ - if can?( :index, GenericFile ) && user.generic_files.count > 0
+ = render "generic_files/index_core", :generic_files => user.generic_files
+ = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => GenericFile} \ No newline at end of file
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 98f7cc6..9bf76df 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -89,4 +89,7 @@
= render :partial => 'conferences', :locals => {:user => @user}
- cache(['user_switchboards_overview', I18n.locale, @user, @user.switchboards]) do
- = render :partial => 'switchboards', :locals => {:user => @user} \ No newline at end of file
+ = render :partial => 'switchboards', :locals => {:user => @user}
+
+ - cache(['user_show_generic_files_overview', I18n.locale, @user, @user.generic_files]) do
+ = render :partial => 'generic_files', :locals => {:user => @user} \ No newline at end of file