Skip to content

Commit

Permalink
add role
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflyman committed Apr 23, 2011
1 parent a9ed73d commit 50f6c1f
Show file tree
Hide file tree
Showing 14 changed files with 1,408 additions and 11 deletions.
3 changes: 2 additions & 1 deletion README
Expand Up @@ -2,4 +2,5 @@
2.搜索功能暂定使用acts_as_ferret
3.增加打分功能
4.增加feedback
5.上传图片加水印
5.上传图片加水印
6.增加 favicon.ico,So Q!
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><%= h(yield(:title) || controller.action_name ) %></title>
<title><%= @page_title || '筠格调' %></title>
<link rel="shortcut icon" href="/favicon.ico?v=003" />
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag :defaults %>
Expand Down
19 changes: 13 additions & 6 deletions app/views/photos/index.html.erb
Expand Up @@ -3,8 +3,11 @@
<table>
<tr>
<th>所有人</th>
<th>是否作为头像</th>
<th>预览</th>
<% if logged_in? %>
<th></th>
<th></th>
<% end %>
</tr>

<% @photos.each do |photo| %>
Expand All @@ -14,11 +17,14 @@
<% else %>
<td><%= "没权限看你妹啊!" %></td>
<% end %>
<td><%= photo.is_avatar ? "是":"否" %></td>
<td><%= image_tag photo.image.url(:thumb) ,:alt =>"被GFW和谐了!" %></td>
<td><%= link_to 'Show', photo %></td>

<td><%= link_to [image_tag photo.image.url(:thumb) ,:alt =>"被GFW和谐了!"],photo%></td>
<% if logged_in? %>
<td><%= link_to 'Edit', edit_photo_path(photo) %></td>
<td><%= link_to 'Destroy', photo, :confirm => 'Are you sure?', :method => :delete %></td>
<% else %>
<% end %>
</tr>
<% end %>
</table>
Expand All @@ -32,5 +38,6 @@
:next_label => 'Next'
%>
<hr />

<%= link_to 'New photo', new_photo_path %>
<% if logged_in? %>
<%= link_to 'New photo', new_photo_path %>
<% end %>
4 changes: 3 additions & 1 deletion app/views/photos/new.html.erb
@@ -1,3 +1,5 @@
<% if logged_in? %>
<% title "上传图片" %>
<%= render :partial => 'form',:locals => {:button_name => "上传"} %>
<%= link_to 'Back', photos_path,:class => "button" %>
<%= link_to 'Back', photos_path,:class => "button" %>
<% end %>
3 changes: 1 addition & 2 deletions app/views/photos/show.html.erb
@@ -1,6 +1,5 @@
<div class="figure">
<%= image_tag @photo.image.url ,:alt =>"被GFW和谐了!" %>
<div class="legend">所有人:<%=h @photo.user.login %>;是否为头像:<%= @photo.is_avatar %></div>
</div>
</div>
<%= link_to '编辑', [:edit,@photo],:class => "button" %>
<%= link_to '返回', photos_path,:class => "button" %>
1,388 changes: 1,388 additions & 0 deletions log/development.log

Large diffs are not rendered by default.

Binary file added public/system/images/6/avatar/b_1244482988722.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/system/images/6/thumb/b_1244482988722.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 50f6c1f

Please sign in to comment.