diff options
-rw-r--r-- | app/views/users/_generic_files.html.haml | 7 | ||||
-rw-r--r-- | app/views/users/show.html.haml | 5 |
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 |