ish_manager 0.1.1 → 0.1.2
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 +4 -4
- data/app/assets/javascripts/ish_manager/application.js +0 -1
- data/app/assets/stylesheets/ish_manager/application.css +4 -0
- data/app/controllers/ish_manager/application_controller.rb +1 -1
- data/app/controllers/ish_manager/features_controller.rb +125 -0
- data/app/controllers/ish_manager/galleries_controller.rb +86 -0
- data/app/controllers/ish_manager/newsitems_controller.rb +113 -0
- data/app/controllers/ish_manager/photos_controller.rb +55 -0
- data/app/controllers/ish_manager/reports_controller.rb +64 -0
- data/app/controllers/ish_manager/sites_controller.rb +2 -0
- data/app/controllers/ish_manager/tags_controller.rb +54 -0
- data/app/controllers/ish_manager/users_controller.rb +13 -0
- data/app/helpers/ish_manager/images_helper.rb +2 -1
- data/app/views/ish_manager/application/_main_footer.haml +6 -2
- data/app/views/ish_manager/cities/edit.haml +3 -3
- data/app/views/ish_manager/features/_form.haml +61 -0
- data/app/views/ish_manager/features/_index.haml +23 -0
- data/app/views/ish_manager/features/_item.haml +14 -0
- data/app/views/ish_manager/features/edit.haml +16 -0
- data/app/views/ish_manager/features/index.haml +25 -0
- data/app/views/ish_manager/features/new.haml +11 -0
- data/app/views/ish_manager/features/show.haml +0 -0
- data/app/views/ish_manager/galleries/#_thumbs.haml# +5 -0
- data/app/views/ish_manager/galleries/_form.haml +46 -0
- data/app/views/ish_manager/galleries/_index.haml +14 -0
- data/app/views/ish_manager/galleries/_list.haml +23 -0
- data/app/views/ish_manager/galleries/_list_short.haml +9 -0
- data/app/views/ish_manager/galleries/_menu_secondary.haml +13 -0
- data/app/views/ish_manager/galleries/_meta.haml +16 -0
- data/app/views/ish_manager/galleries/_search.haml +7 -0
- data/app/views/ish_manager/galleries/_thumbs.haml +12 -0
- data/app/views/ish_manager/galleries/_title.haml +17 -0
- data/app/views/ish_manager/galleries/all_photos.haml +4 -0
- data/app/views/ish_manager/galleries/edit.haml +11 -0
- data/app/views/ish_manager/galleries/index.haml +18 -0
- data/app/views/ish_manager/galleries/index_ajax.haml +9 -0
- data/app/views/ish_manager/galleries/index_mini.haml +0 -0
- data/app/views/ish_manager/galleries/index_short.haml +19 -0
- data/app/views/ish_manager/galleries/index_thumb.haml +16 -0
- data/app/views/ish_manager/galleries/index_title.haml +15 -0
- data/app/views/ish_manager/galleries/index_trash.haml +20 -0
- data/app/views/ish_manager/galleries/new.haml +7 -0
- data/app/views/ish_manager/galleries/show.haml +34 -0
- data/app/views/ish_manager/newsitems/_form.haml +10 -0
- data/app/views/ish_manager/newsitems/_index.haml +17 -0
- data/app/views/ish_manager/newsitems/_item.haml +53 -0
- data/app/views/ish_manager/newsitems/edit.haml +14 -0
- data/app/views/ish_manager/newsitems/new.haml +16 -0
- data/app/views/ish_manager/photos/_meta.haml +9 -0
- data/app/views/ish_manager/photos/_multinew.haml +23 -0
- data/app/views/ish_manager/photos/show.haml +2 -0
- data/app/views/ish_manager/photos/without_gallery.haml +11 -0
- data/app/views/ish_manager/reports/_form.haml +42 -0
- data/app/views/ish_manager/reports/_index.haml +16 -0
- data/app/views/ish_manager/reports/edit.haml +6 -0
- data/app/views/ish_manager/reports/index.haml +26 -0
- data/app/views/ish_manager/reports/new.haml +5 -0
- data/app/views/ish_manager/reports/show.haml +18 -0
- data/app/views/ish_manager/sites/_form.haml +1 -1
- data/app/views/ish_manager/sites/edit.haml +2 -2
- data/app/views/ish_manager/sites/index.haml +7 -7
- data/app/views/ish_manager/videos/_index.haml +12 -0
- data/app/views/layouts/ish_manager/application.haml +2 -1
- data/config/routes.rb +4 -1
- data/lib/ish_manager.rb +2 -0
- data/lib/ish_manager/version.rb +1 -1
- metadata +80 -1
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
.title
|
3
|
+
%h5
|
4
|
+
.btn-group
|
5
|
+
%a{ 'data-toggle' => 'dropdown', :class => 'btn dropdown-toggle' }
|
6
|
+
= t('galleries.list')
|
7
|
+
%span.caret
|
8
|
+
%ul.dropdown-menu
|
9
|
+
%li= link_to 'Add New', new_manager_gallery_path
|
10
|
+
%li= link_to 'Public', :action => :index, :public => '1'
|
11
|
+
%li= link_to 'Nonpublic', :action => :index, :public => '0'
|
12
|
+
%li= link_to 'Done', :action => :index, :done => '1'
|
13
|
+
%li= link_to 'Nondone', :action => :index, :done => '0'
|
14
|
+
%li= link_to 'Trash', :action => :index, :is_trash => '1'
|
15
|
+
%li= link_to 'Fullindex', manager_galleries_fullindex_path
|
16
|
+
%li= link_to 'Paginated', manager_galleries_path
|
17
|
+
%li= link_to 'Short List', :action => :index, :short_list => true
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
.row
|
3
|
+
.large-12.columns
|
4
|
+
%h1
|
5
|
+
= t('galleries.edit')
|
6
|
+
= link_to @gallery.name, manager_gallery_path( @gallery )
|
7
|
+
(#{@gallery.photos.count})
|
8
|
+
|
9
|
+
= render 'manager/galleries/form', :gallery => @gallery, :url => manager_gallery_path( @gallery )
|
10
|
+
= render 'manager/galleries/thumbs', :gallery => @gallery
|
11
|
+
= render 'manager/photos/multinew', :gallery => @gallery
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
- content_for :title do
|
3
|
+
Manager Galleries Index
|
4
|
+
|
5
|
+
- content_for :menu do
|
6
|
+
- # nothing
|
7
|
+
|
8
|
+
.container
|
9
|
+
.row
|
10
|
+
.col-xs-6
|
11
|
+
%h4
|
12
|
+
= t('galleries.list')
|
13
|
+
= link_to '[+]', new_gallery_path
|
14
|
+
.col-xs-6= render 'search'
|
15
|
+
.row
|
16
|
+
.lcol-xs-12
|
17
|
+
-# = render 'ish_manager/galleries/menu_secondary'
|
18
|
+
= render 'ish_manager/galleries/list', :galleries => @galleries
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
%h2
|
4
|
+
= link_to 'Galleries', manager_galleries_path
|
5
|
+
= link_to '[+]', new_manager_gallery_path
|
6
|
+
|
7
|
+
.as
|
8
|
+
- @galleries.each do |g|
|
9
|
+
.clear
|
10
|
+
.a
|
11
|
+
= link_to '[~]', edit_manager_gallery_path(g)
|
12
|
+
= link_to g.name, manager_gallery_path(g.id)
|
13
|
+
= link_to '[+]', new_photo_path( :galleryname => g.galleryname )
|
14
|
+
= link_to '[++]', add_photos_path(g.id)
|
15
|
+
.float-right= button_to '[x]', manager_gallery_path(g), :method => :delete
|
16
|
+
|
17
|
+
.clear
|
18
|
+
= paginate @galleries, :param_name => :galleries_page
|
19
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.row
|
3
|
+
.large-12.columns
|
4
|
+
%h1 Manager Galleries List
|
5
|
+
|
6
|
+
= paginate @galleries, :param_name => :galleries_page
|
7
|
+
%ul
|
8
|
+
- @galleries.each do |gallery|
|
9
|
+
%li
|
10
|
+
= link_to '[~]', edit_manager_gallery_path( gallery )
|
11
|
+
= link_to gallery.name, manager_gallery_path( gallery )
|
12
|
+
%br
|
13
|
+
- gallery.photos.each_with_index do |photo, idx|
|
14
|
+
- if idx < 8
|
15
|
+
= image_tag photo.photo.url :thumb
|
16
|
+
= paginate @galleries, :param_name => :galleries_page
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
.row
|
3
|
+
.large-12.columns
|
4
|
+
%h1 Titled Galleries
|
5
|
+
|
6
|
+
%ul
|
7
|
+
- @galleries.each do |gallery|
|
8
|
+
%li
|
9
|
+
%h4= link_to gallery.name, manager_gallery_path(gallery)
|
10
|
+
%span
|
11
|
+
= link_to '[~]', edit_manager_gallery_path( gallery )
|
12
|
+
= link_to '[x]', manager_gallery_path( gallery ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
13
|
+
= is_public_image_tag( gallery )
|
14
|
+
<i>#{gallery.created_at.to_s.slice(0, 10)}</i>
|
15
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
%ol.galleries-index
|
3
|
+
- @galleries.each do |g|
|
4
|
+
%li
|
5
|
+
= link_to '[~]', edit_manager_gallery_path( g )
|
6
|
+
= link_to g.name, manager_gallery_path( g.galleryname )
|
7
|
+
= link_to '[+]', new_photo_path( :galleryname => g.galleryname )
|
8
|
+
= link_to '[++]', add_photos_path( g.id )
|
9
|
+
.delete= button_to '[x]', manager_gallery_path( g.galleryname ), :method => :delete
|
10
|
+
.site= g.site.domain unless g.site.blank?
|
11
|
+
.tag= g.tag.name unless g.tag.blank?
|
12
|
+
|
13
|
+
%br
|
14
|
+
- g.photos.fresh.each_with_index do |ph, idx|
|
15
|
+
- break if idx == Photo.n_per_manager_gallery - 1
|
16
|
+
= link_to image_tag( ph.photo.url( :mini ), :alt => '' ), ph.photo.url(:large), :rel => "lightbox[#{g.galleryname}]"
|
17
|
+
|
18
|
+
.c
|
19
|
+
- unless params[:fullindex]
|
20
|
+
= paginate @galleries, :param_name => :galleries_page
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
.row
|
3
|
+
.col-xs-12
|
4
|
+
.center
|
5
|
+
Gallery
|
6
|
+
%h2
|
7
|
+
#{@gallery.name} (#{@photos.length})
|
8
|
+
= link_to '[~]', edit_gallery_path( @gallery )
|
9
|
+
[x]
|
10
|
+
= @gallery.galleryname
|
11
|
+
= render 'meta', :gallery => @gallery
|
12
|
+
|
13
|
+
.row
|
14
|
+
%ul
|
15
|
+
- @photos.each do |photo|
|
16
|
+
%li.col-xs-1= image_tag photo.photo.url( :mini ), :alt => ''
|
17
|
+
|
18
|
+
.spacer{ :style => 'height: 500px' }
|
19
|
+
|
20
|
+
.row
|
21
|
+
%ul
|
22
|
+
- @photos.each do |photo|
|
23
|
+
%li.col-xs-2
|
24
|
+
= link_to '[x]', photo_path( :id => photo.id ), :method => :delete, :confirm => 'Are you sure?'
|
25
|
+
%br
|
26
|
+
= image_tag photo.photo.url( :thumb ), :alt => ''
|
27
|
+
|
28
|
+
.spacer{ :style => 'height: 500px' }
|
29
|
+
|
30
|
+
.center
|
31
|
+
%ol
|
32
|
+
- @photos.each do |photo|
|
33
|
+
%li.item
|
34
|
+
= image_tag photo.photo.url( :large ), :alt => ''
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
- if defined? site
|
3
|
+
- edit_url = ->(n) { edit_manager_site_newsitem_path( site, n ) }
|
4
|
+
- delete_url = ->(n) { manager_site_newsitem_path( site, n ) }
|
5
|
+
- if defined? city
|
6
|
+
- edit_url = ->(n) { edit_manager_city_newsitem_path( city, n ) }
|
7
|
+
- delete_url = ->(n) { manager_city_newsitem_path( city, n ) }
|
8
|
+
|
9
|
+
.row
|
10
|
+
.small-12.columns
|
11
|
+
%h2 Newsitems (#{newsitems.count})
|
12
|
+
%ul
|
13
|
+
- newsitems.each do |n|
|
14
|
+
%li
|
15
|
+
= link_to '[~]', edit_url.call( n )
|
16
|
+
= link_to '[x]', delete_url.call( n ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
17
|
+
= n.name
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
- n ||= newsitem
|
3
|
+
|
4
|
+
- if !n.photo.blank?
|
5
|
+
.Nphoto.panel
|
6
|
+
.the-photo
|
7
|
+
- if n.photo.gallery.blank?
|
8
|
+
= link_to image_tag( n.photo.photo.url(:small) ), n.photo.photo.url(:large), :rel => 'lightbox[newsitem]'
|
9
|
+
- else
|
10
|
+
= link_to image_tag( n.photo.photo.url(:small) ), gallery_path( n.photo.gallery.galleryname, n.photo.gallery.photos.index(n.photo) )
|
11
|
+
.meta= render 'photos/meta', :photo => n.photo
|
12
|
+
|
13
|
+
- if !n.report.blank?
|
14
|
+
.Nreport
|
15
|
+
%h3= link_to n.report.name, report_path(n.report.name_seo)
|
16
|
+
.meta
|
17
|
+
New Report on #{pretty_date n.report.created_at} by #{n.report.username}
|
18
|
+
- unless n.report.photo.blank?
|
19
|
+
.thumb= link_to image_tag(n.report.photo.photo.url(:thumb), :alt => ''), report_path( n.report.name_seo )
|
20
|
+
.subhead= n.report.subhead
|
21
|
+
.c
|
22
|
+
|
23
|
+
- if !n.gallery.blank?
|
24
|
+
.Ngallery
|
25
|
+
%h3= link_to n.gallery.name, gallery_path(n.gallery.galleryname, 0)
|
26
|
+
.meta
|
27
|
+
#{t('newsitems.new_gallery', :username => n.gallery.username, :date => pretty_date(n.gallery.created_at))}
|
28
|
+
- unless n.gallery.city.blank?
|
29
|
+
= t('cities.in')
|
30
|
+
= link_to n.gallery.city.name, city_path(n.gallery.city.cityname, :lang => :en)
|
31
|
+
- unless n.gallery.tag.blank?
|
32
|
+
= t('tags.in')
|
33
|
+
= link_to n.gallery.tag.name, tag_path(n.gallery.tag.name_seo)
|
34
|
+
- unless 0 == n.gallery.photos.length
|
35
|
+
- n.gallery.photos.where( :is_trash => false )[0...8].each do |photo|
|
36
|
+
= link_to image_tag( photo.photo.url(:thumb), :alt => photo.name ), photo.photo.url(:small), :rel => "lightbox[#{n.gallery.galleryname}]"
|
37
|
+
-# .subhead= n.descr
|
38
|
+
.c
|
39
|
+
|
40
|
+
- if !n.video.blank?
|
41
|
+
.Nvideo
|
42
|
+
%h3
|
43
|
+
= link_to (n.video.name.blank? ? t('videos.no_title') : n.video.name), video_path(n.video.youtube_id)
|
44
|
+
= render 'application/meta', :item => n.video
|
45
|
+
= render 'videos/embed_half', :video => n.video
|
46
|
+
.c
|
47
|
+
|
48
|
+
- if !n.descr.blank? && n.gallery.blank? && n.report.blank?
|
49
|
+
.Ndescr.panel
|
50
|
+
.meta= pretty_date n.created_at
|
51
|
+
.subhead= simple_format n.descr
|
52
|
+
.c
|
53
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
- if defined? @city
|
3
|
+
- url = manager_city_newsitem_path( @city, @newsitem ) if @city
|
4
|
+
- if defined? @site
|
5
|
+
- url = manager_site_newsitem_path( @site, @newsitem ) if @site
|
6
|
+
|
7
|
+
.row
|
8
|
+
.small-12.columns
|
9
|
+
%h1 Edit this newsitem
|
10
|
+
For site: #{@sity} <br />
|
11
|
+
city: #{@city} <br />
|
12
|
+
id: #{@newsitem.id}
|
13
|
+
|
14
|
+
= render 'form', :newsitem => @newsitem, :url => url
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
- if @city
|
3
|
+
- url = manager_city_newsitems_path( :city_id => @city.id )
|
4
|
+
- if @site
|
5
|
+
- url = manager_site_newsitems_path( :site_id => @site.id )
|
6
|
+
|
7
|
+
.row
|
8
|
+
.small-12.columns
|
9
|
+
%h1
|
10
|
+
New Newsitem
|
11
|
+
- if @site
|
12
|
+
For Site #{@site.domain}
|
13
|
+
- if @city
|
14
|
+
For City #{@city.name}
|
15
|
+
= render 'form', :newsitem => @newsitem, :url => url
|
16
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
.photos-meta.row
|
3
|
+
.meta
|
4
|
+
On #{ pretty_date photo.created_at }
|
5
|
+
- unless photo.user.blank?
|
6
|
+
By #{ link_to photo.user.username, user_path(photo.user.username) }
|
7
|
+
- unless photo.gallery.blank?
|
8
|
+
In #{ link_to photo.gallery.name, gallery_path(photo.gallery.galleryname, 0) }
|
9
|
+
= photo.name unless photo.name.blank?
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
.photos--multinew
|
3
|
+
.row
|
4
|
+
.small-12.columns
|
5
|
+
%h3.center Add Photos
|
6
|
+
%ul{ :id => 'photos', :class => 'thumbnails', 'data-json-url' => manager_j_gallery_path( gallery.id ) }
|
7
|
+
%input{ :id => 'fileupload', :type => 'file', :name => 'photo[photo]', 'data-url' => manager_photos_multiadd_path( gallery.galleryname ), :multiple => '' }
|
8
|
+
|
9
|
+
%script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"}
|
10
|
+
%script{:src => "/js/jquery.ui.widget.js"}
|
11
|
+
%script{:src => "/js/jquery.iframe-transport.js"}
|
12
|
+
%script{:src => "/js/jquery.fileupload.js"}
|
13
|
+
:javascript
|
14
|
+
$(function () {
|
15
|
+
$('#fileupload').fileupload({
|
16
|
+
dataType: 'json',
|
17
|
+
done: function (e, data) {
|
18
|
+
$.each(data.result.files, function (index, file) {
|
19
|
+
$('<p/>').text(file.name).appendTo(document.body);
|
20
|
+
});
|
21
|
+
}
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
- url ||= manager_reports_path
|
3
|
+
= form_for @report, :url => url, :html => { :multipart => true } do |f|
|
4
|
+
|
5
|
+
- if @report.errors.any?
|
6
|
+
#error_explanation
|
7
|
+
%h3= t('e.there_are_errors')
|
8
|
+
|
9
|
+
%ul
|
10
|
+
- @report.errors.full_messages.each do |msg|
|
11
|
+
%li= msg
|
12
|
+
|
13
|
+
.name= f.text_field :name
|
14
|
+
.subhead= f.text_area :subhead
|
15
|
+
.descr= f.text_area :descr, :class => 'tinymce'
|
16
|
+
|
17
|
+
.row
|
18
|
+
.large-6.columns
|
19
|
+
= f.label :city_id
|
20
|
+
= select :report, :city_id, @cities_list
|
21
|
+
|
22
|
+
= f.label :coords
|
23
|
+
= f.text_field :x
|
24
|
+
= f.text_field :y
|
25
|
+
|
26
|
+
= f.label :site
|
27
|
+
= select :report, :site_id, @sites_list
|
28
|
+
|
29
|
+
.large-6.columns
|
30
|
+
= f.label :tag_id
|
31
|
+
= select :report, :tag_id, @tags_list
|
32
|
+
|
33
|
+
.check
|
34
|
+
= f.label :is_public
|
35
|
+
= f.check_box :is_public
|
36
|
+
|
37
|
+
= f.file_field :photo
|
38
|
+
|
39
|
+
= recaptcha_tags
|
40
|
+
|
41
|
+
= f.submit
|
42
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.manager-reports--index
|
3
|
+
.row
|
4
|
+
.large-12.columns
|
5
|
+
%h2 Reports (#{reports.length})
|
6
|
+
|
7
|
+
= paginate reports, :param_name => :reports_page
|
8
|
+
%ol
|
9
|
+
- reports.each do |report|
|
10
|
+
%li
|
11
|
+
= link_to '[~]', edit_manager_report_path( report )
|
12
|
+
= link_to '[x]', manager_report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
13
|
+
= link_to report.name, manager_report_path( report )
|
14
|
+
- if report.subhead && report.subhead.length > 3
|
15
|
+
.subhead= report.subhead
|
16
|
+
= paginate reports, :param_name => :reports_page
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
.row
|
3
|
+
.large-12.columns
|
4
|
+
%h3
|
5
|
+
Reports Index (#{@reports.length})
|
6
|
+
- if @site
|
7
|
+
In #{@site.domain}/#{@site.lang}
|
8
|
+
= paginate @reports, :param_name => :reports_page
|
9
|
+
|
10
|
+
%ol
|
11
|
+
- @reports.each do |report|
|
12
|
+
%li
|
13
|
+
= link_to '[~]', edit_report_path( report )
|
14
|
+
= link_to '[x]', report_path( report ), :method => :delete, :data => { :confirm => 'Are you sure?' }
|
15
|
+
- if report.is_public
|
16
|
+
[public ]
|
17
|
+
- else
|
18
|
+
[private]
|
19
|
+
= link_to report.name, report_path( report )
|
20
|
+
%br
|
21
|
+
.gray
|
22
|
+
- if report.site
|
23
|
+
Site #{report.site.domain}/#{report.site.lang}
|
24
|
+
|
25
|
+
= paginate @reports, :param_name => :reports_page
|
26
|
+
|