File tree Expand file tree Collapse file tree 5 files changed +66
-0
lines changed Expand file tree Collapse file tree 5 files changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ class SmashTagsController < ApplicationController
2
+
3
+ before_action :find_project_by_project_id
4
+ before_action :authorize
5
+
6
+ accept_api_auth :index
7
+
8
+ def index
9
+ example = [ {
10
+ sectionname : "[GTT] Task note" ,
11
+ sectiondescription : "GTT task with image" ,
12
+ sectionnicon : "image" ,
13
+ forms : [
14
+ {
15
+ formname : "Take a photo" ,
16
+ formitems : [
17
+ {
18
+ key : "title" ,
19
+ islabel : "true" ,
20
+ value : "" ,
21
+ icon : "infoCircle" ,
22
+ type : "string" ,
23
+ mandatory : "yes"
24
+ }
25
+ ]
26
+ }
27
+ ]
28
+ } ]
29
+ respond_to do |format |
30
+ format . api { render json : example }
31
+ end
32
+ end
33
+ end
Original file line number Diff line number Diff line change
1
+ # English strings go here for Rails i18n
2
+ en :
3
+ # my_label: "My label"
Original file line number Diff line number Diff line change
1
+ # Plugin's routes
2
+ # See: http://guides.rubyonrails.org/routing.html
3
+
4
+ scope 'projects/:project_id' do
5
+ resources :smash_tags , only : %i( index ) , as : :project_smash_tags
6
+ end
Original file line number Diff line number Diff line change
1
+ require 'redmine'
2
+
3
+ Redmine ::Plugin . register :redmine_gtt_smash do
4
+ name 'Redmine GTT SMASH Plugin'
5
+ author 'Georepublic'
6
+ description 'Adds SMASH integration capabilities for GTT projects'
7
+ version '0.0.1'
8
+ url 'https://github.com/gtt-project/redmine_gtt_smash'
9
+ author_url 'https://github.com/gtt-project'
10
+
11
+ requires_redmine :version_or_higher => '4.0.0'
12
+
13
+ # settings default: {
14
+ # }, partial: 'settings/gtt_smash_settings'
15
+
16
+ project_module :gtt_smash do
17
+ permission :view_gtt_smash , {
18
+ smash_tags : %i( index )
19
+ } , require : :member , read : true
20
+ end
21
+
22
+ end
Original file line number Diff line number Diff line change
1
+ # Load the Redmine helper
2
+ require File . expand_path ( File . dirname ( __FILE__ ) + '/../../../test/test_helper' )
You can’t perform that action at this time.
0 commit comments