+++ /dev/null
-#コモンライセンス
-class CommonLicensesController < ApplicationController
- layout 'test' if Pettanr::TestLayout
- before_filter :authenticate_user!, :only => [:index, :show]
- before_filter :authenticate_admin!, :only => [:list, :browse, :import, :destroy]
-
- private
-
- def set_data(file)
- if file.respond_to?(:read)
- file.read
- else
- file
- end
- end
-
- public
-
- # GET /common_licenses
- # GET /common_licenses.json
- def index
- @page = CommonLicense.page params[:page]
- @page_size = CommonLicense.page_size params[:page_size]
- @common_licenses = CommonLicense.list({}, @page, @page_size)
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @common_licenses.to_json(CommonLicense.list_json_opt) }
- end
- end
-
- # GET /common_licenses/1
- # GET /common_licenses/1.json
- def show
- @common_license = CommonLicense.show(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @common_license.to_json(CommonLicense.show_json_include_opt) }
- end
- end
-
- def list
- @common_licenses = CommonLicense.all
-
- respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @common_licenses }
- end
- end
-
- def browse
- @common_license = CommonLicense.find(params[:id])
-
- respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @common_license }
- end
- end
-
- # POST /common_licenses
- # POST /common_licenses.json
- def import
- @data = set_data params[:file]
- respond_to do |format|
- @errors = CommonLicense.import @data
- if @errors and @errors.empty?
- format.html { redirect_to :action => :list }
- format.json { render text: 'ok', status: :created }
- else
- #@errorsがNILならJson展開できない全体異常
- format.html { render action: "result" }
- format.json { render json: @errors, status: :unprocessable_entity }
- end
- end
- end
-
- # DELETE /common_licenses/1
- # DELETE /common_licenses/1.json
- def destroy
- @common_license = CommonLicense.find(params[:id])
- @common_license.destroy
-
- respond_to do |format|
- format.html { redirect_to common_licenses_url }
- format.json { head :ok }
- end
- end
-end
+++ /dev/null
-class HelpController < ApplicationController
-
-end
+++ /dev/null
-class OriginalLicensesController < ApplicationController
- layout 'test' if Pettanr::TestLayout
- before_filter :authenticate_admin!, :only => [:list, :browse, :new, :edit, :create, :update, :destroy, :import]
-
- private
-
- def set_data(file)
- if file.respond_to?(:read)
- file.read
- else
- file
- end
- end
-
- public
-
- # GET /original_licenses
- # GET /original_licenses.json
- def index
- @page = OriginalLicense.page params[:page]
- @page_size = OriginalLicense.page_size params[:page_size]
- @original_licenses = OriginalLicense.list({}, @page, @page_size)
-
- respond_to do |format|
- format.html # index.html.erb
- format.json { render json: @original_licenses.to_json(OriginalLicense.list_json_opt) }
- end
- end
-
- # GET /original_licenses/1
- # GET /original_licenses/1.json
- def show
- @original_license = OriginalLicense.show(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.json { render json: @original_license.to_json(OriginalLicense.show_json_include_opt) }
- end
- end
-
- def list
- @original_licenses = OriginalLicense.all
-
- respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @original_licenses }
- end
- end
-
- def browse
- @original_license = OriginalLicense.find(params[:id])
-
- respond_to do |format|
- format.html { render layout: 'system' }
- format.json { render json: @original_license }
- end
- end
-
- # GET /original_licenses/new
- # GET /original_licenses/new.json
- def new
- @original_license = OriginalLicense.new
- @original_license.supply_default
- respond_to do |format|
- format.html # new.html.erb
- format.js
- format.json { render json: @original_license }
- end
- end
-
- # GET /original_licenses/1/edit
- def edit
- @original_license = OriginalLicense.show(params[:id])
- respond_to do |format|
- format.html
- format.js
- end
- end
-
- # POST /original_licenses
- # POST /original_licenses.json
- def create
- @original_license = OriginalLicense.new
- @original_license.supply_default
- @original_license.attributes = params[:original_license]
- respond_to do |format|
- if @original_license.store
- format.html { redirect_to @original_license, notice: 'Original license was successfully created.' }
- format.json { render json: @original_license, status: :created, location: @original_license }
- else
- format.html { render action: "new" }
- format.json { render json: @original_license.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # PUT /original_licenses/1
- # PUT /original_licenses/1.json
- def update
- @original_license = OriginalLicense.show(params[:id])
- @original_license.attributes = params[:original_license]
-
- respond_to do |format|
- if @original_license.store
- format.html { redirect_to @original_license, notice: 'Original license was successfully updated.' }
- format.json { head :ok }
- else
- format.html { render action: "edit" }
- format.json { render json: @original_license.errors, status: :unprocessable_entity }
- end
- end
- end
-
- # DELETE /original_licenses/1
- # DELETE /original_licenses/1.json
- def destroy
- @original_license = OriginalLicense.find(params[:id])
- @original_license.destroy
-
- respond_to do |format|
- format.html { redirect_to original_licenses_url }
- format.json { head :ok }
- end
- end
-
- def import
- @data = set_data params[:file]
- respond_to do |format|
- @errors = OriginalLicense.import @data
- if @errors and @errors.empty?
- format.html { redirect_to :action => :list }
- format.json { render text: 'ok', status: :created }
- else
- format.html { render action: "result" }
- format.json { render json: @errors, status: :unprocessable_entity }
- end
- end
- end
-
-end
+++ /dev/null
-class ResourcePictureLicenseController < ApplicationController
-end
+++ /dev/null
-module CommonLicensesHelper
-end
+++ /dev/null
-module HelpHelper
-end
+++ /dev/null
-module OriginalLicensesHelper
-end
+++ /dev/null
-module ResourcePictureLicenseHelper
-end
+++ /dev/null
-#コモンライセンス
-class CommonLicense < ActiveRecord::Base
- belongs_to :license
-
- validates :name, :presence => true, :length => {:maximum => 50}
- validates :url, :presence => true, :length => {:maximum => 200}, :uniqueness => true
- validates :license_id, :presence => true, :numericality => true, :existence => true
-
- def self.default_page_size
- 25
- end
-
- def self.max_page_size
- 100
- end
-
- def self.page prm = nil
- page = prm.to_i
- page = 1 if page < 1
- page
- end
-
- def self.page_size prm = self.default_page_size
- page_size = prm.to_i
- page_size = self.max_page_size if page_size > self.max_page_size
- page_size = self.default_page_size if page_size < 1
- page_size
- end
-
- def self.list opt = {}, page = 1, page_size = self.default_page_size
- opt.merge!(self.list_opt) unless opt[:include]
- opt.merge!({
- :order => 'name', :limit => page_size, :offset => (page -1) * page_size}
- )
- CommonLicense.find(:all, opt)
- end
-
- def self.list_opt
- {:include => [:license]}
- end
-
- def self.list_json_opt
- {:include => [:license]}
- end
-
- def self.show cid, opt = {}
- cl = CommonLicense.find(cid, :include => self.show_include_opt(opt))
-# raise ActiveRecord::Forbidden unless pic.own?(author)
- cl
- end
-
- def self.show_include_opt opt = {}
- res = [:license]
- res.push(opt[:include]) if opt[:include]
- res
- end
-
- def self.show_json_include_opt
- {:include => [:license]}
- end
-
- def self.update_common_license data
- if r = CommonLicense.find_by_url(data[:url])
- r.attributes = data
- else
- r = CommonLicense.new data
- end
- r
- end
-
- def store
- res = nil
- CommonLicense.transaction do
- l = License.update_license self
- if res = l.save
- self.license_id = l.id
- res = self.save
- raise ActiveRecord::Rollback unless res
- else
- raise ActiveRecord::Rollback
- end
- end
- res
- end
-
- def self.store params
- cl = CommonLicense.update_common_license params
- cl.store
- cl
- end
-
- def self.each_license data
- data = [data] if data.is_a?(Hash)
- data.each do |d|
- yield d
- end
- end
-
- def self.parse(data)
- res = data
- begin
- res = JSON.parse(data) if data.is_a?(String)
- rescue
- return false
- end
- res
- end
-
- def self.import(data)
- d = CommonLicense.parse(data)
- return false unless d
- res = []
- CommonLicense.transaction do
- CommonLicense.each_license(d) do |lch|
- cl = CommonLicense.store lch
- res.push(cl) unless cl.valid?
- end
- raise ActiveRecord::Rollback unless res.empty?
- end
- res
- end
-
- def self.import_file(filename)
- t = nil
- begin
- t = File.open(filename, 'r').read
- rescue
- return false
- end
- CommonLicense.import t
- end
-
- def import_error_message(c = '\n')
- self.errors.each do |atr, messages|
- if atr == :base
- end
- full_messages.join c
- end
- end
-
-end
+++ /dev/null
-#オリジナルライセンス
-class OriginalLicense < ActiveRecord::Base
- belongs_to :license
-
- validates :name, :presence => true, :length => {:maximum => 50}
- validates :url, :presence => true, :length => {:maximum => 200}, :uniqueness => true
- validates :license_id, :presence => true, :numericality => true, :existence => true
-
- def supply_default
-
- end
-
- def self.default_page_size
- 25
- end
-
- def self.max_page_size
- 100
- end
-
- def self.page prm = nil
- page = prm.to_i
- page = 1 if page < 1
- page
- end
-
- def self.page_size prm = self.default_page_size
- page_size = prm.to_i
- page_size = self.max_page_size if page_size > self.max_page_size
- page_size = self.default_page_size if page_size < 1
- page_size
- end
-
- def self.list opt = {}, page = 1, page_size = self.default_page_size
- opt.merge!(self.list_opt) unless opt[:include]
- opt.merge!({
- :order => 'name', :limit => page_size, :offset => (page -1) * page_size}
- )
- OriginalLicense.find(:all, opt)
- end
-
- def self.list_opt
- {:include => [:license]}
- end
-
- def self.list_json_opt
- {:include => [:license]}
- end
-
- def self.show cid, opt = {}
- ol = OriginalLicense.find(cid, :include => self.show_include_opt(opt))
-# raise ActiveRecord::Forbidden unless pic.own?(author)
- ol
- end
-
- def self.show_include_opt opt = {}
- res = [:license]
- res.push(opt[:include]) if opt[:include]
- res
- end
-
- def self.show_json_include_opt
- {:include => [:license]}
- end
-
- def self.update_original_license data
- if r = OriginalLicense.find_by_url(data[:url])
- r.attributes = data
- else
- r = OriginalLicense.new data
- end
- r
- end
-
- def store
- res = nil
- OriginalLicense.transaction do
- l = License.update_license self
- if res = l.save
- self.license_id = l.id
- res = self.save
- raise ActiveRecord::Rollback unless res
- else
- raise ActiveRecord::Rollback
- end
- end
- res
- end
-
- def self.store params
- cl = OriginalLicense.update_original_license params
- cl.store
- cl
- end
-
- def self.each_license data
- data = [data] if data.is_a?(Hash)
- data.each do |d|
- yield d
- end
- end
-
- def self.parse(data)
- res = data
- begin
- res = JSON.parse(data) if data.is_a?(String)
- rescue
- return false
- end
- res
- end
-
- def self.import(data)
- d = OriginalLicense.parse(data)
- return false unless d
- res = []
- OriginalLicense.transaction do
- OriginalLicense.each_license(d) do |lch|
- ol = OriginalLicense.store lch
- res.push(ol) unless ol.valid?
- end
- raise ActiveRecord::Rollback unless res.empty?
- end
- res
- end
-
- def self.import_file(filename)
- t = nil
- begin
- t = File.open(filename, 'r').read
- rescue
- return false
- end
- OriginalLicense.import t
- end
-
-end
+++ /dev/null
-class ResourcePictureLicense < ActiveRecord::Base
-end
+++ /dev/null
-<%= form_for(@common_license) do |f| %>
- <% if @common_license.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@common_license.errors.count, "error") %> prohibited this common_license from being saved:</h2>
-
- <ul>
- <% @common_license.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :url %><br />
- <%= f.text_field :url %>
- </div>
- <div class="field">
- <%= f.label :cc_by %><br />
- <%= f.check_box :cc_by %>
- </div>
- <div class="field">
- <%= f.label :cc_sa %><br />
- <%= f.check_box :cc_sa %>
- </div>
- <div class="field">
- <%= f.label :cc_nd %><br />
- <%= f.check_box :cc_nd %>
- </div>
- <div class="field">
- <%= f.label :cc_nc %><br />
- <%= f.check_box :cc_nc %>
- </div>
- <div class="field">
- <%= f.label :no_resize %><br />
- <%= f.check_box :no_resize %>
- </div>
- <div class="field">
- <%= f.label :no_flip %><br />
- <%= f.check_box :no_flip %>
- </div>
- <div class="field">
- <%= f.label :no_convert %><br />
- <%= f.check_box :no_convert %>
- </div>
- <div class="field">
- <%= f.label :keep_aspect_ratio %><br />
- <%= f.check_box :keep_aspect_ratio %>
- </div>
-
- <div class="actions">
- <%= f.submit %>
- </div>
-<% end %>
+++ /dev/null
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>name:</b>
- <%= h @common_license.name %>
-</p>
-
-<p>
- <b>url:</b>
- <%= h @common_license.url %>
-</p>
-
-<p>
- <b>cc_by:</b>
- <%= @common_license.cc_by %>
-</p>
-
-<p>
- <b>cc_sa:</b>
- <%= @common_license.cc_sa %>
-</p>
-
-<p>
- <b>cc_nd:</b>
- <%= @common_license.cc_nd %>
-</p>
-
-<p>
- <b>cc_nc:</b>
- <%= @common_license.cc_nc %>
-</p>
-
-<p>
- <b>no_resize:</b>
- <%= @common_license.no_resize %>
-</p>
-
-<p>
- <b>no_flip:</b>
- <%= @common_license.no_flip %>
-</p>
-
-<p>
- <b>no_convert:</b>
- <%= @common_license.no_convert %>
-</p>
-
-<p>
- <b>keep_aspect_ratio:</b>
- <%= @common_license.keep_aspect_ratio %>
-</p>
-
-<%= link_to 'Edit', edit_common_license_path(@common_license) %> |
-<%= link_to 'Back', :action => :list %>
+++ /dev/null
-<h1>Editing common_license</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', :controller => 'common_licenses', :action => :browse, :id => @common_license.id %> |
-<%= link_to 'Back', :action => :list %>
+++ /dev/null
-<h1>Listing common_licenses</h1>
-
-<table>
- <tr>
- <th>name</th>
- <th>url</th>
- <th>cc_by</th>
- <th>cc_sa</th>
- <th>cc_nd</th>
- <th>cc_nc</th>
- <th>no_resize</th>
- <th>no_flip</th>
- <th>no_convert</th>
- <th>keep_aspect_ratio</th>
- <th></th>
- <th></th>
- <th></th>
- </tr>
-
-<% @common_licenses.each do |common_license| %>
- <tr>
- <td><%= h common_license.name %></td>
- <td><%= h common_license.url %></td>
- <td><%= common_license.cc_by %></td>
- <td><%= common_license.cc_sa %></td>
- <td><%= common_license.cc_nd %></td>
- <td><%= common_license.cc_nc %></td>
- <td><%= common_license.no_resize %></td>
- <td><%= common_license.no_flip %></td>
- <td><%= common_license.no_convert %></td>
- <td><%= common_license.keep_aspect_ratio %></td>
- <td><%= link_to 'Show', common_license %></td>
- <td><%= link_to 'Edit', edit_common_license_path(common_license) %></td>
- <td><%= link_to 'Destroy', common_license, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New Common_license', new_common_license_path %>
+++ /dev/null
-<h1>Listing common_licenses</h1>
-
-<table>
- <tr>
- <th>id</th>
- <th>license_id</th>
- <th>name</th>
- <th>url</th>
- <th>cc_by</th>
- <th>cc_sa</th>
- <th>cc_nd</th>
- <th>cc_nc</th>
- <th>no_resize</th>
- <th>no_flip</th>
- <th>no_convert</th>
- <th>keep_aspect_ratio</th>
- <th>created_at</th>
- <th>updated_at</th>
- <th></th>
- <th></th>
- </tr>
-
-<% @common_licenses.each do |common_license| %>
- <tr>
- <td><%= link_to common_license.id, :action => :browse, :id => common_license.id %></td>
- <td><%= h common_license.name %></td>
- <td><%= h common_license.url %></td>
- <td><%= common_license.cc_by %></td>
- <td><%= common_license.cc_sa %></td>
- <td><%= common_license.cc_nd %></td>
- <td><%= common_license.cc_nc %></td>
- <td><%= common_license.no_resize %></td>
- <td><%= common_license.no_flip %></td>
- <td><%= common_license.no_convert %></td>
- <td><%= common_license.keep_aspect_ratio %></td>
- <td><%= common_license.created_at %></td>
- <td><%= common_license.updated_at %></td>
- <td><%= link_to 'Edit', edit_common_license_path(common_license) %></td>
- <td><%= link_to 'Destroy', common_license, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New Common_license', new_common_license_path %>
- <%= form_tag( {:action => "import"} , { :multipart => true }) do %>
- <label for="file">File to Upload</label> <%= file_field_tag "file" %>
- <%= submit_tag 'upload' -%>
- <% end -%>
+++ /dev/null
-<h1>New common_license</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Back', :action => :list %>
+++ /dev/null
-<table>
- <tr>
- <th>name</th>
- <th>message</th>
- </tr>
-<% @errors.each do |common_license| %>
- <td><%= h common_license.name %></td>
- <td><%= h common_license.import_error_message('<br>') %></td>
-<% end %>
-</table>
+++ /dev/null
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>name:</b>
- <%= h @common_license.name %>
-</p>
-
-<p>
- <b>url:</b>
- <%= h @common_license.url %>
-</p>
-
-<p>
- <b>cc_by:</b>
- <%= @common_license.cc_by %>
-</p>
-
-<p>
- <b>cc_sa:</b>
- <%= @common_license.cc_sa %>
-</p>
-
-<p>
- <b>cc_nd:</b>
- <%= @common_license.cc_nd %>
-</p>
-
-<p>
- <b>cc_nc:</b>
- <%= @common_license.cc_nc %>
-</p>
-
-<p>
- <b>no_resize:</b>
- <%= @common_license.no_resize %>
-</p>
-
-<p>
- <b>no_flip:</b>
- <%= @common_license.no_flip %>
-</p>
-
-<p>
- <b>no_convert:</b>
- <%= @common_license.no_convert %>
-</p>
-
-<p>
- <b>keep_aspect_ratio:</b>
- <%= @common_license.keep_aspect_ratio %>
-</p>
-
-<%= link_to 'Edit', edit_common_license_path(@common_license) %> |
-<%= link_to 'Back', licenses_path %>
+++ /dev/null
-<%= form_for(@original_license) do |f| %>
- <% if @original_license.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@original_license.errors.count, "error") %> prohibited this original_license from being saved:</h2>
-
- <ul>
- <% @original_license.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :url %><br />
- <%= f.text_field :url %>
- </div>
- <div class="field">
- <%= f.label :cc_by %><br />
- <%= f.check_box :cc_by %>
- </div>
- <div class="field">
- <%= f.label :cc_sa %><br />
- <%= f.check_box :cc_sa %>
- </div>
- <div class="field">
- <%= f.label :cc_nd %><br />
- <%= f.check_box :cc_nd %>
- </div>
- <div class="field">
- <%= f.label :cc_nc %><br />
- <%= f.check_box :cc_nc %>
- </div>
- <div class="field">
- <%= f.label :no_resize %><br />
- <%= f.check_box :no_resize %>
- </div>
- <div class="field">
- <%= f.label :no_flip %><br />
- <%= f.check_box :no_flip %>
- </div>
- <div class="field">
- <%= f.label :no_convert %><br />
- <%= f.check_box :no_convert %>
- </div>
- <div class="field">
- <%= f.label :keep_aspect_ratio %><br />
- <%= f.check_box :keep_aspect_ratio %>
- </div>
-
- <div class="actions">
- <%= f.submit %>
- </div>
-<% end %>
+++ /dev/null
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>name:</b>
- <%= h @original_license.name %>
-</p>
-
-<p>
- <b>url:</b>
- <%= h @original_license.url %>
-</p>
-
-<p>
- <b>artist:</b>
- <%= @original_license.artist_id %>
-</p>
-<p>
- <b>cc_by:</b>
- <%= @original_license.cc_by %>
-</p>
-
-<p>
- <b>cc_sa:</b>
- <%= @original_license.cc_sa %>
-</p>
-
-<p>
- <b>cc_nd:</b>
- <%= @original_license.cc_nd %>
-</p>
-
-<p>
- <b>cc_nc:</b>
- <%= @original_license.cc_nc %>
-</p>
-
-<p>
- <b>no_resize:</b>
- <%= @original_license.no_resize %>
-</p>
-
-<p>
- <b>no_flip:</b>
- <%= @original_license.no_flip %>
-</p>
-
-<p>
- <b>no_convert:</b>
- <%= @original_license.no_convert %>
-</p>
-
-<p>
- <b>keep_aspect_ratio:</b>
- <%= @original_license.keep_aspect_ratio %>
-</p>
-
-<%= link_to 'Back', :action => :list %>
+++ /dev/null
-<h1>Editing original_license</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Show', @original_license %> |
-<%= link_to 'Back', licenses_path %>
+++ /dev/null
-$("#uploader").html("<%= escape_javascript(render('ol')) -%>");
+++ /dev/null
-<h1>Listing original_licenses</h1>
-
-<table>
- <tr>
- <th>name</th>
- <th></th>
- <th></th>
- </tr>
-
-<% @original_licenses.each do |original_license| %>
- <tr>
- <td><%= link_to h(original_license.name), original_license %></td>
- <td><%= link_to 'Edit', edit_original_license_path(original_license) %></td>
- <td><%= link_to 'Destroy', original_license, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
-<br />
-
-<%= link_to 'New Original license', new_original_license_path %>
+++ /dev/null
-<h1>Listing original_licenses</h1>
-
-<%= form_tag( {:controller => 'original_licenses',:action => "import"} , { :multipart => true }) do %>
- <label for="file">File to Upload</label> <%= file_field_tag "file" %>
- <%= submit_tag 'upload' -%>
-<% end -%>
-<table>
- <tr>
- <th>id</th>
- <th>license_id</th>
- <th>name</th>
- <th>url</th>
- <th>cc_by</th>
- <th>cc_sa</th>
- <th>cc_nd</th>
- <th>cc_nc</th>
- <th>no_resize</th>
- <th>no_flip</th>
- <th>no_convert</th>
- <th>keep_aspect_ratio</th>
- <th>created_at</th>
- <th>updated_at</th>
- <th></th>
- <th></th>
- </tr>
-
-<% @original_licenses.each do |original_license| %>
- <tr>
- <td><%= link_to original_license.id, :action => :browse, :id => original_license.id %></td>
- <td><%= h original_license.name %></td>
- <td><%= h original_license.url %></td>
- <td><%= original_license.cc_by %></td>
- <td><%= original_license.cc_sa %></td>
- <td><%= original_license.cc_nd %></td>
- <td><%= original_license.cc_nc %></td>
- <td><%= original_license.no_resize %></td>
- <td><%= original_license.no_flip %></td>
- <td><%= original_license.no_convert %></td>
- <td><%= original_license.keep_aspect_ratio %></td>
- <td><%= original_license.created_at %></td>
- <td><%= original_license.updated_at %></td>
- <td><%= link_to 'Edit', edit_original_license_path(original_license) %></td>
- <td><%= link_to 'Destroy', original_license, confirm: 'Are you sure?', method: :delete %></td>
- </tr>
-<% end %>
-</table>
-
+++ /dev/null
-<h1>New original_license</h1>
-
-<%= render 'form' %>
-
-<%= link_to 'Back', licenses_path %>
+++ /dev/null
-$("#uploader").html("<%= escape_javascript(render('ol')) -%>");
+++ /dev/null
-<table>
- <tr>
- <th>name</th>
- <th>message</th>
- </tr>
-<% @errors.each do |original_license| %>
- <td><%= h original_license.name %></td>
- <td><%= h original_license.import_error_message('<br>') %></td>
-<% end %>
-</table>
+++ /dev/null
-<p id="notice"><%= notice %></p>
-
-<p>
- <b>name:</b>
- <%= h @original_license.name %>
-</p>
-
-<p>
- <b>url:</b>
- <%= h @original_license.url %>
-</p>
-
-<p>
- <b>cc_by:</b>
- <%= @original_license.cc_by %>
-</p>
-
-<p>
- <b>cc_sa:</b>
- <%= @original_license.cc_sa %>
-</p>
-
-<p>
- <b>cc_nd:</b>
- <%= @original_license.cc_nd %>
-</p>
-
-<p>
- <b>cc_nc:</b>
- <%= @original_license.cc_nc %>
-</p>
-
-<p>
- <b>no_resize:</b>
- <%= @original_license.no_resize %>
-</p>
-
-<p>
- <b>no_flip:</b>
- <%= @original_license.no_flip %>
-</p>
-
-<p>
- <b>no_convert:</b>
- <%= @original_license.no_convert %>
-</p>
-
-<p>
- <b>keep_aspect_ratio:</b>
- <%= @original_license.keep_aspect_ratio %>
-</p>
-
-<%= link_to 'Edit', edit_original_license_path(@original_license) %> |
-<%= link_to 'Back', original_licenses_path %>
get :browse
end
end
- resources :original_licenses do
- collection do
- get :index
- get :show
- get :new
- post :create
- post :import
- get :list
- get :browse
- end
- member do
- get :edit
- put :update
- delete :destroy
- end
- end
- resources :common_licenses do
- collection do
- get :index
- get :show
- post :import
- get :list
- get :browse
- end
- member do
- put :update
- delete :destroy
- end
- end
resources :system_pictures do
collection do
get :index
match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
match 'home/(:action)', :controller => 'home'
- match 'help/(:action)', :controller => 'help'
match 'system/(:action)', :controller => 'system'
match 'authors/(:action(/:id))', :controller => 'authors'
+++ /dev/null
-{\r
- "name": "Public Domain", \r
- "url": "http://ja.wikipedia.org/wiki/%E3%83%91%E3%83%96%E3%83%AA%E3%83%83%E3%82%AF%E3%83%89%E3%83%A1%E3%82%A4%E3%83%B3", \r
- "cc_by": 0, \r
- "cc_sa": 0, \r
- "cc_nd": 0, \r
- "cc_nc": 0, \r
- "no_resize": 0, \r
- "no_flip": 0, \r
- "no_convert": 0, \r
- "keep_aspect_ratio": 0\r
-}\r
+++ /dev/null
-{\r
- "PublicDomaina": {\r
- "classname": "PublicDomain", \r
- "caption": "Public Domain", \r
- "url": "http://test.com/",\r
- "licenses_attributes": {\r
- "PublicDomain": {\r
- "caption": "Public Domain", \r
- "url": "http://test.com/",\r
- "system_picture": "Data"\r
- }\r
- }\r
- },\r
- "Unknowna": {\r
- "classname": "Unknown", \r
- "caption": "Unknown owner", \r
- "url": "http://test.uk/",\r
- "licenses_attributes": {\r
- "UnknownF1": {\r
- "caption": "Unknown Flag1", \r
- "url": "http://test.com/f1",\r
- "system_picture": "Dataf1"\r
- },\r
- "UnknownF2": {\r
- "caption": "Unknown Flag2", \r
- "url": "http://test.com/f2",\r
- "system_picture": "Dataf2"\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-{\r
- "name": "Local ebi", \r
- "url": "http://eni.doc/", \r
- "cc_by": 0, \r
- "cc_sa": 0, \r
- "cc_nd": 0, \r
- "cc_nc": 0, \r
- "no_resize": 0, \r
- "no_flip": 0, \r
- "no_convert": 0, \r
- "keep_aspect_ratio": 0\r
-}\r
+++ /dev/null
-{\r
- "StandardLicense": {\r
- "classname": "StandardLicense", \r
- "caption": "Standard License", \r
- "url": "http://test.com/standard_license",\r
- "licenses_attributes": {\r
- "StandardLicenseA": {\r
- "caption": "Flag A", \r
- "url": "http://test.com/standard_license/a",\r
- "system_picture": "iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAIAAAAlV+npAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIYSURBVGhD7ZtNkoIwFIS5D+WOY7hxzw1ceQPdsfMSuvMO7ixvMseYAUMS8vJDEvLAqWrLjSUgfK+701RhdT7/4h1JoIrcDpv1BAArwViABVg8QUyV9X7+4C0I2DENWF5xAFaCbwALsHhyFsqCsqCszRsMbAgbwoawYYILAAuweCLjvyrruq/mX/t7mcvrWvFbu+Mr+oCvUy1PsL48Cg0vszp8OyzJVwA7dGXMngnLnPD9ME6xvRaaoXH8dGXRWRbS+FqwzFFXtjVulx0x9nCFEzdNv51xlhxe3chjlpniCrA8F1w1p9vojsexcSVgv0EWrIkSlcSKOJEdlgKh41mpTAhEacrQS68OSTPNhorvZ3fyW8tSghuWcoSxJMmBm9fjS5YkWBS9ye6rYalTN0EouQ3usNKKVoQUWLaQHdLORcasLJLrVjKJKHFnlnJlAiyXjtw2zykTzLDsNc7kNc1du7uNEouHFTeb6GZLgTLDesrMCjSdrqVLlbpmsRf56DfRfFVeVri4YU0sRk9UrneCxfRbIiWtl3Bd8ndjLfBFhYsdlrdYDoTM1ZAkmm4SikLwdi8kQN3XlhSuFWB9nO8KL33eVtZY98wmL0eDn8Gh15AF99VFYOWsLNkpu+GOgJUwacACrNyOHvY4lAVlQVkbroN48i/BgIDFAAt/DggQwHPweA5+nefgYUPYMMFrgAVYPMEEZZVR1h8aqGKZ0anY3gAAAABJRU5ErkJggg==",\r
- "settings": "{\"open\": 1, \"commercial\": 1, \"official\": 0, \"attribution\": 1, \"derive\": 1, \"thumbnail\": 1, \"gif_convert\": 1, \"reverse\": 1, \"resize\": 1, \"sync_vh\": 1, \"overlap\": 1}"\r
- },\r
- "StandardLicenseB": {\r
- "caption": "Flag B", \r
- "url": "http://test.com/standard_license/b",\r
- "system_picture": "iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAIAAAAlV+npAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAANFSURBVGhD7ZjPaxpBFMc3/Ssq2gbBQqF4C2hyKXpqITkIgge9JocaChIk3oynGkT2klzsVQ+BBQ8K6UnpoVXBmwiFBtKWFftftLM7sz/txnm7k4DNWzyo+31vZj7z3pu3u3V29kfCi4/AEz4ZqjQCCAsQBwgLYQEIAKRbrgL/5vVvgPV/Lf30+alrfZiGgA1HWAgLQAAgxchCWAACAClGFsICEABIMbIQFoAAQIqRhbAABABSjCyEBSAAkHK9dRg1Q6X+Oqf7nfFJep2I4/6knKy0iS5e/PoxG+Uw0CWG1ao+U1+eJnjd2HWP8a1DtxJKNgd+aK3YcNWs3ZPleGh+OhnmpSBbfy7FhFXwNb2qKeas6gXmry9fLYK7vqd38CQpUiHrc9xSXVNdtA7tAvJd2/zbq+MQzUFyzS73mIdVc86FJ94a+8ppsEbGFVmQoRwLZobzajZ1YO6tqhwkC9WZy6mgzfeY6svnYcgiPLSCYanKe3muDUXKM8tclgtT+YMeX4tW7XKqKez5MqSpHc1dLMdG7lgeLo4ivlaqKnJXN4wX3+368uAyEgtr0DFAVM2DLNGQ9/VB570vpHCo31lMRWM2BOnTYS8nYvMlLYpZBcjqkyGnIeBUvZOpUFiLmxs6mAOE9Gx7R/93+oOEVuRFnGr6eVqSDpVbEbvu6UM7DVOh84mAQYTCMqPGAEFx0B1mV/ioWqTs2MUKue8q7oLgyO6lYozVrZRHgXEJhWVGzZ3TimR7pJyx3DSV82rtHkIski0ZB+K3X4G7B6GwwrEYXTzp5u0tmPFd66QnZZoRVu9mVPTZT0c+un4GDgsBDoTCktJ5GvYkDd1N8+Dc6B68Wur4tvPhpn8dPHFGzTw9ECVJQPfA9Wzo3BSybDoD0sE3Vo5k0mft0e5h5doptXs5lT36ue+SWsNaBNO/IbFueUeH97OhbqMPDTxtH+DZUO+V2jV25NlWl6nr0000zE7KvKm1VFYzRdoI84lKQO7oNQFM6p8D+4gsEQvYBB8PEFmbgMHvHMUWeL+z2BA7hAXYKISFsAAEAFKMLIQFIACQYmQBYLmbUoDp45NiZAH2HGEhLAABgBQjC2EBCACkGFkIC0AAIP0Las1F1VY+UUMAAAAASUVORK5CYII=",\r
- "settings": "{\"open\": 1, \"commercial\": 1, \"official\": 0, \"attribution\": 1, \"derive\": 1, \"thumbnail\": 0, \"gif_convert\": 1, \"reverse\": 1, \"resize\": 1, \"sync_vh\": 1, \"overlap\": 1}"\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-require 'spec_helper'
-
-describe HelpController do
-
-end
+++ /dev/null
-require 'spec_helper'
-
-describe ResourcePictureLicenseController do
-
-end
+++ /dev/null
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the CommonLicensesHelper. For example:
-#
-# describe CommonLicensesHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-describe CommonLicensesHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
+++ /dev/null
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the HelpHelper. For example:
-#
-# describe HelpHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-describe HelpHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
+++ /dev/null
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the OriginalLicensesHelper. For example:
-#
-# describe OriginalLicensesHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-describe OriginalLicensesHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
+++ /dev/null
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the ResourcePictureLicenseHelper. For example:
-#
-# describe ResourcePictureLicenseHelper do
-# describe "string concat" do
-# it "concats two strings with spaces" do
-# helper.concat_strings("this","that").should == "this that"
-# end
-# end
-# end
-describe ResourcePictureLicenseHelper do
- pending "add some examples to (or delete) #{__FILE__}"
-end
+++ /dev/null
-require 'spec_helper'
-
-describe ResourcePictureLicense do
- pending "add some examples to (or delete) #{__FILE__}"
-end