lalala 4.0.0.dev.236 → 4.0.0.dev.239

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1633d78c79b8c5e3815f8436948873a3d953e154
4
- data.tar.gz: 7e0e536622009e9637c7208193d95143632da5f1
3
+ metadata.gz: 0a45a4659c75ccea93a250c85b4591f5c2a1117f
4
+ data.tar.gz: 7184be267b5a060af4a2870fa4e72cf8aac7316c
5
5
  SHA512:
6
- metadata.gz: 41a46f8eede8fd46642d38e847719bae5e67aedfc9e100c4ba13eb21a060014bf6c4c3381413fb6d36aa316d5bebc867ee8344c73054f50e3880b31aa2de77f6
7
- data.tar.gz: 3ff77751f57f5b8580a338a7fe10600dad5d56e79590c91fc2f3dd0f6b19e04a47ea9919aa31a635a0405c901c3e251404f2a4e97fb57e22118ca60b0fe01894
6
+ metadata.gz: 3cf1effa5821870958aae13f8416d75a2e23b902de4e091354e73575215727fd94944917a475a49443a1b903ec4dfb61fa72e75fbdedfd8984362224083195f0
7
+ data.tar.gz: af259cb61c626dff79c4623f91d9b3368684ac44068b0ab66065abe258cb9662938dd8868d81c474f938991cf56b62c8d78aba2e1677280f51213677c473882d
@@ -0,0 +1,26 @@
1
+
2
+
3
+ exports.init = function(){
4
+
5
+ //
6
+ // this implements lib/moment.js
7
+ //
8
+ // look up timeago timestamp's and process them
9
+ // to nice and readable strings
10
+ // (e.g.: 2 minutes ago)
11
+ $('.timeago').each(function(index){
12
+
13
+ // get date-time
14
+ var date_utc_format = $(this).text().substr(0,$(this).text().length-4);
15
+ var date_formatted = moment.utc(date_utc_format);
16
+
17
+ // adjust to local time
18
+ var result = date_formatted.local();
19
+
20
+ // write result into selector text()
21
+ $(this).text(result.fromNow());
22
+
23
+ });
24
+
25
+ };
26
+
@@ -4,7 +4,8 @@ var console = require('browser/console'),
4
4
  grid = require('lalala/modules/grid'),
5
5
  locale_chooser = require("lalala/modules/locale_chooser"),
6
6
  sorted_pages_tree = require("lalala/modules/sorted_pages_tree"),
7
- login = require("lalala/modules/login");
7
+ login = require("lalala/modules/login"),
8
+ dashboard = require("lalala/modules/dashboard");
8
9
 
