Commit 44b54952f78c2508ae7d4c5ec741a53f4a37d0ed

Authored by Rodrigo Souto
1 parent da9bf73d

[template-welcome-page] Refactor templates page

app/views/admin_panel/_signup_welcome_screen.html.erb
... ... @@ -5,7 +5,7 @@
5 5  
6 6 <p>
7 7 <div class='description'>
8   - <%= _('If this content is left blank, the following page will be displayed to the user.') %><br/><br/>
  8 + <%= _('If this content is left blank, the following page will be displayed to the user:') %><br/><br/>
9 9 </div>
10 10 <p>
11 11 <%= render :file => 'home/welcome' %>
... ...
app/views/templates/index.html.erb
... ... @@ -10,14 +10,27 @@
10 10 <div class='template-kind'>
11 11 <h2><%= title %></h2>
12 12 <%= button :add, _('New...'), {:action => "create_#{kind}_template"}, :title => _("Create a new template for %s") % title.downcase %>
13   - <ul>
  13 + <table class='actions'>
  14 + <tr>
  15 + <th><%= _('Template') %></th>
  16 + <th><%= _('Actions') %></th>
  17 + </tr>
14 18 <% templates.each do |template| %>
15   - <li>
16   - <%= image_tag "icons-app/#{kind}-icon.png" %>
17   - <%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}, :title => _('Edit template "%s"') % template.name ) %>
18   - </li>
  19 + <tr>
  20 + <td>
  21 + <%#= image_tag "icons-app/#{kind}-icon.png" %>
  22 + <%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}, :title => _('Edit template "%s"') % template.name ) %>
  23 + </td>
  24 + <td>
  25 + <%= button_without_text 'edit', _('Edit settings'), {:controller => 'profile_editor', :profile => template.identifier, :action => 'edit'} %>
  26 + <%= button_without_text 'welcome-page', _('Edit welcome page'), {:controller => 'profile_editor', :profile => template.identifier, :action => 'welcome_page'} %>
  27 + <%= button_without_text 'blocks', _('Edit sideblocks'), {:controller => 'profile_design', :profile => template.identifier, :action => 'index'} %>
  28 + <%= button_without_text 'appearance', _('Edit appearance'), {:controller => 'profile_themes', :profile => template.identifier, :action => 'index'} %>
  29 + <%= button_without_text 'header-footer', _('Edit header/footer'), {:controller => 'profile_editor', :profile => template.identifier, :action => 'header_footer'} %>
  30 + </td>
  31 + </tr>
19 32 <% end %>
20   - </ul>
  33 + </table>
21 34 </div>
22 35 <% end %>
23 36  
... ...
public/designs/icons/tango/mod/16x16/mimetypes/appearance.png 0 → 100644

1011 Bytes

public/designs/icons/tango/mod/16x16/mimetypes/blocks.png 0 → 100644

195 Bytes

public/designs/icons/tango/mod/16x16/mimetypes/header-footer.png 0 → 100644

262 Bytes

public/designs/icons/tango/mod/16x16/mimetypes/welcome-page.png 0 → 100644

393 Bytes

public/designs/icons/tango/style.css
... ... @@ -85,6 +85,10 @@
85 85 .icon-application-vnd-oasis-opendocument-text { background-image: url(Tango/16x16/mimetypes/gnome-mime-application-vnd.oasis.opendocument.text.png) }
86 86 .icon-application-vnd-oasis-opendocument-spreadsheet { background-image: url(Tango/16x16/mimetypes/gnome-mime-application-vnd.oasis.opendocument.spreadsheet.png) }
87 87 .icon-application-vnd-oasis-opendocument-presentation { background-image: url(Tango/16x16/mimetypes/gnome-mime-application-vnd.oasis.opendocument.presentation.png) }
  88 +.icon-welcome-page { background-image: url(mod/16x16/mimetypes/welcome-page.png) }
  89 +.icon-blocks { background-image: url(mod/16x16/mimetypes/blocks.png) }
  90 +.icon-header-footer { background-image: url(mod/16x16/mimetypes/header-footer.png) }
  91 +.icon-appearance { background-image: url(Tango/16x16/apps/preferences-desktop-wallpaper.png) }
88 92  
89 93 .icon-media-pause { background-image: url(Tango/16x16/actions/media-playback-pause.png) }
90 94 .icon-media-play { background-image: url(Tango/16x16/actions/media-playback-start.png) }
... ...
public/stylesheets/application.css
... ... @@ -118,8 +118,30 @@ a img {
118 118 -moz-border-radius: 3px;
119 119 -webkit-border-radius: 3px;
120 120 }
121   -/*********************************************************/
122 121  
  122 +table.actions {
  123 + table-layout: fixed;
  124 + width: 100%;
  125 +}
  126 +
  127 +table.actions img {
  128 + width: 16px;
  129 + height: 16px;
  130 +}
  131 +
  132 +table.actions a.icon {
  133 + display: block;
  134 + border: none;
  135 + white-space: nowrap;
  136 + overflow: hidden;
  137 + text-overflow: ellipsis;
  138 +}
  139 +
  140 +table.actions td:last-child {
  141 + text-align: center;
  142 +}
  143 +
  144 +/*********************************************************/
123 145  
124 146 #spinner {
125 147 z-index: 10;
... ...