Skip to content

Commit

Permalink
Update as per suggestion by cpg
Browse files Browse the repository at this point in the history
Signed-off-by: Arpit Goyal <[email protected]>
  • Loading branch information
agmps17 committed Jun 7, 2014
1 parent deb134a commit cf57c51
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/dbbackup_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ margin-top: 30px;
display: inline-block;
text-indent: -9999px;

}

.download_icon{
float:right;
}
21 changes: 11 additions & 10 deletions app/views/dbbackups/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
th.settings-col1.dbbackup-col1= t 'database'
th.settings-col1.dbbackup-col2= t 'backed_up'
- @dbs.each_with_index do |db,index|
tr
td.db_title.dbbackup-col1 = App.where(:db_id=>db.id).first.name
- if @backup_updated[index]!=nil
td.last_update_at
span.backup_content = time_ago_in_words(@backup_updated[index].localtime)+ " ago"
span.backup_content= link_to "", dbbackups_engine.backup_path(:db_id=>db.id),:method=>:post, :class=>"download_link"
- else
td.last_update_at.dbbackup-col2
span.backup_content -
span.backup_content= link_to "Back up", dbbackups_engine.backup_path(:db_id=>db.id),:method=>:post, :class=>"download_link"
- if App.where(:db_id=>db.id).first
tr
td.db_title.dbbackup-col1 = App.where(:db_id=>db.id).first.name
- if @backup_updated[index]!=nil
td.last_update_at
span.backup_content = time_ago_in_words(@backup_updated[index].localtime)+ " ago"
span.backup_content.download_icon= link_to "", dbbackups_engine.backup_path(:db_id=>db.id),:method=>:post, :class=>"download_link"
- else
td.last_update_at.dbbackup-col2
span.backup_content -------
span.backup_content.download_icon= link_to "Back up", dbbackups_engine.backup_path(:db_id=>db.id),:method=>:post, :class=>"download_link"


- else
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/plugin_init.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# plugin initialization
t = Tab.find("apps")
# add any subtabs with what you need. params are controller and the label, for example
t.add("dbbackups", "DB Backups")
t.add("dbbackups", "db_backups")
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
there_are_no_dbs : There are no databases available for any apps.
backed_up: Backed Up
database: Database
db_backups: DB Backups

0 comments on commit cf57c51

Please sign in to comment.