9
10
  $(function() {
10
11
  login.init();
@@ -13,6 +14,7 @@ $(function() {
13
14
  calendar.init();
14
15
  grid.init();
15
16
  sorted_pages_tree.init();
17
+ dashboard.init();
16
18
 
17
19
  $('select').not(".bypass-chosen").chosen();
18
20
  });
@@ -34,4 +34,4 @@
34
34
  @import "lalala/modules/editor-cheatsheet";
35
35
  @import "lalala/modules/grid";
36
36
  @import "lalala/modules/scopes";
37
-
37
+ @import "lalala/modules/dashboard";
@@ -0,0 +1,92 @@
1
+ //
2
+ // Trying to make lemonade with the dashboard lemons given by FormTastic
3
+ //
4
+ body.lalala_dashboard {
5
+
6
+ // reset main container
7
+ #main_content_wrapper {
8
+ width: 100% !important;
9
+ }
10
+
11
+ #dashboard_default_message {
12
+ @include border-radius(3px);
13
+ border: 1px solid $gray_lighter;
14
+ margin: 0 0 40px 0;
15
+ }
16
+
17
+ .columns {
18
+ @include pie-clearfix;
19
+
20
+ .column {
21
+ float: left;
22
+
23
+ .panel {
24
+ @include border-radius(10px);
25
+ border: 1px solid $gray_lighter;
26
+ overflow: hidden;
27
+
28
+ // title
29
+ h3 {
30
+ color: white;
31
+ background-color: $gray_lighter;
32
+ font-size: 14px;
33
+ font-weight: bold;
34
+ padding: 10px;
35
+ }
36
+
37
+ .panel_contents {
38
+
39
+ // paragraph styles
40
+ p {
41
+ padding: 10px;
42
+ }
43
+ // list styles
44
+ ul {
45
+ li {
46
+ border-top: 1px solid $gray_lighter;
47
+ a {
48
+ color: $black;
49
+ display: block;
50
+ padding: 10px 5px 10px 10px;
51
+ text-decoration: none;
52
+
53
+ &:hover {
54
+ color: $blue;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ // table styles
60
+ table {
61
+ thead {
62
+ display: none;
63
+ }
64
+ tbody {
65
+ // cell padding
66
+ td {
67
+ padding: 13px 10px 12px 10px !important;
68
+ }
69
+ // date format
70
+ .timeago {
71
+ display: block;
72
+ color: $gray_lighter;
73
+ text-align: right;
74
+ }
75
+ // default link
76
+ a {
77
+ color: $black;
78
+
79
+ &:hover {
80
+ color: $blue !important;
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ }
88
+
89
+ }
90
+ }
91
+
92
+ }
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.0.0"
3
- BUILD = "236"
3
+ BUILD = "239"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
@@ -12,22 +12,36 @@ ActiveAdmin.register_page "Dashboard" do
12
12
 
13
13
  # Here is an example of a simple dashboard with columns and panels.
14
14
  #
15
- # columns do
16
- # column do
17
- # panel "Recent Posts" do
18
- # ul do
19
- # Post.recent(5).map do |post|
20
- # li link_to(post.title, admin_post_path(post))
21
- # end
22
- # end
23
- # end
24
- # end
15
+ columns do
16
+ column :span => 2 do
17
+ panel "Recent Posts List" do
18
+ ul do
19
+ Article.all.map do |article|
20
+ li link_to(article.title, edit_lalala_article_path(article))
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ column :span => 2 do
27
+ panel "Latest Posts Updated" do
28
+ table_for Article.where('id > 0').order('updated_at DESC').limit(5) do
29
+ column :title do |article|
30
+ link_to(article.title, edit_lalala_article_path(article))
31
+ end
32
+ column :updated_at do |article|
33
+ span article.updated_at, { :class => "timeago", :title => article.updated_at }
34
+ end
35
+ end
36
+ end
37
+ end
25
38
 
26
- # column do
27
- # panel "Info" do
28
- # para "Welcome to ActiveAdmin."
29
- # end
30
- # end
31
- # end
39
+ column do
40
+ panel "Info" do
41
+ para "Welcome to LALALA."
42
+ end
43
+ end
44
+
45
+ end
32
46
  end # content
33
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.dev.236
4
+ version: 4.0.0.dev.239
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-11-26 00:00:00.000000000 Z
16
+ date: 2013-11-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activeadmin
@@ -1310,6 +1310,7 @@ files:
1310
1310
  - app/assets/javascripts/lalala/lib/moment.js
1311
1311
  - app/assets/javascripts/lalala/lib/pikaday.js
1312
1312
  - app/assets/javascripts/lalala/modules/calendar.module.js
1313
+ - app/assets/javascripts/lalala/modules/dashboard.module.js
1313
1314
  - app/assets/javascripts/lalala/modules/editor.module.js
1314
1315
  - app/assets/javascripts/lalala/modules/grid.module.js
1315
1316
  - app/assets/javascripts/lalala/modules/helpers.module.js
@@ -1333,6 +1334,7 @@ files:
1333
1334
  - app/assets/stylesheets/lalala/lib/_jquery-ui.css.scss
1334
1335
  - app/assets/stylesheets/lalala/lib/_pikaday.css
1335
1336
  - app/assets/stylesheets/lalala/modules/_action-items.css.scss
1337
+ - app/assets/stylesheets/lalala/modules/_dashboard.css.scss
1336
1338
  - app/assets/stylesheets/lalala/modules/_dropdown-menu.css.scss
1337
1339
  - app/assets/stylesheets/lalala/modules/_editor-cheatsheet.css.scss
1338
1340
  - app/assets/stylesheets/lalala/modules/_editor-preview.css.scss