dms-tog_depot 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +0 -0
- data/MIT-LICENSE +19 -0
- data/README.markdown +78 -0
- data/Rakefile +22 -0
- data/app/controllers/depot/filefolders_controller.rb +10 -0
- data/app/controllers/depot/files_controller.rb +35 -0
- data/app/controllers/member/depot/filefolders_controller.rb +84 -0
- data/app/controllers/member/depot/files_controller.rb +102 -0
- data/app/helpers/depot/files_helper.rb +18 -0
- data/app/models/depot/file.rb +41 -0
- data/app/models/depot/filefolder.rb +21 -0
- data/app/models/tog/depot/version.rb +17 -0
- data/app/models/user.rb +4 -0
- data/app/views/depot/filefolders/show.html.erb +97 -0
- data/app/views/depot/files/_tag_cloud_file.html.erb +6 -0
- data/app/views/depot/files/by_tag.html.erb +113 -0
- data/app/views/depot/files/index.html.erb +111 -0
- data/app/views/depot/files/show.html.erb +69 -0
- data/app/views/member/depot/filefolders/edit.html.erb +22 -0
- data/app/views/member/depot/filefolders/new.html.erb +19 -0
- data/app/views/member/depot/filefolders/show.html.erb +121 -0
- data/app/views/member/depot/files/by_tag.html.erb +130 -0
- data/app/views/member/depot/files/edit.html.erb +27 -0
- data/app/views/member/depot/files/index.html.erb +132 -0
- data/app/views/member/depot/files/new.html.erb +24 -0
- data/app/views/member/depot/files/show.html.erb +79 -0
- data/config/routes.rb +32 -0
- data/db/migrate/001_create_files.rb +21 -0
- data/db/migrate/002_create_files_folder.rb +16 -0
- data/init.rb +14 -0
- data/public/images/1px.gif +0 -0
- data/public/images/privacity/admin.gif +0 -0
- data/public/images/privacity/community.gif +0 -0
- data/public/images/privacity/member.gif +0 -0
- data/public/images/privacity/public_domain.gif +0 -0
- data/public/images/tog-depot_arrow_dn.gif +0 -0
- data/public/images/tog-depot_arrow_dn_deact.gif +0 -0
- data/public/images/tog-depot_arrow_up.gif +0 -0
- data/public/images/tog-depot_arrow_up_deact.gif +0 -0
- data/public/images/tog-depot_file_dl.gif +0 -0
- data/public/images/tog-depot_iconfile_16px.gif +0 -0
- data/public/images/tog-depot_iconfile_32px.gif +0 -0
- data/public/images/tog-depot_iconfile_48px.gif +0 -0
- data/public/images/tog-depot_iconfolder_16px.gif +0 -0
- data/public/images/tog-depot_iconfolder_32px.gif +0 -0
- data/public/images/tog-depot_iconfolder_48px.gif +0 -0
- data/public/stylesheets/depot.css +52 -0
- data/test/factories.rb +17 -0
- data/test/functional/depot/filefolders_controller_test.rb +30 -0
- data/test/functional/depot/files_controller_test.rb +43 -0
- data/test/functional/member/depot/filefolders_controller_test.rb +15 -0
- data/test/functional/member/depot/files_controller_test.rb +107 -0
- data/test/test_helper.rb +26 -0
- data/test/unit/file_test.rb +8 -0
- data/test/unit/filefolder_test.rb +8 -0
- data/tog_depot.gemspec +81 -0
- metadata +155 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
module Version
|
2
|
+
MAJOR = 0
|
3
|
+
MINOR = 3
|
4
|
+
TINY = 0
|
5
|
+
MODULE = "tog_depot"
|
6
|
+
STRING = [MAJOR, MINOR, TINY].join('.')
|
7
|
+
|
8
|
+
class << self
|
9
|
+
def to_s
|
10
|
+
STRING
|
11
|
+
end
|
12
|
+
def full_version
|
13
|
+
"#{MODULE} #{STRING}"
|
14
|
+
end
|
15
|
+
alias :to_str :to_s
|
16
|
+
end
|
17
|
+
end
|
data/app/models/user.rb
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
<% include_stylesheet "/tog_depot/stylesheets/depot" %>
|
2
|
+
|
3
|
+
<h1><img src="/tog_depot/images/tog-depot_iconfolder_48px.gif" border="0" alt="Member file"/> <%= @folder.title%></h1>
|
4
|
+
<b>Tags:</b>
|
5
|
+
<% tags = @folder.tag_list %>
|
6
|
+
<% if !tags.blank? %>
|
7
|
+
<% for tag in tags %>
|
8
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
9
|
+
<% end %>
|
10
|
+
<% else %>
|
11
|
+
No tags.
|
12
|
+
<% end %>
|
13
|
+
<br />
|
14
|
+
|
15
|
+
<b>Owner:</b> <%= @folder.user.login %><br />
|
16
|
+
<b>Created at:</b> <%= @folder.created_at %><br />
|
17
|
+
<b>Updated at:</b> <%= @folder.updated_at %><br />
|
18
|
+
<br>
|
19
|
+
<b>Description:</b> <%= @folder.description %><br /><br />
|
20
|
+
|
21
|
+
|
22
|
+
<div class="portlet portletB">
|
23
|
+
<h2 style="width:690px;"><span><%= @folder.title%> content</span></h2>
|
24
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
25
|
+
<thead>
|
26
|
+
<tr bgcolor="#eeeeee">
|
27
|
+
<th><img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /></th>
|
28
|
+
<th rowspan="2"> Type</th>
|
29
|
+
<th><a href="<%= depot_files_order_path('title ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /></th>
|
30
|
+
<th rowspan="2"> Filename</th>
|
31
|
+
<th><a href="<%= depot_files_order_path('created_at ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /></th>
|
32
|
+
<th rowspan="2"> Release date</th>
|
33
|
+
<th><img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /></th>
|
34
|
+
<th rowspan="2"> Owner</th>
|
35
|
+
<th><img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /></th>
|
36
|
+
<th rowspan="2"> Times dl.</th>
|
37
|
+
<th><img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /></th>
|
38
|
+
<th rowspan="2"> In folder</th>
|
39
|
+
|
40
|
+
</tr>
|
41
|
+
<tr bgcolor="#eeeeee">
|
42
|
+
<th bgcolor="#eeeeee"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
43
|
+
<th bgcolor="#eeeeee"><a href="<%= depot_files_order_path('title DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
44
|
+
<th bgcolor="#eeeeee"><a href="<%= depot_files_order_path('created_at DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
45
|
+
<th bgcolor="#eeeeee"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
46
|
+
<th bgcolor="#eeeeee"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
47
|
+
<th bgcolor="#eeeeee"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
48
|
+
</tr>
|
49
|
+
</thead>
|
50
|
+
<tbody>
|
51
|
+
|
52
|
+
<% if @my_files.empty? %>
|
53
|
+
<tr><td colspan="13">There isn't any files yet.
|
54
|
+
</td>
|
55
|
+
</tr>
|
56
|
+
<% else %>
|
57
|
+
<% @my_files.each do |file| %>
|
58
|
+
<tr>
|
59
|
+
<td colspan="2"><img src="/tog_depot/images/1px.gif" border="0" height="4" width="5"/><br />
|
60
|
+
<div class="fileicon_32"><img src="/tog_depot/images/1px.gif" border="0" height="14" width="5"/><br /><%= file.filename.to_s.scan(/\.\w+$/) %></div> </td>
|
61
|
+
<td colspan="2">
|
62
|
+
<h3><%= link_to file.title, depot_file_url(file.id) %></h3> </td>
|
63
|
+
<td colspan="2"><%= file.created_at %></td>
|
64
|
+
<td colspan="2"><%= file.user.login %></td>
|
65
|
+
<td style="padding-right:20px;" align="right" colspan="2"><%= file.num_download %></td>
|
66
|
+
<td colspan="2">
|
67
|
+
<% if file.filefolder%>
|
68
|
+
<%= file.filefolder.title %>
|
69
|
+
<%end%>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
<tr><td class="brd_bt" colspan="2"></td><td class="end_list" colspan="12">
|
73
|
+
|
74
|
+
<% tags = file.tag_list %>
|
75
|
+
<b>Tags:</b>
|
76
|
+
<% if !tags.blank? %>
|
77
|
+
<% for tag in tags %>
|
78
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
79
|
+
<% end %>
|
80
|
+
<% else %>
|
81
|
+
No tags.
|
82
|
+
<% end %>
|
83
|
+
</td>
|
84
|
+
</tr>
|
85
|
+
<% end %>
|
86
|
+
<% end %>
|
87
|
+
</tbody>
|
88
|
+
</table>
|
89
|
+
|
90
|
+
<br />
|
91
|
+
<div class="info_results" style="width:688px;">
|
92
|
+
<div class="floater_R" style="float:right; padding-right:4px;">
|
93
|
+
<%= will_paginate @my_files %>
|
94
|
+
</div>
|
95
|
+
<div class="float_breaker" style="clear:both;"></div>
|
96
|
+
</div><br><br><%= link_to '<< Back to filelist', depot_files_path %></div>
|
97
|
+
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<% include_stylesheet "/tog_depot/stylesheets/depot" %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
<%= render :partial => 'tag_cloud_file', :locals => { :file => @file } %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<div class="portlet portletB">
|
7
|
+
<%= link_to 'Upload new file', new_member_depot_file_url, :class => 'button add' %>
|
8
|
+
<%= link_to 'Create new folder', new_member_depot_filefolder_url, :class => 'button add' %><br /><br />
|
9
|
+
<h2 style="width:690px;"><span>Public files marked as tag:<b> <%= params[:tag_name]%></b></span></h2>
|
10
|
+
|
11
|
+
<div class="portlet_content">
|
12
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
13
|
+
<thead>
|
14
|
+
<tr bgcolor="#eeeeee">
|
15
|
+
|
16
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
17
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
18
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Type</th>
|
19
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
20
|
+
<a href="<%= depot_files_order_path('title ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /> </th>
|
21
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Filename</th>
|
22
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
23
|
+
<a href="<%= depot_files_order_path('created_at ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /> </th>
|
24
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Release date</th>
|
25
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
26
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
27
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Owner</th>
|
28
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
29
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
30
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Times dl.</th>
|
31
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
32
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
33
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> In folder</th>
|
34
|
+
</tr>
|
35
|
+
<tr bgcolor="#eeeeee">
|
36
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
37
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><a href="<%= depot_files_order_path('title DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
38
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><a href="<%= depot_files_order_path('created_at DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
39
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
40
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
41
|
+
<th height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
42
|
+
</tr>
|
43
|
+
</thead>
|
44
|
+
<tbody>
|
45
|
+
<% @folders.each do |folder| %>
|
46
|
+
<tr>
|
47
|
+
|
48
|
+
<td colspan="2" align="CENTER"><img src="/tog_depot/images/1px.gif" border="0" height="4" width="5"/><br />
|
49
|
+
<div class="foldericon_32"><img src="/tog_depot/images/tog-depot_iconfolder_32px.gif" border="0" /></div> </td>
|
50
|
+
<td colspan="2">
|
51
|
+
<h3><%= link_to folder.title, depot_filefolder_url(folder.id) %></h3> </td>
|
52
|
+
<td colspan="2"><%= folder.created_at %></td>
|
53
|
+
<td colspan="2"><%= folder.user.login %></td>
|
54
|
+
<td style="padding-right:20px;" align="right" colspan="2"></td>
|
55
|
+
<td colspan="2"> </td>
|
56
|
+
</tr>
|
57
|
+
<tr><td class="brd_bt" colspan="2"></td><td class="end_list" colspan="12">
|
58
|
+
|
59
|
+
<% tags = folder.tag_list %>
|
60
|
+
<b>Tags:</b>
|
61
|
+
<% if !tags.blank? %>
|
62
|
+
<% for tag in tags %>
|
63
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
64
|
+
<% end %>
|
65
|
+
<% else %>
|
66
|
+
No tags.
|
67
|
+
<% end %>
|
68
|
+
</td>
|
69
|
+
</tr>
|
70
|
+
<% end %>
|
71
|
+
<% if @files.empty? %>
|
72
|
+
<tr><td colspan="12">There isn't any files yet.
|
73
|
+
<% else %>
|
74
|
+
<% @files.each do |file| %>
|
75
|
+
<tr>
|
76
|
+
|
77
|
+
<td colspan="2" align="CENTER"><img src="/tog_depot/images/1px.gif" border="0" height="4" width="5"/><br />
|
78
|
+
<div class="fileicon_32"><img src="/tog_depot/images/1px.gif" border="0" height="14" width="5"/><br /><%= file.filename.to_s.scan(/\.\w+$/) %></div> </td>
|
79
|
+
<td colspan="2">
|
80
|
+
<h3><%= link_to file.title, depot_file_path(file.id) %></h3> </td>
|
81
|
+
<td colspan="2"><%= file.created_at %></td>
|
82
|
+
<td colspan="2"><%= file.user.login%></td>
|
83
|
+
<td style="padding-right:26px;" align="right" colspan="2"><%= file.num_download %></td>
|
84
|
+
<td colspan="2">
|
85
|
+
<% if file.filefolder%>
|
86
|
+
<%= file.filefolder.title %>
|
87
|
+
<%end%>
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
<tr><td class="brd_bt" colspan="2"></td><td class="end_list" colspan="10">
|
91
|
+
|
92
|
+
<% tags = file.tag_list %>
|
93
|
+
<b>Tags:</b>
|
94
|
+
<% if !tags.blank? %>
|
95
|
+
<% for tag in tags %>
|
96
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
97
|
+
<% end %>
|
98
|
+
<% else %>
|
99
|
+
No tags.
|
100
|
+
<% end %>
|
101
|
+
</td>
|
102
|
+
</tr>
|
103
|
+
<% end %>
|
104
|
+
<% end %>
|
105
|
+
</tbody>
|
106
|
+
</table>
|
107
|
+
|
108
|
+
</div><br />
|
109
|
+
<div class="info_results" style="width:688px;">
|
110
|
+
<div class="floater_R" style="float:right; padding-right:4px;"><%= will_paginate @my_files %></div><div class="float_breaker" style="clear:both;"></div></div>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
|
@@ -0,0 +1,111 @@
|
|
1
|
+
<% include_stylesheet "/tog_depot/stylesheets/depot" %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
<%= render :partial => 'tag_cloud_file', :locals => { :file => @file } %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<div class="portlet portletB">
|
7
|
+
<%= link_to 'Upload new file', new_member_depot_file_url, :class => 'button add' %>
|
8
|
+
<%= link_to 'Create new folder', new_member_depot_filefolder_url, :class => 'button add' %><br /><br />
|
9
|
+
<h2 style="width:690px;"><span>Public files</span></h2>
|
10
|
+
|
11
|
+
<div class="portlet_content">
|
12
|
+
<table border="0" cellpadding="0" cellspacing="0">
|
13
|
+
<thead>
|
14
|
+
<tr bgcolor="#eeeeee">
|
15
|
+
|
16
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
17
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Type</th>
|
18
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
19
|
+
<a href="<%= depot_files_order_path('title ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /> </th>
|
20
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Filename</th>
|
21
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
22
|
+
<a href="<%= depot_files_order_path('created_at ASC') %>"><img src="/tog_depot/images/tog-depot_arrow_up.gif" border="0" /></a><br /> </th>
|
23
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Release date</th>
|
24
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
25
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
26
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Owner</th>
|
27
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
28
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
29
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> Times dl.</th>
|
30
|
+
<th width="10" height="8" align="left" valign="MIDDLE">
|
31
|
+
<img src="/tog_depot/images/tog-depot_arrow_up_deact.gif" border="0" /><br /> </th>
|
32
|
+
<th height="16" rowspan="2" align="left" valign="MIDDLE"> In folder</th>
|
33
|
+
</tr>
|
34
|
+
<tr bgcolor="#eeeeee">
|
35
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
36
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><a href="<%= depot_files_order_path('title DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
37
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><a href="<%= depot_files_order_path('created_at DESC') %>"><img src="/tog_depot/images/tog-depot_arrow_dn.gif" border="0" /></a></th>
|
38
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
39
|
+
<th width="10" height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
40
|
+
<th height="8" align="left" valign="MIDDLE"><img src="/tog_depot/images/tog-depot_arrow_dn_deact.gif" border="0" /></th>
|
41
|
+
</tr>
|
42
|
+
</thead>
|
43
|
+
<tbody>
|
44
|
+
<% @folders.each do |folder| %>
|
45
|
+
<tr>
|
46
|
+
|
47
|
+
<td colspan="2" align="CENTER"><img src="/tog_depot/images/1px.gif" border="0" height="4" width="5"/><br />
|
48
|
+
<div class="foldericon_32"><img src="/tog_depot/images/tog-depot_iconfolder_32px.gif" border="0" /></div> </td>
|
49
|
+
<td colspan="2">
|
50
|
+
<h3><%= link_to folder.title, depot_filefolder_url(folder.id) %></h3> </td>
|
51
|
+
<td colspan="2"><%= folder.created_at %></td>
|
52
|
+
<td colspan="2"><%= folder.user.login %></td>
|
53
|
+
<td style="padding-right:20px;" align="right" colspan="2"></td>
|
54
|
+
<td colspan="2"> </td>
|
55
|
+
</tr>
|
56
|
+
<tr><td class="brd_bt" colspan="2"></td><td class="end_list" colspan="12">
|
57
|
+
|
58
|
+
<% tags = folder.tag_list %>
|
59
|
+
<b>Tags:</b>
|
60
|
+
<% if !tags.blank? %>
|
61
|
+
<% for tag in tags %>
|
62
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
63
|
+
<% end %>
|
64
|
+
<% else %>
|
65
|
+
No tags.
|
66
|
+
<% end %>
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
<% end %>
|
70
|
+
<% if @files.empty? %>
|
71
|
+
<tr><td colspan="14">There isn't any files yet.
|
72
|
+
<% else %>
|
73
|
+
<% @files.each do |file| %>
|
74
|
+
<tr>
|
75
|
+
|
76
|
+
<td colspan="2" align="CENTER"><img src="/tog_depot/images/1px.gif" border="0" height="4" width="5"/><br />
|
77
|
+
<div class="fileicon_32"><img src="/tog_depot/images/1px.gif" border="0" height="14" width="5"/><br /><%= file.filename.to_s.scan(/\.\w+$/) %></div> </td>
|
78
|
+
<td colspan="2">
|
79
|
+
<h3><%= link_to file.title, depot_file_path(file.id) %></h3> </td>
|
80
|
+
<td colspan="2"><%= file.created_at %></td>
|
81
|
+
<td colspan="2"><%= file.user.login%></td>
|
82
|
+
<td style="padding-right:26px;" align="right" colspan="2"><%= file.num_download %></td>
|
83
|
+
<td colspan="2">
|
84
|
+
<% if file.filefolder%>
|
85
|
+
<%= file.filefolder.title %>
|
86
|
+
<%end%> </td>
|
87
|
+
</tr>
|
88
|
+
<tr><td class="brd_bt" colspan="2"></td><td class="end_list" colspan="10">
|
89
|
+
|
90
|
+
<% tags = file.tag_list %>
|
91
|
+
<b>Tags:</b>
|
92
|
+
<% if !tags.blank? %>
|
93
|
+
<% for tag in tags %>
|
94
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
95
|
+
<% end %>
|
96
|
+
<% else %>
|
97
|
+
No tags.
|
98
|
+
<% end %>
|
99
|
+
</td>
|
100
|
+
</tr>
|
101
|
+
<% end %>
|
102
|
+
<% end %>
|
103
|
+
</tbody>
|
104
|
+
</table>
|
105
|
+
|
106
|
+
</div><br />
|
107
|
+
<div class="info_results" style="width:688px;">
|
108
|
+
<div class="floater_R" style="float:right; padding-right:4px;"><%= will_paginate @my_files %></div><div class="float_breaker" style="clear:both;"></div></div>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
<% include_stylesheet "/tog_depot/stylesheets/depot" %>
|
2
|
+
<% content_for :sidebar do %>
|
3
|
+
<%= render :partial => 'tag_cloud_file', :locals => { :file => @file } %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
|
7
|
+
<div id="file_overview">
|
8
|
+
<div class="floater_L">
|
9
|
+
<div class="fileicon_48"><img src="/tog_depot/images/1px.gif" border="0" height="26" width="5"/><br /><%= @extension %></div>
|
10
|
+
</div>
|
11
|
+
<div class="floater_R">
|
12
|
+
<h1><img src="/tog_depot/images/1px.gif" border="0" height="28" width="5"/><br /><%= @file.title %></h1>
|
13
|
+
</div>
|
14
|
+
<div class="float_breaker"></div>
|
15
|
+
<div style="padding-left:15px;">
|
16
|
+
|
17
|
+
<% tags = @file.tag_list %>
|
18
|
+
<b>Tags:</b>
|
19
|
+
<% if !tags.blank? %>
|
20
|
+
<% for tag in tags %>
|
21
|
+
<%= link_to tag, tag_depot_files_path(tag.to_sym) %>
|
22
|
+
<% end %>
|
23
|
+
<% else %>
|
24
|
+
No tags.
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<p class="file_metadata">
|
28
|
+
<b>Created:</b> <%= @file.created_at %><br />
|
29
|
+
<b>Updated:</b> <%= @file.updated_at %><br />
|
30
|
+
<b>Size:</b>
|
31
|
+
<%if @file.size%>
|
32
|
+
<%= @file.size / 1024 %> Mb. (<%= @file.size %> Bytes)
|
33
|
+
<%end%>
|
34
|
+
<br />
|
35
|
+
<b>Owner:</b> <%= @file.user.login %><br />
|
36
|
+
<b>Times downloaded:</b> <%= @file.num_download %><br />
|
37
|
+
<b>Parent folder:</b>
|
38
|
+
<%if @file.filefolder%>
|
39
|
+
<%if @file.filefolder.state== 'public'%>
|
40
|
+
<%= link_to @file.filefolder.title, depot_filefolder_url(@file.filefolder.id) %>
|
41
|
+
<%else%>
|
42
|
+
<%=@file.filefolder.title%> (private)
|
43
|
+
<%end%>
|
44
|
+
<%end%>
|
45
|
+
<br />
|
46
|
+
<b>Visibility: <%= @file.state %></b>
|
47
|
+
</p>
|
48
|
+
<p>
|
49
|
+
<b>Description:</b>
|
50
|
+
<%= @file.description %>
|
51
|
+
<br /><br />
|
52
|
+
</p>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div class="floater_L" style="float:left;">
|
56
|
+
<a href=" <%= depot_files_download_path %> "><img src="/tog_depot/images/tog-depot_file_dl.gif" border="0" /></a></div>
|
57
|
+
<div style="float:left; padding-left:8px;"><h2 class="no_margins" style="padding:0px; border:0px; margin:0px;">
|
58
|
+
<%= link_to "Download file", depot_files_download_path %>
|
59
|
+
</h2>
|
60
|
+
|
61
|
+
<%= report_abuse_link(@file, 'Report abuse', :class => 'abuse_link') -%>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
<div style="clear:both;" class="float_breaker"></div><br />
|
65
|
+
|
66
|
+
<%= link_to '<< Back to filelist', depot_files_path %><br /><br />
|
67
|
+
<%= render :partial => "shared/comments", :locals => { :commentable => @file } %>
|
68
|
+
|
69
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="titleB"><img src="/tog_depot/images/tog-depot_iconfolder_48px.gif" border="0" /> Edit folder<br /><br /></div>
|
2
|
+
|
3
|
+
<%= error_messages_for :folder %>
|
4
|
+
<% form_for :filefolder, :url => member_depot_filefolder_path(@filefolder), :html => {:action => 'update', :method => "put", :id => "settings"} do |f| -%>
|
5
|
+
<fieldset>
|
6
|
+
<div class="fields">
|
7
|
+
<p>
|
8
|
+
<label for="folder_title">Title</label><%= f.text_field :title, :class=>"fieldbox wide" %></p>
|
9
|
+
<p><label for="folder_tag_list">Tags (separated with ,)</label><%= f.text_field :tag_list, :class=>"fieldbox wide" -%></p>
|
10
|
+
<p>
|
11
|
+
<label for="folder_state">Visibility
|
12
|
+
</label>
|
13
|
+
<%= select_tag "state", options_for_select(Depot::Filefolder.states, @filefolder.current_state) -%>
|
14
|
+
<br>(Changing folder privacity will affect all files into folder)</p>
|
15
|
+
<p>
|
16
|
+
<label for="folder_description">Description</label><%= f.text_area :description, :class=>"fieldbox wide" %></p>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
</fieldset>
|
20
|
+
<div class="actions"><%= link_to '<< Back to filelist', member_depot_files_path, :class => 'button mainaction' %>
|
21
|
+
<%= submit_tag 'Edit folder', :class => 'button mainaction' %></div>
|
22
|
+
<% end -%>
|